MFxMF / SDM630-Modbus

SDM630-Modbus 3P4W Multifunction Power Analyser WithRS485 Port modbus RTU for the domoticz plugin
GNU General Public License v3.0
19 stars 16 forks source link

Domoticz crash after adding Hardware #6

Open Jordan87 opened 2 years ago

Jordan87 commented 2 years ago

Hi

Any idea why after adding Hardware Domoticz is crashing with your plugin? :) image

Only "sudo service domoticz.sh restart" is helping and fast disabling/removing SDM630 from HW list.

Thanks!

fritzlc commented 2 years ago

Hi, Do you have installed pyserial and minimalmodbus?

Jordan87 commented 2 years ago

Yes, pyserial and minimalmodbus were installed and updated, with: sudo apt-get install python-pip pip install pyserial pip install minimalmodbus

tomke2 commented 2 years ago

Hello. I have exactly the same problem. Raspberry Pi 3+. pyserial and minimalmodbus were installed

camell22 commented 1 year ago

taki sam problem

Jordan87 commented 1 year ago

At least HomeAssistant is working fine with my SDM630 ;)

camell22 commented 1 year ago

At least HomeAssistant is working fine with my SDM630 ;) I tried in HomeAssistant but there I can not catch you know maybe a movie how to install ???? what programs are needed for this????in HomeAssistant I do not know what where to copy paste ????? I'm just starting ????? counter I want to connect to USB

pt., 7 paź 2022 o 17:23 Jordan87 @.***> napisał(a):

At least HomeAssistant is working fine with my SDM630 ;)

— Reply to this email directly, view it on GitHub https://github.com/MFxMF/SDM630-Modbus/issues/6#issuecomment-1271736934, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3PK6VVJLOF3HLM5V2MJWH3WCA56JANCNFSM5SXP4HDA . You are receiving this because you commented.Message ID: @.***>

Jordan87 commented 1 year ago

You have many videos/manuals on youtube how to install HA, for example this for RaspberryPi https://www.youtube.com/watch?v=2F_JEuOeQL4 When you will have it working you need to edit one file and create different one and as i remember that's all for SDM630 I can share what needs to be added

PL Na youtube sa wideo instrukcje jak uruchomic HA np na RaspberryPi Trzeba edytowac plik konfiguracyjny i stworzyc inny z lista encji/czujników. Moge pozniej podzielic sie informacja co trzeba dodac.

edit I pisz prosze po angielsku, nawet z tlumacza, to jednak angielskie forum.

CreasolTech commented 1 year ago

Hi, I've just tried SDM630 plugin using raspberry, python3.9, domoticz beta (last beta 14559), pyserial installed by apt-get and minimalmodbus installed using pip3 install -U minimalmodbus. The serial adapter is ok, serial port is correct, rs485 connection ok, modbus address = 1 and baud rate 9600, as specified in the plugin, but I get the following errors:

2022-10-11 00:02:57.081 sdm: Connection problem 2022-10-11 00:02:57.081 sdm: Eastron SDM630 Modbus Data 2022-10-11 00:02:57.081 Error: sdm: Call to function 'onHeartbeat' failed, exception details: 2022-10-11 00:02:57.082 Error: sdm: Traceback (most recent call last): 2022-10-11 00:02:57.082 Error: sdm: File "/home/pi/domoticz/plugins/SDM630-Modbus/plugin.py", line 554, in onHeartbeat 2022-10-11 00:02:57.082 Error: sdm: _plugin.onHeartbeat() 2022-10-11 00:02:57.082 Error: sdm: File "/home/pi/domoticz/plugins/SDM630-Modbus/plugin.py", line 448, in onHeartbeat 2022-10-11 00:02:57.082 Error: sdm: Domoticz.Log('Voltage L1: {0:.3f} V'.format(Volts_L1)) 2022-10-11 00:02:57.082 Error: sdm: UnboundLocalError: local variable 'Volts_L1' referenced before assignment

Any help? Thanks a lot.

camell22 commented 1 year ago

I already had installed HomeAssistant some programs but I did not know what and how, ie where what ''copy'' ''paste'' Black magic ????

pt., 7 paź 2022 o 19:02 Jordan87 @.***> napisał(a):

You have many videos/manuals on youtube how to install HA, for example this for RaspberryPi https://www.youtube.com/watch?v=2F_JEuOeQL4 When you will have it working you need to edit one file and create different one and as i remember that's all for SDM630 I can share what needs to be added

PL Na youtube sa wideo instrukcje jak uruchomic HA np na RaspberryPi Trzeba edytowac plik konfiguracyjny i stworzyc inny z lista encji/czujników. Moge pozniej podzielic sie informacja co trzeba dodac.

— Reply to this email directly, view it on GitHub https://github.com/MFxMF/SDM630-Modbus/issues/6#issuecomment-1271837048, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3PK6VUNZOURTSCYZGRCSYDWCBJSPANCNFSM5SXP4HDA . You are receiving this because you commented.Message ID: @.***>

Jordan87 commented 1 year ago

In HA you need to copy or create same file but change name from sdm630_registers.txt to sdm630_registers.yaml sdm630_registers.txt This file should be in same location as configuration.yaml

And in configuration.yaml you need to add:

Modbus for SDM630

modbus:

  • name: hub1 type: serial baudrate: 9600 port: /dev/ttyUSB0 bytesize: 8 method: rtu parity: N stopbits: 1

Sensors

sensors: !include sdm630_registers.yaml

In your case name "ttyUSB0" can be different if you have more usb devices.

https://github.com/ticapix/home-assistant_sdm630 I haven't used any additional resistors.

tomatos-st commented 1 year ago

Domoticz crashes for me too. The effect is that screaming devices disappear:

2023-03-12_110140

After disabling and removing the plugin everything is back to normal log throws errors:

2023-03-12 10:19:23.690 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:19:28.980 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:19:34.306 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:19:37.076 Error: SDM6300 hardware (10) thread seems to have ended unexpectedly 2023-03-12 10:19:39.615 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:19:44.879 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:19:50.177 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:19:51.085 Error: SDM6300 hardware (10) thread seems to have ended unexpectedly 2023-03-12 10:19:55.441 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:20:00.194 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 481, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.195 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 482, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.201 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 517, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.202 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 519, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.202 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 520, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.203 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 521, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.203 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 522, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.204 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 523, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.205 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 524, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.206 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 525, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.206 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 526, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:00.207 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 527, sValue: '', sUsage: '0', dType: 113, sType: 0) 2023-03-12 10:20:01.435 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:20:06.253 Error: SDM6300 hardware (10) thread seems to have ended unexpectedly 2023-03-12 10:20:06.843 Error: [web:8082] PO exception occurred : 'stoull' 2023-03-12 10:20:12.100 Error: [web:8082] PO exception occurred : 'stoull'

fritzlc commented 1 year ago

Hi I think the problem is in this python version Jordan87 I see you have 3.9.3 I had 3.7.x on the last version of domoticz and everything worked fine I have now switched to HA but i remember having various issues with other plugins due to upgrading python to 3.9.3 if you have the opportunity and time, look for an older version of os sysyem for raspberry and put domoticz with older python 3.7.x you can check the version in the log from domoticz or from the python ‐‐version or python -V console you need to ask the author to update the plugin or someone who can program in python Regards

tomatos-st commented 1 year ago

I checked the version at home, I have an Pi3+

pi@smarticz:~$ python --version Python 2.7.16 pi@smarticz:~$ python3 --version Python 3.7.3