nplan / HomeButtons

140 stars 9 forks source link

Automatic WiFi reconnection #70

Open chriszuercher opened 1 year ago

chriszuercher commented 1 year ago

I discovered an issue using the latest version of HomeButtons. My WiFi is shutdown during night. This leads to a "Network error" message on HomeButtons every morning. A button press get it working again. Would it be possible to automatically reconnect to WiFi from time to time to check if a connection recovered? Eg. ever 30 minutes? This would be perfect.

Thanks for this great product!

nplan commented 1 year ago

This is intended behaviour. Trying to connect to Wi-Fi drains a lot of energy. To preserve battery, it stops after a couple tries. Even trying every 30 minutes would significantly reduce the expected battery life.

chriszuercher commented 1 year ago

Could this be disabled as an option so users can define it? It uses more energy to have the wifi running all night in comparison to charging the battery more often 😉

chriszuercher commented 2 months ago

@nplan is there any chance this sill be implemted in future?

Or can I do it myself by modifing the code and deploy it to my device using USB? Is there anything to consider? i would try to add a DeepSleep wakeup in a defined internal (e.g 60min) to check the connection and try to reconnect it. If possible added as setting.