Skip to content
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

RPI Air Quality Index (AQI) Project

This is based on the below project by Stephan from Open School Solutions.

Below are some additional features not included in the above project.

1. Remote JSON File
Copies .json files to GitHub page after each run. This allows viewing of the web UI from anywhere as well as a bookmarkable page.

2. Google Doc Support
Each time the script runs it logs the results to a Google sheet. This allows you to chart over time how good or bad the air quality is. Also allows you to add notes to groups or runs like (Ran from person X's house)

3. IFTTT Support
If the AQI reaches a certain threshold it send a WebHook event to IFFF to do things like turn your Nest Fan on or maybe a WebMo plug on to turn on (Or off) a Hepa Filter.

4. Volatile Memory Support (aka Ram disk)
Helps if you are doing things like routinely writing .json file and updating or erasing it, it's a good idea to use tmpfs in RAM.

5. External & Internal IP
If going to run in different locations having the internal or external IP can be useful to help geo locate where the reading was taken or based on a certain IP or location to do something different. For example if running from home then IFTTT will trigger Nest fan where if elsewhere you may not want this.

TIP: If connecting to the RPI and you don't know the IP you can SSH, VNC, or http to it by its host name like below (assuming you are on the same network)
ssh pi@rpizw.local. or http://rpizw.local./aqi/index.html

My Parts List
In my case I only had to buy the below 3 items and because I already had lying around a 16gig mem card, USB power cord, USB battery, and for setup only micro HDMI and keyboard/mouse

$5 RPI Zero W

$1 USB Female to Micro USB (Needed for the Air sensor USB to plug into the RPI Zero W)

$26 Air Sensor (Laser PM Sensor SDS011)

Optional Parts
$20 IFTT Smart Plug (Like a WeMo annd must support IFTT to trigger turning on something like a hepa filter)

$200 Nest Thermostat (Also to trigger the house fan to help clean the air)

$16 Box Fan (Also to trigger to help clean the air)

$51 Box if 6 Air Filters 20x20x1 MERV 13 (Tape to the box fan)

RPI Zero + Air Sensor Setup (Optional standard USB battery)

Google Sheet Chart Example

Optional Hepa Box Fan

You can’t perform that action at this time.