Flash ESP32 with ESPHome in 2025
A lot has changed since I last worked with ESPHome, and it seems that everything has changed, but for the better. It is now easier than ever to flash an ESP32 with ESPHome using Web Serial.
In my example, I will be using an ESP12-f (similar to the ESP12-e and pretty much just an ESP8266ex under the hood).
Connect your ESP12-f to your Computer
I wrote an article about this before (https://techstuff.leighonline.net/2023/10/29/esp-flashing-tasmota-using-an-ftdi/) but will will put the most important details below.
First, connect your ESP12-f to your FTDI as per the below diagram. Make sure you are using 3.3v.

Get your ESP12-f ready for ESPHome
Go to https://web.esphome.io/?dashboard_wizard and click on the Connect button and select your COM port from the list. Mine was COM 5, yours might be different.

Then, click on the “Prepare for First Use” button:

Flashing will take a minute or so.
Add ESP12-f to ESPHome
I have ESPHome running on my local network. I just opened up the page and clicked on New Device, and then Continue when that message pops up.

It will ask you to name your config and to select a board. For the ESP12-f, select ESP8266. When done, a key will be displayed which you can save somewhere. Don’t click on install yet, click on Skip because we need to do some additional config.

ESPHome Configuration
In the top right corner of your ESPHome website, click on Secrets, and add 2 new secrets for your WiFi network you want your ESP12-f device to connect to.

Just add these 2 lines:

When done, and back on your ESPHome home page, click on the Edit button just below the new device you just added. Your config should look like this. Note the board line in bold and the WiFi section in bold.
esphome:
name: mytestconfig
friendly_name: mytestconfig
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxx"
ota:
- platform: esphome
password: "xxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Mytestconfig Fallback Hotspot"
password: "KwaVfCNh4z5a"
captive_portal:
Installing the config to your ESP12-f
Still on your config screen, click Save if you changed anything, and then click on Install. Both these buttons are in the far right top corner.

And then select Manual Download. It will take some time and your browser will prompt you to save a .bin file.

Go back to https://web.esphome.io/?dashboard_wizard again and click on Install and navigate to your downloaded .bin file.

The flashing will take some time, and once done, remember to disconnect the EN pin, GPIO0, GPIO15, RX and TX. We pretty much justt need GND and VCC connected to give our ESP12-f power.
HomeAssistant
If all went well, you will see your ESPHome device in your local ESPSHome website, and in Home Assistant.


Flash ESP12-f via WiFi
Now that the initial setup is done, you can flash your ESP12-f using WiFi. No need to connect it to your computer again.
