How to set a local time server?

Hi. I have a very flaky internet connection: sometimes it’s now working good and if the Vera reboots, I have problems with time.

I found a couple of very old posts about changing to a local NTP server, but I’m not sure if that’s the right direction. I have a synology NAS, so I think I’m covered. I can also install it on my local ubuntu server.

I’d prefer a way to automatically re-install after a firmware upgrade.

Any help is appreciated. Thanks.


I used these instructions to set one of my Vera’s to a local PI running a NTP server.,33038.0.html

Cheers Rene

Thanks Rene, I think I made it.

Sorry, might be a bit off topic but I have been digging pretty deep into the OpenWrt OS of my vera plus over the past few days and have discovered a number of forgotten scripts.
As I found out, during boot up, the vera intervenes on its time with 5 different scripts!!!

First openWRT has an internal script which checks your entire file system and determines the latest updated file date and sets the time to that date. It is actually very well designed by openWRT developers.
“/etc/init.d/sysfixtime”. It is actually the first script the init.d runs.
Second, this script is from Mios, is run a little later in the boot sequence “/etc/init.d/mios_fix_time” which checks whether the unit has a battery and then updates the system time to a time saved in a file when the vera shut down. The problem is that file may not be saved if you brutally unplugged it or in case of power outage. If it was saved it will take the previous time and just add 1 minute as the supposed time it takes to reboot. It also updates to that time only if it determined that it got its time from the internet through a temporary file ("/tmp/.time_synced") created by a script which seem to no longer exists on my machine, otherwise by default it will reset the time to midnight Jan 1st 2000 if none of the conditions above occur. This is a little convoluted script which is overkill and does not work very well.
The third one is from the OS through the ntpclient which is run as a service and loads just before the cmh Luup engine starts.
The fourth one is through another OS service: ntpd, so there are actually 2 ntp services running and updating the time.
The fifth one is within the cmh Luup engine itself which calls an obsolete ntp sync program: “rdate” still residing on the vera through the “/usr/bin/” script. On my Vera Plus, this script fails because it requires a “” file which is not where it thinks it is. The file is in /lib instead of /etc.

Overall this is a mess… When I reboot the vera I get a reboot time in my logs of 2min after Jan 1 2000 because my temp file never has the flag to indicate it got its time through an ntp server. I suspect it is because it is should be coming from rdate which is probably not working. I then get a Luup reload time which is accurate since it has been synced with ntp.

I have now killed 2 of the 5 scripts calling for the system time update… essentially the 2 mios ones and I am getting better time accuracy upon reboot.

1 Like

Have you opened a ticket? I think they can try to improve this particular piece of their architecture and, we hope, to just let us specify a time server in the UI.

No, I haven’t. I have been frustrated with opening tickets and seeing no change in the OS related to my tickets so I kind of took upon myself to now modify the vera myself. One other thing I have done is preventing the vera from rebooting when it loses internet connection or even network connections and have been testing that…

I can relate to your frustration, but maybe now they’re more open to feedback than in the past.

I’m curious about your solution to prevent reboot with no internet. If you don’t mind sharing, it could be helpful to me, since my internet connection is very unstable (it’s a wifi bridge - long story, they forgot to cover my house, so fiber will come later in 2019 - I hope)-

Sure, I will share that once I confirm that it works. I’ve been peeling the onion and I wish the box was not so convoluted and buggy. It is carrying a lot of legacy code, some of which is conflicting with newer code or is buggy.

I watch your threads a lot like taking Vera off the grid. Good luck. Maybe you could be a 300/hour contractor for them. :slight_smile:

Sent from my VS995 using Tapatalk

@reneboer @therealdb Is the link to the old forum still the right way to set a local time server? Everything other than Vera is talking to my Synology NAS…

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules