Shelly Devices + Home Assistant: Complete Setup Guide (2026)
Shelly devices are some of the best smart home hardware for the money. They are tiny WiFi relays that fit behind your existing light switches, cost $10-25 each, and work locally with Home Assistant without any cloud dependency. I have 22 Shelly devices in my house, and they have been running flawlessly for two years.
The appeal is simple: you keep your existing switches (my partner appreciates this more than any smart feature), gain smart control, and everything runs locally. No hub required, no subscription fees, no cloud servers deciding whether your lights should turn on.
Why Shelly for Home Assistant?
Shelly devices stand out for several reasons:
- Price: $10-25 per device, among the cheapest smart home hardware available
- Local control: Full local API, no cloud required after initial setup
- Compact size: Fits behind standard European and US switch boxes
- Built-in web interface: Each device has its own web UI for configuration
- MQTT support: Native MQTT for direct Home Assistant integration
- Matter support: Newer Gen3 and Gen4 devices support Matter natively
- Energy monitoring: Many models include power metering
- No hub needed: Direct WiFi connection to your network
If you are building a smart home on a budget, Shelly delivers more smart switches per dollar than any other brand. Our smart home on a budget guide covers more affordable options.
Which Shelly Devices to Buy
Shelly has a large product line. Here are the ones that matter for Home Assistant users in 2026:
For Light Switches
| Device | Price | Type | Matter | Notes |
|---|---|---|---|---|
| Shelly Plus 1PM | $15 | Single relay + power meter | No | Best value, my daily driver |
| Shelly Plus 2PM | $22 | Dual relay + power meter | No | Controls two circuits |
| Shelly Plus i4 | $13 | Input-only (no relay) | No | Scene controller, smart button input |
| Shelly 1PM Gen3 | $18 | Single relay + power meter | Yes | Matter support, future-proof |
| Shelly 2PM Gen3 | $25 | Dual relay + power meter | Yes | Matter support, two circuits |
For Dimming
| Device | Price | Type | Matter | Notes |
|---|---|---|---|---|
| Shelly Plus Dimmer 0-10V | $20 | 0-10V dimmer | No | For LED drivers |
| Shelly Dimmer Gen3 | $25 | Leading/trailing edge | Yes | Matter support, most compatible |
For Sensors and Monitoring
| Device | Price | Type | Matter | Notes |
|---|---|---|---|---|
| Shelly Plus H&T | $20 | Temperature + humidity | No | Battery-powered, wireless |
| Shelly Plus Smoke | $25 | Smoke detector | No | Local alerts, no subscription |
| Shelly Plus Plug S | $18 | Smart plug + power meter | No | Plug-and-play, energy monitoring |
| Shelly Gen4 Plug | $22 | Smart plug + power meter | Yes | Matter support |
For Garage Doors and Blinds
| Device | Price | Type | Matter | Notes |
|---|---|---|---|---|
| Shelly Plus 1PM | $15 | Single relay | No | Works for garage door control |
| Shelly Plus 2PM | $22 | Dual relay | No | Roller shutter control |
For the best overall smart home device recommendations, see our best smart home ecosystem 2026 guide.
Setup Method 1: MQTT (Recommended for Full Control)
This is the method I use. Shelly devices connect to Home Assistant via MQTT, giving you full local control with maximum flexibility.
Step 1: Set Up Mosquitto MQTT Broker
- In Home Assistant, go to Settings > Add-ons
- Install Mosquitto Broker (see our best Home Assistant add-ons guide)
- Create an MQTT user: Settings > People > Users > Add User
- Start the broker
Step 2: Configure the Shelly Device
- Power on the Shelly device (connect it to your wiring per the manual)
- The device creates its own WiFi network (ShellyPlus1PM-XXXX)
- Connect to that network from your phone or laptop
- Open a browser and go to
192.168.33.1 - Go to Settings > MQTT
- Enable MQTT
- Enter your MQTT broker address:
192.168.x.x(your HA server IP) - Enter the MQTT username and password you created
- Set a topic name (e.g.,
shelly/kitchen_light) - Click Save
The device restarts and connects to your MQTT broker. In Home Assistant, the device appears automatically under Settings > Devices & Services > MQTT.
Step 3: Configure the Device
Back in the Shelly web UI (now accessible via its new IP on your network):
- WiFi Settings: Connect to your home WiFi network
- Button Type: Set to “momentary” for standard light switches, “toggle” for flip switches
- Power On Default: Set to “off” or “last known” depending on your preference
- LED Indication: Disable the status LED if the device is behind a wall switch
- Firmware Update: Update to the latest firmware for security patches
Step 4: Name and Organize in Home Assistant
In Home Assistant, rename the device and assign it to a room:
- Go to Settings > Devices & Services > MQTT
- Click on the Shelly device
- Click the pencil icon to rename
- Assign to an area (Living Room, Kitchen, etc.)
- The device is now ready for automations
Setup Method 2: Shelly Integration (Simpler)
Home Assistant has a built-in Shelly integration that does not require MQTT. It is simpler but offers less control.
- Go to Settings > Devices & Services
- Click Add Integration and search for “Shelly”
- Enter the Shelly device’s IP address
- Home Assistant discovers and adds the device
Pros: No MQTT broker needed, simpler setup Cons: Polling-based (slightly slower updates), less granular control, uses more network traffic
For most users with under 10 Shelly devices, the integration is fine. For larger setups, MQTT is more efficient.
Setup Method 3: Matter (Newest Gen3/Gen4 Devices)
Shelly Gen3 and Gen4 devices support Matter natively. This means they connect to Home Assistant via the Matter protocol, which is the newest and most interoperable standard.
- Put the Shelly device in Matter pairing mode (via the Shelly app or web UI)
- In Home Assistant, go to Settings > Devices & Services > Matter
- Click Add Matter device and scan the QR code
- The device appears in Home Assistant
Pros: Future-proof, works with any Matter controller (Google Home, Alexa, Apple Home) Cons: Only available on newer Gen3/Gen4 devices, Matter is still maturing
Our best Matter compatible devices 2026 guide covers more Matter options.
Essential Shelly + Home Assistant Automations
Motion-Activated Porch Light
automation:
- alias: "Porch light on motion"
trigger:
- platform: state
entity_id: binary_sensor.porch_motion
to: "on"
condition:
- condition: sun
after: sunset
action:
- service: switch.turn_on
target:
entity_id: switch.porch_light
- delay: "00:05:00"
- service: switch.turn_off
target:
entity_id: switch.porch_light
All Lights Off When Leaving
automation:
- alias: "All lights off when leaving"
trigger:
- platform: zone
entity_id: person.your_name
zone: zone.home
event: leave
action:
- service: light.turn_off
target:
entity_id: group.all_lights
Energy Monitoring Alert
automation:
- alias: "High energy usage alert"
trigger:
- platform: numeric_state
entity_id: sensor.shelly_washing_machine_power
above: 50
for: "00:30:00"
action:
- service: notify.mobile_app
data:
title: "Washing Machine"
message: "Washing machine has been running for 30 minutes"
For more automation ideas, see our best smart home automations guide.
Real-World Performance
My 22-device Shelly setup:
- 22 devices total: 12x Plus 1PM, 4x Plus 2PM, 3x Plus H&T, 2x Plus Plug S, 1x Plus i4
- Network impact: Negligible. Each device uses about 1-2KB/s when idle.
- Reliability: 2 devices needed reboots in 2 years (both after power outages)
- Response time: Under 100ms for MQTT commands, virtually instant
- Energy monitoring accuracy: Within 5% of my dedicated energy monitor
Common Issues and Fixes
Device not connecting to MQTT: Check the broker IP address and credentials. Make sure the MQTT broker is running. Verify the device can reach the broker (same network or correct routing).
Device goes offline intermittently: Usually WiFi range issues. Add a WiFi access point closer to the device. Shelly devices use 2.4GHz WiFi, which has better range than 5GHz but more interference.
Power metering not accurate: Shelly devices need calibration for inductive loads (motors, LED drivers). Check the device settings for calibration options.
Switch does not work physically: Check your wiring. Shelly devices need both live and neutral wires. If you have a switch loop (no neutral at the switch box), you need the Shelly 1L (designed for no-neutral installations).
Firmware update fails: Some older devices have issues with OTA updates. Try updating via the web UI instead of the Shelly app. If that fails, use the Shelly recovery mode.
Shelly vs Sonoff vs IKEA
| Feature | Shelly | Sonoff | IKEA |
|---|---|---|---|
| Price | $10-25 | $8-15 | $8-20 |
| Local control | Excellent (MQTT, local API) | Good (MQTT, eWeLink) | Good (Zigbee) |
| Size | Very compact | Compact | Bulky (bulbs) |
| Power monitoring | Yes (many models) | Yes (some models) | No |
| Matter support | Yes (Gen3/Gen4) | Yes (some models) | Yes (Dirigera hub) |
| In-wall installation | Yes (designed for it) | Yes | No |
| Best for | Switches, relays, energy monitoring | Budget switches | Bulbs, remotes |
Shelly is the best choice for in-wall switch automation. Sonoff is the budget champion. IKEA is best for lighting. Our Sonoff vs Shelly comparison dives deeper.
FAQ
Do Shelly devices work without internet?
Yes, completely. After initial setup (which can be done via the local web UI), Shelly devices communicate locally over WiFi and MQTT. No cloud connection is needed. You can disable cloud features entirely in the device settings.
Do I need a hub for Shelly devices?
No. Shelly devices connect directly to your WiFi network. The only “hub” you need is your WiFi router. For Home Assistant integration, you need your HA server running, but no additional Shelly-specific hub.
Can Shelly devices fit behind my light switches?
In most cases, yes. Shelly devices are designed to fit behind standard European (round) and US (rectangular) switch boxes. Measure your switch box depth: you need at least 25mm of depth for a Shelly Plus 1PM. Some very shallow boxes may not fit.
Is the Shelly app required after setup?
No. After initial WiFi and MQTT configuration, you can control everything through Home Assistant. The Shelly app is useful for firmware updates and troubleshooting, but not required for daily use.
How much energy do Shelly devices consume?
About 0.5-1W in standby. Over a year, that is about $1-2 per device in electricity. The energy monitoring feature can actually save you money by identifying devices that consume power when they should be off.