Hi,
Let’s say I have 10, 20 or 50 sensors located around a building that transmit temperature and humidity data through mqtt in topics such as:
sensors/sensor1/temperature
sensors/sensor1/humidity
I would like to combine these in to a single message to add in to a database. I can use the join node to do this just fine.
My question, if I have a single mqttin node using wildcards to receive all the messages from the sensors, is the join node clever enough to only join messages from the same mqtt client? How will it handle multiple mqtt clients sending data in at the same time and is it possible for the wrong two messages will be joined?
Alternatively am I better to just send a single mqtt message containing both the temperature and humidity data as json etc?
When adding the data to the database I want to associate the sensor it came from. Should I pass the sensor name in the payload with the readings or extract it from the topic?
Any suggestions on how best to handle this would be appreciated.