Hi Guys,
I am very new to this - but have a bit of DIY in me.
I setup an automation to be able to open and close my gates using homeassistant and everything works fine. I have an issue where, in the event of a power loss, it triggers the relay and my gates open. I have backup power and am sorting out the faulty power supply. The issue I have is that I cannot leave this in the current state where if there is a power outage, the gates can open erratically. I know I can add sensors and will get there eventually but I am trying to find the root cause. I have read about not using GPIO 0, 2 and 15 and I have refrained from that. my ESP code is below:
switch:
- platform: gpio
pin: GPIO5D1 - GPIO5
white wire = driveway gate
id: relay
name: “Driveway Gate”
icon: “mdi:gate”
on_turn_on:- delay: 500ms
- switch.turn_off: relay
- Garage Section
- platform: gpio
pin: GPIO4D2 - GPIO4
brown wire = blue gate
id: relay1
name: “Blue Gate”
icon: “mdi:gate”
on_turn_on:- delay: 500ms
- switch.turn_off: relay1
The very important note is that it failed when it looses power, not upon boot.
this is my relay: 1. BDD RELAY BOARD 2CH 5V - Communica [Part No: BDD RELAY BOARD 2CH 5V]
this is how its connected:
Any help would be appreciated.
