Mastering Technology, Systems, Automation and Beyond

ESP Home Assistant

How to connect an ESP Board to HAOS: My Go-To Setup Guide

I always struggle a bit with the steps required to connect an ESP board to HAOS for the first time. Even though it’s super simple and straightforward, the sequence of steps does matter for a clean setup. So, just for my own reference – here’s what needs to be done.

Open ESPHome Builder and add a new device. A warning will appear with two options – either open ESPHome Web or continue. Select Continue here.

Give it a name. It should follow the existing naming convention – this will also be the name your WiFi router will capture later.

Select the device type. In my case, it’s ESP8266. Leave the recommended settings ticked. Click Continue.

At this point, the initial config for your new device is created. A pop-up will now offer to Install the config.

You can either go ahead with Install, or Skip and review the config first. Let’s skip and check the config.

You’ll now see the new device listed as OFFLINE in ESPHome – which is expected, since it’s just a config at this point. Click Edit, check that the WiFi settings are applied. You can also copy a few lines from other ESPs to enable the web portal or load some initial config, but to start with – keep it super plain and simple. I wouldn’t change anything at this stage.

Once happy with the config, click Save, then use the three dots menu and select Install. Pick the option Plug into this computer.

Wait for the download to be prepared (can take a couple of minutes), then download the file. It’ll be a binary file with a .bin extension. Chrome might block it – if so, click Keep to allow the download.

With the binary config ready (including WiFi settings and basic setup), click the other link on the pop-up to open ESPHome Web.

Now plug the ESP board into your computer – make sure it’s a data-enabled USB port, not just power. Click Connect. A pop-up will show available COM ports. If you don’t see your device, unplug and plug it back in. Once it shows up, select it.

The installation process will now begin. After a few minutes, the board should reboot and automatically connect to your WiFi.

Very important – check your WiFi router to see which IP address was assigned to the device, and make a reservation for it.

Go back to your ESP config and add a line to enforce that static IP. Without it, the ESP might struggle to reconnect. Leave everything else unchanged, save, and install again.

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: 192.168.1.20
  1. That’s it – you’re ready! You can now unplug the ESP board from your PC and plug it into any other USB socket for power. Everything else can now be managed over WiFi and all further config changes can be done over-the-air.

Phew….

P.S. More screenshots coming next time I run through this setup.


Discover more from Soul of All Tech

Subscribe to get the latest posts sent to your email.


Tags


Comments


Leave a Reply

Your email address will not be published. Required fields are marked *

Navigation