An ESP32 firmware I use to smartify my FAAC E024S gate
Supports the following features :
- Only accepting open requests when someone is nearer than 1km from home 📏
- Only accepting requests when ready, to avoid double presses which would make it report the wrong state ✅
- Only using one pin, to only use one relay and work by guessing the actual state of the gate 💡
- Opening and closing even while moving, by sending a double pulse, and inverting time taken to move to the current position 🔄
- Error reporting in HA, to see why the gate decided not to move ⛔
- BLE scanner, with automatically turns entity status to unavailable after no signal for 25s 📡
- BLE switch, which allows you to turn off the continuous BLE scanning ⏯️
Note : Since this gate firmware relies on a single opening pin without any extra sensors, please keep in mind that it won't be able to register any state change from another source than itself. If you open your gate with your remote, please also close it with your remote, as closing with your esp32 would invert the virtual state of the gate
- An ESP32 with relay
- ESPHome installed
- Your gate documentation to identify the gate opening/closing pin
- Your ESP32 documentation to identify the pin used for the relay (this model uses GPIO16 and GPIO17)
- Home Assistant sensors : Persons, Proximity sensors, Notify group, optional : phone iBeacons UUIDs
- Clone this repo
- Run :
git clone https://github.com/etiennec78/Home-Automation.git
- Run :
- Edit the file to fill your needs
- Change the GPIO pin
- Replace any "!secret" line with your own information
- Adapt the gate moving time (default 42s)
- Flash your ESP32
- Plug it into your computer
- Run :
python -m esphome run gate.yaml
- Harware connections
- Run a cable between your gate opening/closing pin and your ESP32 relay pin
- Either power your ESP32 with a gate pin, or an external supply
- Connect your ESP32 to Home Assistant
- Home Assistant should detect your ESPHome device automatically on your LAN
- Connect it and enter your api_key
- Finally, go to Settings > Devices & services > ESPHome > three-dot menu to the right of your gate > Configure > Allow the device to make Home Assistant service calls ✔