Shelly Devices + Home Assistant: Complete Setup Guide (2026)

Shelly Devices + Home Assistant: Complete Setup Guide (2026)

Published

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

DevicePriceTypeMatterNotes
Shelly Plus 1PM$15Single relay + power meterNoBest value, my daily driver
Shelly Plus 2PM$22Dual relay + power meterNoControls two circuits
Shelly Plus i4$13Input-only (no relay)NoScene controller, smart button input
Shelly 1PM Gen3$18Single relay + power meterYesMatter support, future-proof
Shelly 2PM Gen3$25Dual relay + power meterYesMatter support, two circuits

For Dimming

DevicePriceTypeMatterNotes
Shelly Plus Dimmer 0-10V$200-10V dimmerNoFor LED drivers
Shelly Dimmer Gen3$25Leading/trailing edgeYesMatter support, most compatible

For Sensors and Monitoring

DevicePriceTypeMatterNotes
Shelly Plus H&T$20Temperature + humidityNoBattery-powered, wireless
Shelly Plus Smoke$25Smoke detectorNoLocal alerts, no subscription
Shelly Plus Plug S$18Smart plug + power meterNoPlug-and-play, energy monitoring
Shelly Gen4 Plug$22Smart plug + power meterYesMatter support

For Garage Doors and Blinds

DevicePriceTypeMatterNotes
Shelly Plus 1PM$15Single relayNoWorks for garage door control
Shelly Plus 2PM$22Dual relayNoRoller shutter control

For the best overall smart home device recommendations, see our best smart home ecosystem 2026 guide.

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

  1. In Home Assistant, go to Settings > Add-ons
  2. Install Mosquitto Broker (see our best Home Assistant add-ons guide)
  3. Create an MQTT user: Settings > People > Users > Add User
  4. Start the broker

Step 2: Configure the Shelly Device

  1. Power on the Shelly device (connect it to your wiring per the manual)
  2. The device creates its own WiFi network (ShellyPlus1PM-XXXX)
  3. Connect to that network from your phone or laptop
  4. Open a browser and go to 192.168.33.1
  5. Go to Settings > MQTT
  6. Enable MQTT
  7. Enter your MQTT broker address: 192.168.x.x (your HA server IP)
  8. Enter the MQTT username and password you created
  9. Set a topic name (e.g., shelly/kitchen_light)
  10. 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:

  1. Go to Settings > Devices & Services > MQTT
  2. Click on the Shelly device
  3. Click the pencil icon to rename
  4. Assign to an area (Living Room, Kitchen, etc.)
  5. 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.

  1. Go to Settings > Devices & Services
  2. Click Add Integration and search for “Shelly”
  3. Enter the Shelly device’s IP address
  4. 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.

  1. Put the Shelly device in Matter pairing mode (via the Shelly app or web UI)
  2. In Home Assistant, go to Settings > Devices & Services > Matter
  3. Click Add Matter device and scan the QR code
  4. 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

FeatureShellySonoffIKEA
Price$10-25$8-15$8-20
Local controlExcellent (MQTT, local API)Good (MQTT, eWeLink)Good (Zigbee)
SizeVery compactCompactBulky (bulbs)
Power monitoringYes (many models)Yes (some models)No
Matter supportYes (Gen3/Gen4)Yes (some models)Yes (Dirigera hub)
In-wall installationYes (designed for it)YesNo
Best forSwitches, relays, energy monitoringBudget switchesBulbs, 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.