This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Date Question
#1
Hi,
I have the WeatherDuino Pro 2 Plus RX, I have had it running for about a week now, running HTU21D Sensor and the BMP180 sensor (I did have a BMP280 sensor but I found the unit wouldn't boot up with it connected, so I've assumed it was faulty, luckily I had a spare BMP180 from another project)

I also have one TX board, it is only running a SHT31 sensor until I source a tipping bucket rain gauge, and an anemometer.

Thanks Werk for such an awesome project, it even kept my 6 year old daughter entertained and interested whilst I was assembling it.

I noticed a day ago that when the big clock comes on the date changes, but the time stays correct. e.g. Today I restarted the RX board, the time and date was correct, 16-10-2018 and the time 11:55am, then once the large clock appeared the date went to 06-09-2018, but the time stayed correct.
After touching the screen, the date is still wrong. It also shows up on the built in webserver page with the wrong date.

It does this with the USB connected or disconnected from a PC running CumulusMX.

On a side note (I can start a separate thread) I couldn't get it to work with WeeWX on a different machine running Ubuntu 16.04. I got the same issues reported in another thread (https://meteocercal.info/forum/Thread-Is...compatible) .

Cheers
Michael
Reply
#2
Some extra information;
This is the debug output for NTP.

RTC current date: Set 06 2018
12:24:18.267 -> RTC current time: 12:24:18
12:24:18.267 -> Sending NTP request to sync clock...
12:24:18.301 -> NTP replied
12:24:18.301 -> UTC time from NTP server: 01:24:18
12:24:18.339 -> RTC adjusted to local time: 12:24:18
WiFi connection is ON

Something interesting is if I restart it again before the big clock appears the debug output is still showing the "RTC current date: Set 06 2018"  is this where it is getting the incorrect "06-09-2018" date from?

RTC current date: Set 06 2018
12:28:04.815 -> RTC current time: 12:28:03
12:28:04.815 -> Sending NTP request to sync clock...
12:28:04.856 -> NTP replied
12:28:04.856 -> UTC time from NTP server: 01:28:05
12:28:04.856 -> RTC adjusted to local time: 12:28:05
WiFi connection is ON


But if I leave it to do another NTP update without reseting the unit the date the RTC date does change "RTC current date: Oct 16 2018" But on another rest the RTC goes back to "RTC current date: Set 06 2018"

ESP8266 FW Version: AT+GMR

12:27:55.207 -> AT version:1.2.0.0(Jul  1 2016 20:04:45)
12:27:55.245 -> SDK version:1.5.4.1(39cb9a32)
12:27:55.245 -> Ai-Thinker Technology Co. Ltd.
12:27:55.283 -> Dec  2 2016 14:21:16
12:27:55.283 -> OK
RTC current date: Set 06 2018
12:28:04.815 -> RTC current time: 12:28:03
12:28:04.815 -> Sending NTP request to sync clock...
12:28:04.856 -> NTP replied
12:28:04.856 -> UTC time from NTP server: 01:28:05
12:28:04.856 -> RTC adjusted to local time: 12:28:05
WiFi connection is ON
RTC current date: Oct 16 2018
12:31:14.196 -> RTC current time: 12:31:14
12:31:14.233 -> Sending NTP request to sync clock...
12:31:14.233 -> NTP replied
12:31:14.233 -> UTC time from NTP server: 01:31:14
12:31:14.269 -> RTC adjusted to local time: 12:31:14
ESP8266 FW Version: WIFI GOT IP
12:32:08.495 -> AT+GMR

12:32:08.495 -> AT version:1.2.0.0(Jul  1 2016 20:04:45)
12:32:08.564 -> SDK version:1.5.4.1(39cb9a32)
12:32:08.564 -> Ai-Thinker Technology Co. Ltd.
12:32:08.564 -> Dec  2 2016 14:21:16
12:32:08.564 -> OK
RTC current date: Set 06 2018
12:32:18.105 -> RTC current time: 12:32:17
12:32:18.105 -> Sending NTP request to sync clock...
NTP replied
12:32:18.174 -> UTC time from NTP server: 01:32:18
12:32:18.212 -> RTC adjusted to local time: 12:32:18
WiFi connection is ON
Reply
#3
Hi Michael,

