ESPHome logo ESPHome
OPEN SOURCE ESP32 · ESP8266 · RP2040 · BK72xx

ESPHomeCreate Custom Deviceswith Powerful Automation

ESPHome empowers you to transform microcontrollers into intelligent smart-home devices through intuitive configurations and seamless Home Assistant integration. Create connected sensors, switches, lights, and automation systems with greater flexibility, reliability, and local control.

YAMLNo C++ required
OTAWireless updates
LocalNo cloud account
ESP32-S3 board running ESPHome firmware with its YAML configuration and live sensor status
$ esphome run kitchen.yaml
✔ compiled · uploaded · online
ESPHome YAML configuration compiled into firmware for an ESP32-C6 board
What is ESPHome

Build smart devices with ESPHome

ESPHome creates custom firmware for microcontrollers using a simple YAML configuration. Define your board, network settings and components to build connected sensors, switches, lights and more.

Connect devices to Home Assistant, run automations locally and update firmware wirelessly after the initial installation.

Choose from supported components to read temperature, monitor energy, control lighting or operate switches. Your configuration brings the hardware and its behavior together, so you can tailor each device to the needs of a room or project.

ESPHome checks the configuration and builds firmware for your chosen board. Once installed, the device can report its readings and respond to commands over your local network. You can change settings, add components and send updates as your setup grows.

Features

Everything a smart device needs, wired in by default

Each capability below is a few lines of YAML away. Turn it on, save, and the next build includes it.

GPIO 01Configuration as plain YAML icon

Configuration as plain YAML

Describe your board, Wi-Fi, sensors, outputs and automations in a readable YAML file. ESPHome validates your settings, generates the firmware and compiles it for your device. Update the configuration as your project grows and easily reuse settings across devices.

GPIO 02Native Home Assistant link icon

Native Home Assistant link

Devices are discovered automatically and talk over an encrypted native API, so entities appear without MQTT brokers or manual setup.

GPIO 03Wireless OTA updates icon

Wireless OTA updates

After the first USB flash, every change is pushed over Wi-Fi with a password, plus safe mode for boards that crash after an update.

GPIO 04Hundreds of components icon

Hundreds of components

Temperature, CO₂, mmWave, energy meters, displays, LED strips, IR remotes, stepper motors: most common parts have a ready-made platform you enable in a few lines.

GPIO 05On-device automations icon

On-device automations

Triggers, conditions, scripts and lambdas run on the microcontroller itself, so a fan or light still reacts when the network goes down.

GPIO 06Bluetooth proxy built in icon

Bluetooth proxy built in

An ESP32 can relay nearby BLE sensors and trackers to Home Assistant, extending Bluetooth coverage across the whole house.

GPIO 07Local-first, no cloud icon

Local-first, no cloud

ESPHome devices communicate over your local network without requiring a cloud account or subscription. Sensors and controls can connect directly to Home Assistant, while on-device automations continue to run even if the internet or your controller is unavailable. Keep sensor readings and device controls within your home network, and use local triggers to make lights, switches and other components respond quickly. You can also protect connections with API encryption and secure wireless updates.

How it works

From a text file to a device on your network

Four stages, all handled by the same tool. You only touch the first one.

STAGE 01

Describe

Create a YAML file naming the board, Wi-Fi credentials and components such as sensor, switch or light.

STAGE 02

Validate

ESPHome checks every key, pin and value against the component schemas and reports mistakes before anything is compiled.

STAGE 03

Compile

The configuration is turned into C++ and built with PlatformIO or ESP-IDF into a firmware image sized for your chip.

STAGE 04

Flash & connect

The image goes over USB once, then over Wi-Fi. Home Assistant discovers the device and its entities appear instantly.

Installation

Pick the install route that matches your setup

All four routes produce the same firmware. Choose by where you want the tool to live.

Install the ESPHome Device Builder in Home Assistant

  1. Open Settings → Apps (called Add-ons on older releases) and select Install App.
  2. Search for ESPHome Device Builder, install it, then enable Show in sidebar and start it.
  3. Open it from the sidebar and choose New device. The wizard asks for a name, the chip family and your Wi-Fi.
  4. Connect the board by USB for the first install. Every update after that goes over the air.

Your YAML files are stored in /config/esphome/, so they are included in Home Assistant backups automatically.

Install with pip in a virtual environment

  1. Install Python 3.12 or newer and confirm it with python3 --version.
  2. Create a virtual environment so ESPHome stays isolated from system packages.
  3. Install ESPHome, check the version, then run the wizard to create your first configuration.
# create and activate an environment
python3 -m venv ~/esphome-venv
source ~/esphome-venv/bin/activate   # Windows: esphome-venv\Scripts\activate
pip install esphome
esphome version
esphome wizard bedroom.yaml
esphome run bedroom.yaml

