Been reading through this post and trying to do something similar ( i have flashed a few energy plugs to Tasmota and also have Home Assistant up and running)…
Where are you running NodeRed? Have you any instructions on the NodeRed piece?
Assume on the EMONCMS Host or on something like home assistant?
I have been trying for a few hours tonight to get some basic data off a Shelly device or even a Tasmota into the MQTT broker already installed via my existing emoncms install… I have node-red installed but still unsure of what way the flow from the device (shelly or tasmota) should work…
I assume it is device → MQTT Queue (in my instance the one on emoncms) → node red → another mqtt queue (on my emoncms device) → read in my EMONCMS…
Am I right? I appreciate any clarity, insight or help you can provide
Yes, they all feed into the same MQTT broker, first under their own topic (e.g. Smartplug/Smartplug1/SENSOR/#) , then into the NodeRed flow, which parses it correctly for Emon, and then post it back to the MQTT broker under the emon topic (emon/Smartplug1).
If you put debuggers on the relevant parts of the flow, it helps to see whats going on:
I am struggling to get a topic and connection currently to the MQTT queue running on my EMONCMS PI up and running… How do I set that up to enable a shelly or tasmota device to connect and onto the queue?
I’m not sure you are understanding how MQTT works - I suggest a bit of googling.
To connect to the MQTT Broker on the emonpi, you need to tell the Shelly or Tasmota flashed device to send their data to that Broker. On tasmota, you need (from the console);
Thnx Brian, I was playing more today, I was struggling to understand the AUTH Details for the MQTT Server running via the EMONCMS install, so used the MQTT server for testing setup on my HOMEASSISTANT pi.
Have been using the mosquitto_sub client to view a topic… Will try the tool (MQTT.fx) you recommend, would love to be able to view/query what are all the topics which the MQTT server has and then subscribe to the appropriate ones etc…
Why and (possibly answering the first too) where is it stated regularly? I’ve not seen this advice before.
How much do I really need to buy, care for and feed another RPi just to run NR? Why would running it on another RPi not be a recipe for disaster as much as running on an emonPi? Would it be any less disasterous running NR alongside emonCMS on a RPi using emonSD?