I am having trouble debugging a really weird issue with an esp32 based board. The device enters deep sleep and logs the correct sleep time, but it never wakes up as far as I can tell from the logs. Here is the minimal config I am using for testing, and I am still having this issue:
esphome:
name: weatherstation-garden
esp32:
board: esp32dev
framework:
type: arduino
substitutions:
loc: "Garden"
name: "Garden Weather Station"
wifi:
ssid: "xxx"
password: !secret wifi_pw
fast_connect: false
manual_ip:
static_ip: xxx.xxx.xxx.xxx
gateway: xxx.xxx.xxx.xxx
subnet: xxx.xxx.xxx.xxx
ap:
ssid: ${name} Fallback
password: !secret fallback_pw
captive_portal:
logger:
level: DEBUG
api:
encryption:
key: "xxxx"
ota:
password: !secret ota_pw
deep_sleep:
sleep_duration: 60s
run_duration: 45s
id: deep_sleep_1
The device logs the following before going to sleep:
[15:45:39][I][app:100]: ESPHome version 2024.5.0 compiled on May 17 2024, 15:36:34
[15:45:39][C][wifi:580]: WiFi:
[15:45:39][C][wifi:408]: Local MAC: xxxx
[15:45:39][C][wifi:413]: SSID: [redacted]
[15:45:39][C][wifi:416]: IP Address: 192.168.7.87
[15:45:39][C][wifi:420]: BSSID: [redacted]
[15:45:39][C][wifi:421]: Hostname: 'weatherstation-garden'
[15:45:39][C][wifi:423]: Signal strength: -62 dB ▂▄▆█
[15:45:39][C][wifi:427]: Channel: 11
[15:45:39][C][wifi:428]: Subnet: xxxx
[15:45:39][C][wifi:429]: Gateway: xxxx
[15:45:39][C][wifi:430]: DNS1: 0.0.0.0
[15:45:39][C][wifi:431]: DNS2: 0.0.0.0
[15:45:39][C][logger:185]: Logger:
[15:45:39][C][logger:186]: Level: DEBUG
[15:45:39][C][logger:188]: Log Baud Rate: 115200
[15:45:39][C][logger:189]: Hardware UART: UART0
[15:45:39][C][captive_portal:088]: Captive Portal:
[15:45:39][C][mdns:115]: mDNS:
[15:45:39][C][mdns:116]: Hostname: weatherstation-garden
[15:45:39][C][ota:096]: Over-The-Air Updates:
[15:45:39][C][ota:097]: Address: xxxx
[15:45:39][C][ota:100]: Using Password.
[15:45:39][C][ota:103]: OTA version: 2.
[15:45:39][C][api:139]: API Server:
[15:45:39][C][api:140]: Address: xxxx
[15:45:39][C][api:142]: Using noise encryption: YES
[15:45:39][C][deep_sleep:049]: Setting up Deep Sleep...
[15:45:39][C][deep_sleep:052]: Sleep Duration: 60000 ms
[15:45:39][C][deep_sleep:055]: Run Duration: 45000 ms
[15:46:23][I][deep_sleep:117]: Beginning Deep Sleep
[15:46:23][I][deep_sleep:119]: Sleeping for 60000000us
[15:46:23][D][esp32.preferences:114]: Saving 1 preferences to flash...
[15:46:23][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
INFO Processing expected disconnect from ESPHome API for weatherstation-garden @ 192.168.7.87
WARNING Disconnected from API
I’ve stripped down the code as much as possible to just test the functionality of the deep sleep component, and it’s still not waking up. I only recently started using the block
esp32:
board: esp32dev
framework:
type: arduino
as I previously had the board configured under esphome:
but that never seemed to be an issue before and it did not fix the sleep problem.