Offline Hub cannot keep accurate date time

Today I learned from support that a hub needs to connect to the internet in order to keep proper date/time. For my use case of scheduling as an event this defeats the value point of Hubitat (local only).

So, I want to hack around it! Has anyone found a workaround to this? I'm considering setting up an external cron to send an http/post request similar to that found in the "Update time and browser" button in settings in order to keep time. Before going forward with my ugly hack I was wondering what other folks' thoughts on the limitation might be.

Just had this happen to me. My internet went down about 11:30 last night. 3 different scheduled automations didn't run after midnight. Went I looked at the hub date/time, the time was right but the date was still yesterday.

Also noticed there was no backup made at 3 am either.

Completely new to Hubitat here, but is it possible to just use a Raspberry Pi on a battery backup as a time server and configure Hubitat to sync it's time with your own time server? I have literally only spent like 3 minutes with the HE interface, so I have no idea if you can do that.

As far as I know the HE uses an online time server hardcoded (don't know what the schedule is for the sync). You can set the time in the settings page to sync to the time of your browser, but don't know what that does for long term if it uses an online time server.

1 Like

Shouldn't have to use some other piece of equipment to sync time. If the internet is down and it can't sync it should at least keep an approximation. My computer does.

And updating time with browser is ok if you know it's off and are up and on your computer, etc.

In my case I was in bed when the internet went down. I did not know it was down until I got up this morning and noticed nothing had worked. I had to reboot my modem to get it back up.

This sort of surprises me.
A few months ago my Internet router died while I was away. No Internet.
When I got home and checked the events log, all of my rules ran OK.
Some use Sunset and sunrise and they ran OK.
This was quite a few builds ago so things may have changed since then.

Yeah, it should run ok without internet. Sunrise and sunset will run out of sync the fastest (about a second a day i believe), but still nothing to worry about. If you have your hub online once a year it should be plenty enough to run just fine. If your time is really a day of when you loose internet during a night then there is something wrong. May be you can test it again on purpose and block internet for one night to see if it doesn't work again? If it still gives a problem then I would advise to contact

I don't know about the sunrise as I had the internet back up before sunrise, so that event happened ok.

All I know is there was a plug that was supposed to turn off at 4 am, it didn't. A light was to come on at 5:45 am, it didn't.

When I started looking as to why I found the internet down. Had to reboot router to get it back up. After that I looked at the time in the HUB and discovered the wrong date. Again, time was correct, or within a couple minutes, but date was still yesterday. So even tho the hub kinda kept time it didn't change the date at midnight.

But the date is correct at this moment?

Only after I manually updated it by telling it to sync with the browser. I assume it would probably updated automatically at some point, I just didn't wait for it.

Roll your own dhcp sever and add to the scope a local ntp server. You’d have to roll your own ntp server too.

I would imagine that would work?

Ok, I would still advise to monitor it for a few days if you can. Maybe even test it disconnecting it on purpose a night. And see what happens.

I don't particularly want to stay up till midnight to check anything.

To my knowledge this has never happened before. I have had internet outages but they have occured early morning or during the day. So nothing that was out at midnight.

The hub obviously has an internal clock. It kept pretty good time, just didn't roll the date over at midnight. My computer did and it was down also.

I don't mean stay up per se. I mean, block internet before you go to bed, and check in the morning what happend. After that unblock internet... It's just what I would do.

No, Hubitat doesn't use these parameters and doesn't support this.

The only real way of using a local NTP server is by having a router that supports redirection based on destination port. What users have done is to define a firewall rule that redirects all NTP traffic on their network to a local NTP server but not all home routers support something like this

Okay I did just this.

How can I test time syncing on Hubitat?

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.