Closed foobar26 closed 1 year ago
I just found a bug in your MowerConfiguration
public void setReconnectInterval(int pollingInterval) { this.reconnectInterval = reconnectInterval; }
so are you sure you really reconnect every 10 minutes
it must be
public void setReconnectInterval(int reconnectInterval) { this.reconnectInterval = reconnectInterval; }
Whoops, you are right! I'm very sorry I overlooked that one. A classical case of midnight programming :-) I put this one together quite quickly after doing a dirty implementation based on your code without additional config parameters. There it was definitely 10 minutes. This one is still running, just checked the logs:
2023-04-09 11:57:47.711 [INFO ] [id.internal.WorxLandroidMowerHandler] - reconnecting
2023-04-09 12:07:47.101 [INFO ] [id.internal.WorxLandroidMowerHandler] - reconnecting
2023-04-09 12:17:46.468 [INFO ] [id.internal.WorxLandroidMowerHandler] - reconnecting
Just fixed it in my repo if needed.
Sorry, just realized that there is an ugly INFO logging for the reconnecting still in the implementation. You might want to put this to debug level.
You might want to put this to debug level.
Done!
I played around a bit with the Pluigin and found a working solution. I replaced the polling every 10 minutes with a reconnect. Then I also set the polling to 60 minutes. This way you don't always get some info updates (e.g. when the mower is charging and the charging status changes), but you are not blocked and have full control over the mower all the time. You get all the updates while mowing. Status updates (e.g. when the cable is missing) are always received.