Power data via MQTT to openhab

I use an Iotawatt to measure power in my houshold. As datacollector i run a emonpi with emoncms on it.

Need some data also in openhab

To being able to publish to the internal MQTT server i add in Key16 the publish to MQTT process.
imageimage.png839x47 3.15 KB

This seems to work correct as I controlled the output with a free MQTT client MQTTFX and see data every 10 seconds.

But the setup on the client side seems to bee not correct:

OPENHAB MQQT binding installed and mqtt.cfg adapted as following


in openhab in my itemfile i defined following item:

Number Gesamtverbrauch { mqtt="<[mosquitto:emon/IotaWatt/Verbrauch_gesamt:state:default]" }

As MQTT topic is documented as :

[basetopic]/[node]/[keyname] i use

emon is the base topic (found in the docu)
Iotawatt is my Node
Verbrauch_gesamt is my Topic which i will subscribe

But get no values to openhab ?? Think there is something wrong with the topic syntax

Don´t find the failure in my configuration

Maybe somwhere have done similar and could give my advice


The emon base topic is for incoming data to EmonCMS. Use a different basetopic for outgoing MQTT.

Is OpenHab on the same machine as EmonCMS? It is worth using the command line tools to check you can see the MQTT data on the OpenHab machine.

I only try to use outgoing topic to bring data from my local EMONCMS (Raspi3) to my other Raspi3 where openhab 2.2 is installed on.

Problem is i am not familar with command line tools. I use command line via Putty but don´t know command
how i can check i.e. topicstructure from the MQTT server . My used MQQT client scans the server and shows the keyname he found.

But i need basetopic and nodename and keyname to subscribe to the topic.

Thanks borpin

Now i understand .
Gave in EMONCMS in the publish to MQTT process a new name ( Verbrauch/Haus/gesamt)

and adapted item to

Number Gesamtverbrauch { mqtt="<[mosquitto:Verbrauch/Haus/gesamt:state:default]" }

and voila values are correct in my sidemap.

Thanks for the hint

1 Like