However the problem in the first place is that the connection is lost in version 1.0.4 and not in 1.0.3.
There must be something that introduces this behaviour? No?
Sorry, coding is not my thing (someday in the future maybe), so I can't help there.
Yes, I've seen that and thought of the same.
Haven't seen any abnormal behaviour in that counter thought. But that's just at the moment I refresh the page, don't know what's happening in between.
By the way, is there any specific reason for displaying milliseconds (and not seconds)?
It's not that obvious to read. For me that is.
Haha. I think I'll survive anyway. Just a minor detail.
However, the more concerning part is the disconnection thing.
As of now the V1.0.4 doesn't work. Have you confirmed this yourself or is it just me?
1.0.3 works perfectly, with the exception of showing the IP adress of course.
I've seen the lost connection happening in a time range of 1 to 26 hours. (1.0.4)
OK, that's interesting!
I'm thinking of Arduino and it's libraries (which I won't pretend I have any deeper understanding of).
I just noticed that #include <time.h> doesn't actually compile with Time library.
It doesn't give any errors and compiles fine but Time library isn't used.
#include <TimeLib.h> compiles using the Time library (version 1.5) though.
Don't know if this has any effect on my problem, or any effect at all since it's the same in version 1.0.3 and I don't remember changing #include <time.h> to #include <TimeLib.h> there.
Just an observation in lack of other ideas...
I'm currently using Arduino 1.8.2
Using library ESP8266WiFi at version 1.0
Using library ESP8266WebServer at version 1.0
Using library ESP8266HTTPClient at version 1.1
Using library Wire at version 1.0
Using library EEPROM at version 1.0
Using library Time at version 1.5
Since I'm the only one with this problem this might not be of interest for anyone else but here it goes:
Version 1.0.3 (WiFiTimeProviderESP8266) works without any problems.
Version 1.0.4 works for a while, then it loses I2C connection with clock.
I have tried reverting all changes from 1.0.3 to 1.0.4 and the problem is displaying the IP adress.
All other changes does not affect the connection.
As soon as I insert
// Allow the IP to be displayed on the clock
in the main loop
(and the associated functions 1328-1351)
the module loses connection with clock (or vice versa depending on how you see it) after some time, usually after some hours.
So the rollover function does not seem to be the problem.
I understand it's hard to pinpoint the problem since you can't reproduce it.
It's really strange, I can't understand what could be different at my end.
@Stackerlee i worked with the ESP8266 and sometimes i can be a pain to debug, most of the time it reboots itself nicely but from time to time it hangs, what you can do is hookup the ESP to a serial converter and if possible enable debug messages for the arduino code running on the ESP this way you will see whats going on with (i have a gut feeling its an exception of some sort)
@Ian one thing i don't understand about the software, why is the ESP8266 a master when used as a time provider?shouldn't the MCU that i actually controlling the clock be the master and the ESP8266 slave ?
Allow me to jump in.
@vladco: the ESP has a terrible "bug": if you issue a ESP.restart(); right after programming (ie, the ESP starts after you program it), it will hang.
But if you reset it after programming (like pressing the RESET button or power cycling it, the ESP.restart() will work always.
More details here:
@vladco: the ESP does not support I2C slave, that's why Ian had to set it up as a master.