At Home with ESPHome

12 devices

in-progress

ESPHome changed everything about how I approach smart home hardware. Before discovering it, I was at the mercy of whatever Tuya-based firmware came pre-loaded on cheap sensors. After? I can flash custom firmware onto a $4 ESP8266 and have it talking to Home Assistant in under an hour.

What is ESPHome?

ESPHome is a system for programming ESP8266 and ESP32 microcontrollers using YAML configuration files rather than C++. You describe what sensors are connected and how they should behave, and ESPHome generates and flashes the firmware.

For someone who can write YAML but finds C++ intimidating, this is a revelation.

My device fleet

After a year of tinkering, I have 12 ESPHome devices deployed around the apartment:

  • 4x temperature/humidity sensors (DHT22, one per room + balcony)
  • 2x motion sensors with ambient light detection
  • 2x door/window contact sensors (reed switches)
  • 1x CO2 sensor (SCD40 — the good one)
  • 1x leak detector under the sink
  • 1x plant moisture monitor (the plant is doing fine, thanks for asking)
  • 1x custom power monitor for the server rack

The build process

The workflow for a new device is surprisingly smooth once you have the tooling set up. Define the device in YAML, flash over USB the first time, then all subsequent updates happen over WiFi (OTA updates).

The YAML for a basic temperature sensor is embarrassingly simple — this is placeholder content and the full tutorial is being written.