I was wondering if i can join 2 Sensordata streams by a message payload.
so if i get for example from sensor 1:
{"time": "09:44:34", "whatever1":123....}
and from the second sensor 2:
{"time": "09:44:34", "whatever2":343....}
and then combine them (by msg.payload.time):
{"time": "09:44:34", "whatever1":123,"whatever2":343....}
The msg.payload.time is a string....
and the thing is, that the data doesnt come exactly at the same moment and sometimes a timevalue is missed....
does anyone hava an idea? Maybe with the join node?
alright thank you. but is there a way to just join them to the "time" value?
So if the time of Sensor1 equals to time of Sensor2, pass them.
And if they dont equal continue checking after 2 seconds
The Join node has an option to send the joined message after a timeout following the first message. That may be what you want. Then after the join you can look at the contents and decide what to do with the data.