New to node red struggling

hi im new to node red and mqtt i have a sonoff th flashed with tasmota and i am trying to get the temperature to show in node red dashboard. this is how i set it up and what i get


any help would be great
thanks in advance


Place a function node between your mqtt node and your ui node and write the following.

var temp = msg.payload.DS18B20.Temperature;

msg.payload = temp;
msg.topic = "Temperature";

Return msg;

The mqtt reply is a javascript object. You fetch the value from the object as demonstrated above.
The ui node needs a numeric value to display correctly.

The msg in node red is also an object. Always consisting out of minimum a topic and a payload.

Topic = description
Payload = value

1 Like

Or use a change node:


1 Like

Or in the Value Format field of the gauge put


thanks so much for the help i was pulling my hair out .

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.