New device: An error occurred. Improv Wi-Fi Serial not detected

I am new to HA/ESPHome. I was able to get two ESP32 devices on my HA install without much issue. I’m now trying to add a D1 Mini 8266 and I’m stuck at the initial set up. I use Prepare for Adoption from the web UI and the install succeeds, but then the next thing that happens is “An error occurred. Improv Wi-Fi Serial not detected.”

I have tried the prepare for adoption step multiple times and the sequence of events is the same. I’ve already tried unplugging and replugging the D1 to my computer.

Am I doing something wrong? My Wifi SSID/Password are still in ESPHome “Secrets” and have not changed.

I found the logs for the device and it looks like it gets to “setting up wifi” and then there’s an exception error and the device reboots itself. This just loops forever.

I flashed this same D1 with a wifi example from Arduino IDE and it worked just fine.

Unclear what I should try to get this working…

Flash via a cable attached to the esphome computer.

The headless computer with HA installed on it? That is running HA-OS… So plug it in there and then flash from the same ESPHome web console from another computer?

Yeah that’s how it works best.

1 Like

Wow that worked. It flashed and it came right online the first time. Thanks for taking the time to comment!

When esphome started, that was the only way to do the first upload.

Hi all. I also have this problem. but after reinstalling drivers all works fine

Driver download with ESPHome link

1 Like

This page helped me: ESP Web Tools

I had this issue after flashing an ESP8266 connected to USB (not the server, but the laptop). I think what happens is that it tries to configure the device while it is still in flash mode right after flashing it, and for it to come out of flash mode, you need to disconnect the GIO from GND (which you would have connected to be able to flash), then restart the device (unplug power/replug) and then click the setup wifi again.

6 Likes

So i actually had had this happen to me as well using an MH-ET Live DEVKIT from Ali Express

In case you were banging your head against the wall like i was, this was the exact steps I had to do to get it flashed:

  1. Get to https://web.esphome.io/
  2. Connect your device, and click “Prepare for Adoption”
  3. Hold down the “BOOT” button as you click the button to install. This part was finicky as the error Installation failed: Error: Command failure error code 0x07 kept showing up. Had to hold the button before/during/after clicking “Make adoptable” and “Retry” for it to stick.
  4. As it installs, you can relax from pressing “BOOT”
  5. Before it reaches 100%, make sure to go back to holding “BOOT” again, otherwise you potentially get a different error Installation failed: SlipReadError: Timed out waiting for packet header
  6. Once you get “:tada: Congratulations”, click on “Logs”.
  7. Here’s the punchline: If you don’t see any console logs, press the “EN” to reset the device. You should start seeing information about wifi signals and other good stuff.

If you do get stuck on 5 (i have once), see if you can still go to “Logs”, and click “Reset Device” to see if things work out that way.

I had already installed the CH341 drivers, as mentioned above. Not sure if it’s that important, but worth having it.

Good luck!

2 Likes

@nickrout: That worked for me. Thank you!

I am in the same situtation but on a step further.

I was able to connect over com1 port (USB) and install basic firmware using “install for first use”. However, after the installation it tries to configure the wifi and that returns the above error. Any ideas?

ok, solved. If the device fail to connect to wifi from the installation dialog either in web.esphome.io or on the ESP dashboard (dependent where do you install the software) then the device is in the AP mode. Connect to it and it asks you which network you would like to connect. HA then detects the device.

1 Like

That works for me.

Just to clarify, your device will be set in Access Point mode, and using your computer you can connect to it as a wifi access point. Once you do it will open a page (automatically) where you can insert your wifi credentials and hit save. The information will be saved and the device will now switch to your wifi and it will be discovered automatically on Home Assistant ESPHome addon.

I have the same problem and don’t understand the process “connect to it”. I am relatively new. Managed to integrate a NodeMCU 8266 without issue. This device was programmed directly from Web-ESP home, not attached to my HA instanc (headless). I’m now trying to do the same thing for a Sonoff basic and Sonoff PowerR2. I connect these via a USB to serial converter and get the error “Improv WIFI serial not detected” as above.
Can anyone help?

I think I understand where you might be stuck.

Scenario:

  • Headless Home Assistant
  • Working on a windows computer to install ESPHome for the first time on a out-of-the-box ESP module:

Steps:

  • HomeAssistant ESPHome Add-on forwards you to https://web.esphome.io/ and that is where you connect to the ESP(32 / 8266) device connected over serial line (USB–serial adapter)
    image
  • Connect your ESP device attached to a USB–>serial adapter and when doing so make sure IO0 is pulled to GND during the power-up.
  • Click CONNECT and select COM where your virtual COM port enumerated.
  • Click PREPARE FOR FIRST USE (you are probably past that point)

Now is the point where you might be getting stuck:

  • Reset the ESP(32 or 8266) device and make sure IO0 is floating.
    You may just disconnect and reconnect your USB–>serial adapter from the computer if this is how your ESP is powered and if you do not have a Reset button.
  • Repeat the CONNECT and select the same COMxx port as earlier
  • Now click the three vertical dots (menu) and select Configure WiFi
    image

Once you connect your ESP to your Wi-Fi you are on the home run.
Hope this helps!

1 Like

Thanks for your response. It worked!!!
Bar from the fact that I use Linux, your picture is accurate. I had not noticed the 3 dots nor expected the WiFi config tonsit under there. The system has thoroughly changed since my last time.
Thanks again.