RPi Airquality Station: Logging Airquality-Data to Grafana
Log data to an online grafana database, and then view the resulting graphs and maps.
What you will learn:
- Configuring easybotics air-quality sensors,
- setting up the grafana logging node
- viewing the logged data.
What you need to know:
- Full easybotics air-quality station kit
- Raspberry pi
- Internet Connection
Setting up node-red:
Start Node-Red and navigate to 127.0.0.1:1880 using the web browser. Drag in all the air-quality nodes, and the BME node from the palette.
Select the C02 node, from the drop down menu select ‘Add new sensor manager’; the only configuration here is to switch the ‘Automatic C02 calibration’ to ‘Manual’.
By default the C02 Sensor will zero itself to the lowest C02 level it detects in a 24 hour period, pinning that value to 400ppm which is the atmospheric baseline. If your air-quality station is indoors, or in a crowded place this might lead to inaccurate data so you can change it here to manual.
Next select the PM concentration node, and Particulate node and select the Sensor Manager you made from the dropdown.
With this the config is far enough too start printing data to the led-matrix (if you have one); with the setup looking like this.
For the next steps you’ll need the influxdb username and password that should have been provided to you.
Select the ‘Publish to Influxdb’ node and enter your username and password here.
For the GeoHash field you’ll need to use a tool like this one: http://geohash.gofreerange.com Drag the map around, and click to generate different scale geohashes. Remember that the more digits you use the more specific of a location you’ll be providing to the T3 database.
Now you can link all the sensor nodes into the publish node like so:
The URL status below the node is where you can find your logged data, sadly you can’t copy and paste out of the status bar thing. The node pushes the url out as a message, so using a debug node you can retrieve the URL and view your graphs.