Our Home Assistant setup has sensors for environmental data such as temperature, humidity, water leaks and air pressure but one type of sensor we have been missing is the ability to monitor outdoor air pollution and quality levels.
The air quality in my town varies greatly during the year and with different weather conditions and being able to monitor and log this will be interesting to add to our smart home system.
We found an open source air monitor called AirGradient Open Air Outdoor Air Quality Monitor from airgradient.com which is available in kit form or fully built and ready to use.
The AirGradient Open Air Outdoor Monitor measures PM2.5, CO2, TVOC, NOx, temperature and humidity, in real-time.
It's easy to set up and offers a cost-effective way for individuals, schools, or community groups to monitor local air quality and share the information online using sites such as the AirGradient map.
We purchased the kit version of the sensor from AirGradient and after a few weeks kit arrived.
Building the Kit
A power supply is not included and it requires a 5V, 2 Amp USB power supply.
The kit is supplied with the following components:
- AirGradient Open Air PCB with ESP-32-C3
- Plantower PMS5003T PM Sensor
- SenseAir S8 module NDIR CO2 Sensor
- SGP41 module TVOC/NOx Sensor
- 2x JST 8 cross-over cables for connecting PM and CO2 sensors
- 4 Meter long USB-C cable for flashing and power
- UV-resistant injection molded ASA plastic enclosure
- Torx T6 Screws
- Torx T6 Screwdriver.
The AirGradient website has detailed assembly instructions and assembly only took us a few minutes. The kit comes with the software flashed to connect it to the AirGradient dashboard and map. The firmware can be updated online at the AirGradient website by connecting the device to a computer using the USB cable. We found that the update process failed using an Apple Mac and Chrome browser but the update installed correctly using a Windows 11 computer and Chrome.
There is an onboarding system on airgradient.com/onboarding/welcome which takes you though connecting to the sensor to add your Wi-Fi network and creating an account with AirGradient to allow the data to sync online.
With the sensor setup the air quality data was now live on the AirGradient Map with an icon showing the sensor location in Swanage.
Mounting Outdoors
We installed the sensor on our garden shed.
Home Assistant
We then setup the AirGradient in Home Assistant using the AirGradient integration and the device was auto-discovered by Home Assistant.
The integration will fetch data from the AirGradient device. The following sensors are available:
- Carbon dioxide
- Humidity
- Nitrogen index
- PM0.3 count
- PM1 density
- PM2.5 density
- PM10 density
- Raw nitrogen
- Raw total volatile organic compounds
- Signal strength
- Temperature
- Total volatile organic compounds index
I added the sensors to a new page on Home Assistant as shown below:
Long Term Logging
On my long term logging website for smart home data, I created a new database table and added new pages to show data from the sensors which is uploaded every 10 minutes via Home Assistant.
Historic data can be viewed on https://home.briandorey.com/airquality/
Comments