Offline Hub cannot keep accurate date time

It would be nice if, in the system setup settings, you could define a primary and secondary NTP server. I have a couple of NTP servers on my network I could use in the event of internet loss to provide accurate time sync.

Set it to a wrong time through the browser and reboot the hub. It will try to get the time on boot

This has been requested several time, search the forum here for NTP. I am sure it might come at some point but I don't think it is high on anyone's priority list.

All those ideas are great. However, in this case it appears it was my router that locked up for whatever reason. So no NTP server, local or otherwise would work.

I still think the hub should keep time independently of any network connection. Even if not real accurate. The whole point of local control to me means I should be able to disconnect the ethernet cable and all my automations that don't depend on outside resources continue to run. Even if the time is not entirely accurate. Over a days time it shouldn't be off more than a minute or so.

I agree! Something happened in your case that isn't normal, my suggestion is to reach out to support@hubitat.com and see if there is any additional logging they could pull. In all of my "offline" case, where the hub did not reboot while offline, it kept the right date/time

1 Like

This from that post:

"Hubitat doesn't have a battery backup for it's RTC, so if Hubitat goes offline whilst it's disconnected from the Internet (eg. it's intentionally standalone) then the time will be lost and certain automations either may not occur, or may not occur at the expected time)"

So if I read that correct the hub has to be connected to the internet or time based automations won't work. That doesn't sound like local to me.

I had contacted support several days ago and they reported that there is a problem with 2.1.3xxx versions properly dealing with time/date.

In my case on version 2.1.3.128 at a specific time of the day the hub is rewinding the date to a prior date. The time remains correct. Only the date is affected but It is causing my automatons to fail. As I understand it, this problem began on 2.1.3.125 but manifested differently by losing connection with the Hubitat Cloud. They have since posted two hot patches that fixed the loss of cloud access but cause the date issue.

Seeing that there aren't a huge amount of people complaining I suspect this problem is isolated to a few of us.

1 Like

I think this is what is affecting me as well.

Since this problem I have rolled back to 2.1.2.123 and haven't experienced any problems with the date changing or Hubitat cloud connections. However if anyone rolls back you won't have any of the newer features such as Twilio or any other features that came out in 2.1.3.xxx but for me its better than getting up in the night to reset my hub's date so automatons can continue.

1 Like

I agree that the internal clock should maintain the time and date locally. The NTP server could be local and over the internet which would help keep it in sync if the local clock isn't accurate,

That's not how I read that... That means if the Hubitat hub reboots/loses power, and when it comes up there is no internet, then it won't be able to set the time and it will be off. "Offline" in that sense is reboot or no power on the hubitat hub, not solely 'no internet'.

Which is absolutely true as there is no internal RTC or battery backup - so it has to get its time from SOMEWHERE.

1 Like

I was unaware of this also until recently. The issue that I have with this is, what if internet is only down because there was a line down somewhere? So, if I am recovering from a power failure that also took out my internet, I won't be able to have any of my scheduled tasks run on my Hubitat until my Internet is restored?!?

That is totally unacceptable from a system that sells itself as completely local control.

How does your PC know what time it is? There is a RTC with a battery in your PC. We're talking fractions of a microamp so your button cell last forever basically. Hubitat should have the same thing, shouldn't it?

1 Like

No argument. I think a better hardware design would incorporate a RTC with battery. Maybe in a future version?

But for now, it doesn't have it - so people just need to be aware of that.

Absolutely. I wasn't until recently.

My hub is on a UPS so for now I would be happy to just have it maintain time and date if the internet is down.

If it keeps power, it will keep time. You'll only lose time if the hub reboots. My hub is on a UPS too...but that only lasts for so long.

Well, not necessarily. It appears there is a bug, as mentioned above. And that is what happened to me last night. Time was OK, but date wasn't.

But that's a software fix. Maintaining time after power failure would require a hardware change (aka new hub).

I agree with what you say completely. But for now let's get the software bug fixed.

If I ever have a power outage Long enuf to empty the ups, then that is probably the least of my problems...:slight_smile: