Can not flash ESPHome to Sonoff

Not able to install ESPHome on Sonoff Basic… Have spend a week testing various options. Have tried three windows pc’s running W7; W10 and W11. My usb to serial device is FT232RL, Sonoff RF R2 Power v1.0. Using ESPHome Flasher v 1.4.0. The error I am gettind is "ESP Chip-Detection failed: Failed to connect to Espressif device: No serial data received. I did try to connect Sonoff device while holding on/off button down, also tried without holding it down, same message. Have started ESPHome Flasher regularly and as administrator. Verified cable pins few times. FT232RL is set on 3.3V. Went from original Dupont femail male wire cable to soldered solution. Running out of options… Worst is that I have done this procedure (might have used different software) few years ago and it worked, but need to reflash as I moved to new HA setup and didn’t have original bin files or yaml’s. By the way, I also tried different board types (not sure which one is correct for Sonoff Basic): esp8286: board: esp8285 (tried also esp01_1m, sonoff_basic). I have used HA to create New Device from ESPHome Add on. I have put simple YAML, then used Install ->Manual Download → Legacy Format. My YAML is pretty simple, just trying to make flashing work:

esphome:
  name: esp1
  platform: ESP8266
  board: esp8285

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "KYEfJ06bdvg01ePA5Ckm1Ovb/y5bzq4ptKSW5ZVkyx8="

ota:
  password: "69df200bcaef751d0838d327b562a02f"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

web_server:
  port: 80

captive_portal:
    

My Sonoff basics are set like this

esphome:
  name: top-light
  
esp8266:
  board: esp01_1m

This is what Esphome puts in when it detects them. They are old so it may be different for new ones, I don’t know.

Thanks, I also tried exact lines like you with board: esp01_1m, same issue… Did you use ESPHome Flasher or some other tool? I also tried installing directly from HA->ESPHome, getting error as well.

Did you remember to invert the pins?

FT232RL            ESP
3,3 >>>>>>>>>>>>>  3,3
GND >>>>>>>>>>>>>  GND 
RX >>>>>>>>>>>>>>  TX
TX >>>>>>>>>>>>>>  RX

Does sonoff still have the old version of esphome?
Do you have the web_server option enabled to upgrade via OTA?

1 Like

For a first flash I would just plug in my ch340 uart usb thing and let esphome setup a new device if I was starting from scratch. Although I started from mine being flashed with Tasmota.

I don’t use ESP flasher anymore. I use the esphome addon.

I start adding a new device give it a name, skip the connect , set it to esp8266, then install, manual download, modern format

Let it do its thing.

then I end up with this

esphome:
  name: test

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "zOynQkfW5EcS03Ty0vB93EikOymHfWcHCNZqI7HSHmM="

ota:
  password: "83922a09ec3b7dc993d510344b26f471"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Test Fallback Hotspot"
    password: "KLwUj9QXPRmX"

captive_portal:
    

The encryption key needs to be unique so let esphome create it.

I then add the switches and sensors and recompile.

This should work if you are plugged in with a USB uart thingy. You will probably need to hold the button down when plugging in the usb uart, then let it go a second or 2 after its started up.

Thanks, that must be it, I did not invert pins … Will resolder and try again.

I screwed up somethind while trying to update via OTA, it is not available anymore, that is why i moved over back to cable…