skip to Main Content
RPi Airquality Station: Setting  Up The Default Flow

RPi Airquality Station: setting up the default flow

Goal:

Connect to the airquality station’s node-red instance, and configure the Grafana node.

What you will learn:

How to connect to the airquality station’s node-red, and detailed info on the Grafana node configuration.

 

What you will need:

An airquality kit connected to the internet, as per this tutorial: https://t3alliance.org/rpi-airquality-station-setup-and-access/

 

Connecting to Node-Red:

After you have connected your pi to the internet (https://t3alliance.org/rpi-airquality-station-setup-and-access/) you’re ready to setup the default flow to log data properly to Grafana.

If you’re using the pi locally (with a keyboard and display plugged into the air-quality station) you can just open the browser and click the Node-RED bookmark in the bar.  If you’re on a different computer, first find the IP address to use from the mini-oled on the airquality station, and then on your own computer enter as the URL. IP_ADDRESS:1880. Our airquality station was assigned the IP address of ‘10.71.0.196’, so to access our Node-RED flow I use ‘10.71.0.196:1880’.

Configuring the flow:

The default flow is pretty big, but not that complicated.
The part we are interested in is at the very bottom and looks like this.

 

 

 

 

 

 

 

All the sensor-nodes are being injected into a Grafana node, and then the Grafana node is being injected into a text node to print the url onto the display.
If you double click the Grafana node you’ll get a settings page like this.

The default settings do work, and do log your data onto a webpage where you can view graphs etc. However the default location is somewhere in the Arctic Circle, and you get a random jumble of numbers and letters for your Grafana url.

So the only two settings that need changing from the default are ‘Geohash’ and ‘Location Name’.
For the Geohash you can click the link in the settings page, or here: http://geohash.gofreerange.com/

Scroll around on the map, and zoom in to find your location, be mindful of how many digits you use. The geohash data will be public on the world-map. You can tell from how specific the location is from the size of the squares.
Looking at this shot of east Hawaii, ‘8e98’ is pretty good at showing where I kind of am on the island. ‘8e98n’ Shows what half of hilo-town I’m in. And then ‘8e98ny’ shows the exact area of streets I might be on. I wouldn’t recommend going further than ‘8e98’, or even ‘8e9’.

The second option is the location-name, this will allow you to use that name in the aqeasy url instead of the serial number that resides there right now. You can’t just use anything you’d like though. Location Names are not reserved, or restricted; so if you use something obvious like ‘School’, or ‘Outdoors’ you might find your data being overwritten by someone else in the future.
One other caveat is that data always sticks to the name it was uploaded with, so if you change your location name any data you recorded with the previous name won’t be on the graph with it.
So whatever name you chose now, the data on your graph will be from this moment on.

You can leave Location Name blank, the only downside is you have to use the serial-number url to look at your data.
I’m using easyboticsHilo, so now my data is visible here: g.aqeasy.com/easyboticsHilo

Remember to hit ‘deploy’ in the top right corner after you’ve finished making changes.

The data on Grafana won’t update visibly for a few minutes after you’ve set this up.

 

Viewing your data:

Once you have set your geohash in the flow and deployed, your data will start being updated onto the public world airquality map.

http://map.aqeasy.com

Your own data is viewable at the URL displayed by the default flow. If you change the flow so that it’s not displayed anymore remember that it’s being constantly outputted from the grafana node.

Here is what my data looks like at http://g.aqeasy.com/0e1c6c307

Back To Top