I have a couple use cases for detecting when my house front gate is opened. At night, opening the gate triggers the front porch lights. During the day, I know when packages arrive. When I’m away, I get a picture of the front gate from my doorbell camera.
Here are notes on using a battery powered ESP-01s to notify when the house front gate is opened. It took a few iterations to get right, including switching from XBee3 Zigbee devices and ruling out BLE. In the end, it’s surprisingly reliable with good battery life. Simple wins.
Overall, pretty fun project and easy to automate with HA:
Is your gate motorised? The reason I’m asking is that you can power things from it. I’m might have missed that point.
I had similar use cases, so during our first covid lockdown I built a device for this purpose too. In my case I stepped down the voltage from the gate motor’s 12V, powering an ESP32. I have WiFi coverage at my gate, which was another benefit. Plus, I’m tapping the gate’s open/closed sensors. Lastly I used ESPHome and recently switched my devices from using MQTT to using HA API instead. I’m finding it a lot more stable and responsive.