Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection problem on domoticz 2023.1 15378 #8

Open
anno006 opened this issue Jul 7, 2023 · 19 comments
Open

connection problem on domoticz 2023.1 15378 #8

anno006 opened this issue Jul 7, 2023 · 19 comments

Comments

@anno006
Copy link

anno006 commented Jul 7, 2023

I have 2 sdm630. It did work fine last month. But now i can't get it working anymore, i stil get this error:
2023-07-07 23:28:48.093 Error: SDM630.2: Call to function 'onHeartbeat' failed, exception details:
2023-07-07 23:28:48.093 Error: SDM630.2: Traceback (most recent call last):
2023-07-07 23:28:48.093 Error: SDM630.2: File "/home/pi/domoticz/plugins/SDM630-Modbus/plugin.py", line 554, in onHeartbeat
2023-07-07 23:28:48.093 Error: SDM630.2: _plugin.onHeartbeat()
2023-07-07 23:28:48.093 Error: SDM630.2: File "/home/pi/domoticz/plugins/SDM630-Modbus/plugin.py", line 448, in onHeartbeat
2023-07-07 23:28:48.093 Error: SDM630.2: Domoticz.Log('Voltage L1: {0:.3f} V'.format(Volts_L1))
2023-07-07 23:28:48.093 Error: SDM630.2: UnboundLocalError: local variable 'Volts_L1' referenced before assignment

When the one is working the other won't and around, when the second is working the first is not.

@anno006 anno006 changed the title connection rpoblem on domoticz 2023.1 15378 connection problem on domoticz 2023.1 15378 Jul 7, 2023
@Roel6
Copy link

Roel6 commented Aug 31, 2023

I have more or less the same problem. What am I doing wrong?

2023-08-31 19:45:39.093 Error: MODBUS: Call to function 'onHeartbeat' failed, exception details:
2023-08-31 19:45:39.095 Error: MODBUS: Traceback (most recent call last):
2023-08-31 19:45:39.095 Error: MODBUS: File "/home/pi/domoticz/plugins/SDM630-Modbus/plugin.py", line 552, in onHeartbeat
2023-08-31 19:45:39.095 Error: MODBUS: _plugin.onHeartbeat()
2023-08-31 19:45:39.095 Error: MODBUS: File "/home/pi/domoticz/plugins/SDM630-Modbus/plugin.py", line 265, in onHeartbeat
2023-08-31 19:45:39.095 Error: MODBUS: Volts_L1 = self.rs485.read_float(0, functioncode=4, numberOfRegisters=2)
2023-08-31 19:45:39.095 Error: MODBUS: File "/home/pi/domoticz/plugins/SDM630-Modbus/minimalmodbus.py", line 392, in read_float
2023-08-31 19:45:39.095 Error: MODBUS: return self._genericCommand(functioncode, registeraddress, numberOfRegisters=numberOfRegisters, payloadformat='float')
2023-08-31 19:45:39.095 Error: MODBUS: File "/home/pi/domoticz/plugins/SDM630-Modbus/minimalmodbus.py", line 697, in _genericCommand
2023-08-31 19:45:39.096 Error: MODBUS: payloadFromSlave = self._performCommand(functioncode, payloadToSlave)
2023-08-31 19:45:39.096 Error: MODBUS: File "/home/pi/domoticz/plugins/SDM630-Modbus/minimalmodbus.py", line 798, in _performCommand
2023-08-31 19:45:39.096 Error: MODBUS: payloadFromSlave = _extractPayload(response, self.address, self.mode, functioncode)
2023-08-31 19:45:39.096 Error: MODBUS: File "/home/pi/domoticz/plugins/SDM630-Modbus/minimalmodbus.py", line 1075, in _extractPayload
2023-08-31 19:45:39.096 Error: MODBUS: raise ValueError(text)
2023-08-31 19:45:39.096 Error: MODBUS: ValueError: Checksum error in rtu mode: '\x1di' instead of ':]' . The response is: '\x7fßÿÿû\x1di' (plain response: '\x7fßÿÿû\x1di')

DOMOTICZ 2023.2
Python 3.9.2
minimalmodbus.py installed
running on raspberry pi 3b+
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

Thanks in advance

@porczek
Copy link

porczek commented Oct 19, 2023

