Hi
Can NTP servers be checked manually or on a set schedule? I have noticed the time has occasionally drifted and it would be good to make sure it is set correctly.
Regards
Ben
Hi
Can NTP servers be checked manually or on a set schedule? I have noticed the time has occasionally drifted and it would be good to make sure it is set correctly.
Regards
Ben
Chrony addon is probably the easiest solution.
Chrony is a NTP cliebt instead of the SNTP client HA use.
Thanks, that looks like a server though - and I have plenty of servers I can use, but no idea how to direct HA to them.
Edit: I can see an option in it “set_system_clock” - but what is it actually setting? I am using the ready-rolled OVA VM. The issue with a VM is that if it ever gets paused (e.g. a reboot of the host OS) it comes back up with the wrong time, and that suggests HA OS and/or HA aren’t checking periodically. Hopefully someone can explain how it is setup.
Chrony is a server also. It is a NTP server.
The important part here is that it gets it time through NTP and not SNTP.
What VM are you using ? My VM’s keep the correct time.
Take a look at systemd-timesyncd. It is a lightweight ntp client daemon for synchronizing the system clock client side at configurable intervals. It does not bother with the full NTP complexity, focusing only on querying time from one (or more) remote server(s) and synchronizing the local clock to it. You can easily install it as a precompiled package through the repository of most distros. It’s a once-set-then-forget task.
The official .ova - Alternative - Home Assistant
What happens if you pause your VM for 5 minutes then resume?
What hypervisor ?
I am using an official VM, so it runs the Home Assistant OS which cannot be changed. It must pick the time up somewhere/somehow though.
Hyper-V.
(Just discovered you can’t post <10 characters!)
Can’t help with Hyper-V
Why should that make a difference as to where and how HA OS manages time?
For vmware and virtualbox the ‘guest additions’ handle time drift
Maybe this reading provides some enlightement on the issue: Time Sync Best Practices (Hyper-V).
Here is a snippet from your link:
The
systemd-timesyncd
service implements SNTP only
SNTP is the problem. You need a NTP client.
Any extra hypervisor guest additions would only work on an OS that supports them.
This is the official HA OS - it’s a self-contained locked down OS, no hypervisor guest services will apply.
I want to understand how time sync works within HA OS - and the HA server sitting on top, and the relationship between the two. It would require someone who knows HA OS, inside and out as it were.
Ha Core does nothing with time. It just gets it from HAOS.
HAOS has a SNTP service running that runs at startup and then with some hours between.
HAOS should have QEMU guest services included, but I am not certain how it is configured.
Thanks, so the thing I need to see the config for is the service SNTP source and the frequency, which to me would both seem reasonable things to be able to edit.