Hi All,
My setup:
I am integrating seeed-studio xiao esp32c3 with door sensor in esphome.
The esp32c3 should wake up whenever there is change in state, else go to sleep.
That is, if door opens, wakeup, report to hassio, sleep. Same goes for door close.
Current Status:
Without deep sleep, I am able to observe the door sensor status is updated successfully based on door open and close.
After implementing deep sleep, the sensor shows unavailable, and is not waking up on door close or open.
Here is my yaml file:
esphome:
name: door-sensor
friendly_name: Door_Sensor
esp32:
board: seeed_xiao_esp32c3
variant: esp32c3
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "api key"
ota:
password: "ota password"
wifi:
ssid: Potato
password: Password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Door-Sensor Fallback Hotspot"
password: "dnKbTZUUHNwj"
captive_portal:
# Define your door sensor pin and setup
binary_sensor:
- platform: gpio
name: "Main Door"
pin:
number: GPIO2
mode: INPUT_PULLUP
allow_other_uses: true
device_class: door
# Configure deep sleep
deep_sleep:
id: deep_sleep_1
run_duration: 5s # Adjust as needed
wakeup_pin:
number: GPIO2 # Replace with the actual GPIO pin where your door sensor is connected
allow_other_uses: true
wakeup_pin_mode: IGNORE
What I wish I could get?
1st: To make the deep sleep work, so that I can run it over battery for months,
2nd: If I am able to make the 1st work out, I would like to have my door sensor show the last state of the door rather than showing unavailable.
Any inputs or suggestions will be really helpful.
Thanks & Regards,
A noob in hassio