Skip to content

geerlingguy/airgradient-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirGradient - Prometheus WiFi Sketch

Arduino CI

AirGradient has a DIY air sensor. I built one (actually, more than one). I want to integrate sensor data into my in-home Prometheus instance and graph the data in Grafana.

So I built this.

How it Works

If you're using the official AirGradient Arduino sketch (C02_PM_SHT_OLED_WIFI), you can configure it to enable WiFi and send data to a remote server every 9 seconds (as it cycles through the display of PM2.5, CO2, temperature, and humidity values).

By default, it sends a small JSON payload to AirGradient's servers, and you can monitor the data via their service.

This project configures the AirGradient sensor for local access (instead of delivering data to AirGradient's servers), and includes two configurations:

  1. AirGradient-DIY: This is an Arduino sketch with all the code needed to set up an AirGradient sensor as a Prometheus endpoint on a WiFi network, suitable for scraping from any Prometheus instance (e.g. geerlingguy/internet-pi)
  2. AirGradient-ESPHome: This is an ESPHome configuration which integrates the AirGradient sensor with Home Assistant using ESPHome.

Please see the README file in the respective configuration folder for more information about how to set up your AirGradient sensor.

Contributing

If you are adding a new library or bumping the version of an existing one, update the GitHub action Arduino CI (arduino.yaml) accordingly.

License

MIT.

Authors

ESPHome configuration adapted from code by: