A few videos back, I promised to make a video
about how to install and use ESP Home for Home Assistant. So, today, that's what I'm going
to do. For those of you that are not familiar, ESP Home is an app that allows you to
easily connect an ESP32 to Home Assistant, making your ESP32 into a connected smart
device that you can easily automate. If you want to follow along, here's what you're
going to need. One, an ESP32. Any type will do. I've added a link to a pretty inexpensive
one on Amazon if you're in the market. Two, you're going to need Home Assistant. I'm going
to assume for this walkthrough that you already have Home Assistant installed somewhere. If
you don't, there's a link in the description containing a basic tutorial on ways to install
Home Assistant. All right, so let's get started. ESP Home really consists of two components in
order to make it work properly. The first is the ESP Home dashboard, and the second is the
ESP Home code that gets flashed to your ESP32. (...) The first step to getting going is to install
the dashboard, and depending on how you've set up your copy of Home Assistant, there's
two ways you may need to install the ESP Home dashboard. If you're like me and you
installed Home Assistant using containers and not by installing Home Assistant OS or
purchasing something like Home Assistant Yellow, you'll unfortunately need to install ESP Home
manually. Now, I'm not going to cover this process in a ton of detail since most people install
ESP Home the easier way using Home Assistant OS, but there is a link in the description of my
configuration and the container I use so you can install it yourself. Now, for most of you that
probably have Home Assistant OS or Home Assistant with supervisor,(...) just click this link in the
ESP Home website to install ESP Home or go to the Add-On section in Home Assistant, open the store,
and add the ESP Home Add-On. After it installs, check all the boxes and start ESP Home. ESP Home
will appear in the sidebar of Home Assistant, and you can click it to see the empty dashboard.
All right, so now that you have the ESP Home dashboard installed, next we're going to set up an
ESP32 and flash it with the ESP Home software so we can control it with Home Assistant. Since there
are literally hundreds of different things you can connect to an ESP32 and control with ESP Home,
I'm just going to keep it simple. Today, we're going to set up ESP Home to control a single LED.
This keeps it simple so you can see all the steps, but we also don't get lost in the weeds of setting
up some complicated accessory. First, using the USB port on the ESP32, plug the device into your
computer. Note that you don't necessarily need to connect the device into the computer that's
running ESP Home, as long as you can load the dashboard using HTTPS,(...) you can flash the
ESP32 from any computer with a USB port. Next, click the green button in the corner to add a
device. ESP Home is going to ask you what to name the device. For this demo, I'm calling the device
Test. Next, ESP Home will tell you to connect your device with a USB cable. If you already did this,
you could. Just click Connect.(...) One note here, make sure your USB cable actually supports
data. Some cables are power cables only, and they're not going to work here. Okay, right
after clicking Connect, a little box should pop up asking you what device to connect to. You
should choose the USB to UART bridge controller or something similar. It'll look like that. Then
click Connect. As soon as you do that, go back to the ESP32 device itself, press and hold the boot
button on the device. Keep holding it until ESP Home dashboard shows preparing installation on the
screen. At that point, let go of the button and just wait for the installation to complete. After
it's done, you should see the device appear on the dashboard. If everything goes exactly perfectly,
it should say that it's online. Now real quick, this is another gotcha. Sometimes after
installation, it'll continue to show as offline. If this happens, you may need to set the
IP address in the configuration manually. Just hit the Edit button, and under the Wi-Fi section, type
the IP address that was assigned to the device. You can usually find the IP address by logging
into your home router and looking at the list of connected devices. After you get that entered,
save the file, hit Install, and choose to install with the USB cable again. This fixes the issue
99% of the time. After it says that it's online, you can disconnect the USB cable from your
computer and just power the device with the cable by plugging it into power. It'll now be able
to update via Wi-Fi. Finally, now that you have a connected device, figure out the configuration you
need for whatever you have connected to the ESP32. Here you can see that I just copied an example
from the ESPHome website and changed the pin number to match how I have mine wired. After
configuring the device, install the changes, and this time you can do it via Wi-Fi. Then, and
some of you won't need this, but just in case, click the three dots next to the device, click
Show API Key, and copy the key. After that's done, go to the Settings section of Home Assistant and
then click on Devices and Services. For most of you, it'll probably just auto-detect the ESPHome
device and ask if you want to install it. If you don't get lucky, you may need to install ESPHome
integration yourself. Just click the blue Add Integration button at the bottom and search for
ESPHome. Install it, provide the IP address and port where ESPHome was installed, then provide
the API key that you copied just a second ago. This is a one-time setup, and next time it'll
auto-detect, I promise. Okay, now after you've configured your device, go to Entities at the top
of the screen and search for your entity. The name of it will be the name of your ESP32 device, then
the name of the entity attached to it. In my case, Test Test Light. You should be able to
click on the entity and control it. Alright, that's the whole setup. I hope it helps you
get started. Until next time, happy coding.