Filter Payload Data for Dashboard

#1

Hello,

Noob question.

I have a node extracting data from a BME 280 sensor. The payload comes out as follow

{“temperature_C”:21.77,“humidity”:52.70266127999612,“pressure_hPa”:1005.302539660442,“model”:“BME280”,“heatIndex”:24.842263805971022,“dewPoint_C”:11.683990939913583,“altitude_M”:66.34021220673784,“temperature_F”:71.186,“pressure_Hg”:29.68657143994413}

What is the best way to filter out just the “temperature_F” data so I can put it in a gauge in a dashboard?

Thanks.

Pedro

0 Likes

#2

Try to put on the gauge {{msg.payload.temperature_Fº}} or {{msg.temperature_Fº}} I’m not sure

0 Likes

#3

If the payload is a string rather than a javascript object then first feed it through a JSON node, then it will be an object and you can access the value by msg.payload.temperature_F.

0 Likes

#4

@davidcgu Either {{msg.payload.temperature_F}} or {{payload.temperature_F}} should work. - You can drop the msg.

0 Likes

#5

That worked. Thanks Guys!

0 Likes