I’m trying to figure out how to work with Hassio, a relay board and contactors.
The purpose is to configure a “switch” on GPIO#2, able to activate a relay for 0.5 second that will itself activate the contactor. Then, I’d like to read contactor’s state back on GPIO#12.
My will is to bundle all that in a simple command with state return on dashboard.
I read this (3 or four times ^^) and managed to have a switch turning GPIO “on/off”.
I also configured the binary_sensor (but this one doesn’t work and stays “off”).
Do you have the correct pin for the GPIO you are using?
Are you supplying the correct voltage (3.3v = on, 0v = off) or are you using a pull up resistor and a switch to ground?
Thanks for your advices, I managed to get it flawlessly working adding pull-pu and pull-down resistors. Great.
Now back to my first consideration, I’d like to bundle sensor and trigger in a smart switch telling me if the circuit is closed on my dashboard, letting me to open it and reciprocally.
Should I go for a script or a command line switch ?
I do trust it but I also want to be able to keep manual action with a push button to activate my contactors. Getting contactor feedback is the best method I found to use both software and manual actions.
The rpi_gpio switch and rpi_gpio sensor are OK.
I thought having the sensor “ON” would declare the switch “ON” but that’s not the way it looks to behave.
Can I achieve this with this template ?
– EDIT –
Actually, the rpi_gpio switch is not so OK. It can turn on but turning it off is somewhat broken:
I am trying to use relay modules to control my lamps, plugged directly into my Raspberry GPIO pins, but would like to keep my wrist switches installed, and have both control options, manual and Home Assistant. Today I use a NODEMCU with ESPHOME for this, with an external sources that feeds the 5v of the relay module and NODEMCU, with the external source GND connected to a NODEMCU GND and the pulse switches are connected to a pin and the GND of the NODEMCU to use directly on Raspberry is the connection the same?