By default it sends data to their API, but all of the code is fully open source so I can modify it to send anywhere. I have no idea of the best way to send it to HomeAssistant though. It want to post to an API endpoint with a JSON payload. Is there an easy way to have HomeAssistant listen for this or other suggestions? Someone on JeffGeerling’s blog mentioned they modified it to use MQTT and got it reporting to HA but didn’t link to any code. Monitoring my home’s air quality (CO2, PM2.5, Temp/Humidity) with AirGradient’s DIY sensor | Jeff Geerling
Note: Jeff recently replied about using ESPHome to get the data in to HA. I haven’t travelled down that road either, but I’m open to trying
I have an AirGradient running with ESPHome and have created a little GitHub repo as a tutorial for other folks:
I also want to write something up on my blog in a few days on how I use this and which values are important.
For now, just open your window when the CO2 level is above 1000ppm. That is the threshold when you say: “It smells like someone died in here”.
Tested and verified with my girlfriend’s nose
Finally got around to soldering my kit together and the PM sensor is reading 0’s across the board. I’m unsure if I soldered it wrong, but the fan is spinning up so it’s definitely got something. I still need to 3D print the case, anyways.
[21:59:18][D][pmsx003:169]: Got PM1.0 Concentration: 0 µg/m^3, PM2.5 Concentration 0 µg/m^3, PM10.0 Concentration: 0 µg/m^3
[21:59:18][D][sensor:113]: 'Particulate Matter <1.0µm Concentration': Sending state 0.00000 µg/m³ with 0 decimals of accuracy
[21:59:18][D][sensor:113]: 'Particulate Matter <2.5µm Concentration': Sending state 0.00000 µg/m³ with 0 decimals of accuracy
[21:59:18][D][sensor:113]: 'Particulate Matter <10.0µm Concentration': Sending state 0.00000 µg/m³ with 0 decimals of accuracy
Definitely double check the soldering order/connections. I did that wrong.
I would also recommend double checking the model number of the PM2.5 sensor you ordered. ESP Home has support for different models. When I had the wrong model in my config, I was getting all zeroes. Pretty sure pmsx003 is the correct value for the default sensor linked on AirGradient, but there could have been a mix up somewhere.
Finally, my sensors do read 0 at times. Get some particulates flowing and let it run for a few minutes!
Adding my version of a ESPHome file to replicate the functionality of AirGradient, including reporting to the AirGradient API for this website in addition to HomeAssistant
Thanx for your code @ajfriesen. One thing I was wondering. Is there any way to have a some kind of slider (or similar) to set brightness of the display as it’s possible for NSPanel, see picture
Thanks! Finally got my package (AirGradient DIY Pro kit with the additional SGP41 TVOC Module), and have set-up the first one! Made some additions/changes to the configuration found on your page.