Multiple DS18B20 temperature sensor (Tasmota->NodeRed->InfluxDB))

Hi there,
I have been tired to resolve an issue for the last couple of days but unfortunately, it seems is over my knowledge so here I am here writing hoping that someone would help me.
I have two DS18B20 sensors connected to WeMos module running tasmota firmware. the flow i have is:

And the message just after the MQTT node is
How do I manage to send the data to influxdb?
Currently influxdb only sees the first sensor (DS18B20-1) of course there is influxdb node instead of debug node

1 Like

Take a look at the Info panel for the influxdb node

If msg.payload is an object containing multiple properties, the fields will be written to the measurement.
For example, the following flow injects three fields, numValue , randomValue and strValue into the same measurement with the current timestamp.

msg.payload = {
   numValue: 123.0,
   strValue: "message",
   randomValue: Math.random()*10
return msg;

So you need to get your data into that form.
Start by placing a debug node after the JSON node. Where your data will be a javascript object that you can manipulate.
Then use the guide to "working with messages" in the docs which will show you how you can identify the right path to a bit of data and use the change node to move them around...

If you get stuck, come back, but hopefully that's enough of a nudge for you to do it.

Side note: you can configure the mqtt node to output json, no need for the json node.

For the last hours I have tried to work it out but since I am back here you know what the answer is.......didn't succeed. I have set up an inject node to simulate json data and tried different options, unfortunately, would not happen today. so here is my test flow I someone could take a look I would be grateful.


Unfortunately your flow isn't currently importable.Please read the following post How to share code or flow json and then edit the above message.

You want to Move the data in the change node, and as the influxdb node requires it to be in msg.payload, you need to put it there...


I can't thank you enough ukmoose. Thanks, everything is working now.

And I'll try to learn from here on how to place the two sensors DS18B20-1 and DS18B20-2 under the temp something like that

Thanks once again!!!!

1 Like

For those who run into this. Another way to deal with the problem could be with jsonata expression:

still learning, NR is fun :slight_smile: