Real Time Clock not initialized

I must say I was quite excited to get my new IotaWatt but am very frustrated at this seemingly simple but blocking issue - my $400 purchase seems to have been wasted. The unit connects to my WiFi fine, I can connect to it but it never gets a time from any NTP server. I have fed it my own NTP server, I fed it pool.ntp.org - does not matter, on my 1Gbps terrestrial fibre internet connection it just refuses to get a time. I even added an allow any IPv4 rule to the internet. I can see it is sending NTP packets and receiving them, but it is never setting its clock:

18:35:36.134938 IP 192.168.3.181.62944 > ns1.phuture.sk.ntp: NTPv4, Client, length 48
18:35:36.309511 IP ns1.phuture.sk.ntp > 192.168.3.181.62944: NTPv4, Server, length 48

What can I do to fix this? Here is my log:

** Restart **

SD initialized.
Real Time Clock not initialized.
Reset reason: External System
Trace:  34:203[115], 183:161[185], 167:213[10], 39:43[99], 149:53[1], 94:50[66], 90:152[74], 254:90[151], 159:50[237], 112:144[217], 50:199[109], 182:63[41], 82:82[132], 7:133[41], 168:189[181], 238:58[153], 33:246[20], 206:65[170], 254:125[17], 200:9[227], 131:126[117], 126:62[136], 16:154[135], 121:58[76], 149:250[157], 12:179[156], 162:20[245], 209:132[237], 135:116[197], 245:52[78], 4:78[84], 197:213[241]
ESP8266 ChipID: 8993185
IoTaWatt 5.0, Firmware version 02_06_05
SPIFFS mounted.
Local time zone: -6:00
Using Daylight Saving Time (BST) when in effect.
device name: IotaWatt
Connecting with WiFiManager.
HTTP server started
WiFi connected. SSID=MySSID, IP=192.168.3.181, channel=1, RSSI -72db
MDNS responder started for hostname IotaWatt
LLMNR responder started for hostname IotaWatt
timeSync: service started.

It wants to access time1(and 2,3).google.com.

I tried with 5 different NTP servers - none works.

19:57:31.737303 IP (tos 0x0, ttl 255, id 2, offset 0, flags [none], proto UDP (17), length 76)
    192.168.3.181.49157 > 192.168.3.11.ntp: NTPv4, length 48
	Client, Leap indicator:  (0), Stratum 0 (unspecified), poll 0 (1s), precision 0
	Root Delay: 0.000000, Root dispersion: 0.000000, Reference-ID: (unspec)
	  Reference Timestamp:  0.000000000
	  Originator Timestamp: 0.000000000
	  Receive Timestamp:    0.000000000
	  Transmit Timestamp:   0.000000000
	    Originator - Receive Timestamp:  0.000000000
	    Originator - Transmit Timestamp: 0.000000000
19:57:31.737477 IP (tos 0xb8, ttl 64, id 52891, offset 0, flags [none], proto UDP (17), length 76)
    192.168.3.11.ntp > 192.168.3.181.49157: NTPv4, length 48
	Server, Leap indicator:  (0), Stratum 3 (secondary reference), poll 3 (8s), precision -24
	Root Delay: 0.013748, Root dispersion: 0.033996, Reference-ID: 198.161.203.36
	  Reference Timestamp:  3841782729.282762483 (2021/09/27 19:52:09)
	  Originator Timestamp: 0.000000000
	  Receive Timestamp:    3841783051.737349045 (2021/09/27 19:57:31)
	  Transmit Timestamp:   3841783051.737465174 (2021/09/27 19:57:31)
	    Originator - Receive Timestamp:  3841783051.737349045 (2021/09/27 19:57:31)
	    Originator - Transmit Timestamp: 3841783051.737465174 (2021/09/27 19:57:31)

I just changed the NTP option on my DHCP server to feed it time1.google.com - it connects fine to google, and receives the NTP time but the light is still red. Any assistance would be greatly appreciated. I really, really want to get this to work.