Hi, info from Domoticz wiki page:
WARNING nov 2021: Raspberry Pi OS based on Bullseye is giving issues with Python plugins!! Please do not upgrade or use this version for fresh install (instead use Raspberry Pi OS Legacy, based on Buster)

@gizmocuz
Copy link

Tested with latest Domoticz (beta) and works correctly. Way to many devices 😁

@Roel6
Copy link

Roel6 commented Nov 20, 2023

still the same problems with the present DOMOTICZ beta version. aaahhhhhh
I also updated python but no results.
What am I doing wrong

@gizmocuz
Copy link

gizmocuz commented Nov 20, 2023

You can use my fork, this is working with the latest beta

https://github.com/gizmocuz/SDM630-Modbus

Hope to have to additional meters here this week to verify this.

@Roel6
Copy link

Roel6 commented Nov 20, 2023

Thanks,
I think it is a big step ahead.
I now have this warning " **** Connection problem ****" only and all parameters are 0.

@gizmocuz
Copy link

Your modbus address should not be 0, as well as the other settings, better check and correct them
Make sure you are on one of the later beta versions

@Roel6
Copy link

Roel6 commented Nov 21, 2023

DOMOTICZ 2023.2 (build 15658)
Python 3.9.2 showing in DOMOTICZ but upgraded to 3.9.15
minimalmodbus.py installed
running on raspberry pi 3b+
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)

It was working in previous version of Raspbian GNU/Linux and a older version of domoticz .
I had to upgrade LINUX to use a newer version of domoticz and then the trouble started.
I have several SDM630 installed
reading interval 2 minutes
baud-rate 9600 on all SDM630 devices and domoticz

image

For testing I now only use device with ID 4
All other devices (puls and smartmeter) devices are working.

Surgestion?

@Roel6
Copy link

Roel6 commented Nov 22, 2023

I installed phyton 3.11.4 (was 3.9.2) and now it is working again
!
!

@Roel6
Copy link

Roel6 commented Nov 22, 2023

https://stackoverflow.com/questions/76942052/raspberry-pi-cant-install-python-3-11

@gizmocuz
Copy link

gizmocuz commented Dec 7, 2023

Tested with 3 meters and working!

@Roel6
Copy link

Roel6 commented Dec 10, 2023

Tested with 5 SDM630 V2 (38k4 and 2 min intervals) and it is working.
The raspberry PI 3B is having a hard time

Thanks for the help

@gizmocuz
Copy link

Great to hear! What do you mean with 'The raspberry PI 3B is having a hard time' ?
I think we should rewrite this plugin... instead of the option to provide 1 modbus id, we should let the user enter a comma separate list
This way the plugin can scan all id's instead of doing a trial and error and timeout/reconnect stuff
Anyone want to be willing to give this a try?

@Roel6
Copy link

Roel6 commented Dec 11, 2023

DOMOTICZ WWW server is getting slow due to high CPU use (80% or more)
I like the separate modbus ID approach so that each SDM630 gets a different name.

@gizmocuz
Copy link

Do you have MQTT (not the auto discovery) enabled by any change?
If not, this plugin really needs updating

@Roel6
Copy link

Roel6 commented Dec 11, 2023

1702307042: mosquitto version 2.0.11 starting
1702307042: Using default config.
1702307042: Starting in local only mode. Connections will only be possible from clients running on this machine.
1702307042: Create a configuration file which defines a listener to allow remote access.
1702307042: For more details see https://mosquitto.org/documentation/authentication-methods/
1702307042: Opening ipv4 listen socket on port 1883.
1702307042: Error: Address already in use

It looks like MQTT is in use

@gizmocuz
Copy link

You should be able to see this in the hardware setup screen.
If you have a hardware named 'MQTT Client Gateway with LAN interface' then you do
In this case i think it is because of the amount of devices that are send to MQTT
Since the latest beta version you should have a 'setup' button here, if you press it, you can specify the devices you want to be published

@Roel6
Copy link

Roel6 commented Sep 15, 2024

After some time I see that the actual data from my SDM630 sensors is correct but the graphs are wrong.
The current and voltage data looks ok but the energy in the power graphs is wrong.
Any suggestions?
Modbus power

@gizmocuz
Copy link

Not sure what I see here...
Also not sure which version you are using, my fork with modifications (there where some changes 4 months ago), or the version from this project?
Best to make issues on the correct github page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants