The all arrive in separate messages and I have a MQTT node for each one.
So in total in this example I have 4 MQTT nodes.
I think it would be better to have them all inputted as one JSON message and separate only the Data I want ... for example Humidity - DHT 01 from the JSON ?
Then I only need one MQTT node.
The Arduino modules sending JSON data, I can most probably find out how to this with some searching.
But how do I do the Node-RED part ?
I am not sure what Node-RED nodes are best suited to this and the easiest to understand and implement and easy to update when i want to add more information ?
What mqtt topics are your arduinos publishing to?
if msg.topic === "Module 91 - Temperature - DHT 02 ..." then you are missing much of the power of mqtt.
Change it to "Module91/DHT02/Temperature" then a single mqtt-in node can subscribe to everything from Module91 - "Module91/#"
or DHT01 and DHT02 temperature only - "Module91/+/Temperature"
etc.
That was just the help I needed, I will look into each option and then decide.
At the moment I am doing a lot of restructuring of my flows in anticipation of this being run in Docker.
The flows have been built up over 4 years, while they work they could be improved, so these will all need updating, streamlining and hopefully easier to maintain in the future
So it maybe a while until I can actually do the Arduino & JSON, so I may have to come back to this thread.
Thanks for your help on how i can restructure my messages.
With another debug note attached to the output of the JOIN node I can get just the electricity_counter latest value.
But if i use the same payload and add that to a filter node.
I get ALL of the Module 22 data, I was expecting to just see only the electricity_counter ?
Sorry, last comment. you get ALL data because you subscribed to Module 22/# that means you will get Module 22/x and Module 22/sausage and Module 22/scoobydoobydoo etc.
What are you REALLY trying to do?
PS:
a better topic structure would be module/22/xxxxx this way you can subscribe to all modules module/# or a single module module/22/# or a specif topic of all modules module/+/temperature
Hi, yes I can see what you mean, I understand that now, must learn to look at the help on nodes, but my brain likes to work visually so I learn mostly from YouTube and Node-RED and you kind people on here
In fact you do not even need to use a Change node. The Gauge node has a Value Format field. In there you can put {{msg.payload.xyz}} and it will select that property for display for you automatically.