Updating ESPHome Devices Sequentially with Home Assistant Scripts

Why I Needed Sequential Updates I maintain 20‑plus ESPHome nodes on a small ARM‑based Home Assistant server. Each OTA update forces a full C++ compile, which can take ≈ 5 min per device. Two compiles at once, however, balloon the total wall‑time (CPU contention + I/O) and can push the server to its limits. I opened esphome/feature‑requests #2171 asking for a shared build‑cache across devices—because most of my YAML files differ only in pin mappings. If the cache wasn’t per device, maybe I could have kicked off all devices at once, or even used esphomes own “update all” as it had its own issues with not being able to run for hours and hours. Until that feature lands, the workaround has been to update devices strictly one after another. ...

May 12, 2025 · 4 min · Michael Bisbjerg

Smart Refresh Schedule for Sensors in Home Assistant

Polling a sensor at a fixed interval — say, every 5 minutes — is simple to set up. But in practice, it can be wasteful or inadequate: polling too often wastes bandwidth and may hit rate limits, while polling too slowly can leave your data stale when you need it most. Ideally, we’d poll frequently when someone might be watching, and rarely (or not at all) when the house is asleep or empty. That means dynamic polling based on context. ...

May 9, 2025 · 4 min · Michael Bisbjerg

Lets Encrypt organized for reverse nginx proxy

This is a short post on using Let’s Encrypt to get TLS certificates for NGINX virtual hosts. The setup assumes: Ubuntu NGINX hosting multiple domains A scheduler (e.g., cron or Rundeck) Let’s Encrypt Let’s Encrypt offers free domain-validated (DV) certificates for HTTPS and other secure services. letsencrypt.org GitHub Initial Setup I run multiple web services on VMs behind a single public IP. My NGINX proxy manages SSL termination and routing using virtual host configs. ...

July 7, 2016 · 2 min · Michael Bisbjerg