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

Domoticz crash after adding Hardware #6

Open
Jordan87 opened this issue Apr 6, 2022 · 13 comments
Open

Domoticz crash after adding Hardware #6

Jordan87 opened this issue Apr 6, 2022 · 13 comments

Comments

@Jordan87
Copy link

Jordan87 commented Apr 6, 2022

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
Copy link

fritzlc commented Apr 11, 2022

Hi,
Do you have installed pyserial and minimalmodbus?

@Jordan87
Copy link
Author

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

@tomke2
Copy link

tomke2 commented Apr 28, 2022

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

@camell22
Copy link

camell22 commented Oct 7, 2022

taki sam problem

@Jordan87
Copy link
Author

Jordan87 commented Oct 7, 2022

At least HomeAssistant is working fine with my SDM630 ;)

@camell22
Copy link

camell22 commented Oct 7, 2022 via email

@Jordan87
Copy link
Author

Jordan87 commented Oct 7, 2022

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
Copy link

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
Copy link

camell22 commented Oct 11, 2022 via email

@Jordan87
Copy link
Author

Jordan87 commented Oct 11, 2022

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
Copy link

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
Copy link

fritzlc commented Mar 13, 2023

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
Copy link

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

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

6 participants