I bought an EmonPi shield (V1.6) and a EmonTH a couple of years ago, I got them to work back then, but haven’t used them in some years.
I’d like to put them back to work, so I etched the recent SD image (21Jul21) on a new SD card. Connecting and configuring WiFi worked like a charm, but I do not get any inputs (red, n/a), even though voltage and CTs are plugged in. The EmonTH also does not show any values, I don’t even know if it managed to connect.
I noticed that the service “emonhub” in the Admin-tab is red and shows “Activating loaded activating auto-restart”. Starting it manually will not bring the inputs to life, and the service seems to stop again soon after. The emonhub log does not show a single line.
I tried rebooting, re-etching the SD-card and updating of everything, without success.
When you copy the system information, please use the Copy Markdown button and then just paste it here. Much easier to view and collapses the text as well (you can edit your post).
It will have done an update on first boot and there was an issue with emonhub (see other threads).
Rerun a full update and you should be fine.
However Trystan is about to release a new image so if there is no urgency, I’d wait a short while until he does to collect any meaningful data, then start with that new image.
Hi! this part i got resolved by giving /var/log/emonhub/emonhub.log rights to write. used: chmod 775 /var/log/emonhub/emonhub.log and then after emonhub service restart this solved.
but I have other probem. the inputs are not forwarded to emoncms. i see data coming in, but no inputs are generated.
I’ve the exact same issue. I got a freshly imaged SD card as shipped from Open Energy Monitor (due to the old one being corrupt) and hit update, and now emonhub hub wont start.
Hello @drc when did you write the SD card and boot it up? Did you do this all today?
I pushed a fix for this yesterday but if that didnt work for a newly built image today I will have to replicate this tomorrow and work out what’s going wrong…
Hi Trystan, thanks for the reply. The SD card was shipped already imaged from OEM so I simply put it in the emonpi and plugged it in, I went through the startup section, then to Admin to update it in case it needed it and realised the emonhub wasnt running and couldnt be started for anything more than a few seconds. Since then I’ve tried:
sudo chmod -775 /var/log/emonhub/emonhub.log
and
cd /opt/openenergymonitor/emonhub
sudo ./install.sh
and the emonhub service is auto-starting but wont start. I’ll try a system restart now and see how I go.
Hi, I’m not getting any output from the feedwriter unit in journalctl when I try to enable or restart the emonhub but maybe this output from the full journalctl might help-
NO OUTPUT FROM FEED WRITER UNIT:
pi@emonpi:/var/log/emonhub $ sudo journalctl -f -u feedwriter
– Logs begin at Sun 2022-11-13 19:44:56 GMT. –
Nov 13 19:45:13 emonpi systemd[1]: Started Emoncms feedwriter script.
^C
OUTPUT FROM JOURNALCTL -F:
Nov 13 21:45:43 emonpi systemd[1]: Starting emonHub data multiplexer…
Nov 13 21:45:43 emonpi systemd[1]: Started emonHub data multiplexer.
Nov 13 21:45:44 emonpi emonhub[14243]: usage: emonhub.py [-h] [–config-file CONFIG_FILE] [–logfile LOGFILE]
Nov 13 21:45:44 emonpi emonhub[14243]: [–show-settings] [–version]
Nov 13 21:45:44 emonpi emonhub[14243]: emonhub.py: error: argument --logfile: can’t open ‘/var/log/emonhub/emonhub.log’: [Errno 13] Permission denied: ‘/var/log/emonhub/emonhub.log’
Nov 13 21:45:44 emonpi systemd[1]: emonhub.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 13 21:45:44 emonpi systemd[1]: emonhub.service: Failed with result ‘exit-code’.
Nov 13 21:45:49 emonpi systemd[1]: emonhub.service: Service RestartSec=5s expired, scheduling restart.
Nov 13 21:45:49 emonpi systemd[1]: emonhub.service: Scheduled restart job, restart counter is at 1109.
Nov 13 21:45:49 emonpi systemd[1]: Stopped emonHub data multiplexer.
Nov 13 21:45:49 emonpi systemd[1]: Starting emonHub data multiplexer…
Nov 13 21:45:49 emonpi systemd[1]: Started emonHub data multiplexer.
Nov 13 21:45:50 emonpi emonhub[14250]: usage: emonhub.py [-h] [–config-file CONFIG_FILE] [–logfile LOGFILE]
Nov 13 21:45:50 emonpi emonhub[14250]: [–show-settings] [–version]
Nov 13 21:45:50 emonpi emonhub[14250]: emonhub.py: error: argument --logfile: can’t open ‘/var/log/emonhub/emonhub.log’: [Errno 13] Permission denied: ‘/var/log/emonhub/emonhub.log’
Nov 13 21:45:51 emonpi systemd[1]: emonhub.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 13 21:45:51 emonpi systemd[1]: emonhub.service: Failed with result ‘exit-code’.
^C
LOG FILE PERMISSIONS:
pi@emonpi:/var/log/emonhub $ ls -l /var/log/emonhub/emonhub.log
-rwxrwxr-x 1 root root 0 Nov 13 19:17 /var/log/emonhub/emonhub.log
pi@emonpi:/var/log/emonhub $
I’ve just booted up a new image and replicated the issue. I realise I made a mistake in the update script and did not pass a parameter the emonhub update script was expecting. I’ve now fixed this and pushed up the fix as an available update.
Could you both @drc@John_Woods try running an full update there to confirm that it works for you?
I’ve pushed your privileges up a notch, so you should be OK now. But if you saw the amount of spam and the like that we had to deal with under the old forum software, you’d fully understand the reason for these checks. As it is now, we can devote more time to helping genuine users like you - the snag is it takes Discourse (the software) a while to have confidence in you.