ESP01 Wakeup pin

Hi, i’m tring to use a esp01 with deep sleep and wake it up when the pin changes (door sensor). I modified my esp01 like this https://www.instructables.com/Enable-DeepSleep-on-an-ESP8266-01/ so it should wake up right? i was using it before for another door sensor that i made with arduino ide and it was wakeing up (if i rembember correct…)

esphome:
  name: prova
  platform: ESP8266
  board: esp01_1m
  
wifi:
  ssid: ""
  password: ""

    
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ""
    password: ""

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: ""

ota:
  password: ""

deep_sleep:
  run_duration: 2min
  sleep_duration: 2min
  wakeup_pin: 0
  
sensor:
  - platform: adc
    pin: VCC
    id: "VCC"
    internal: true
    
  - platform: template
    name: "prova.battery_level"
    unit_of_measurement: '%'
    update_interval: 40s
    lambda: |-
      return ((id(VCC).state /3.30) * 100.00);
      
binary_sensor:
  - platform: gpio
    pin:
      number: 0
      mode: INPUT
    name: porta
    device_class: door

the problem i have is that esphome shows me a error on line " wakeup_pin: 0" because its only for esp32…but it should work if i modified the chip, or i m wrong?
the code without " wakeup_pin: 0" is working but its only sending pin state if its awake, if its sleeping it does nothing.
thanks in advance!

My guess would be that since esphome has no way of knowing that you modified your esp01 it thinks you are trying to use a pin that’s not available.

Maybe you could trick esphome by changing board: to a different board that has the pin you jumpered the wire to.

Wakeup pin is only for esp32. Esp8266 only wakes up via the timer.

i tried with esp32, but its not working.

this ‘hack’ is only to enable deepsleep, not wake up, right? :frowning:
ok…then it will be for a higrometer or something xd

Yes. The esp8266 needs pin 16 connectee to rst to go into deep sleep.

1 Like