Cannot get Node MCU 8266 ESP-12E to connect to ESPHome

Hi, all. I have been trying unsuccessfully to get a Node MCU 8266 ESP-12E to connect for its initial flash. This applies to both the Home Assistant ESPHome add-on and to the ESPHome web page. Getting an ESP-01 board to connect was easy, but the Node MCU 12E just won’t connect. I’ve been searching both the web and the HA forum, and I have tried many different things. I have successfully programmed it from the Arduino IDE to prove to myself that it can be programmed. I just haven’t figured out how to do the ESPHome flash. Any help I can get would be much appreciated.
Thanks.

Try flashing it from here: https://web.esphome.io/

Or try connecting GPIO0 to GND before connecting the USB.

Unfortunately, neither of those things worked. I’d previously tried the ESPHome web site, in addition to the ESPHome add-on from within HA, and neither is working, yet. However, following your suggesting, I tried again, same result, failure to connect. The GPIO0 to GND also did not work, even though that is the key to getting an ESP-01 module into programming mode. Not sure, but it seems that the problem is that I’m just not getting the Node MCU ESP-12E into programming mode. The Arduino IDE is able to do it without having to make any similar electrical connections for the Node MCU. It has a reset button and a flash button that connects GPIO0 to GND. It also has a built-in CP2102 adapter that is supposed to let the programming software, like the Arduino IDE, put the module into programming mode. I’m certain that I’m just missing something.

Did you use IDE on the same computer you run esphome (web) ?
Missing CP2102 driver could cause issue like that…

The ESP-12E device should be able to enter programming mode automagically. Are you sure you have defined the correct board?

Post your yaml code, and the compiler output here, [in forum formatted format </> for readability purposes].

Any entries in the system error log? The HomeAssistant one as well as your computer?

Are you up to date with all code?

Have you cleared your ESPHome cache so it downloads fresh copies of all libraries to compile?

Do you have static IP Addresses allocated for your devices (including your HomeAssistant server and ESP) in your router DHCP configuration setup?

Do you have matching entries in your yaml networking sections?

I have installed the CP2102 driver, as suggested, no change.
If I follow the recommended process I don’t get any YAML, no logs that I can find, and no error messages. I see the ‘Connecting’ screen, which I’ve let run for up to 20 minutes before I finally just pull the cable out of the USB port.
If I click on ‘skip this next step’ rather than connecting, then I get the opportunity to choose a board and generate YAML. I’ve tried the board I know I have as well as several other choices. I get YAML (see below), and then when I try to connect and install, I get the same never-ending ‘Connecting’ screen.
This behavior is the same whether I use the HA ESPHome add-on interface of if I go directly tothe ESPHome web site.
I have been able, easily, to connect and set up an ESP-01 module, which requires connecting GPIO0 to GND during power-up to get into programming mode. However, neither the NodeMCU 8266 ESP-12E nor an ESP32 module can get past the ‘Connecting’ screen, even if I manually make the GPIO0 connection first, even though this should not be required with these modules.
The CP2102 seems to have been recognized from the beginning because it shows up when I choose a port for connecting, and the port entry in the port selection screen says ‘paired’

esphome:
  name: test
  friendly_name: test

esp8266:
  board: nodemcuv2

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "bq/sVbkqTNg4QS/+buLkauN++c9/GL34r6fWIsVPEJ8="

ota:
  - platform: esphome
    password: "2bba238e434447710c160a22a3687057"

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: "4TkOhOVO9IXB"

captive_portal:
 

Instead of connecting to the device choose “Manual Download”. Save the .bin file somewhere then use this tool to flash the device: Releases · esphome/esphome-flasher · GitHub

This is how I flash all my ESP32 devices. I started using it when ESPHome could not connect to my ESP32 devices via USB-C (missing driver). That may have changed and I should try directly from the add-on/app next time I need an ESPHome device.

Thank you!
It seems to have worked to manually generate the bin file and then to flash it using the ESP flasher tool you pointed me to. I now have a NodeMCU ESP-12E online and am able to download logs from it wirelessly. I am very much looking forward to experimenting with ESPHome devices, I have ideas. In the meantime I’ll do this again a few times with a couple of different modules in order to gain confidence, and I’ll probably continue to work on figuring out why neither the HP add-on nor the ESP web site can connect to my devices. Probably something simple that I’m missing.
Thank you, again!

Thanks for sticking with this one.
While the immediate problem has been bypassed by a workaround, the documented approach is still faulty. A bug should be reported in GitHub for investigation and remedy for other bewildered players.
Thanks.