denpamusic/PyPlumIO

PyPlumIO doesn't reconnect forever on TCP connection failure.

denpamusic opened this issue · 1 comments

The TCP device relaying my RS485 connection disappears for some reason, the custom component retries connection to it for 5 times and then goes forever silent. If I do not switch on the TCP device back on in time (100s.) the plugin remains dormant forever until I reload it from HASS (or restart HASS). I don't know if this is desired behavior, but it annoyed me a bit and I increased the retry count to 50 for start to be able to play around with devices and locations etc.

@svenlange2
This is hopefully resolved now.

It was mostly down to the callback loop that updates sensors values, crashing when connection was restored. When you restarted integration manually, callback loop restarted with it, however it did not restart if it failed during runtime.

I've released v0.1.9 of PyPlumIO that incorporates fix for this issue and updated hassio-plum-ecomax to depend on this version. Please update plum-ecomax custom component and restart HA. It should automatically pull correct version of PyPlumIO from pypi.