#19803·esphome

deep_sleep: ESP32-S3 enters sleep cleanly but usually never wakes on the timer (identical twin wakes 17/17)

Author: siegeldCreated Sep 27, 2026Updated Sep 27, 2026

The problem

A XIAO ESP32-S3 enters deep_sleep deliberately and cleanly, and then usually does not wake on the timer. One wake in many attempts, at both 60min and 5min.

The board is not losing power. With USB removed it runs on its cell, reports a genuine battery reading, publishes, evaluates its own power source as battery, and enters deep sleep by explicit deep_sleep.enter — the API disconnect is logged as expected, not a drop. It simply does not come back when the timer expires.

What makes this worth reporting rather than filing as a dead board: a second, near-identical device running a build compiled three seconds later, on the same silicon revision, with a byte-identical deep_sleep block, woke 17 times out of 17 in the same window. So the configuration is not at fault, and neither is the environment they share.

I have been unable to reduce this to anything in the YAML, the framework options, the ESPHome version, or the sleep duration — details below. I would rather be told I have missed something obvious than leave it unreported.

Which version of ESPHome has the issue?

2026.8.2, and 2026.9.0 (rebuilt on the newer version specifically to test; identical behaviour)

What type of installation are you using?

Docker (ESPHome Device Builder)

What platform are you using?

ESP32-IDF

Component causing the issue

deep_sleep

YAML Config

yaml
esp32:
  board: esp32-s3-devkitc-1
  flash_size: 16MB
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_ESPTOOLPY_FLASHMODE_DIO: y

deep_sleep:
  id: sleeper
  run_duration: 180s
  sleep_duration: 60min      # also reproduced with 5min
  # deliberately NO wakeup_pin

wifi:
  power_save_mode: light
  use_address: esp-rbr-housepanel.siegel.com

# The normal path publishes and then sleeps explicitly; run_duration is a backstop.
script:
  - id: decide_sleep
    mode: single
    then:
      - if:
          condition:
            or:
              - binary_sensor.is_on: stay_awake
              - lambda: 'return usb_host_present();'
          then:
            - deep_sleep.prevent: sleeper
          else:
            - deep_sleep.allow: sleeper
            - deep_sleep.enter: sleeper

Anything in the logs that might be useful for us?

# On battery, USB removed. 5-minute build, ESPHome 2026.9.0.

[19:28:48][S][sensor]: 'Editions Published' >> 16 editions
[19:28:48][S][sensor]: 'Uptime' >> 1083 s
[19:29:06][S][sensor]: 'Battery Voltage' >> 4.14 V
[19:29:14][I][deep_sleep:056]: Beginning sleep
[19:29:14][I][deep_sleep:058]: Sleeping for 300000000us
INFO Processing expected disconnect from ESPHome API

19:34:21  woke   <- the only wake observed
[19:34:40][I][deep_sleep:056]: Beginning sleep
[19:34:40][I][deep_sleep:058]: Sleeping for 300000000us
INFO Processing expected disconnect from ESPHome API

19:39:40  expected wake - nothing
19:44:40  expected wake - nothing
19:48     still unreachable, 14 minutes into a 5-minute cycle

Earlier, on the 60-minute build (2026.8.2), the same shape:

[16:16:25][I][power]: battery 4.062V, previous 4.062V -> battery
[16:16:25][I][deep_sleep:060]: Beginning sleep
[16:16:25][I][deep_sleep:062]: Sleeping for 3600000000us
INFO Processing expected disconnect from ESPHome API
=> no wake after 80 minutes

Liveness was polled directly on TCP 6053 every 15-20s, not by ping — this board answers TCP but not ICMP, so ping-based checks are meaningless on it.

I cannot provide a serial log, and I know that is the log you actually want. The module does not enumerate over USB on this carrier — power reaches it and it boots, but no COM port appears and no device is presented to the host, so there is no way to capture the ROM banner or the rst: reason. That is a hardware/cabling problem at my end, not an ESPHome one, and it is the main gap in this report.

Additional information

Hardware: Seeed XIAO ESP32-S3 on a Seeed 7.5" ePaper driver board (sold as the TRMNL 7in5 OG DIY kit). ESP32-S3 rev0.2, 16MB flash, octal PSRAM.

Ruled out, with what ruled it out:

Suspect Evidence against
Power loss / battery switch / flat cell Runs on the cell with USB out (4.06 V / 91%), publishes, and sleeps by explicit deep_sleep.enter; the disconnect is logged expected
Sleep never entered Beginning sleep + Sleeping for Nus present every cycle
Config Byte-identical to the working twin in deep_sleep, wifi, esp32/framework/sdkconfig, boot sequence and the sensors gating sleep
ESPHome version Fails identically on 2026.8.2 and 2026.9.0
Sleep duration Fails at 60min and at 5min
Silicon revision Both boards report ESP32-S3 rev0.2
Network / AP Twin on the same AP and SSID wakes 17/17
API connection exhaustion No stale clients; verified on the host

The control: the twin (esp-rbr-newspanel, same kit, same chip revision, build compiled 3 s apart, same deep_sleep block) woke at 15:15, 16:15, 17:15, 18:15, 19:15, 20:15, 21:14, 22:14, 23:14, 00:14, 01:14, 02:14, 03:14, 04:13, 05:13, 06:13, 07:13 — 17 consecutive hourly wakes while the affected board managed one.

The honest counter-argument: a working identical twin is also exactly what a unit-specific hardware fault looks like, and a marginal RTC slow-clock oscillator would produce this same "wakes occasionally" signature. I am not claiming otherwise. What keeps me from accepting it is that this is the second board in this position to fail the same way — the first was replaced on hardware-fault grounds and its replacement behaves identically. I am still confirming whether the carrier board was replaced along with the module, which would be the remaining untested constant.

If there is a known interaction here — RTC slow-clock source selection on ESP32-S3, or deep_sleep behaviour with power_save_mode: light — I would be glad to be pointed at it and will close this. Happy to run any instrumented build you want on the affected unit; it is on my bench and reproduces within minutes on the 5-minute interval.