Open jonfpersson opened 1 year ago
It doesn't seem to be supported for now if I check the docs. It would be a nice feature though. Pitty I'm not into c++🤔. It seems to be supported on the rp2040 recently.
+1 would love this feature
Will not help much for battery life since the buck boost regulator on the Pi Pico is not very energy efficient compared to the regulators used e.g. on the um_tinys2 boards
Unfortunately, without deep sleep support, there is no way to effectively compare the efficiency of the Pi Pico W regulator to those used on ESP-S2/S3 boards. Deep sleep support needs to be added for the Pi Pico W in order for it to be considered as a viable alternative to the ESP32 variants
Based on a look at https://esphome.io/api/deep__sleep__component_8cpp_source.html it appears the the actual sleep functionality is not compiled at all unless macros USE_ESP32
, USE_ESP32_VARIANT_ESP32C3
and/or USE_ESP8266
are defined. See in particular DeepSleepComponent::begin_sleep
So based on a 5 min skim read it looks like for the pi pico w it's basically a no-op.
The pico SDK does have control over sleep modes. I'll see if I can cook up a patch, as this is something crucial to my intended use, and pico W is what I have so it's what I'm stuck with for now. The datasheet for the pi pico W suggests that sleep should have a significant benefit, and without it it's gobbling battery, so it's worth a go.
I'd like to factor it out into per-platform support files too, reduce the nest of ifdefs that make the actual logic hard to follow.
I didn't manage to get to this, as calculations showed that even for best-case pico W sleep it was unlikely I could use them for the intended battery-supported application. I'd still like to return to it.
The problem
It seems like the deep sleep component doesn't work on the RP2040, my board consumes as much power as when not in deep sleep. This makes it very hard to run on batteries.
Both in "deep sleep" and normally the board consumes around 40 mA.
Which version of ESPHome has the issue?
2022.12.8-dev
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2023.2.1
What platform are you using?
RP2040
Board
Raspberry Pi Pico W
Component causing the issue
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response