Since the MQTT messages are almost a replication of the Log, it is quite a mess to work with them, the only way to work with it is to grab the IDX value.
I have few flows in node-red that handle lights/group, multimedia devices and security.
those 3 blocks are handled by a switch block that gets the IDX and do what it is supposed to do...
actually the message sent is the followig:
Code: Select all
{
"idx" : 5,
"name" : "Internal Temperature",
"id" : "00080A",
"unit" : 1
"dtype" : "Temp",
"stype" : "TFA 30.3133",
"nvalue" : 0,
"svalue1" : "41.2",
"Battery" : 100,
"RSSI" : 12,
}
Code: Select all
{
"idx" : 5,
"name" : "Internal Temperature",
"id" : "00080A",
"unit" : 1
"dtype" : "Temp",
"stype" : "TFA 30.3133",
"nvalue" : 0,
"svalue1" : "41.2",
"Battery" : 100,
"RSSI" : 12,
"topic": "TempSensors"
}

thanks
ciao
M