-->
Page 1 of 1

ESP8266 not able to reconnect when router reboots

PostPosted: Wed Oct 17, 2018 1:38 am
by dushyantahuja
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.

https://www.instructables.com/id/Infinity-Mirror-Clock/

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:

https://gist.github.com/dushyantahuja/1 ... 43994c5e9f

Also, is there a way to get time zone automatically?

Any help would be appreciated

Re: ESP8266 not able to reconnect when router reboots

PostPosted: Wed Oct 17, 2018 2:51 pm
by schufti
Hi,
the reconnect problem (re)appears ever so often with new core versions. There are now core functions to configure "autoconnect". One cuold allways check for connections before trying to access network services IF reported status would be reliable ...

No, there is no automatic detection of timezone, how should this work? Maybe with GPs module but still the clock does not know if you want to see local time?

But there is new functionality in standard lib that does all the daylightsaving once TZ is set correctly and syncs via ntp every 60min.

Re: ESP8266 not able to reconnect when router reboots

PostPosted: Thu Oct 18, 2018 3:15 am
by QuickFix
schufti wrote:Maybe with GPs module

Would be a nice idea, on the other hand you also don't need NTP anymore. ;)