Confused where to connect the ESP8266

I just started out with HA, and successfully installed ESPHome.
This is running on a small computer.
Trying to add my first device, but I am confused where to physically connect the ESP8266.
My browser where I have to do all the work is running on another computer, so not on the machine HAOS is running on.
Do I need to connect the ESP8266 to the HAOS machine or to the machine running the browser ?

It should connect by Wifi to your router. I’m assuming you have flashed it already.

No, sorry if I was unclear.
I still have to flash it for the first time, so I need to physically connect the soc somewhere…

If the esp8266 has a usb port connect it to the computer where you run the browser. Don’t connect it directly to the HA device.

Ok, thank you very much.
I did try that yesterday, and it did not seem to work.
I’ll try again and see where things went wrong.

If it is a new esp that has never been flashed you will need to press the boot button just before you plug it in or plug it in hold down boot button before pressing the other button which is reset. Some esp boards require you to hold down that boot button until it has started flashing. Make sure you choose a usb lead that supports data. Many usb only support power for charging.

And if it is a PC that you never used to flash esp devices with, you probably need to install the proper driver if the computer does not see the usb. Using esphome through chrome on windows, you should get a dialog which drivers that could be. There are a few different serial chips the boards can use, each thoe needs its own driver installed.

1 Like

Why not? It is the easiest way

1 Like

Easier than connecting to the computer that you are using to connect to esphome to flash it on that you may have to hold the boot button down?

Most of the time, Yes (I never had to push the button)

Interesting. First time I flash anything to an esp8266 I have had to hold down the boot button. I can’t recall not having to hold it down for any esp32.

Good point from from @mcarty nothing will happen until you run esphome and try to upload your YAML.

You don’t need to do that.

@Phloks - I agree with @nickrout . Connect the ESP8266 directly to a USB port on the system running HAOS. Then, from a web browser on another computer, connect to Home Assistant, open up the ESPHome interface, create your ESPHome project, and then load it on to the ESP8266 over USB.

This is by far the easiest way I have found to get the initial ESPHome firmware loaded on to the microcontroller. HAOS already has the necessary drivers to communicate with the ESP8266.


Ok thank you all for your suggestions.
The PC I have attached the esp8266 to, and the one where my browser is running on, is a Debian 12 laptop.
I can see the esp as /dev/ttyUSB0, and I made sure my user is member of the dialout group.
The esp is now shown in ESPHome, and I can create a new device, connect it to wifi, etc.
Yay , great success !

(will try the same when connected directly to the HA pc…)