Where does IoTaWatt get NTP?

I got my IoTaWatt because it works offline, and as a part of the project to get as much stuff in my home and on my network to work completely offline, I have setup a few local GPS/PPS Stratum 1 NTP servers which I have configured all of my devices to use.

Where does IoTaWatt get NTP from? Does it pick it up from DHCP or is it hard coded somewhere?

I wondered the same since I too prefer to have everything use my local NTP server. It seems like it’s hardcoded to time1.google.com.

Thats a shame

Interestingly, it looks like it does also contact the DHCP provided servers. I ran a packet capture on one of my NTP servers for 20 mins and spotted it querying over port 123

Would be great if there was a future addition of an NTP server field so we could replace that Google NTP server with our own. The less talking to the internet, the better

I’m tempted to NAT all traffic over port 123 back to my local NTP servers, I’m not sure if that would work or not

Some people have reported doing that successfully. At the end of the day, they all work the same. No doubt your local NTP server is syncing to an internet server. I’ve found the Google servers to be most reliable globally.

I have 3 local NTP servers, all with GPS modules doing PPS over serial. Zero internet

Any chance of a future update with the option to add our own entries for NTP?

Short answer is probably not. Your reroute idea should work. It’s just UDP.

It seems like the lwIP library is making that request: DHCP NTP Server configurable · Issue #5681 · esp8266/Arduino · GitHub. I ran a packet capture while restarting IoTaWatt and I too see a request to my local NTP server followed by NTP requests to Google. From what I can see, IoTaWatt has its own clock code and the local NTP is effectively ignored.

I have a locked down IoT VLAN which by default blocks internet access. I serve it a custom pool.ntp.org DNS zone for some IoT devices but I expect NATing UDP 123 would work fine too. I went for DNS over NAT to avoid any confusion with public IPs showing up in the VLAN. I haven’t moved my IoTaWatt over to that VLAN yet but I’ll probably just add time1.google.com to the DNS override list and disable automatic updates.

Is there any way to confirm that IoTaWatt sees it as a valid source once doing the NAT reroute?

Darn, that probably means other things I figured were working correctly like the Weatherflow Tempest also are not

Power down the IoTaWatt, remove the battery for a few seconds, replace and restart. Give it a minute and if the led turns green it has successfully set the time. If it stays red, you can just open up the internet to reset it.