ESPHome Advanced
Build your own sensors and devices.

WiFi-based smart home devices are often the easiest to get started with. No coordinator, no mesh - just your existing WiFi network. This guide covers the big three: Shelly, Tasmota, and ESPHome.
Shelly devices are Bulgarian-made WiFi products that just work. Out of the box. No flashing, no configuration - connect power, join WiFi, done.
| Advantage | Description |
|---|---|
| Local API | Works 100% without internet |
| No cloud required | Disable cloud entirely if you want |
| CoIoT/MQTT | Choose your protocol |
| Power metering | Most models have built-in meters |
| Compact size | Fits behind switches and in junction boxes |
| Model | Function | Channels | Power | Price |
|---|---|---|---|---|
| Shelly 1 | Relay | 1 | 16A | ~$13 |
| Shelly 1PM | Relay + metering | 1 | 16A | ~$17 |
| Shelly 2PM | Relay + metering | 2 | 10A/ch | ~$24 |
| Shelly Plus 1 | Gen2 relay | 1 | 16A | ~$16 |
| Shelly Plus 2PM | Gen2 relay + metering | 2 | 10A/ch | ~$27 |
| Shelly Pro 4PM | DIN rail, display | 4 | 16A/ch | ~$80 |
| Shelly Dimmer 2 | LED dimmer | 1 | 220W LED | ~$27 |
| Shelly Plug S | Smart plug | 1 | 12A | ~$20 |
Home Assistant automatically discovers Shelly devices on your network:
Connect Shelly to power and WiFi via Shelly app
Go to Settings β Devices & Services
Shelly appears under βDiscoveredβ - click Configure
Enter IP address if not auto-discovered
Done - all entities are created automatically
For faster updates on Gen1 devices:
# In Shelly's web interface:# Internet & Security β Advanced - Developer Settings
# Enable CoIoTEnable CoIoT: β
# Set unicast to Home AssistantCoIoT peer: 192.168.1.100:5683 # Your HA IP| Aspect | Native Integration | MQTT |
|---|---|---|
| Setup | Automatic | Manual configuration |
| Speed | Fast (CoIoT/WebSocket) | Fast |
| Cloud | Can run simultaneously | Gen1: Either/or |
| Recommendation | β For most users | Only if you need MQTT |
Rule of thumb: Use the native Shelly integration. MQTT rarely provides benefits and requires more maintenance.
Tasmota is open source firmware for ESP8266/ESP32-based devices. Flash it on cheap Sonoff switches or Chinese smart plugs, and you get full local control.
Tasmota runs on almost anything with ESP8266 or ESP32:
| Device Type | Examples |
|---|---|
| Sonoff | Basic, Mini, S31, 4CH Pro, POW |
| Tuya/SmartLife | Smart plugs, switches, LED bulbs |
| Shelly | Can flash to Tasmota (but why?) |
| BlitzWolf | BW-SHP6, BW-SHP10 |
| Gosund | SP1, SP111, WP3 |
| NodeMCU/Wemos | DIY projects |
The easiest method - requires only Chrome/Edge browser:
Connect device via USB (or USB-to-Serial adapter)
Select firmware variant (typically βTasmotaβ)
Click Install and wait
Device creates WiFi network βtasmota_XXXXXXβ
Connect and configure your WiFi
Desktop application with more options:
# Windows: Download .exe from GitHub# Linux/Mac:pip install tasmotizertasmotizerAdvantages:
Command line for full control:
# Install esptoolpip install esptool
# Erase flash (recommended)esptool.py --port /dev/ttyUSB0 erase_flash
# Flash Tasmotaesptool.py --port /dev/ttyUSB0 write_flash -fm dout 0x0 tasmota.bin
# ESP32 variant:esptool.py --port /dev/ttyUSB0 write_flash 0x0 tasmota32.binAfter flashing:
Connect to tasmota_XXXXXX WiFi network
Open 192.168.4.1 in browser
Select your WiFi and enter password
Device restarts and gets new IP from your router
Find IP in router or via Tasmota Device Locator
Open Tasmota Dashboard at the new IP
Tasmota needs to know which GPIO pins control what:
# In Tasmota Dashboard:# Configuration β Configure Other
# Paste template from templates.blakadder.com{"NAME":"Gosund SP1","GPIO":[56,0,158,0,132,134,0,0,131,17,0,21,0],"FLAG":0,"BASE":45}
# Or select module:# Configuration β Configure Module β (select from list)Tasmota primarily communicates via MQTT:
# Configuration β Configure MQTT
Host: 192.168.1.100 # Your MQTT broker (often HA)Port: 1883Client: tasmota_%06X # Unique per deviceUser: mqtt_userPassword: mqtt_passwordTopic: gosund_office # Choose descriptive nameFull Topic: %prefix%/%topic%/Tasmota has native integration via MQTT Discovery:
Enable MQTT Discovery in Tasmota:
SetOption19 1Install Tasmota integration in Home Assistant:
Devices are automatically discovered via MQTT
All entities (switches, sensors, metering) are created
ESPHome is the most flexible choice. You write a YAML file, ESPHome compiles firmware, and you get exactly the functionality you want.
| Aspect | ESPHome | Tasmota |
|---|---|---|
| Configuration | YAML files | Web interface |
| Flexibility | Unlimited | Limited to templates |
| HA Integration | Native API (fastest) | MQTT |
| Learning curve | Steeper | Easier start |
| DIY Projects | βββββ | βββ |
| Ready-made devices | βββ | βββββ |
You can flash ESPHome on many Tasmota-compatible devices:
# Example: Sonoff Basicesphome: name: sonoff-kitchen platform: ESP8266 board: esp01_1m
wifi: ssid: "MyWiFi" password: "secret"
api: encryption: key: "your-encryption-key"
ota: password: "ota-password"
binary_sensor: - platform: gpio pin: number: GPIO0 mode: INPUT_PULLUP inverted: true name: "Button" on_press: - switch.toggle: relay
switch: - platform: gpio name: "Kitchen Light" pin: GPIO12 id: relay
status_led: pin: number: GPIO13 inverted: trueFlash Tasmota Minimal first (frees up space):
Flash ESPHome via HTTP:
Alternatively: Flash via serial/USB as normal
| Feature | Shelly | Tasmota | ESPHome |
|---|---|---|---|
| Requires flashing | β | β | β |
| Out of box | βββββ | ββ | ββ |
| Flexibility | βββ | ββββ | βββββ |
| HA Integration | Native | MQTT | Native API |
| Power metering | Built-in | Depends on device | Configure yourself |
| Price | Higher | Cheap devices | Cheap devices |
| Support | Commercial | Community | Community |
| Warranty | Preserved | Voided | Voided |
ββββββββββββββββββββββββββββββββββββββββββββββββ WHICH FIRMWARE IS RIGHT FOR YOU? ββββββββββββββββββββββββββββββββββββββββββββββββ β βΌ ββββββββββββββββββββββββββ β Want to build it β β yourself? β ββββββββββββββββββββββββββ β β Yes No β β βΌ βΌ ESPHome βββββββββββββββββββ β Have Tuya/cheap β β devices? β βββββββββββββββββββ β β Yes No β β βΌ βΌ Tasmota ShellyWiFi devices are potential security risks. Consider:
# Separate VLAN for IoTIoT VLAN: 192.168.10.0/24 - No internet access (local only) - Communication only with Home Assistant - Firewall rules for MQTT/APIAll three platforms support 100% local control:
| Platform | How to disable cloud |
|---|---|
| Shelly | Internet & Security β Cloud β Disable |
| Tasmota | No cloud by default |
| ESPHome | No cloud by default |
ESPHome Advanced
Build your own sensors and devices.
Zigbee2MQTT
Alternative to WiFi protocol.
Last updated: December 2025