Closed RFDarter closed 9 months ago
If you paste this JSON-message into an editor which supports JSON then you will quickly see that the last comma (,) is wrong. JSON does not support leading commas and this must be removed.
So maybe you would want to update your example on the README. I just used that to test it.
Hehe good point. Thanks
Maybe that would be a good change too, to prefent the service crashing when an invalid Jason is recived
try:
json_data = json.loads(payload)
except json.JSONDecodeError as e:
print("Invalid JSON syntax:", e)
return
Would you mind sending it as a pull request? I can take it in. Thanks
Can you tell me how i can remove a service from from tzhe dbus created with your script?
modifing the settings.xml and removeing the
root@raspberrypi:~# dbus -y
org.freedesktop.DBus
com.victronenergy.battery.jk_Bms
com.victronenergy.modbusclient.tcp
com.victronenergy.system
com.victronenergy.qwacs
org.freedesktop.Avahi
com.victronenergy.logger
com.victronenergy.fronius
org.bluez
debug.victronenergy.gui
com.victronenergy.platform
com.victronenergy.settings
com.victronenergy.solarcharger.ttyUSB0
com.victronenergy.adc
net.connman
fi.w1.wpa_supplicant1
com.victronenergy.battery.jk_Bms
reboot doesnt fix it eighter
hi, i gave your example a try but as soon as a mqtt message is recived it get this error:
This is the mqtt message recived(confirmed using mqtt explorer)