Had issues to reconnect to powerswitch after nightly shutdown.
rctmon ran into an endless:
rctmon.daemon.socket - WARNING - No data received for 180 seconds, disconnecting
rctmon.daemon.socket - INFO - Socket disconnected
rctmon.daemon - INFO - Time to attempt reconnection
once the powerswitch shutdown, because of solar power loss at night.
But in the morning when the powerswitch was back online rctmon didn't recover and stay in that loop.
Small timer reset when connecting fixes this issue.
Another option would be to change the logic here https://github.com/svalouch/rctmon/blob/main/src/rctmon/daemon.py#L241-L269 and run code in the last else part right after re-connection, which triggers a real read before resetting the counter.
If you prefere that approach let me know. I will update the PR accordingly.
Had issues to reconnect to powerswitch after nightly shutdown.
rctmon ran into an endless:
once the powerswitch shutdown, because of solar power loss at night. But in the morning when the powerswitch was back online rctmon didn't recover and stay in that loop.
Small timer reset when connecting fixes this issue.
Another option would be to change the logic here https://github.com/svalouch/rctmon/blob/main/src/rctmon/daemon.py#L241-L269 and run code in the last else part right after re-connection, which triggers a real read before resetting the counter.
If you prefere that approach let me know. I will update the PR accordingly.