Hi
So I’ve got an ESP32 S3 & configured it to deep sleep after 120s of being idle, which seems to work fine. My issue is that it wakes up randomly & I cant figure out why.
The push button (input 12) is connected to 3.3v LDO1 & the input is configured with a pull down resistor, putting a meter on the input shows it stays off until the switch is pushed & monitoring ‘deep_sleep_pin’ seems to imply its not randomly toggling.
Monitoring the wakeup wause gets a state of 2 which implies its an RTC pin waking the system up, but how? The configured pin looks okay…
What could be causing the system to keep waking up?
binary_sensor:
- platform: gpio
id: deep_sleep_pin
name: "Wakeup"
pin:
number: 12
allow_other_uses: true
mode:
input: true
pulldown: true
on_press:
then:
- logger.log: "Sleep Prevented"
- deep_sleep.prevent: deep_sleep_1
- script.stop: start_sleep
on_release:
then:
- logger.log: "Sleep Allowed"
- deep_sleep.allow: deep_sleep_1
- script.execute: start_sleep
- platform: gpio
id: charging_pin
name: "Charging"
pin:
number: 34
mode:
input: true
pulldown: true
on_press:
then:
- logger.log: "Charging"
- deep_sleep.prevent: deep_sleep_1
- script.stop: start_sleep
on_release:
then:
- logger.log: "Battery"
- deep_sleep.allow: deep_sleep_1
- script.execute: start_sleep
# Deep Sleep
deep_sleep:
id: deep_sleep_1
wakeup_pin:
number: 12
allow_other_uses: true
mode:
input: True
pulldown: True
wakeup_pin_mode: IGNORE
script:
- id: start_sleep
then:
- delay: 120s
- deep_sleep.enter:
id: deep_sleep_1
sleep_duration: 3600min