I had home assistant working perfectly on my raspberry pi 3b+ via ssd for a long while now. A few weeks ago after an update i noticed that all the logs had october 2021 as the date and time was off too.Soon many of my addons stopped working as well as nabu casa cloud and others had a lot of issues.After trying many things that didnt work i finally ended up backing up everything up and wiping the disk and installing hassos without restoring anything from before. After wiping the disk and installing a new installation i find the time and date is still the same.SO it doesnt look like it was something with my config or other settings .Any ideas on how to fix this?I’m completely out of ideas at this point.
The instructions for updating the time source are in Configuration .
If you have access to the root filesystem:
You can manual edit the systemd timesync file on
/etc/systemd/timesyncd.conf
. Our default ntp configuration look like:
[Time]
NTP=time1.google.com time2.google.com time3.google.com
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
If not:
Format a USB stick with FAT32/EXT4/NTFS and name it
CONFIG
(in all capitals). Alternative you can create aCONFIG
folder inside boot partition. Use the following directory structure within the USB drive:timesyncd.conf
The
timesyncd.conf
file allow you to set different NTP servers. HassOS won’t boot without correct working time servers!You can put this USB stick into the device and it will be read on startup and files written to the correct places. The USB Stick just needs to be insterted to the device during this setup process and can be disconnected afterwards.
Also check your firewall for blocking of NTP packages. They use port 123.
Packets!!!
Thanks
English is not my primary language, so need those corrections to get better at it.
i already tried this.Unfortunately it still doesnt sync.
Glad to help
Thanks for the suggestions. It seems the problem was with my ISP having an issue with NTP which they resolved yesterday and now it’s all working as it should.
I was having some of the same issues with my Raspberry Pi 4 setup and tried some of the solutions suggested without effect.
What worked for me was changing some settings in my firewall/router.
The router can be set up as a time server. It connects to internet time servers itself. My Raspberry Pi was not showing the correct time or timezone even after trying the CONFIG modifications suggested. The “[Time]” info was written to the /etc/systemd/timesyncd.conf file but was not being used because the Pi did not yet have a network connection while booting up.
I checked the DHCP settings on my router/firewall and it can be set up to be the time server for DHCP clients while they are obtaining an IP address. Under my DHCP settings I had to set the router itself (its gateway IP address) as the Primary NTP server. You will still need to give the router addresses of internet time servers to pass on. Networks that run on DHCP use this method to keep all the machines on the network set to the same date and time.
This seems to have worked. The timedatectl command now shows the correct date and the time for the UTC timezone bootup.
Hopefully this will resolve the issues I was having with time-related automations.