Adding temp and humidity to influxdb

To close this out, what I got to work was a Nodered MQTT in node connected to topic reading a parsed JSON object:

[{"Temperature":57.4, "Humidity": 45.6},{"Location:" "RV"}]

It passed that msg payload to an Influxdb out node which received it as an array of 2 objects:

environmentTopic : msg.payload : array[2]
array[2]
0: object
Temperature: 60.7
Humidity: 40.6
1: object
Location: "RV"

My data in the database still looks basically the same, but if I show tags in the database I see:

 show tag keys
name: environment
tagKey
------
Location
> show tag keys
name: environment
tagKey
------
Location
> 

So I think I have it right??

I think this is my confirmation. The output from the select shows before Location was tag and after:

 select * from environment group by Location limit 3
name: environment
tags: Location=
time                Humidity Location Temperature
----                -------- -------- -----------
1610056066283658222 46.6     RV       57.7
1610056126445212027 46.6     RV       57.7
1610056186564122372 46.7     RV       57.7

name: environment
tags: Location=RV
time                Humidity Location Temperature
----                -------- -------- -----------
1610113254370362806 45.6              57.4
1610113314536607421 44.9              57.7
1610113374705172706 44.3              58.1
> 

Yep, that looks good.
If you use Grafana for drawing charts note that there is a mechanism in there for defining a chart and providing a list of rooms, it will then auto-generate a set of charts, one for each room.

1 Like

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