That solution relies on an MQTT broker holding the message, and the device checking for this pending message on boot: It’s essentially an advertised maintenance mode.Įmad hit this challenge in his project and implemented the solution that’s documented with the ESPHome Deep Sleep Component. When the device next wakes up, it’ll read this flag, and skip a further sleep cycle. The solution: Publish a flag that says “stay awake”. It’s incredibly hard to push an over-the-air firmware update to the device when it’s only awake for a few seconds at a time! The challenge: Combining deep sleep behaviour with over-the-air updates.
He’s working on battery power, and thus needs to put the device into deep sleep most of the time to conserve energy.
ESP-based devices, like the M5Stack Atom, are a great platform for building small automation projects on.ĮSPHome is a great way of rapidly generating feature-rich firmware for these devices.Įmad Alashi – a long-time coworker of mine – recently blogged about a soil moisture sensor that he’s built using exactly this combination of M5Stack Atom + ESPHome.