Relays not turning on but relay indicators are on

Hello,
I’m trying to create a switch board with 4 relays and momentary switches. But after configuration, 2 relays are working but 2 relays are not turning on but their light indicators are turning on. Is it a voltage issue? or circuit issue? I’m using a d1mini connected to 5V 4 channel relay board powered by Hi-Link power supply 5V-0.6A (3 watts).

my ESPhome yaml,

esphome:
  name: bathroom
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "xx"
  password: "xx"
  fast_connect: true
  # Optional manual IP
  manual_ip:
    static_ip: 192.xxx.xx.xx
    gateway: 192.xxx.xx.x
    subnet: 255.xxx.xxx.x
  ap:
    ssid: "xx"
    password: "xx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

web_server:

# Relays
switch:
  - platform: gpio
    name: "Bathroom Light"
    icon: 'mdi:lightbulb'
    id: relay1
    pin:
      number: D1
      # One of INPUT, INPUT_PULLUP or OUTPUT
      mode: OUTPUT
      inverted: True

  - platform: gpio
    name: "Bathroom Exhaust Fan"
    icon: 'mdi:fan'
    id: relay2
    pin:
      number: D2
      mode: OUTPUT
      inverted: True

  - platform: gpio
    name: "Bathroom Boiler"
    icon: 'mdi:water-boiler'
    restore_mode: RESTORE_DEFAULT_OFF
    id: relay4
    pin:
      number: D4
      mode: OUTPUT
      inverted: True

  - platform: restart
    name: "Bathroom Panel REBOOT"

# Switches
binary_sensor:
  - platform: gpio
    pin:
      number: TX
      mode: INPUT_PULLUP
      inverted: True
    name: "Bathroom Light"
    on_press:
      - switch.toggle: relay1
    internal: True
  - platform: gpio
    pin:
      number: RX
      mode: INPUT_PULLUP
      inverted: True
    name: "Bathroom Exhaust Fan"
    on_press:
      - switch.toggle: relay2
    internal: True
  - platform: gpio
    pin:
      number: D7
      mode: INPUT_PULLUP
      inverted: True
    name: "Bathroom Boiler"
    on_press:
      - switch.toggle: relay4
    internal: True

I’ve tested wit 4 channel, relay 3 is working. But as I don’t need 4 relays, only need 3, I’m trying to resolve the issue that happened to those 2 relays not working.

I’d try a power supply with a bit more current capability first.

Yes, used 5W and 10W charger to it’s USB port, but nothing changed.

Which relay board are you using?

I’m using this one.

Well it does say:

5 V-12V to TTL control signal

And you are only driving it with 3.3V from the ESP GPIO.

Ok. Got it. I’ll try to use 3v to 5v logic level shifter. But I have another one which have 4 channel relay board working fine. I’ll get a logic level shifter and try.

Some might work for 3.3V control signals but they only guarantee it for 5v.

Strictly speaking 3.3V and 5V TTL switching levels do overlap:

But that’s for logic ICs and your board looks like it is using optocouplers for the inputs so you can not guarantee it will work with 3.3V if it is spec’d at 5v.

Got the idea. Thank you.