stormmurdoc / victron_sdm630_bridge

MQTT-dbus Bridge for Victron CerboGX (Venus) and Eastron SDM630 Power Meter
MIT License
26 stars 7 forks source link

irregular stop of the function #3

Closed fucide closed 2 years ago

fucide commented 2 years ago

Thank you for your great development work. The GO tool is doing a great job, but it seems to crash after a while. This often takes several days. After ending and restarting the process, it runs again for some time. Have you already noticed similar behavior? Thank you for your support.

stormmurdoc commented 2 years ago

Dear @fucide , yes you're right. I have been able to reproduce the error. It looks like it occurs exactly after 4 days of uptime. It looks at first view as if the error occurs in the MQTT module.

@400000006273a58739f0b9bc During handling of the above exception, another exception occurred: @400000006273a58739f0c574 @400000006273a58739f0c95c Traceback (most recent call last): @400000006273a58739f47e94 File "/opt/victronenergy/dbus-mqtt/dbus_mqtt.py", line 602, in <module> @400000006273a5873a1e2a8c main() @400000006273a5873a1fa18c File "/opt/victronenergy/dbus-mqtt/dbus_mqtt.py", line 584, in main @400000006273a5873a46924c handler = DbusMqtt( @400000006273a5873a47e624 File "/opt/victronenergy/dbus-mqtt/dbus_mqtt.py", line 217, in __init__ @400000006273a5873a5e5454 self._scan_dbus_service(service) @400000006273a5873a5fc76c File "/opt/victronenergy/dbus-mqtt/dbus_mqtt.py", line 401, in _scan_dbus_service @400000006273a5873a7f3a34 self._introspect(service, device_instance, '/', publish) @400000006273a5873a80dc2c File "/opt/victronenergy/dbus-mqtt/dbus_mqtt.py", line 441, in _introspect @400000006273a5873aa16834 self._introspect(service, device_instance, p, publish=publish) @400000006273a5873aa36404 File "/opt/victronenergy/dbus-mqtt/dbus_mqtt.py", line 423, in _introspect @400000006273a5873adf8a74 value = self._dbus_conn.call_blocking(service, path, None, 'Introspect', '', []) @400000006273a5873adfb184 File "/usr/lib/python3.8/site-packages/dbus/connection.py", line 652, in call_blocking @400000006273a5873afd6ae4 reply_message = self.send_message_with_reply_and_block( @400000006273a5873aff0124 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Unknown / invalid method @400000006273a58814030624 *** starting dbus-mqtt *** A reboot of the Venus device helps as a first workaround. I am not sure how to debug this?

stormmurdoc commented 2 years ago

Hi @fucide, I've added a workaround for that. The bride will noch extit if the connection is lost. Please keep an eye on the startup.sh script in the bin folder and adapt it to your needs.