Closed bram2202 closed 5 years ago
Thanks for the pull request. I will review and test it.
This is one of the main issues I'm experiencing. Our inverter is just a tad too far from the WiFi access point for a stable connection. Unplugging the ESP has too be done weekly.
Hi, did you, by any chance, had the time to review and test this PR?
I did test it. Without your Wificonnector class the GoodWeLogger automatically reconnects, which is what an ESP8266 does by default. I don't really see any need for a separate class. If your ESP does not automatically reconnects, it might be related to a bug in the SDK: https://github.com/esp8266/Arduino/issues/4161. I suggest upgrading to the latest SDK.
@bram2202 @lgespee Can you test with a later version of the ESP SDK if this is resolved?
I observed similair disconnects a while back, but after upgrading the SDK, I didn't come across it anymore.
In the latest commits an extra check is added which will auto restart the ESP if the Wifi is lost for more than 30 seconds (and the ESP can't auto reconnect within that time for whatever reason).
Fixes a bug that when the wifi connection drops out you need do reset the board to regain a wifi connection. This is due to the fact that the wifi connection is made in the main setup and never checked again.
This commit fixes that by: