Hi all, I’m trying to report the status of a sliding gate to home assistant.
The gate controller report it’s status on a “signal lamp” that is off when the gate is closed, on when the gate is open or opening and flashing with a frequency of about 1 flash/sec when closing.
It seems easy to detect on/off but how can I detect the flashing ? I’ve thought to use an esp8266 GPIO (in a sonoff basic) with esphome and maybe the Pulse Width Sensor, but it seems more suited to much higher frequency than 1Hz or simply on/off static status, do you believe this is possible with esphome ?
but that would need me to reach the analog input on the sonoff basic I’m using,and if I remember correctly the ADC pin is not broken out on that board. Or is somehow possible to reconfigure a GPIO to be an analogue input ?
Assuming however that the pulse width is the right path, I’d better show off what the problem is.
It seems that this sensor just outputs a number of seconds each time that the configured GPIO pin toggle on/off.
But how can I use that number to determine Open/close/closing (1Hz flashing) ?
Is there also a way to report the pin status ?
Though if you’re using that binary sensor to feed your pulse width sensor, it will prevent it from working. The sensor will no longer detect flashing if you set delay off to > 1 sec.
I’m thinking the lamp may not be the way to go. Can you access other places to sense?
Oh ok I see, thanks for the link.
Motor works at 220v but the driving relay works at 24v, pretty easy to hook up but of course it can’t give anything about gate status.
There are two magnetic limit switches, the magnet is fixed on the sliding gate and the sensors are are directly soldered in the gate control board, and I’d rather not mess up with them, since are really tiny and it’s easy to let some drop of solder near them.
However I believe I can add two other magnetic sensor and near those two and use them: if both contact are open then the gate is opening or closing otherwise is either open or closed.
If you believe that the lamp is not the way to go I can try this path, adding two magnetic sensors
Thanks for the insightful thread. I’m surprised there is not a more elegant way to address this and to do it directly from the gate status led/output that presents itself on most gate control boards. Most gates I know work on a similar principal - normally off when closed, on when open and flashing when opening or closing. Some also have a short, long interval flash when closed, to indicate that the power is good. Fitting sensors to an existing gate setup is not a simple job, especially for swing gates.
Stumbled across this thread hoping there might be some alternate solutions to mine for a double swing gate.
I have 2 swing gates with a crescent type driveway with each having infrared sensors to avoid collision, installed by previous owner.
The control boards have the courtesy/flashing light option which I thought I might use aswell, but ended up installing an actual courtesy light as I have multiple devices with gate control an wanted to alert anyone that the gate is moving. Each gate can be viewed on its own camera.
Settled on using the electric lock option that outputs 0v or 24v after a close cycle has finished.
Using a handy 24v relay as i had nothing else on hand I was able use the output to switch the relay on/off to get myself an input signal.
Very makeshift but works as intended
Using a 24V to 3.3V Optocoupler Isolator would be the option