RalfZim / venus.dbus-fronius-smartmeter

A service for Venus OS, reading smart meter data from a Fronius system and making the values available on dbus.
MIT License
50 stars 28 forks source link

Make the update path more robust and less frequent #3

Closed trixing closed 2 years ago

trixing commented 2 years ago

If the return value from _update is not True, gobject will stop calling the thread. Make sure that we always return True as otherwise the process will just start hanging.

trixing commented 2 years ago

Note, it's debatable if the better course of action would be to call sys.exit to prevent stale readings to stick around on dbus, potentially leading to wrong action by the ESS system?

trixing commented 2 years ago

Okay, I've found a corner case of the Symo changing IP and this code kept reporting the old energy, let's rather exit than do that.