Run esphome dashboard config/ to open the same web dashboard on port 6052.

Run the dashboard in Docker

  1. Create a folder for your configurations, for example ~/esphome.
  2. Start the official image with host networking so mDNS discovery works.
  3. Open http://<server-ip>:6052 and create devices from the browser.
docker run -d --name esphome --restart unless-stopped \
  --net=host \
  -v "$HOME/esphome":/config \
  ghcr.io/esphome/esphome

On Docker Desktop, where host networking is unavailable, replace --net=host with -p 6052:6052.

First flash from the browser with ESPHome Web

  1. Open web.esphome.io in Chrome or Edge on a desktop computer.
  2. Plug the board in, click Connect and pick its serial port from the browser prompt.
  3. Choose Prepare for first use. A starter firmware is written to the chip.
  4. Enter your Wi-Fi details when asked. The device then appears in Home Assistant or the dashboard for adoption.

Web Serial is not available in Firefox, Safari or mobile browsers. Use a Chromium-based desktop browser.

Use cases

What people actually build with it

Most ESPHome devices solve one specific job well. These four categories cover the majority of real installations.

Climate and air-quality nodes built with ESPHome

Climate and air-quality nodes

Temperature, humidity, pressure, CO₂ and particulate readings from rooms, greenhouses or lofts, with filters that smooth noisy sensors before Home Assistant records them.

Addressable LED lighting built with ESPHome

Addressable LED lighting

WS2812B and SK6812 strips with effects, colour temperature control and transitions, driven by a single ESP32 behind a shelf or TV.

Energy and smart-plug monitoring built with ESPHome

Energy and smart-plug monitoring

Reflashed plugs and clamp meters reporting watts, kWh and voltage, so you can see which appliance actually drives the bill.

Presence and Bluetooth tracking built with ESPHome

Presence and Bluetooth tracking

mmWave radar for true room occupancy and BLE proxying for key fobs and phones, feeding lighting and heating automations.

Download

Get the ESPHome source package

The archive below is the current development branch from the official ESPHome GitHub repository: the Python tooling, every component and the C++ runtime that ends up on your boards.

Package
esphome-dev.zip
Source
GitHub · dev branch
Platforms
Windows · macOS · Linux
Requires
Python 3.12+
Download ESPHome (dev.zip) ↓

For a stable everyday setup, install the released package with pip install esphome or use the Device Builder app in Home Assistant.

ESP32-S3, ESP32-C6 and ESP8266 boards representing ESPHome builds from the source archive
Compatibility & comparison

Supported chips, and how it compares

ESPHome covers the microcontrollers found in most DIY boards and many retail smart devices.

ESP32 XtensaESP32-S2ESP32-S3ESP32-C3 RISC-VESP32-C6 Wi-Fi 6ESP8266RP2040 / RP2350BK72xxRTL87xxLN882xnRF52
ESPHomeTasmotaWLEDArduino sketch
Setup styleYAML compiled per devicePrebuilt firmware, web UI templatesPrebuilt firmware, web UIHand-written C++
Home AssistantNative encrypted API, auto-discoveryMQTT discovery or Tasmota integrationDedicated WLED integrationManual MQTT or REST
Wireless updatesBuilt-in OTA with passwordBuilt-in OTABuilt-in OTAOptional library
ScopeSensors, lights, displays, BLE, climatePlugs, relays, general devicesAddressable LED lightingAnything, with effort
Best forCustom devices kept as config filesQuick reflash of retail plugsLED strips and matricesUnusual one-off logic
Troubleshooting

The errors you are most likely to meet

Nearly every first-day problem comes down to a cable, a driver, power or the network. Here is how to clear each one.

No serial port found

The computer does not see the board

Use a USB cable that carries data, not a charge-only lead. Install the CP210x or CH34x driver for your board's USB chip, then reconnect and refresh the port list.

Failed to connect: Wrong boot mode

Board will not enter flashing mode

Hold the BOOT (GPIO0) button, tap RESET, then release BOOT while the upload starts. Some cheap boards need this every time they are flashed over USB.

Device shows OFFLINE in dashboard

Dashboard cannot reach the device

The dashboard relies on mDNS. If your router blocks it, set a static IP with use_address or enable ping-based status in the Device Builder settings.

Error auth result / OTA failed

Wireless update is rejected

The OTA password in the YAML must match the one already on the device. If you changed it, flash once with the old password included, or reinstall over USB.

Brownout detector was triggered

Board resets when Wi-Fi starts

The supply cannot handle current spikes. Use a better USB port or power supply and add a capacitor across 3.3 V and GND on bare modules.

Compile stops with "Killed"

Build runs out of memory

ESP32 builds, especially on ESP-IDF, need around 2 GB of RAM. Compile on a desktop instead of a small single-board computer, or add swap space.

