Intermittent MBUS multiple Heatmeters - Scheduled restart

Hi there,

Is there a way to schedule periodic restart if emonHUB ? Once in about three days I have MBUS communications freeze , sometimes no logs at all on emonHUB (empty). It recovered when I restart just the emonHUB. MQTT is up as my other sensors are able to send in Data so the issue is emonHUB > Driver > MBUS HW side of things.

Since its a non standard installation It is not worth debugging I suppose so wondering if there is some way for me to just periodically restart emonHUB automatically ?

My setup

MBUS adaptor from openenergymonitor Shop.

I have 4 heatmeters 3 ultego smart (measuring Ground , upstairs and DHW separately ) and a DANFOSS sonometer on the primary.

Regards
Gopi

If bought as part of an HP Bundle, please contact the shop as support is part of the deal.

Is emonhub just used for this? If not, do other interfaces work?

Check the syslog - python errors get logged there and that may be the issue

sudo journalctl -f -u emonhub (from memory not tested).

Check var/log isn’t full

df -h

Hi there. Thanks .

All other interfaces work fine . It is just the mbus interface that has some issue. Unfortunately , the heat meters were not from the shop. I will make the above checks you recommended next time this happens.

the emonhub screen just has a scroll of below … or sometimes it is blank with no logs…

Since these are not standard heat meters maybe difficult to debug so might as well better to have some script if you can recommend to periodically restart emnhub ? (tried with two shop mbus adaptors and have the same issue so not hardware)

Regards
Gopi

2024-01-13

14:39:50,923 DEBUG

MBUS Invalid MBUS data received 0 bytes 2004.0 ms
2024-01-13

14:39:53,129 DEBUG

MBUS Invalid MBUS data received 0 bytes 2004.8 ms
2024-01-13

14:39:53,330 DEBUG

MBUS Decoded MBUS data: None
2024-01-13

14:39:55,340 DEBUG

MBUS Invalid MBUS data received 0 bytes 2009.1 ms
2024-01-13

14:39:57,545 DEBUG

MBUS Invalid MBUS data received 0 bytes 2004.0 ms
2024-01-13

14:39:57,745 DEBUG

MBUS Decoded MBUS data: None
2024-01-13

14:40:02,055 DEBUG

MBUS Invalid MBUS data received 0 bytes 2004.3 ms
2024-01-13

14:40:04,259 DEBUG MBUS Invalid MBUS data received 0 bytes, 2003.3 ms
2024-01-13 14:40:04,459 DEBUG MBUS Decoded MBUS data: None
2024-01-13 14:40:06,464 DEBUG MBUS Invalid MBUS data received 0 bytes 2003.9 ms
2024-01-13 14:40:08,669 DEBUG MBUS Invalid MBUS data received 0 bytes 2003.8 ms
2024-01-13 14:40:08,870 DEBUG MBUS Decoded MBUS data: None
2024-01-13 14:40:10,874 DEBUG MBUS Invalid MBUS data received 0 bytes 2003.9 ms
2024-01-13 14:40:13,079 DEBUG MBUS Invalid MBUS data received 0 bytes 2004.3 ms
2024-01-13

14:40:13,280 DEBUG

MBUS Decoded MBUS data: None
2024-01-13

14:40:15,285 DEBUG

MBUS Invalid MBUS data received 0 bytes 2003.7 ms
2024-01-13

14:40:17,489 DEBUG

MBUS Invalid MBUS data received 0 bytes 2003.3 ms
2024-01-13

14:40:17,690 DEBUG

MBUS Decoded MBUS data: None
2024-01-13

14:40:22,099 DEBUG

MBUS Invalid MBUS data received 0 bytes 2003.8 ms
2024-01-13

14:40:24,304 DEBUG MBUS Invalid MBUS data received 0 bytes 2003.8 ms
2024-01-13 14:40:24,504 DEBUG MBUS Decoded MBUS data: None
2024-01-13 14:40:26,510 DEBUG MBUS Invalid MBUS data received 0 bytes 2004.9 ms
2024-01-13 14:40:28,715 DEBUG MBUS Invalid MBUS data received 0 bytes 2003.6 ms
2024-01-13 14:40:28,915 DEBUG MBUS Decoded MBUS data: None
2024-01-13 14:40:30,924 DEBUG MBUS Invalid MBUS data received 0 bytes 2007.9 ms
2024-01-13 14:40:33,129 DEBUG MBUS Invalid MBUS data received 0 bytes 2004.0 ms
MBUS Decoded
**pi@emonpi**:**~ $** sudo journalctl -f -u emonhub
-- Journal begins at Sun 2024-01-14 12:51:24 GMT. --
Jan 15 13:53:30 emonpi systemd[1]: Stopped emonHub data multiplexer.
Jan 15 13:53:30 emonpi systemd[1]: **emonhub.service: Consumed 36min 18.198s CPU time.**
Jan 15 13:53:30 emonpi systemd[1]: Starting emonHub data multiplexer...
Jan 15 13:53:30 emonpi systemd[1]: Started emonHub data multiplexer.
Jan 15 20:57:58 emonpi systemd[1]: Stopping emonHub data multiplexer...
Jan 15 20:58:00 emonpi systemd[1]: emonhub.service: Succeeded.
Jan 15 20:58:00 emonpi systemd[1]: Stopped emonHub data multiplexer.
Jan 15 20:58:00 emonpi systemd[1]: **emonhub.service: Consumed 10min 16.126s CPU time.**
Jan 15 20:58:00 emonpi systemd[1]: Starting emonHub data multiplexer...
Jan 15 20:58:00 emonpi systemd[1]: Started emonHub data multiplexer.

pi@emonpi:~ $ cd /var
pi@emonpi:/var $ ls
backups  cache  lib  local  lock  log  log.bak  log.old  mail  opt  run  spool  swap  tmp  www
pi@emonpi:/var $ ls -ls
total 102440
     4 drwxr-xr-x  2 root root       4096 Jan 14 06:25 backups
     4 drwxr-xr-x  8 root root       4096 Nov 10  2022 cache
     4 drwxr-xr-x 33 root root       4096 Nov 10  2022 lib
     4 drwxrwsr-x  2 root staff      4096 Sep 12  2022 local
     0 lrwxrwxrwx  1 root root          9 Sep 22  2022 lock -> /run/lock
     0 drwxr-xr-x 13 root root       1180 Jan 16 01:17 log
     4 drwxr-xr-x 13 root root       4096 Jan 16 01:17 log.bak
     4 drwxrwxr-x  4 root root       4096 Jan 14 06:17 log.old
     4 drwxrwsr-x  2 root mail       4096 Sep 22  2022 mail
     4 drwxr-xr-x  3 root root       4096 Nov 10  2022 opt
     0 lrwxrwxrwx  1 root root          4 Sep 22  2022 run -> /run
     4 drwxr-xr-x  4 root root       4096 Sep 22  2022 spool
102400 -rw-------  1 root root  104857600 Sep 22  2022 swap
     0 drwxrwxrwt  7 root root        140 Jan 16 05:09 tmp
     4 drwxr-xr-x  4 pi   root       4096 Nov 10  2022 www
pi@emonpi:/var $

What is emonhub installed on?

Thanks @borpin , it is installed on
Raspberry Pi 4 Model B Rev 1.1
running latest updates

Thanks