Clock loses I2C connection with ESP8266

More
8 months 2 weeks ago #7656 by Stackerlee
Seems reasonable.
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.
Thanks!

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #7657 by Ian
Hmmmm looking at the changes in 1.0.4, I added a rollover function (if the internal counter. I wonder if this is causing a problem?

If you look into the web view, does the "Time last update" value do anything wird? It should go between 0 and 60000 (1 minute in milliseconds).

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #7658 by Stackerlee
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.

Please Log in or Create an account to join the conversation.

More
8 months 6 days ago - 8 months 6 days ago #7699 by Ian
The only reason is innate idleness... ;)

I'll change it.
Last Edit: 8 months 6 days ago by Ian. Reason: typo

Please Log in or Create an account to join the conversation.

More
8 months 6 days ago #7700 by Stackerlee
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)

Please Log in or Create an account to join the conversation.

More
8 months 6 days ago - 8 months 6 days ago #7701 by Ian
I'm not getting it on any of my clocks. Here's the one I'm using for the rollover test:

Attachments:
Last Edit: 8 months 6 days ago by Ian.

Please Log in or Create an account to join the conversation.

More
8 months 6 days ago #7708 by Stackerlee
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

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago #7761 by Stackerlee
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
sendIPAddressToI2C(WiFi.localIP());
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.

Any thoughts on this are welcome!

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago #7762 by vladco
@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 ?

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago #7763 by mazevedo
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: github.com/esp8266/Arduino/issues/1722

@vladco: the ESP does not support I2C slave, that's why Ian had to set it up as a master.

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.114 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com