Leider funktioniert die Kommunikation nur sporadisch.
Die Werte werden vom Skript korrekt eingelesen und auf der Console auch dargestellt:
$ /home/ralle/python-daly-bms-main/bin/daly-bms-cli -d /dev/serial0 --soc
{
"total_voltage": 53.2,
"current": 0.0,
"soc_percent": 74.2
}
Wenn ich sie dann an den iobroker weiterleite, was in meinem Fall localhost ist, werden nicht alle Werte aktualisiert, auch wenn sie sich zwischenzeitlich geändert haben.
$ /home/ralle/python-daly-bms-main/bin/daly-bms-cli -d /dev/serial0 --soc --verbose --mqtt --mqtt-broker 127.0.0.1 --mqtt-port 1883
DEBUG [daly_bms.py:100] -- 94 ------------------------
DEBUG [daly_bms.py:70] w a5409408000000000000000081
DEBUG [daly_bms.py:119] 0 a5019408100100000200000055 13
DEBUG [client.py:2529] Sending CONNECT (u0, p0, wr0, wq0, wf0, c1, k60) client_id=b''
DEBUG [daly_bms.py:100] -- 90 ------------------------
DEBUG [daly_bms.py:70] w a540900800000000000000007d
DEBUG [daly_bms.py:119] 0 a501900802140000753002e6e1 13
DEBUG [daly-bms-cli:135] Send data: 53.2 on topic: daly_bms/total_voltage, retain flag: False
DEBUG [client.py:2529] Sending PUBLISH (d0, q0, r0, m1), 'b'daly_bms/total_voltage'', ... (4 bytes)
DEBUG [daly-bms-cli:135] Send data: 0.0 on topic: daly_bms/current, retain flag: False
DEBUG [client.py:2529] Sending PUBLISH (d0, q0, r0, m2), 'b'daly_bms/current'', ... (3 bytes)
DEBUG [daly-bms-cli:135] Send data: 74.2 on topic: daly_bms/soc_percent, retain flag: False
DEBUG [client.py:2529] Sending PUBLISH (d0, q0, r0, m3), 'b'daly_bms/soc_percent'', ... (4 bytes)
DEBUG [client.py:2529] Sending DISCONNECT
Irgendwo ist ein Kommunikationsproblem zum iobroker.
In diesem Fall, des Senden der 3 Werte wird nur "total_voltage" beim Senden der Daten abgedatet.