Air Quality Meter over WiFi (Work in Progress)

Eric

local maker
Staff member
I'm documenting my progress on this project in this thread to make information a little clearer and easier to find. Discussion is totally encouraged though, the important bits will be updated into the top post of the thread if you're planning to build one too!

What: Air quality sensor that is accessible over WiFi

Why: To report indoor/outdoor air quality of a variety of locations within my home and share that data to the home assistant server to enable further automation in response to data.
I want to turn on the HEPA filter when the wild-fire smoke is here and warn me that it's still not safe to skip the respirator in the garage after a wood working session.

Hardware:
Programming:
This has all been done before, we can just cherry pick the various sensors + ESP8266 tutorials to assemble it into a web server with the data needed. Only basic programming literacy will be needed. I will be using the Arduino IDE and the ESP plugin. I will be using ESPhome flasher to load the ESPhome compatible code for connecting to home assistant.



Tutorials / Links
 
Last edited:
Last night I got to play with the actual hardware and got the DT22 reporting to a web server hosted on the ESP8266 via that first tutorial. This was fun and easy to do but in order to get that data easily put into my homeassistant server I will need to setup the ESP with the ESPhome code instead. I had trouble getting that on there before bed time so that's going to be the next attempt. For my reference the ESPhome flashing binaries are located here: https://github.com/esphome/esphome-flasher/releases

If you're running home assistant and have installed ESPhome you should be able to open it up on that server and flash esp from it's interface but it requires the machine you're operating it from to successfully communicate with the ESP over serial through the web browser. This requires using microsoft edge or google chrome according to their page and running through a windows 10 VM on macOS didn't work even though the USB was mounted and being read successfully by windows otherwise. I will just install the macOS binaries next time and try it that way. I will use the ESPhome interface on the home assistant server to connect it as the last step once it's already broadcasting.
 
It's been a while since I've flashed a new device, but you should be able to connect the ESP directly to the Home Assistant device and flash it from there. As in, connect your ESP directly to the rPI, then you go to your Mac and open ESPhome in your browser, choose the USB port with the ESP connected, and it does the rest. The only time I had to download the binaries was when I had a defective ESP32 (meaning that it made no difference, but it was a step I had to take to figure that out anyways).
 
I think that should work! It had said you could plug it into the server or the device your using to access it. Installing the binaries was a little lazier solution if that works since my electronics workbench is out in the garage and the home assistant server in the house but it might be more straight forward to plug it into the server.
 
Back
Top