Thank you for the detailed report. I will investigate and report back ASAP.
In the meantime, please check if you are using the RTCLib, Time and TimeZone libraries included in the software package and not any other version (even if updated).
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply
#4
Thanks Werk,

I just made a change to turn off WU data sending and noticed on a reboot that now it is showing 31st July as the RTC date.



ESP8266 FW Version: AT+GMR

13:03:10.112 -> AT version:1.2.0.0(Jul  1 2016 20:04:45)
13:03:10.145 -> SDK version:1.5.4.1(39cb9a32)
13:03:10.145 -> Ai-Thinker Technology Co. Ltd.
13:03:10.196 -> Dec  2 2016 14:21:16
13:03:10.196 -> OK

RTC current date: Jul 31 2018
13:03:19.696 -> RTC current time: 13:03:18
13:03:19.731 -> Sending NTP request to sync clock...
NTP Clock adjust failed!
13:03:23.247 -> 
WiFi connection is ON
ESP8266 FW Version: WIFI GOT IP
13:05:05.321 -> AT+GMR

13:05:05.321 -> AT version:1.2.0.0(Jul  1 2016 20:04:45)
13:05:05.355 -> SDK version:1.5.4.1(39cb9a32)
13:05:05.388 -> Ai-Thinker Technology Co. Ltd.
13:05:05.388 -> Dec  2 2016 14:21:16
13:05:05.388 -> OK
RTC current date: Jul 31 2018
13:05:14.920 -> RTC current time: 13:05:14
13:05:14.955 -> Sending NTP request to sync clock...
13:05:14.955 -> NTP replied
13:05:14.955 -> UTC time from NTP server: 02:05:15
13:05:14.998 -> RTC adjusted to local time: 13:05:15
WiFi connection is ON
Reply
#5
Hello Michael,

I similar issue have been reported not so long ago on this thread: https://meteocercal.info/forum/Thread-Pr...me-problem
The problem was solved by reinstalling the Arduino IDE and supplied libraries in another machine, which leads me to think that the problem was related to a use of any library which may have been automatically updated by the Arduino IDE.

Despite I couldn't reproduce the problem on any of my test systems, I did a very small change on the code which sets the date and time on the RTC.
Please download the new software package, and make sure that you are using only the software libraries supplied with the package, and not any others.

At the Arduino IDE preferences, temporarily disable the "Aggressively cache compiled core" option.
As soon as you install the new software version, please report back.
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply
#6
Thanks Werk,
I have deleted everything from the existing library folder in Arduino, and replace with the contents of the folder in the rar file.

I'll leave it running now for a while and see what happens.

Just a quick question if I may;

I noticed after the new code upload it still shows a strange date on boot up in the debug. In this case Jul 28 2018. Where does that date come from?

Thanks again for your help and this awesome project.
Cheers,

ESP8266 FW Version: AT+GMR

21:18:54.263 -> AT version:1.2.0.0(Jul  1 2016 20:04:45)
21:18:54.263 -> SDK version:1.5.4.1(39cb9a32)
21:18:54.300 -> Ai-Thinker Technology Co. Ltd.
21:18:54.300 -> Dec  2 2016 14:21:16
21:18:54.300 -> OK
RTC current date: Jul 28 2018
21:19:03.856 -> RTC current time: 21:19:26
21:19:03.856 -> Sending NTP request to sync clock...
21:19:03.891 -> NTP replied
21:19:03.891 -> UTC time from NTP server: 10:19:27
21:19:03.891 -> RTC adjusted to local time: 21:19:27
21:19:03.924 -> 
WiFi connection is ON
Reply
#7
If everything is working well, on next restart you will not see that wrong date. It comes from the RTC, that for some reason hasn't set properly during the NTP sync.
Please let me know how it goes.
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply




Users browsing this thread: 1 Guest(s)