I had created an infinity mirror clock a few years back and recently decided

fastled-random
gplus
(Dushyant Ahuja) #1

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:

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

Any help would be appreciated

(Jeremy Spencer) #2

Not sure about the connection issue but here’s a timezone library, it works perfecty on an ESP8266

(Jeremy Spencer) #3

It looks like the reconnecting issue was fixed in January


Try downloading and installing the ESP8266 core from Github rather than using “boards manager”

(Dushyant Ahuja) #4

@Jeremy_Spencer will try to download the latest.
On my other question, is there any way to find what timezone the clock is in? Similar to how computers select timezone automatically.

(Jeremy Spencer) #5

@Dushyant_Ahuja There is a timezone library that works off longitude and latitude, but you still need to find those…

(Jeremy Spencer) #6

Some of the weather data feeds also include timezone information, then you just need a city and country. You can also get sunrise and sunset data, which could be useful for patterns :wink:
https://openweathermap.org/api

(Jeremy Spencer) #7

@Dushyant_Ahuja Here are some options for getting geolocation with an ESP8266 using IP address, no GPS required…


(Dushyant Ahuja) #8

@Jeremy_Spencer Thanks - that sounds cool