I had created an infinity mirror clock a few years back, and recently decided to upgrade it with an ESP8266 - basically to get time from an NTP server and some basic MQTT control.
Unfortunately, I’m running into a small problem. Every time my router is down, or reboots - the clock does not connect again until I physically switch if off and on. Here is the code I’m using:
From a quick look at the code I would think the WiFi doesn’t reconnect automatically. What I saw of the library you used is that when it cannot connect in the set timeout it creates an access point on its own. Check if there is a Wifi network called “InfinityClock” after your router restarts. If thats the case you could try to set the timeout higher. I know my router takes longer to be up again than 180 seconds. You could also try using “connectWifi” instead of “autoConnect”, I think it only tries to connect to the Wifi and won’t set up an AP if it can’t connect.
@Stefan_Salowsky discussions on the wifimanager library github said that the ESP8266 should try to connect automatically, without needing anything in the loop. I’m stumped.
@Stefan_Salowsky InfinityClock is coming up, but goes off after 180 seconds and the system tries to reconnect again. Looks like there was a bug in the old version of ESP8266 arduino core (2.4.0) that I was working with. Have updated the ESP8266 arduino core to the latest. Will report back if that helps. Thanks.