Shelly Home Assistant Integration: Local Setup Guide
This post may contain affiliate links. As an Amazon Associate we earn from qualifying purchases. Disclosure.
Learn how to integrate Shelly devices with Home Assistant for local smart home automation, scripting, and reliable device control.
Shelly devices are installed in 5.6 million households worldwide, and that number grew 33% in 2025 alone (Shelly Group, 2025). Connecting Shelly devices to Home Assistant gives you fast, reliable control that runs entirely on your local network. This complete guide covers setup, protocol configuration, scripting, and troubleshooting for every Shelly generation.
Bottom line: Shelly runs on 25.3% of the Home Assistant installations that share integration analytics (142,134 of 561,214, October 2026), which puts it ahead of Philips Hue at 15.9% (HA Analytics, 2026). Add devices through auto-discovery or manual IP entry, configure CoIoT (Gen1) or RPC (Gen2+) for local push updates, and use Shelly scripts for automations that run even when your server is offline.

How Do You Get Started with Shelly and Home Assistant Setup?
Shelly is one of the most-used device brands in Home Assistant, installed on roughly one in four of the installations that report their integrations. You need just three things to connect your first Shelly device: the device itself, a Home Assistant server on the same network, and a few spare minutes. Auto-discovery does most of the work.
Start by connecting your Shelly device to your Wi-Fi network using the Shelly Smart Control app. This gets the device online and discoverable. Once it's on your network, Home Assistant can detect it automatically through discovery or you can add it manually by entering the device's IP address.
The real advantage here is access to smart home automation features that aren't available through the Shelly app alone. You get scripting, energy dashboards, and integration with thousands of other Home Assistant services and devices.
What Are Automatic Discovery and Manual Configuration Methods for Shelly?
Home Assistant offers two paths for adding Shelly devices, and both are quick. Auto-discovery happens when your Home Assistant instance finds compatible devices on the network. Your device appears in the discovered devices section and can be set up with minimal configuration.
If discovery doesn't find your device, the manual method works just as well. Go to Settings > Devices & Services, click "Add Integration," search for Shelly, and enter your device's local IP address. This approach is especially useful if you have a segmented network or VLANs separating your IoT devices from your main network.
What Is the Step-by-Step Shelly Integration Process?
The integration itself takes a few minutes per device, and the order matters. Two problems trip people up most often: discovery not finding the device, and a battery-powered device falling asleep before the handshake finishes. Home Assistant's documentation says battery devices must be woken with a button press before setup, so do the steps in the order below.
- Install batteries in wireless devices like the Shelly H&T sensor (current model: H&T Gen3), and wake them with a button press before setup
- Connect your device to Wi-Fi using the Shelly Smart Control app
- Note your device's IP address from the Shelly app settings
- Open Home Assistant and go to Settings > Devices & Services
- Click "Add Integration" and search for Shelly
- Enter the device IP address and follow on-screen instructions
- Press the physical button on your device if prompted to complete pairing
- Wait for entities to appear in Home Assistant
Each additional device goes faster once you've done the first one, because the integration is already in place and later devices usually just appear as discovered.
How Do You Configure CoIoT and RPC for Local Communication?
The communication protocol your Shelly device uses depends on its generation. Gen1 devices use CoIoT, a protocol based on CoAP that pushes state updates to Home Assistant over UDP port 5683. To enable it, open the device's web UI, go to Internet & Security, Advanced - Developer Settings, tick Enable CoIoT, and enter your Home Assistant server's local IP address and port 5683 into the CoIoT peer field. Port 5683 must be reachable across subnets and firewalls.
Gen2 and newer devices use the RPC protocol, which communicates over WebSocket and doesn't require manual CoIoT configuration. The integration detects the generation automatically and selects the right protocol. Some battery-powered Gen2+ devices may need an Outbound WebSocket pointed at /api/shelly/ws on your Home Assistant instance, according to the integration docs.
What about MQTT? You can use it with any Shelly generation through a separate MQTT broker like Mosquitto. A 2023 community thread reports state changes arriving more slowly over CoIoT than over MQTT (HA Community). However, the native Shelly integration is simpler to maintain for most setups. After changing protocol settings, restart your Shelly device to apply the changes.
How Do You Set Up Voice Control Integration with Alexa and Google Assistant?
Shelly devices can be voice-controlled through any Alexa speaker or Google Home display. One catch: both routes link your Shelly cloud account, so commands travel through Shelly Cloud rather than your local network. If you want voice control that stays local, use Home Assistant's own voice features instead. Edison Research's Infinite Dial surveys put US smart speaker ownership at roughly 35 to 39 percent of Americans age 12 and up in 2025 and 2026, so plenty of homes already have a convenient microphone in the room.
For Google Assistant, open Google Home, go to Settings > Works with Google, search for "Shelly," and sign in with your Shelly account.
For Alexa, open the Alexa app, go to Skills, search for "Shelly Cloud," enable it, and log in with your Shelly account (you can also start from Settings > Amazon Alexa in the Shelly Smart Control app, per Shelly's documentation). The device has to be registered in Shelly Cloud first. Once linked, you can control it using voice commands through any Alexa-enabled speaker or display.
How Do You Manage Multiple Shelly Devices and Sub-Devices?
When a single Shelly device has multiple relay channels, Home Assistant creates sub-devices for each one. The integration names these automatically based on your Shelly device settings. If you've set a custom name in the Shelly app, Home Assistant uses that for the main device. Each relay channel gets its own entity.
This organization keeps your dashboard clean even with dozens of connected devices. Is it worth naming devices before adding them to Home Assistant? Absolutely. A clear naming scheme saves hours of confusion later.
How Do You Access Shelly's Configuration Options?
Yes, you can change Shelly device settings after initial setup through Home Assistant's configuration interface. Renaming is worth doing early, especially if devices came in with generic default names. Go to Settings > Devices & Services, select the Shelly integration, and click Configure. This interface lets you adjust device names, communication settings, and firmware update preferences without touching the device or the Shelly app.
Advanced Features and Automations
Once integrated, your setup supports automations that trigger on time, temperature, motion, or other sensor inputs. Combine Shelly relays with devices like the Tapo Smart Light Bulb L535E for warm white ambiance, the LIFX Switch with Night Vision for hallway control, or the eufy Indoor Cam E220 for 2K indoor monitoring triggered by Shelly motion events.
The real power shows when you chain multiple devices into home automation sequences. A Shelly door sensor triggers a hallway light, which triggers a camera recording, which sends a notification to your phone. All of it runs locally.
Shelly now makes the camera end of that chain too. Home Assistant 2026.9 added native support for it, and our read on the Shelly camera is that the 49-dollar price and the absent subscription matter more than the modest 1080p sensor, with one caveat worth knowing before you buy: no ONVIF.
How Do You Troubleshoot Shelly Connection Issues?
A good first fix for Shelly connection problems is assigning a static IP (a DHCP reservation) and restarting the device. If your Shelly doesn't appear in Home Assistant after setup, check these factors first: confirm the device is powered and connected to Wi-Fi, and verify it's on the same subnet as your Home Assistant server. These three checks catch the vast majority of problems before they require deeper network troubleshooting.
Battery-powered devices like the H&T sensor may enter sleep mode after brief inactivity. Keep them plugged in during troubleshooting to prevent sleep cycles from interfering. For persistent issues, access the device's web interface directly by entering its IP address in a browser. This confirms whether the problem is network-level or integration-level.
Advanced Control with Shelly Display Devices
For visual control interfaces, the Shelly Wall Display X2 integrates with Home Assistant to provide a wall-mounted touch panel for your entire smart home system. It gives you quick access to automation controls, device status, and manual overrides without reaching for your phone. If you'd rather have a quiet readout than a touch panel, the Shelly Smart Display E-Paper shows temperature, humidity, and light at a glance over Bluetooth or Zigbee.
What Advanced Shelly Automation Strategies Should You Try?
Shelly devices solve a problem that stops many smart switch installations: missing neutral wires. Shelly relays fit inside the junction box behind your existing wall switch, working with wiring configurations that standard smart switches can't handle. This makes them especially useful in older housing stock, where a switch loop carries live and switched-live and nothing else. The reason a relay wins there is geometric rather than clever: it sits at the load end, in the ceiling rose or the fitting, where neutral does exist. A HomeKit-only smart switch or a Zigbee switch module that expects neutral at the wall box has no such option, which is why the same houses defeat one and not the other. Retrofitting this way costs you a fiddly ten minutes above your head and saves you rewiring a circuit.
Energy monitoring Shelly devices feed granular power consumption data into Home Assistant's long-term statistics database. Over months, this data reveals exactly which circuits draw the most power and when peak usage occurs. Pairing this data with time-of-use rate schedules lets you automate devices like water heaters to run during off-peak periods, cutting energy costs without sacrificing convenience. The Shelly Power Strip 4 Gen4 brings individual outlet control and energy monitoring to a desk or media shelf.
Shelly scripting, available on Gen2 and newer devices (Plus, Pro, Gen3 and Gen4), runs automation logic directly on the device hardware. Scripts keep working during server maintenance or internet outages. A script might manage a water heater based on a temperature sensor reading, running independently while still reporting status to Home Assistant when the connection is available. Gen4 devices launched in early 2025 add Wi-Fi 6 (2.4 GHz), Zigbee, and native Matter support, expanding the range of protocols a single device can handle (CNX Software, 2025). The family includes the Plus 2PM Gen4, a dual-channel switch with power metering, the Dimmer Gen4, and the Flood S Gen4 leak sensor.

How Do You Maximize Shelly's Local Control Capabilities?
Shelly's local control architecture means devices respond to direct HTTP API calls, MQTT messages, or the native protocol used by Home Assistant's integration. No cloud authentication required. This means automations keep running during internet outages, eliminating the cloud dependency that affects competing platforms.
Five Shelly Z-Wave devices earned Works with Home Assistant certification in July 2025, including the Wave PM Mini and Wave 1PM Mini (Home Assistant Blog). The Z-Wave line also covers the Wave Plug US outlet and the Wave H&T humidity sensor, both with Long Range mode. This program verifies that devices meet Home Assistant's standards for local operation and user experience.
For maximum reliability, assign static IP addresses to all Shelly devices through your router's DHCP reservation table. This prevents IP changes that cause Home Assistant to lose contact after network events. Test your automations during an intentional internet disconnect to confirm which ones run entirely locally and which still depend on external services.
What Are Common Shelly Questions?
Does Shelly work with Home Assistant without internet?
Yes. Shelly devices communicate locally via CoIoT (Gen1) or RPC (Gen2+). Both protocols operate entirely on your home network. Automations that don't involve cloud services continue running normally during internet outages.
Which Shelly generation works best with Home Assistant?
Gen2+ devices use the faster RPC protocol and include Bluetooth for easier initial pairing. Gen4 adds Matter and Zigbee support. All generations work with the official Shelly integration, so the best choice depends on what protocols you need.
Can I use MQTT instead of the native Shelly integration?
You can, and some users prefer it for faster state reporting. However, MQTT requires a separate broker like Mosquitto. The native integration is simpler to maintain. We'd recommend starting with the native integration and switching to MQTT only if you need broker-level control.
How many Shelly devices can one Home Assistant instance handle?
The integration documents no device cap. The key is assigning static IPs through DHCP reservations and keeping your Home Assistant hardware adequately powered. A Raspberry Pi 4 handles typical loads, but heavy automation users benefit from an x86 mini PC.
When Is Shelly the Wrong Pick?
Fair is fair, so here's the other side of the recommendation. Every Wi-Fi Shelly relay, Gen4 included, is a 2.4GHz device, and a house with 30 of them plus phones, laptops, and cameras is asking one radio band to carry everything. Zigbee and Z-Wave devices form their own mesh and leave your Wi-Fi alone, which is why heavy Shelly households end up tuning routers that Zigbee households never think about.
The in-box installation is the bigger filter. Wiring a relay behind a wall switch means working with mains voltage in a cramped junction box, and in several countries that work legally belongs to a licensed electrician. If the words "line and load" mean nothing to you, a plug-in smart device or a Zigbee bulb delivers most of the benefit with none of the risk. I'd also steer renters away, since everything you install in a box stays with the apartment when you leave. Shelly rewards people who are comfortable with a screwdriver and a voltage tester, and there's no shame in not being that person.
Why Do Shelly and Home Assistant Work So Well Together?
Connecting Shelly devices to Home Assistant gives you a smart home setup that's fast, private, and independent of cloud services. The setup process takes minutes per device, and the combination of local protocols, on-device scripting, and deep Home Assistant integration makes this pairing hard to beat for DIY home automation. For the latest firmware changelogs and full REST API reference, the Shelly developer documentation covers all device generations and configuration options.
Frequently Asked Questions
How do I add Shelly devices to Home Assistant?
Home Assistant auto-discovers Shelly devices on your local network. Go to Settings, Devices and Services, and look for the Shelly notification. Click Configure and follow the prompts. For manual setup, click Add Integration, search for Shelly, and enter the device IP address. Setup usually takes a few minutes per device. No cloud account is required.
Do Shelly devices work locally without cloud?
Yes, Shelly devices communicate directly with Home Assistant over your local network using CoIoT (Gen1) or RPC (Gen2+) protocols. No internet connection or cloud account is needed for device control and automations. Shelly scripts can even run automations directly on the device, working even when your Home Assistant server is offline.
What is the difference between Shelly Gen1 and Gen2 devices?
Gen1 devices use the CoIoT protocol over CoAP for local communication. Gen2+ devices use the newer RPC protocol with WebSocket connections for faster, more reliable communication. Gen2 and newer devices support Shelly scripts for on-device automation. Both generations work with Home Assistant but Gen2 provides better performance and more features.
How do I configure Shelly for local push updates?
For Gen1 devices, enable CoIoT in the Shelly web UI under Internet and Security, Advanced - Developer Settings, setting the CoIoT peer to your Home Assistant IP on port 5683 (UDP) and restarting the device. For Gen2+ devices, RPC push updates usually need no setup when added through the Home Assistant integration. Local push updates ensure instant state changes without polling delays.
Can Shelly replace traditional light switches?
Yes, Shelly relay modules like the Shelly 1 Mini Gen4 and Shelly 1PM Mini Gen4 install behind existing wall switches, converting them to smart switches while keeping the original switch functional. The physical switch continues to work normally while adding app control, voice control, and automation capabilities through Home Assistant.
Sources & References
- Home Assistant - Shelly home-assistant.io
- Shelly - Gen1 API Reference shelly-api-docs.shelly.cloud