Solid state relay SSR-40DA - D1 Mini not starting

Hi everybody,

I want to use my Wemos D1 Mini to control a water valve by switching it with a relay. As the pump needs about 1000W of power I wanted to use the SSR-40DA I already had at home.
This is the code I use to define the relay:

switch:
  - platform: gpio
    pin: D4
    id: valve_1
    name: "Valve 1"
    icon: "mdi:gate"

And this is how I connected it:

relay - → D1mini GND
relay + → D1mini pin D4

Code is validated and I can install it to my D1 mini, but afterwards it does not start when the relay is connected.
If I disconnect the relay the D1mini is starting and showing as “online” on ESPHome.

Cannot find out what’s the problem here, the SSR-40DA can be switched with 3-32VDA, and the D1mini can send 3,3V on D4.

D4 HIGH at boot
connected to on-board LED, boot fails if pulled LOW

Hi pepe59,

thanks for your reply, but does not change anything. Both PINs work when another relay is connected, but D1mini won’t boot when I use the SSR-40DA.
Booting first and connecting SSR-40DA will work, very strange.

To be clear:
with this relay the Arduino can boot:
relay-33v

and with this it can not:

Have you tried a different GPIO pin?
For example D1

switch:
  - platform: gpio
    name: "Valve 1"
    pin: GPIO5
    id: valve_1
    inverted: True
    restore_mode: RESTORE_DEFAULT_OFF

Ok, tried with D1 now, and it’s working. D0 also.
D4 and D3 did not, very strange.

Anyway, thanks for your help!!!