I managed to identify the fields I need and they are:
payload.data.aqi
payload.data.iaqi.pm10.v
payload.data.iaqi.pm25.v
I managed to write these values in InfluxDB but each with a different "measurement".
I would like these values to be written under one "measurement" with 3 fields (Time, AQI, PM10 and PM25).
To write to InfluxDB I use "node-red-contrib-influxdb".
I've read a lot on the net (discussion and official guides...) and I've managed to do a lot of things but I'm missing the last piece that I couldn't understand... could you help me?
Hi @jodelkoenig, could you show me how to do it?
Which nodes should I use?
What code should I write to isolate these fields and tell InfluxDB to create a "Measurement" with 4 fields (Time, AQI, PM10 and PM25)?
I didn't say previously, but you don't need to provide a time to influx, if the data is for the current time. Influx will add it automatically.
In addition, I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.
Thanks, now work!!
I added msg. before payload.data.aqi
It's very strange because if I copy the path from the original message payload printed by NodeRED (I followed the official guide...) I have this: payload.data.aqi, without msg. front!