Enable access to Mosquitto on the latest EmonHub

This post is just a note/reminder on how to enable ports on the low write emonhub / emonpi raspberry pi prebuilt image so you can then access the already installed MQTT Mosquitto server

The Mosquitto server already runs, so really, all you have to do is allow access through the firewall (you might wann think about at least changing the port and ideally adding some authentication as well).

Enable write:


Then add the MQTT port to the firewall:

sudo ufw allow 1883

Now you can enable read only mode again


Check firewall status using sudo ufw status

It should look something like this:

pi@emonpi ~ $ rpi-rw
Filesystem is unlocked - Write access
type ' rpi-ro ' to lock
pi@emonpi ~ $ sudo ufw allow 1883
Rule added
pi@emonpi ~ $ rpi-ro
Filesystem is locked - Read Only access
type ' rpi-rw ' to unlock

Another way of doing this recommended by the folks at open energy monitor themselves you can find here EmonPi and Node-Red but it involves adding another package.

Category: blog

Tags: , ,

- November 16, 2015