Set or customize NTP source

I’m running Hass OS, using the community addon to SSH into the system: Home Assistant Community Add-on: SSH & Web Terminal

Basically seeing the same as @jds, the list is not showing /systemd.

Maybe there is another way to get to that timesyncd.conf file?

Like I said before ,ssh addon doesnt give you access to the HassOs … You need to access the host on port 22222 , not 22 , install the other addon, or access it with the console directly if you attach a monitor

Thanks for pointing towards that port 22222. I am indeed running virtual, an will check out that addon to get into the host system on HassOS.

Last weekend I succeeded uploading an adjusted timesyncd.conf using the USB method. The problem I had earlier lied in the fact that I boot and run HassOS on an SSD. As soon as another USB device is plugged in, it won’t boot from the SSD anymore, but probably attempted to boot from the inserted USB and hanged.

  • Solution for me was to first initiate boot by powering on, and after a few seconds and blinking lights on the Raspberry Pi, insert the USB.
2 Likes

it helped me too , thanks

I have an Add-on called chrony which is in Configuration and under Add-ons, Backups & Supervisor. Clicking on the chrony Add-on go to the Configuration tab. You’ll be able to add ntp servers in that list.

Now to see if the ntp is working, I added 2 sensors to the Lovelace UI. They are:-
sensor.last_clock_synchronization which tells you when your machine last did a ntp synch and secondly sensor.date_time which shows the current date time on your system. I noticed on my Raspberry Pi it does an ntp action updating the time +/- every 10 min. When you reboot your device, the 1st time it does this, it thinks the time was set in 1970…which was 50 odd years back. The second time it does an NTP action, you’ll see it says it was done +/- 10 min back…

2 Likes

cant believe it. get rest of th0se commands, this addon save my OS.

Was it January 1, 1970?

Immensely helpful thank you. I’m in a situation where only the organizations NTP server will work. Finally have my ha clock sync’d properly - boot time is drastically reduced as well.

How did you add those sensors? I can’t get my rpi to sync time, even tho the timesyncd.conf has been set correctly, and the servers are pingable from the rpi. Chrony tells me my host time is off by a few minutes, but still no sync.

Hi I was running some shelly devices OK for a while and decided to firewall them from the internet and only allow connection to my HA instance. All was working well until they lost time synchronisation and the local weekly schedules were not triggered anymore.

I installed the Chrony addon and changed my sntp configuration in each Shelly device to point to the HA server for time sync. It initially did not work, and I subsequently found out that this was because the “time zone and geolocation” part of the Shelly settings was on “automatic detection” and it failed (despite having pointed to the local NTP server).

I deactivated the “automatically detect…” box, had the timezone set manually, but left the daylight saving time on “auto”. I also set the longitude and latitude manually.

After reboot the time synced again and it is the right time (winter time). I don’t know if it will work in the longer run or if some cache will expire at some point, but I hope that this will work permanently if it could sync after reboot.

Hope this helps

1 Like