I’m by no means an expert…
from what I see radio hardware is working and data making it to emonhub (you said when the system has inputs not updating you still see MQTT messages in emonhub.log and presumably serial frames like your screenshot in the same log file).
This tells me emonhub is doing its thing and the problem likely emoncms.
emonhub is a python application that gets the data from radio using an “interfacer” (which talks to either serial or SPI if this is a emonpi2) and then publishes it to MQTT. It does not populate emoncms (what you see as the User interface with inputs).
emoncms is a PHP web application that gets data via emoncms_mqtt.php which subscribes to the MQTT topic that emonhub is publishing to (normally emon/ ) and puts the data into emoncms inputs.
To me this looks like the broken part…
Can you ssh in to the box and do:
ps -ef | grep mqtt
which should yield something like :
root 1128 1 26 May09 ? 02:24:59 /usr/bin/php /var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.php
pi 22730 16947 0 00:33 pts/1 00:00:00 grep --color=auto mqtt
also run
systemctl status emoncms_mqtt
which should yield something like:
emoncms_mqtt.service - Emoncms emoncms_mqtt script
Loaded: loaded (/etc/systemd/system/emoncms_mqtt.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-05-09 14:59:17 BST; 9h ago
Docs: https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
Process: 950 ExecStartPre=/bin/mkdir -p ${LOG_PATH} (code=exited, status=0/SUCCESS)
Process: 1120 ExecStartPre=/bin/chown ${USER} ${LOG_PATH} (code=exited, status=0/SUCCESS)
Process: 1123 ExecStartPre=/bin/touch ${LOG_PATH}/emoncms.log (code=exited, status=0/SUCCESS)
Process: 1125 ExecStartPre=/bin/chmod 666 ${LOG_PATH}/emoncms.log (code=exited, status=0/SUCCESS)
Main PID: 1128 (php)
Tasks: 1 (limit: 1571)
CPU: 2h 25min 51.658s
CGroup: /system.slice/emoncms_mqtt.service
└─1128 /usr/bin/php /var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.php
Look too at /var/log/emoncms/emoncms.log
You may want to enable more logging for emoncms - edit /var/www/emoncms/settings.ini and under the [log] section set level to 1, then restart with
systemctl stop emoncms_mqtt
systemctl start emoncms_mqtt
[EDIT]
Check feedwriter too please :
pi@emonpi: systemctl status feedwriter.service
feedwriter.service - Emoncms feedwriter script
Loaded: loaded (/etc/systemd/system/feedwriter.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-05-09 14:59:17 BST; 9h ago
Docs: https://github.com/emoncms/emoncms/blob/master/scripts/services/install-service-feedwriter.md
Process: 951 ExecStartPre=/bin/mkdir -p ${LOG_PATH} (code=exited, status=0/SUCCESS)
Process: 1121 ExecStartPre=/bin/chown ${USER} ${LOG_PATH} (code=exited, status=0/SUCCESS)
Process: 1124 ExecStartPre=/bin/touch ${LOG_PATH}/emoncms.log (code=exited, status=0/SUCCESS)
Process: 1127 ExecStartPre=/bin/chmod 666 ${LOG_PATH}/emoncms.log (code=exited, status=0/SUCCESS)
Main PID: 1131 (php)
Tasks: 1 (limit: 1571)
CPU: 18.206s
CGroup: /system.slice/feedwriter.service
└─1131 /usr/bin/php /var/www/emoncms/scripts/feedwriter.php
Let’s see what that shows…
[EDIT2]
You could also try downloading MQTT-Explorer http://mqtt-explorer.com and point it to your emonpi , you are looking at the emon/ topic to see that it is being published to correctly (this will eliminate the whole emonhub part from the equation if it is)… Here’s a screenshot (note your emonpi entry is likely called emonpi not emonpiCM like mine):
Please post an emonhub.log snippet with debug enabled when the system isn’t working… I’d like to verify the frames being sent & received look correct (correct nodeID etc).