Help troubleshooting feeds inactive with emoncms on emonpi

Hi,

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.

Hope this info is enough to help.

Can you do a df -h and have a look at this thread as it might be the same issue. /var/log at 100%

Hi,

Presume this isn’t issue, only 5%.

Filesystem           Size      Used     Avail     Use% Mounted on
/dev/root            4.1G     2.2G     1.8G     55% /
devtmpfs             431M     0        431M     0% /dev
tmpfs                463M     0        463M     0% /dev/shm
tmpfs                463M     6.3M     457M     2% /run
tmpfs                5.0M     4.0K     5.0M     1% /run/lock
tmpfs                463M     0        463M     0% /sys/fs/cgroup
tmpfs                30M      0        30M      0% /tmp
tmpfs                1.0M     0        1.0M     0% /var/lib/php/sessions
tmpfs                1.0M     0        1.0M     0% /var/tmp
/dev/mmcblk0p3       9.9G     2.9G     6.5G     31% /var/opt/emoncms
/dev/mmcblk0p1       253M     54M      199M     22% /boot
log2ram              50M      2.5M     48M      5% /var/log
tmpfs                93M      0        93M      0% /run/user/1000

No.

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.

1 Like

I purchased an updated card in march 2021

current time here is 11:59pm

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

you’re a legend!!

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

Good to know that forces a time update.