I am trying to retrofit a Automatic Pet door (PX-1 MEDIUM STANDARD POWER PET DOOR), that I found at a second hand store. The door usually is controlled by a collar, however the collar is 50$ and I would rather make this work for all 3 of our dogs.
So, I have placed a Wemos D1 inside of it, and using 2N2222 transistor bridging the manual open button on the device control board can make the door open and close from HomeAssistant. It also will open when pressure is applied to either of the pads I have placed on either side. (Security Pressure Floor Mat)
Now, the challenges that are beyond my skill level yet.
- Currently if one pad is touched the door is opened, but if the other pad is then touched it will cause the door to close before the dog is through it.
- If the dog door is powered on, and the Wemos has the 2N2222 connected, ESPHome fails to boot with no log output. So I currently have a switch wired to between the Wemos and the 2N2222 so I can separate them, to allow the Wemos to boot properly.
- Additionally like #2 if the Wemos tries to boot with the 2N2222 connected at boot it will trigger the door to open and it will stay open until power is removed from the Wemos. (This is bad as a power outage will cause the door to open and stay open)
Currrent ESPHome Config
esphome:
name: dog-door
friendly_name: Dog Door
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: ---- REDACTED -----
ota:
- platform: esphome
password: ---- REDACTED -----
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Dog-Door Fallback Hotspot"
password: ---- REDACTED -----
binary_sensor:
- platform: gpio
id: inside_pressure_mat
pin:
number: GPIO05
mode: INPUT_PULLUP
inverted: True
name: Inside Pressure Mat
filters:
- delayed_on: 1s
on_state:
then:
- switch.toggle: dog_door_switch
- platform: gpio
id: outside_pressure_mat
pin:
number: GPIO04
mode: INPUT_PULLUP
inverted: True
name: Outside Pressure Mat
filters:
- delayed_on: 1s
on_state:
then:
- switch.toggle: dog_door_switch
switch:
- platform: gpio
id: dog_door_switch
pin:
number: GPIO02
name: Door Switch
captive_portal:
Current layout