4 channel Relay ESP8266 Wifi board WORKING with esphome

What chipset is you FTDI using? I have had better luck with CP2102 based devices than - whatever the other common one is.

Also did you ground GPIO0?

1 Like

Hi @nickrout
Mine says FT232RL.
Yes, when I powered on I put the I00 on GND, it’s just to be done during boot right, like when I flash all the other 8266 stuff.

Hi @fribse,

No, I didn’t do anything special. It is just an ESP-01. You can find a lot tutorials about it online.

It might be a broken board, sometimes it happens. Do you have another ESP-01 you can try?
I’ve had some boards that won’t flash, and try the same on another board without problems.

1 Like

Yes, I’ve gotten four, I’ve tried two without success (that was why I thought there might be a special trick to this one :slight_smile:) , I’ll whip out two more and try them.

If all 4 of them aren’t working, maybe you are doing something wrong. Try another tutorial, and start from the beginning.

Try another FTDI adapter, or try programming a known working board.
I didn’t do anything special for this.

Try holding it to ground until flashing is finished.

EDIT: although searching seems to indicate it shouldn’t be necessary to ground GPIO0 once it is in bootloader mode.

You aren’t accidentally pulling CH_PD low are you? It needs to be high to flash.

Thank you! I’d just gotten my relays in and discovered they had the other cpu controlling the relays when you posted your results. Here is my front yard sprinkler system - thanks to you.

3 Likes

I’m pullin I00 low, but I’ve orderedthis one, and are waiting for the delivery.
I hope that will make it work.
I’ll mount a momentary switch to the GND/I00, so that I can press that easily.
Now I just hope I haven’t fried them all :smiley:
I’ve flashed a ton of these until now, though so far only ESP8266, so I usually get this working without problems.

Ok, I finally got the usb programmer instead of the ftdi, and now I can program the esp-01 without problems…

Hey all,

Thanks for your work on this!

I just got a single channel relay:

but don’t seem to be able to get this working :confused:

esphome config below. Have I done something wrong? Feels like the GPIO might not be correct as nothing happens when toggling the switch in HA, I’m expecting the relay to ‘click’ but no luck.

Thanks!

esphome:
  name: relay2
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "SSID"
  password: "PASSWORD"

# Enable logging
logger:
  baud_rate: 0 #need this to free up UART pins

# Enable Home Assistant API
api:

ota:

uart:
  baud_rate: 115200 # speed to STC15L101EW
  tx_pin: GPIO1
  rx_pin: GPIO3
  
switch:
  - platform: template
    name: "R1"
    id: "R1"
    turn_on_action:
      - uart.write: [0xA0, 0x01, 0x01, 0xA2]
    turn_off_action:
      - uart.write: [0xA0, 0x01, 0x00, 0xA1]
    optimistic: true
1 Like

theres a tasmota fork called wespota that supports these boards right out of the gate.
obviously not ideal if you want everything ESPhome but still worth considering.
the version i’m running on my 4 channel has a bug where it fills the console with failed DNS errors but its rock solid in in its actual function so i’ve been giving this bug a damn good ignoring.

I have a similar one and just used a standard GPIO switch:

No need for any of the UART or baud rate in logger

switch:
  - platform: gpio
    id: relay
    inverted: true
    name: relay
    pin: GPIO0

The example in the customer review on the Amazon page said baud rate needed to be 9600. Give that a try.

Well that is a completely different device then isn’t it.

2 Likes

theres a tasmota fork called wespota that supports these boards right out of the gate.
obviously not ideal if you want everything ESPhome but still worth considering.
the version i’m running on my 4 channel has a bug where it fills the console with failed DNS errors but its rock solid in in its actual function so i’ve been giving this bug a damn good ignoring.

Thanks, I am trying to stick with ESPHome

I have a similar one and just used a standard GPIO switch:

No need for any of the UART or baud rate in logger

I did try this but didn’t work same result - nothing happens

The example in the customer review on the Amazon page said baud rate needed to be 9600. Give that a try.

YES This was correct, I had tried that previously but it didn’t work which leads me on to the real reason this wasn’t working:

I had my power supply set to 3V instead of 5V. So the ESP01 was running fine but the relay wasn’t getting enough power to energise! :man_facepalming:

Thanks for the help!

1 Like

Happy to see these boards work with home-assistant. Just wonder if there might be issues using another board than the linked one in the opening post. Cheaper but also available on banggood and the only difference (?) seems to be 12V relay’s instead of 5v ones…?
5v version
12v version

They look likely to work. Depends if your handy power supply is 5v or 12v.

Thanks for this guide!

I only had a 5v USB to serial cable handy so I used the 7 pin header on the relay board to hook it up, which stepped down to 3.3v for the ESP-01. I was able to program it successfully after bridging EN to 3V3 and IO0 to GND (I just used logic analyser test clips on the topside of the ESP-01).

Now to wire up my sprinkler solenoids…

2 Likes

So I had this working. Just got my EPS-01 and x2 relay board today. It worked for about an hour. The ESP-01 gets on wifi just fine and I can send commands, but nothing is happening. I checked the 5v pins and the power is there. The D5 blue led is lit and D6 is flashing on the relay board. Any ideas what else I can check?

1 Like

What is your yaml? Where is your log?