a week ago I was unable to log into my emoncms locally or remotely, I discovered my ip address changed on the emonpi so I used the new address and logged in ok. once logged in I could see that nothing was updating anymore all graphs apps etc weren’t working.
when I opened emoncms and go to the feeds page I can see that all feeds are showing live data, but are marked as inactive.
I started troubleshooting following the openenergymonitor website following their instructions I ssh into my pi and $ date shows the wrong time,
Current time for me is 12/08/2023 11:00 am in NZ and the pi reports 12/08/2023 00:00:54 BST 2023. and i dont know how to change this.
I logged into my emoncms and under cant see anywhere to change the date/time other then account profile, this was already set to pacific/auckland +12.
How old is the system? It might be an SD Card failing.
For date/time what does timedatectl status (in SSH) return?
[edit]
One issue is that if your time is too far out, the sync will not fix it automatically. This used to be a significant issue with Pis, but I have not seen it for a while since systemd-timesyncd became the default time daemon.
To force time to sync, you need to disable the automatic sync, set it to as close as now (hh:mm:ss) local time and restart the sync. However, it may not sync (I can’t test it properly here) and might jump back to the last recorded time.
sudo timedatectl set-ntp false
sudo timedatectl set-time hh:mm:ss
timedatectl status
sudo timedatectl set-ntp true
timedatectl status
journalctl -u systemd-timesyncd
Alternatively use sudo raspi-config and just confirm your TZ, it may force a sync.
[edit]
I am assuming here the emonpi is connected to the internet to get a time sync.
pi@emonpi:~ $ timedatectl
Local time: Sun 2023-08-13 12:56:53 BST
Universal time: Sun 2023-08-13 11:56:53 UTC
RTC time: n/a
Time zone: Europe/London (BST, +0100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
I run the config as you suggested, set the time zone and boom, its all back working again.
I appreciate your support, keep up the good work.
pi@emonpi:~ $ timedatectl
Local time: Mon 2023-08-14 00:13:36 NZST
Universal time: Sun 2023-08-13 12:13:36 UTC
RTC time: n/a
Time zone: Pacific/Auckland (NZST, +1200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no