Last week, I wrote about the tech we deploy on my parent’s 100 acre property.
Our goal is to be able to quickly and cheaply integrate new sensors and controls. We want to be able to buy a flow meter / particulate matter sensor / pressure transducer / other crazy thing off AliExpress, and get it integrated into our control plane without it becoming a massive project.
Too many electronics and automation projects just die on the desk. We want the flexibility of our own electronics, but we want to be off the breadboard and into production as fast as we can.
As a software developer, the place I often getting tripped up is, amusingly, at the coding stage. Some fairly simple electronics suddenly need a lot of code to actually integrate well. Writing it yourself is a blackhole that’s easy to fall into.
Last year, I fell in love with ESPHome: the perfect piece of glue between ESP-based devices and Home Assistant.
Walk-through
I sat down and recorded a 30 minute walk-through of getting started with ESPHome.
To follow along, you’ll need only three things:
- A running instance of Home Assistant
- An M5Stack Atom Lite (or any other ESP-based device you’re already comfortable with)
- A USB-C cable
It’ll take you through:
- 00:40 – Why Home Assistant
- 02:40 – Installing ESPHome
- 03:20 – Creating your first ESPHome node
- 06:00 – Handling secrets
- 07:10 – Controlling the RGB LED on the M5Stack Atom Lite
- 09:10 – Doing the first flash via USB, with esphome-flasher
- 14:15 – Adopting the device in Home Assistant
- 16:00 – Detecting the button on the M5Stack Atom Lite
- 17:10 – Cleaner code with substitutions
- 18:30 – Doing the subsequent flashes over-the-air
- 20:45 – Adding light effects
- 21:15 – Adding automation on the device
- 23:50 – The firmware from my intercom project
- 25:40 – Lightning detectors and particulate matter sensors
- 26:30 – “Covers”, for garage doors, blinds, and pool covers
- 27:40 – Opinions on Tasmota, in this context
- 28:50 – Other devices, like the Shelly1
Final Code
Here’s the final code from this demo: