emonPi new SD image - emonHub failing

Hi all,

I am sure I have not done something right, but any pointers would be appreciated.
My emonPi was purchased in Jan seemed to stop booting correctly about a week ago, had to move it.
Could not get connected to it, web or ssh, so through I would just flash the SD card with a new image.
As it was bought in Jan I went for the emonSD-17Oct19 image.
Unfortunately after that I cant get the emonHub to run.
I also tried a manual update from the web interface and scripts but that did not help, in fact I now do not have any logs visible in the admin and enmonhub sections.
I did SSH in to check that the logs are empty, and they are!
Any suggestions? sorry its a noob question, but lost.

Hello @boydo, could you try running an update from the Admin page again today? We made some changes on Friday that should hopefully fix the emonhub issue. When did you flash the card?

Hi All,

My system has been running fine for the last 15days. I had the issue that the emonhub Failed. I have just reflashed the SD card and restored my backup. emonhub failed again.

I have run the update but log says nothing to update

hi there, sorry same thing. flashed the SD again and then watched the update happen on the log on first boot.

had and update log attached.

emonpiupdate.log.txt (46.7 KB) emonhub (3).log.txt (155.0 KB)

Hi All,

I flashed the SD card twice and had the same error after importing my setup “emonhub - Failed”

The only thing that if found to work was the following;

cd /opt/openenergymonitor/
rm -r emonhub/

answer Y to all delete confirmations

cd /opt/openenergymonitor/EmonScripts/install

I do not know why it failed

Thanks for the logs @boydo they look good to me? it looks like emonhub is running and receiving data?

Thanks @fostersimp any chance of a screenshot of exactly what you are looking at when you see this error?

Thanks Trystan for looking at this. Unfortunately I am still not getting any data.
No data on the inputs screen and I know there is a temp sensor connected. No feeds and when looking at the Services section on the Admin web interface the emonhub states Failed, few screen shots below if that helps.



I did however notice something interesting the last time booted emonPi for the first time after I flashed the SD card and I just did it again to confirm. When going directly to the admin web interface, before updates are complete on first boot, I can see data flowing in the inputs section of the web interface. This would indicate to my simple brain that the hardware seems ok?

Below is an image of the Services section pre update.


My emonbase had a similar problem this morning after an update.
I have tried running the update again and trying to restart the emonhub service - no luck.

Yes, also haivng hub fails after update/reboot. Tried a full udpate, same deal.

Thanks all. Im trying to see if we can replicate this here. In the mean time if you are comfortable with SSH could you try:

sudo service emonhub stop
cd /opt/openenergymonitor/emonhub
python src/ --config-file=/etc/emonhub/emonhub.conf

Im expecting that this may crash out with an error, if you can copy the error here that would be great, thanks!

1 Like

Thanks again, results below.

[email protected]:/opt/openenergymonitor/emonhub $ python src/
Traceback (most recent call last):
File “src/”, line 302, in
setup = ehs.EmonHubFileSetup(args.config_file)
File “/opt/openenergymonitor/emonhub/src/”, line 74, in init
TypeError: super() takes at least 1 argument (0 given)

Should it not be python3

from systemctl status emonhub.service

python3 /usr/local/bin/emonhub/ --config-file=/etc/emonhub/emonhub.conf --logfile=/var/log/emonhub/emonhub.log

you missed the config parameter

python src/ --config-file=/etc/emonhub/emonhub.conf

and I think it should be python3

yes sorry try:

sudo service emonhub stop
cd /opt/openenergymonitor/emonhub
python3 src/ --config-file=/etc/emonhub/emonhub.conf
1 Like

I have had same yesterday after a few power fails and restarts and seems this upgrade happened at same time which confused things

Running emonhub service by itself I got this message:

[email protected]:~# python3 /usr/local/bin/emonhub/ --config-file=/etc/emonhub/emonhub.conf --logfile=/var/log/emonhub/emonhub.log

Traceback (most recent call last):

File “/usr/local/bin/emonhub/”, line 26, in

from interfacers import *

File “/opt/openenergymonitor/emonhub/src/interfacers/”, line 5, in

import paho.mqtt.client as mqtt

**ModuleNotFoundError: No module named 'paho'

SO then I tried:

pip3 install paho-mqtt

Which installed a missing module

After a restart emonhub still would not start… but now saying “missing emonhub.conf” so I recovered that from a recent backup and now seems all working - or certainly emonhub is started and collecting data

Yep that’s now running after that command. On restart it does not run.

Yep, back up and running until ending process

Thanks all

@Tockley @boydo did you just do the 3 commands I mentioned or did you run pip3 install paho-mqtt as well?

Just the 3 commands and the process runs live in terminal, MySolar app starts updating, etc. But of course closing terminal or interrupting process stops emonhub.