Hello
i have some msg.payload coming from a Raspi-with433MHz Dongel.
They nicely drop in Node Red MQTT IN with output a parsed JSON object
The Question how do i splitt the Message to use them and later add to InfluxDB?
The id: will ich change, or how will it work when two device have the same ID?
Do i have to use the Switch node, to splitt the differen input?
Why do you think you have to split the message up? For example, You could send the msg to three different debug nodes and each one would have all the data. All you need to do is address the item you want like msg.payload.humidity
i have all 433MHz Message coming in with MQTT.
Some device i Know some not.
the one i know i would like to store it in a Database and also send message if Battery is low.
the device i am not sure should just be listed and after a while should be deleted
If you have multiple devices with the same 'id' is the 'model' different? Can you change the 'id' on the device?
is the data coming from the different devices different? for example, it one device reporting temperature and humidity while another is reporting if a window is open or closed?
If you have multiple devices sending in the same ID and the MODEL is the same, there is no way to tell which device it came from. That would have to be determined before the data makes it to Node-RED.
Once the data gets to NR, you you could use a switch node to send the msg to different legs of the flow.
@zenofmud Hello Paul
it is called up or send from a Raspberry Pi with 433 Dongel
rtl_433 -F json -M utc | mosquitto_pub -h 192.168.x.xxx -p 1883 -t home/rtl_433 -l
like this all come in!
time : 2020-12-14 22:10:55
model : TFA-Pool Id : 142
Channel : 1 Battery : 1 Temperature: 2.9 C Integrity : CHECKSUM
time : 2020-12-14 22:10:59 brand : OS
model : Oregon-THGR122N House Code: 16
Channel : 1 Battery : 1 Temperature: 23.20 C Humidity : 38 %
time : 2020-12-14 22:10:59 brand : OS
model : Oregon-THGR122N House Code: 126
Channel : 2 Battery : 1 Temperature: 22.70 C Humidity : 52 %
the model is strange because the THGR122N are two different device but send the same Information.
no i can't change the ID - i dont know where it commes from
i would have been thinking
a switch and sort/splitt the device between the known and the other
so switch model : Oregon-THGR122N and then a second switch for the channel or the ID
this both the data should go to a database
the other is just for curiosity what is arround which i could also be added to the known as soon i know where it stay
Can you put a debug node (set to display the 'Complete msg object) on the output of the mqtt-in node. After it spits out some data, expand all the items in the debug log and copy and past a couple into a reply.