Relais not working after a night

Hey Wled Community.

I recently moved my Raspberry Pi setup to an ESP32 with wled installed.
Everything works great. Also love that there is a homebridge integration for HomeKit :slight_smile:

But sometimes after a night or a while not using the setup, wled or the esp can’t trigger the Relais anymore. (It can’t change the Pin to Low/0V)

The pin always stays high and I can measure voltage on the pin.

The Relais I am using has a optocoupleur (read that’s important). (Here more info)
And the cable between Relais and ESP is about 1.2 meters long.

I also had a problem where the esp32 wouldn’t even boot while the „data“ cable of the Relais was connected. I mitigated it with using the same 61 Ohm resistor, I used on my data cable for the LEDs.
Could it be that I need a larger resistor? Or do you have any other ideas?

How is it connected? The LED VCC on the relay board should not be more than 3.3V.

So the Relais is connected to the esp (Devkit V4) like that.

Relais VCC → 5V ESP
Relais Ground → Ground ESP
Relais Control → Pin 26 in esp?

the Relais is a TTL Relais so the control can also be Less than 5 Volts.

It would need to operate on only 20mA or so.

Yes I know.
And in normal use everything works great. I can turn LEDs off. The Relais go off.
I turn LEDs on. Relais go on.

But after a night. I want to turn the LEDs on. And nothing happens.

I checked the voltage on my relay pin and it’s still 3.3 Volts. (Should be 0V)
Even though Wled shows the LEDs as turned on

Maybe it’s inverted? There is a checkbox for that.

The doc shows separate supplies for the relay and optocoupler LED.

Asking for the complete connections because we don’t know if you drive the optocoupler LED to ground, from what high side, or if you instead supply it with the ESP pin etc…

Also what pins are used on the ESP, some have caveats