I am currently experimenting with a temperature sensor. Data sent by the sensor is received by KPN Things, which will then send it to ThingsBoard (via a webhook). Such data looks like this (example taken from KPN Things documentation):
[
{"bn": "urn:dev:DEVEUI:0123456789ABCDEF:", "bt": 1.58565075E9,
"n": "temperature", "v": 20.5, "u": "Cel"},
{"n": "batteryVoltage", "v": 3.6, "u": "V", "t": 10},
{"n": "active", "vb": true},
{"n": "modus", "vs": "Active"},
{"n": "image", "vd": "aGFsbG9vb29vISE="}
]
The problem is that ThingsBoard splits up this array, so we’re receiving multiple “messages”; in this case, {"bn": "urn:dev:DEVEUI:0123456789ABCDEF:", "bt": 1.58565075E9, "n": "temperature", "v": 20.5, "u": "Cel"}
, {"n": "batteryVoltage", "v": 3.6, "u": "V", "t": 10}
, etc.
What I want is to keep the original message, turn it into one object containing all the relevant info/stats, and then continue in the rule chain with that. Is this possible? (To be clear, the problem is how to receive the original array; extracting the relevant data and creating a new object won’t be an issue.)