Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work with newest arduino software #51

Closed
matmay opened this issue Jan 17, 2018 · 10 comments
Closed

does not work with newest arduino software #51

matmay opened this issue Jan 17, 2018 · 10 comments

Comments

@matmay
Copy link

matmay commented Jan 17, 2018

I updated today with the arduino boards manager and afterwards time sync didn't work anymore.

it works with "Arduino AVR Boards by Arduino version 1.6.15" and "esp866 by ESP8266 Community version 2.3.0" and does not work with 1.6.20 and 2.4.0, respectively.

I'm using

#include<ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <TimeLib.h>
#include <NtpClientLib.h>
#include "FS.h"

on an ESP-8266 12E board

@gmag11
Copy link
Owner

gmag11 commented Jan 21, 2018

I'm testing with latest ESP8266 Arduino core. Could you copy some debug output here?
Do you have any problem during compilation?

@Tirantet
Copy link

Tirantet commented Jan 22, 2018

I report the same issue, my project crash with new version.
If I downgrade the library to 2.0.5 all works as expected.

I use ESP12F

@matmay
Copy link
Author

matmay commented Jan 22, 2018 via email

@Tirantet
Copy link

My project compiles perfect, but when run and the "NTP loop" routine executes, the module is halted with a exception.

While the module is not connected to Internet works, but if the module get connection in this moment (NTP loop detect connection)... crash

@bill-orange
Copy link

Even running with board manager 2.30, I had to add the following line to loop to get it to work No compile problems, however. This was not necessary in ver. 2.0 of the library

while (actualTime == 0) actualTime = (NTP.getTime());

@gmag11
Copy link
Owner

gmag11 commented Mar 8, 2018

I'm not able to reproduce such behaviour. Please, enable DEBUG log and copy the result and your code here. Thanx.

@bill-orange
Copy link

bill-orange commented Mar 8, 2018

It may be a while before I can run with debug. Here is the code. Sorry about the size but if I give you fragments, I might leave out something important.

@gmag11
Copy link
Owner

gmag11 commented Mar 9, 2018

@bill-orange , I've deleted the link in your message. It seems you made a mistake selecting what to share.

@bill-orange
Copy link

bill-orange commented Mar 9, 2018

@gmag11 Sorry about that!

https://1drv.ms/u/s!AmXKqAwyCrbxh-RiHb21AnxtNBU7vA

Here's what it does.

http://orangecaweather.duckdns.org:8021/

The idea is to get actual temperature from a sensor, wunderground actual temperature, wunderground future temperatures and make a very accurate local short term forecast. I use NTPclientLib to get a unix time mark each data point. The referenced code runs fine with ver 2.05 but with no changes ver 2.5 gives zeros after 12 - 24 hours. Once it starts delivering zeros, it never recovers.

**Edit ** It also appears that when testing with the ver. esp8266 2.3 core that FTP is nearly blocked using the ver. 2.5 library. Odd.

@gmag11
Copy link
Owner

gmag11 commented Mar 14, 2018

You are doing many NTP.getTime() calls in your code. Normally you should not do that. NTPClientLib aims to synchronize time from a NTP server. All time keeping is done in TimeLib library that NTPClientLib uses.

To get Unix time you should call now() instead.

@gmag11 gmag11 closed this as completed Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants