ESP32 Sleep Mode without HomeKit disconnection #783
Replies: 1 comment 5 replies
-
Unfortunately HomeKit requires a constant-on connection when used with WiFi (HomeSpan only supports WiFi, not bluetooth), and WiFi is not practical with small, battery-operated devices. Sleep modes don't help because as soon as the ESP32 goes into sleep mode, the connection to HomeKit is lost, as you've seen. But although a constant-on WiFi connection is not practical for a small battery operated device, there are other options that would work for certain types of set-ups. Specifically, if you are deploying a remote sensor (say a temperature sensor) and you want this to run on battery, it is easy to do this using HomeSpan's SpanPoint functionality. In this mode, you use two ESP32s (or one ESP32 and one ESP8266), where one ESP32 runs HomeSpan, connects to your WiFi network, is paired with the Home App, and is plugged into a power source. The second ESP32 (or ESP8266) does not run HomeSpan and is not connected to HomeKit or a WiFi network. Instead, it operates on a standalone basis, takes sensor measurements, and then transmits those measures periodically to the main ESP32 for integration with HomeKit. If you only take sensor readings once every 30 seconds, once a minute, etc., the remote ESP32 can remain in sleep mode for most of the time and only wake very briefly to take the reading and transmit it to the main ESP32. See the HomeSpan SpanPoint page for details and examples. |
Beta Was this translation helpful? Give feedback.
-
Hi All!
I have currently an ESP32 running with HomeSpan. It works really nice and smooth with HomeKit.
The next thing I want to do is make it battery powered. As far as I could find online, the ESP32 has several sleep modes. The deep sleep mode seems most interesting for me.
When I start experimenting with the deep sleep mode, my ESP32 lost connection to HomeKit and is shown as "not responding". It obvious since the WiFi module is powered down in this mode.
I'm wondering if there would be any way to make the system battery powered and still be able to update all the variables in HomeKit (and remain responding)?
Thank you in advance :)
Beta Was this translation helpful? Give feedback.
All reactions