I’m rebuilding our Tefal Raclette to have it controlled with an ESP01s dual relay board.
All the logic is working, I can turn it on from inside HomeAssistant, but I can’t figure out if I need a pull up/down resistor on the GPIO2, or if I can do that as an argument in esphome?
I’m using this board:
So one relay is for 230v, the other is for the led in the pushbutton.
As the GPIO2 is not connected to the pin array on the board (as far as I can tell), I’m just going to solder directly to the pin on the board.
But how, just short GPIO2 to gnd, or do I need to add a resistor as a pull up/down for it? And what would the corresponding code look like?
If you are going to short the pin to gnd then when it’s not shorted and just “floating” you want it pulled the opposite way - up, so it changes when you short it.
If instead you plan to short the pin to 3.3v, when the pin is not shorted and floating you want it pulled the opposite way - down.
No need for a physical resistor. Software enabling the internal pull up or down resistors is all that is required.
If you have an active device that outputs 0v or 3.3v the pin is never floating and you don’t need a pull resistor.
So the weird part is, if I toggle this throught HA it works, it turns on the LED when I turn on the relay and vice versa.
If I do it with the button, it turns the LED on and off, but not the switch as far as I can se?
I’m very confused, off to bed for now, I’m getting too tired for this
So what it does. When the button is pushed, it will start the relay turn on procedure, the timer is set to 120mins, the relay will turn on the light in the button, and then the relay for power. When it is pressed again it stops the script, turns off the power and then the LED.
It of course integrates to HA, and the LED and relay can be controlled from that as well.
Now I’m just going to find out if I can make the delay shorter than 1s