Air Sensors v2
Since making some simple air sensors last year, I've enjoyed having the graphs of temperature and humidity through my house this winter. I wanted to iterate on the designs of the devices, and also to add new sensors. But I found the development process with the Arduino IDE tedious, and as the USB connection didn't work with the ESP32 from my mac, the project ended up on the back-burner for quite some time.
Recently though, I picked it back up again. An OSX upgrade has fixed the USB drivers so I can flash an ESP32 from my laptop. And rather than code the devices myself, I decided to investigate the ESPHome project for the firmware.
I was aware of ESPHome back when I wrote the air sensor code myself, but back then I was interested in the process of coding the ESP32 directly, and interfacing with sensors. The novelty passed however, and I'm quite happy now to outsource the process of investigating the data-sheets of every cheap sensor I buy off Aliexpress to the contributors of the ESPHome project.
Switching was easy - the ESPHome project is very slick - it even has a web based UI to flash the ESP32 using the web-serial API. This means you can configure the device using their web based dashboard, and upload to the ESP with no additional tooling from your browser.
There are a few warts - it took far too long for me to work out how to run the ESPHome dashboard in the same docker-compose file as I run Home Assistant. I spent a lot of time reading about mDNS and bridging docker networks before realising that I just needed to restart all the docker-compose services. Fighting with docker has become an all too common part of my projects.
But once everything was running, I had the ability to run over-the-air updates to the devices, and see their logs (although I still need to assign each device a manual IP as mDNS still isn't working).
I also added a little CO2 sensor so I could monitor air quality in the room.
With this, and some protoboard soldering, v2 of my air sensor is starting to look pretty slick.