Power Outage and system time

So we had another long power outage yesterday, it went down around 9:30 am and came back at 4pm, when I logged in to the hub right after it came back to life, I saw the time was something like 9:36am. So even though my network was up with internet access, and the hub was obviously booted as I could access its web Gui, the time had not been set.

Shouldn't one of the first things it does during the boot process be to run a ntp daemon or ntp client and set its system clock to NTP? Im guessing the HE SBC doesn't have a battery backed cmos clock, which is a strange design choice given its role as a home automation hub where time keeping is, erm, pretty important.

I noticed the option to set the system time from the browser time, which I did use to get it in sync, but if I hadn't done it, would the hub ever have synced to NTP by itself?

I have a C-4 hub in case thats relevant.

I think we have seen some reports of ISP's that block NTP . . . is that a possibility? Do you use NTP (successfully) on your other systems?

NTP is not blocked.

Just curious, is your isp AT&T? I believe my AT&T modem is blocking some NTP and I have to manually update the time sometimes. Unfortunately I am stuck with their modem.

its not ATT, NTP is not blocked.

The real question I have to ask is when are you buying a decent ups? :slight_smile:

1 Like

Oh for the love of Mike.....I have Liebert GXT3, which is a decent UPS. It powers my PoE switch and the HE hub. It lasted about 2 hrs.

Why is everyone intent on avoiding the actual issue, which is why the hub doesn't sync to NTP on boot?

1 Like

My 3 hubs always sync time upon boot. I do not know if they sync off of cloud.hubitat.com or some other server. I have never had an issue with their clocks after a boot, except when the internet is down. Is it possible it is just a race condition? Hub was up before your internet connection? I don't know how frequently it retries to sync its time.

1 Like

Thanks, could be this. But what's the solution? if you power cycle your whole network stack, how long does it take for modem, router and switch to power up, sync up, and ultimately for NTP be available to network devices? it could be a good couple or three of minutes after power comes up. Is it possible the HE hub is trying NTP on boot but giving up too soon? And not retrying enough?

It should just work. It needs to just work.

1 Like

I know it can take 5 minutes for my cable modem to come up and pass traffic. With a power failure, there are other things on my system that can take much longer, especially if the file systems need scanning/repair. The HE hub only takes a minute. I have a virtual machine that runs my internal DNS and when I lose power, it can take quite a bit of time to be really back online.
You should be able to simulate your outage and test to see if you need to do something to compensate. Pull the network cable and reboot the hub. Wait for two or three minutes and plug the network cable back in. Connect to the hub. If the time is off, try rebooting the hub.

Not in front if my hub, but there used to be a way to manually sync time by browser in the location settings. Is that still there?

Yes, on the Hub Details page under Settings.

My power was out for 3 hours and I had a similar issue. Is it possible to set the time using rule machine? With a delay, you could give the modem time to go through its startup.

1 Like