When we bought our home it came with wired door sensors… for an old alarm system. Given that they are just reed sensor i figured there was a way to get them in to home assistant via ESPHOME.
I have been doing a bit of exploring with WLED and ESP32 boards around house.
After a bit of looking around here I found a few example and tried to figure it out. I was pretty happy when it worked the first time…
I figured I would share here and get some feedback.
5 Doors being monitored off 1 ESP 32.
using a ESP32, provided power via USB, I tied all the reed switch grounds together and the other end of the sensor to different GPIO pins.
Here is some info from the yaml file.
esphome:
name: esphome-web-d86490
build_path: .esphome/build/esphome-web-d86490
platformio_options: {}
includes: []
libraries: []
name_add_mac_suffix: false
esp32:
board: esp32dev
framework:
version: 1.0.6
source: ~3.10006.0
platform_version: platformio/espressif32 @ 3.5.0
type: arduino
variant: ESP32
logger:
baud_rate: 115200
tx_buffer_size: 512
deassert_rts_dtr: false
hardware_uart: UART0
level: DEBUG
logs: {}
captive_portal: {}
binary_sensor:
- platform: gpio
pin:
number: 4
mode:
input: true
pullup: true
output: false
open_drain: false
pulldown: false
inverted: false
name: Garage Entry Door
device_class: door
filters:
- delayed_on: 10ms
disabled_by_default: false
- platform: gpio
pin:
number: 15
mode:
input: true
pullup: true
output: false
open_drain: false
pulldown: false
inverted: false
name: Rear Balcany Door
device_class: door
filters:
- delayed_on: 10ms
disabled_by_default: false
- platform: gpio
pin:
number: 16
mode:
input: true
pullup: true
output: false
open_drain: false
pulldown: false
inverted: false
name: Front Balcany Door
device_class: door
filters:
- delayed_on: 10ms
disabled_by_default: false
- platform: gpio
pin:
number: 17
mode:
input: true
pullup: true
output: false
open_drain: false
pulldown: false
inverted: false
name: Front Door
device_class: door
filters:
- delayed_on: 10ms
disabled_by_default: false
- platform: gpio
pin:
number: 18
mode:
input: true
pullup: true
output: false
open_drain: false
pulldown: false
inverted: false
name: Back Entry Door
device_class: door
filters:
- delayed_on: 10ms
disabled_by_default: false
It’s not pretty at the moment. I need to print a case, mount it, and rewire so that it looks better.
I was able to create some automation bases on the state to check it out and turn on a light when the door is in the open state and off when the door is close. So I’m pretty happy its working.
I do wonder if it will last…