Hi all,
Need some help / suggestions - I’m helping a friend in setting up HA and one of the things we want to accomplish is to monitor the state of his gate. This is based on a HySecurity Swingsmart DC20 (link) which has a relay that opens / closes whenever the gate is in that state.
This is the relay:
It’s wired back with the black/red cables to his garage where it was connected to an exotic box that, via a PSTN line connected to it as well, would call out if the gate remains open for a preset period.
I’ve set up an ESP32 with COM to GND and NO to GPIO13 but I get rapid changes between ‘open’ and ‘closed’ lasting between 15 and 220ms, like this:
This is the code I use:
binary_sensor:
- platform: gpio
pin: 13
name: magnet
device_class: door
I have a similar thing set up in my own garage with a simple magnet from Amazon (this one) and it does the trick…
I must be doing something wrong or overlooking something but I have no idea what…
Any ideas / help would be truly appreciated.
Bernard