20:02:15.289026 IP (tos 0x0, ttl 255, id 6, offset 0, flags [none], proto UDP (17), length 76)
    192.168.3.181.62944 > time1.google.com.ntp: NTPv4, length 48
	Client, Leap indicator:  (0), Stratum 0 (unspecified), poll 0 (1s), precision 0
	Root Delay: 0.000000, Root dispersion: 0.000000, Reference-ID: (unspec)
	  Reference Timestamp:  0.000000000
	  Originator Timestamp: 0.000000000
	  Receive Timestamp:    0.000000000
	  Transmit Timestamp:   0.000000000
	    Originator - Receive Timestamp:  0.000000000
	    Originator - Transmit Timestamp: 0.000000000
20:02:15.313230 IP (tos 0x80, ttl 109, id 58798, offset 0, flags [none], proto UDP (17), length 76)
    time1.google.com.ntp > 192.168.3.181.62944: NTPv4, length 48
	Server, Leap indicator:  (0), Stratum 1 (primary reference), poll 0 (1s), precision -20
	Root Delay: 0.000000, Root dispersion: 0.000122, Reference-ID: GOOG
	  Reference Timestamp:  3841783335.298216341 (2021/09/27 20:02:15)
	  Originator Timestamp: 0.000000000
	  Receive Timestamp:    3841783335.298216341 (2021/09/27 20:02:15)
	  Transmit Timestamp:   3841783335.298216342 (2021/09/27 20:02:15)
	    Originator - Receive Timestamp:  3841783335.298216341 (2021/09/27 20:02:15)
	    Originator - Transmit Timestamp: 3841783335.298216342 (2021/09/27 20:02:15)

Can I see the log and the status display please?

Sure.
log.txt (9.5 KB)

As to status display - what do you refer to? the LED is solid red. The status menu option in the web portal is attached. This is a brand new unit that just arrived - never been set up.

Plug in the AC adapter.

Umm wait what? Plugged it in and:

** Restart **

SD initialized.
Real Time Clock not initialized.
Reset reason: External System
Trace:  38:203[123], 183:161[187], 165:197[10], 191:40[99], 21:53[129], 94:50[67], 90:156[202], 126:90[151], 151:58[237], 112:144[217], 50:199[109], 246:27[41], 90:90[196], 7:133[41], 40:253[181], 238:18[152], 32:246[20], 206:65[172], 252:125[17], 200:13[227], 139:252[117], 254:54[138], 80:170[71], 121:58[76], 149:250[221], 14:179[156], 178:132[245], 209:132[169], 135:116[197], 245:36[14], 4:78[84], 193:213[241]
ESP8266 ChipID: 8993185
IoTaWatt 5.0, Firmware version 02_06_05
SPIFFS mounted.
Local time zone: -6:00
Using Daylight Saving Time (BST) when in effect.
device name: IotaWatt
HTTP server started
WiFi connected. SSID=VasGeketting, IP=192.168.3.188, channel=11, RSSI -72db
MDNS responder started for hostname IotaWatt
LLMNR responder started for hostname IotaWatt
timeSync: service started.
statService: started.
Updater: service started. Auto-update class is MINOR
9/27/21 21:19:29 timeSync: RTC initalized to NTP time
9/27/21 21:19:29 dataLog: service started.
9/27/21 21:19:29 dataLog: New current log created.
9/27/21 21:19:31 Updater: Auto-update is current for class MINOR.

How does that work? Why would it need AC to do NTP?

It didn’t need AC to do NTP. It needs the AC because that’s what it does, it samples AC 67% of the time, and does everything else inbetween, including time services. It’s the heartbeat of the unit and everything is synchronized to it.

You’re all set. Read the docs for installation specifics.

Aha you use it as the clock. That makes sense. Well I am very thankful to you for making my evening better. I have been reading the docs extensively before I bought the unit and I will continue to do so as I hook it up.

Thanks again.

3 Likes

This actually explains the strange behaviour I had yesterday, plugged the AC in after the USB (I was just borrowing the case for some cad purposes and the date as well wrong (I think I need to go source new batteries for my rtcs)