emonPi Inputs not working

The Inputs on my emonPi have stopped updating, and just show “n/a NULL”. I am not sure how to get them working again. I have rebooted the Pi, but that didn’t help.

The only change I have made (knowingly) is turning on the MQTT broker within the pi, following the guidance at Service Credentials - Guide | OpenEnergyMonitor

Any ideas?


Hello @haffle, the MQTT broker should have been on already as its the way the data is transferred internally between a software component called emonhub (which receives the data from the emonpi) and emoncms.

Did you change the MQTT settings?

@TrystanLea - I didn’t (knowingly) change any settings other than the MQTT password, by typing sudo mosquitto_passwd -c /etc/mosquitto/passwd emonpi and sudo service mosquitto restart via ssh. Maybe that was the wrong thing to have done if emonhub (something that I have not been particularly aware of before) relies on MQTT. Should I change it back again and see what happens?

thats fine, you need to update your MQTT password in emonhub.conf .eg:

:sob: Sorry!

I have updated & saved the new MQTT password within emonhub as shown, & rebooted the emonPi, but the Inputs are still showing “n/a NULL”.

What do you see on the admin page under service running:

are both emoncms_mqtt, emonhub running?

Yes; does the feedwriter entry imply an issue?

It always was on (as I said previously)!

You also need to update the mosquitto credentials in the settings.ini. I anticipate that, if you look, you will find errors in the emoncms log.

If that still fails, you need to test the credentials with a mosquitto_sub (or pub) from the command line.

Another curl up and die moment. :cold_face:

Evidently changing the MQTT password created more problems than I had anticipated, and so I put it back to what it was - both via sudo mosquitto_passwd -c /etc/mosquitto/passwd emonpi and by changing it within emonhub.

That immediately brought the Inputs back to normal and are updating. All very embarrassing, but at least I have got out of that hole - with assistance from here… So thank you all !

I will now try to determine the correct nomenclature to use for the MQTT messaging, and will revert back later.

1 Like

Just use the user/password within the NR Broker configuration under security tab. It will connect quite happily.


Obvs not with that username…

1 Like

Good point, of course, that should then do it @haffle if you want to try the different password.
I will update the documentation to include these steps

1 Like