System requirements

What your computer and board need

Build machine HOST

Operating system
Windows 10/11, macOS, or a current Linux distribution
Python
3.12 or newer (pip installs only)
Memory
2 GB free for compiles; 4 GB+ recommended for ESP-IDF builds
Disk space
3 GB+ for toolchains, libraries and build caches
Browser
Chrome or Edge desktop for USB flashing via Web Serial
Network
Same LAN as devices, with mDNS allowed

Target device BOARD

Chip
ESP32 family, ESP8266, RP2040/RP2350, BK72xx, RTL87xx, LN882x or nRF52
Flash
4 MB recommended for OTA headroom; 1 MB ESP8266 works with limits
USB link
Data-capable cable and CP210x / CH34x driver if needed
Power
Stable 5 V USB or 3.3 V supply able to handle Wi-Fi peaks
Wireless
2.4 GHz Wi-Fi network (5 GHz is not supported by these chips)
Controller
Home Assistant optional; MQTT or web server also supported
Security shield representing ESPHome API encryption, OTA passwords and safe mains wiring
Safety

Secure the network, respect the mains

ESPHome devices sit on your home network and sometimes inside wall sockets. A few habits keep both sides safe.

Encrypt the native API

Add an encryption: key: under api: so only your Home Assistant can read and control the device.

Keep secrets out of configs

Store Wi-Fi, API and OTA credentials in secrets.yaml and never commit that file to a public repository.

Never flash while on mains

Unplug plugs and switches before opening them. Power a reflash only from the USB-serial adapter at 3.3 V.

Use trusted sources

Install from PyPI, the official container registry or the Home Assistant app store, and review shared YAML before flashing it.

Pros and cons

An honest look at the trade-offs

+ Strengths

  • Readable configuration. A device's whole behaviour fits in one file you can version, copy and review.
  • Tight Home Assistant integration. Discovery, encryption and entity naming work with no extra broker.
  • Local and private. No cloud dependency, no vendor lock-in, no telemetry required.
  • Broad hardware support. From $3 ESP8266 boards to ESP32-S3 displays and reflashed retail plugs.
  • Active project. Monthly releases, new components and a large community of shared configs.

− Limitations

  • Compiles take time. The first ESP32 build downloads toolchains and can take several minutes.
  • YAML learning curve. Indentation and component options need care until the patterns feel familiar.
  • First flash needs a cable. Retail devices may require opening the case and soldering to serial pads.
  • Breaking changes happen. Monthly releases sometimes rename options, so read release notes before updating.
  • Not for heavy compute. Microcontrollers handle sensing and control, not cameras with AI or large web apps.
FAQs

Questions people ask before their first build

Yes. ESPHome is open-source software maintained under the Open Home Foundation. The Python tooling is MIT-licensed and the C++ device runtime is GPLv3, so you can install it, build firmware and flash as many boards as you like without a licence fee or subscription.

No. Home Assistant is the most common companion, but ESPHome devices can run on their own with on-device automations, expose a built-in web server, publish to an MQTT broker, or be driven by any client that speaks the native API. The firmware keeps working even when no controller is connected.

An ESP32 development board with a USB-to-serial chip (CP2102, CH340 or native USB on the S3/C3) is the easiest start. It has enough flash and RAM for OTA updates, Bluetooth proxying and a web server at the same time. ESP8266 boards such as the D1 mini remain fine for single-sensor nodes.

ESPHome Web is a browser page that flashes a minimal starter firmware over USB and sets up Wi-Fi. The Device Builder is the full tool: it stores your YAML files, validates and compiles them, pushes updates over the air and shows live logs for every device you manage.

Many plugs, bulbs and switches use ESP8266, ESP32, BK72xx or RTL87xx chips, and ESPHome supports all of them. Whether a specific model can be converted depends on its chip and how easily its serial pins can be reached. Never open or flash a mains-powered device while it is plugged in.

Only the first install needs a cable. After that, every change you save in the YAML is compiled and sent over Wi-Fi using the OTA component. If an update fails, the device keeps running the previous image, and safe mode helps a board recover from a crash loop.

The dev.zip archive is a snapshot of the development branch from the ESPHome GitHub repository. It is useful for reviewing source code or testing unreleased fixes. For day-to-day use the stable package from pip, the Docker image or the Home Assistant app is the better choice.

Only for installation and for the first compile of each platform, when the toolchains and libraries are downloaded. Devices themselves talk to Home Assistant over your local network, with no cloud account involved, so lights and sensors keep responding when your internet connection is down.

Keep credentials in a secrets.yaml file and reference them with !secret. That keeps them out of the device configuration you share or commit to Git. Add an API encryption key and an OTA password so other machines on the network cannot control or reflash your devices.