Shelly + Home Assistant
Shelly devices offer 100% local control with no cloud required. The native integration auto-discovers devices and provides real-time push updates.
What You Need
- Shelly device (relay, dimmer, sensor, plug, etc.)
- Latest firmware (Gen1: 1.9+, Gen2+: 1.0+)
- Home Assistant on the same network
Supported Devices
Gen1 Devices
Shelly 1, 1PM, 1L, 2.5, Dimmer 2, RGBW2, Duo, EM, 3EM, Plug, Plug S, H&T, Flood, Door/Window, Motion, i3, Uni, Button 1
Gen2 (Plus/Pro Series)
Plus 1, Plus 1PM, Plus 2PM, Plus i4, Plus Wall Dimmer, Plus Plug S, Plus H&T, Pro 1, Pro 1PM, Pro 2PM, Pro 3, Pro 4PM
Gen3 Devices
1PM Gen3, 2PM Gen3, 1L Gen3, 2L Gen3, Dimmer Gen3, EM Gen3, 3EM-63 Gen3, Plug S MTR Gen3, H&T Gen3, i4 Gen3, BLU Gateway Gen3
Gen4 Devices (Multi-Protocol)
1 Gen4, 1PM Gen4, 1 Mini Gen4, 1PM Mini Gen4, 2PM Gen4, Plug US Gen4, Flood Sensor Gen4, Wall Display, Wall Display X2
Setup Steps
Auto-Discovery (Recommended)
- 1
Update device firmware
Access your device's web UI at its IP address and check for firmware updates.
- 2
Device auto-discovered
Go to Settings → Devices & Services. Your Shelly device should appear in the "Discovered" section.
- 3
Click Configure
Follow the prompts. Enter the device password if you've set one.
Manual Setup
- 1
Add integration manually
Settings → Devices & Services → Add Integration → Search "Shelly"
- 2
Enter device hostname or IP
Enter your Shelly device's IP address or hostname.
Gen1: Enable CoIoT for Real-Time Updates
Gen1 devices use CoAP (CoIoT) for push-based updates. Enable this for instant state changes:
- 1
Access device web UI
Open your browser and navigate to your device's IP address.
- 2
Navigate to CoIoT settings
Internet & Security → Advanced Developer Settings
- 3
Enable CoIoT and set peer
Enable CoIoT and enter:
[Your_HA_IP]:5683 - 4
Save and restart
Click Save and restart the device.
Available Entities
| Entity Type | Description |
|---|---|
| Switch | Relay on/off control |
| Light | Brightness, color for dimmers and RGBW |
| Cover | Open/close/tilt for roller shutters |
| Sensors | Power (W), energy (kWh), voltage, current, temperature |
| Binary Sensors | Input state, overheating, overpower |
| Events | Button press types (single, double, long) |
| Update | Firmware update availability |
Generation Comparison
| Feature | Gen1 | Gen2+ | Gen4 |
|---|---|---|---|
| Protocol | CoAP | WebSocket | WebSocket |
| Local Control | Yes | Yes | Yes |
| Scripting | No | Yes | Advanced |
| Bluetooth Proxy | No | Yes | Yes |
| Matter/Zigbee | No | No | Yes |
Frequently Asked Questions
Does Shelly work offline with Home Assistant?
Yes! Shelly devices are 100% local and work completely offline with Home Assistant. Once configured, they communicate directly with your Home Assistant server using CoAP (Gen1) or WebSocket (Gen2+) protocols. No internet connection or cloud account is required for any functionality.
Do I need a hub for Shelly devices?
No, Shelly devices connect directly to your WiFi network without any proprietary hub. They communicate directly with Home Assistant over your local network. This makes them simple to set up and eliminates single points of failure in your smart home system.
Is Shelly better than Sonoff for Home Assistant?
Shelly devices work locally out of the box without firmware modifications, while Sonoff devices require flashing custom firmware (Tasmota/ESPHome) for local control. Shelly also offers better build quality, UL/CE certifications for in-wall installation, and native Home Assistant integration. Sonoff is cheaper but requires more technical effort.
Can I flash custom firmware on Shelly devices?
Yes, many Shelly devices can run Tasmota or ESPHome firmware, though the stock firmware already provides full local control. Custom firmware may be useful for advanced features or consistency with other ESPHome devices. Note that flashing voids the warranty and newer Gen3/Gen4 devices have more limited custom firmware support.
Are Shelly devices safe to install in electrical boxes?
Yes, Shelly in-wall devices are designed specifically for installation in electrical boxes. They have UL, CE, and other safety certifications. However, installation should be performed by a qualified electrician in accordance with local electrical codes. Shelly devices are compact enough to fit behind standard switches and outlets.
Sources
Related Guides
Need Help with Your Shelly Setup?
Our team can install Shelly relays, configure energy monitoring, and create custom automations for your smart home.
Get a Free Quote