Setting up MQTT for the first time

image

Put the publish after you have the data you want else it is just sending the same value back out again - I suggest after the Power to kWh although I’m not sure that is the figure you actually want (as it isn’t cumulative I don’t think).

image
As explained here, the text here is the topic it is published on. A normal convention would be to have a base topic like data_from_emonpi/ and then the data topic so it becomes data_from_emonpi/grand_total.

in NR you then put that in this field
image

Thanks @borpin. I have now managed to get both my emonPi and an emonTx/ESP8266 to send valid MQTT messages to Node-RED. Very happy with that, and as always, very grateful for the help here.

Onwards & Upwards!

Sorry for the late reply. I never have seen your reply.
Since you advised me before to avoid integrate everything on the same rpi, i am thinking in another solution.
Thanks for the advise. It’s a better decision.

I have this: Seeed odissey.
The main problem for now is that i don’t know how to use the gpio pins in the same way as rpi does. From what i have read, Rpi’s have a library that makes it very easy to use gpio, specially on Node-red. On X86 PC’s, only have the possibility to use it by sysfs (but i think it’s deprecated in favor of another way), and i am no good coder to make use of it.
I know i don’t need the gpio in Odissey for the setup below but it would be better for me to use it as is more easy for me to measure impulses (water and gas) on node-red.

My first option is to use emonTX and emonTH to transmit to Rpi, then rpi transmit by cable to Odissey PC using mqtt and Node-red for another stuff (LCD with dashboard, impulse/consumption, gas and water and temperature info. Maybe some cameras streams and some relays but not for now.

@Paul, on node-red there is a node that makes use of Rpi Gpio https://flows.nodered.org/node/node-red-node-pi-gpio.
Do you know another that allows me to use x86 system’s gpio?

And sorry for my bad english.
Thanks
Celso