Today I would like to share an automation project I made a couple of months ago and I rewired and fixed it just a couple of days ago.
It’s a system interacting with a Came ZA3 control board to open/close a swing gate. It’s based on Home Assistant and ESPHome.
Long story short: with a NodeMcu (ESP8266), a couple of power rectifiers and converters, an optocoupler and a relay, I am able to open/close the gate and to know if the gate is open or closed.
Here’s a video of the system in action: https://twitter.com/ermannob/status/1226467698558763009
Here are some pictures of the system.
Work in progress and temporary wiring (black and red cables):
Final layout of components fixed with hot glue (my new best friend!):
My box (light grey) next to the control board (dark grey):
And this is the scheme:
The power supply comes from the Came control board (pins 10 and 11), and it’s 24V AC. It gets converted to 5V DC and it feeds the NodeMcu.
The NodeMCU drives a relay that “presses the button” to open/close the gate using pins 7 and 2 of the control board.
Then, the final part: getting to know if the gate is open or closed. If the gate is open, on pins 10 and 5 there’s a 24VAC current, that is rectified with a power converter similar to the one I use for the power supply of the NodeMcu and it feeds the optocoupler. Then the optocoupler is connected to a pin of the NodeMcu.
The relevant code:
api: services: - service: gate_controller then: - switch.turn_on: apricancellone - delay: 1000ms - switch.turn_off: apricancellone binary_sensor: - platform: gpio name: "Gate open" pin: GPIO14 switch: - platform: gpio pin: number: GPIO5 id: apricancellone
Now a funny thing: with the temporary red-black wires, the Came remotes stopped working. My system was generating some interference that disturbed the 433MHz band.
After rewiring with a proper multi-wire single cable, remotes started working again!
Thanks for reading! Comments and suggestions are welcome!