On this page
Setup Ecosystems
Shelly LNM: make Shelly devices control each other, no internet needed
Local Network Messaging lets one Shelly switch another over your home network, with no cloud, hub or internet. What it does, which models have it, and a generator that writes the setup for you.
Since firmware 2.0, a Shelly can talk to another Shelly directly. Press a button on one and a light on another switches, without the message leaving your house. Shelly calls it Local Network Messaging, or LNM. It's now the simplest way to tie Shelly devices together, and it keeps working when the internet doesn't.
What LNM does
LNM sends small messages between Shelly devices over your home network. One device sends, the others listen, and none of it goes through Shelly's cloud, a hub or the internet.
Three kinds of message travel this way:
- Status. A relay's on or off state, a dimmer's brightness, or a meter's power reading.
- Events. A button press on an input: single, double, triple or long.
- Commands. One device tells every device in the group to do something, such as turn off.
That covers most of what people used to need a script, a cloud scene or Home Assistant for. A Shelly i4 behind a wall plate can switch lights wired to three other relays. A Pro 3EM in the switchboard can tell a relay that the house is drawing too much. A plug measuring the TV can turn the speakers on with it.
It also fills the gap in what Shelly does without the internet. Each device already runs its own switch and schedules locally. LNM is the part that lets them work together locally too.
What you can build with it
Most setups are one of four patterns. They're the four the generator below writes for you.
| Pattern | What happens | Example |
|---|---|---|
| A button controls lights elsewhere | A press on one Shelly toggles an output on another | A four-button i4 at the door, each button a different room |
| One press switches a whole group | One device sends a single command every device carries out | An all-off button by the bed |
| One device copies another | When the leader turns on or off, the followers match it | Two lights on separate relays that always move together |
| Follow what an appliance draws | A device switches when another device's power reading crosses a line | Speakers come on with the TV, an exhaust fan with the dryer |
Set it up with the generator
Pick a pattern and the devices, and the generator writes a numbered card for each one: the group address, which settings to turn on, and the condition and URL to paste into the device's Actions. For the power pattern it also writes the script. Add each device's IP address and it gives you links that apply the LNM settings in one click. Everything you type stays in your browser.
What should happen?
Which Shelly devices have LNM
LNM needs firmware 2.0.0 or newer. Shelly puts it on every mains-powered Gen3 and Gen4 device, and on the Gen2 models still in production. Plus models that have a Gen3 or Gen4 replacement stopped getting new features at firmware 1.7, so they never get it. If you're not sure which generation you own, our guide to the Shelly generations shows how to tell.
For the Shelly models we sell, that works out as:
| Support | Models |
|---|---|
| Has LNM | Shelly 1, 1 Mini, 1PM, 1PM Mini, Dimmer and EM Mini Gen4. Shelly 1, 1 Mini, 1L, 2L, 1PM, 2PM, Dimmer, EM and i4 Gen3. Shelly Pro 1, Pro 1PM, Pro 2, Pro 2PM, Pro 3, Pro 4PM, Pro Dimmer 1PM and 2PM, Pro EM-50, every Pro 3EM, Pro Dual Cover/Shutter PM, Plus RGBW PM and Pro RGBWW PM |
| No LNM | Shelly 2PM Gen4 and Plus Uni. Shelly left it off both because there isn't enough storage space |
| Shelly doesn't say | Ogemray 25A Smart Relay. Check its web interface for a Local Network Messaging section after updating |
Battery devices, including the BLU sensors and buttons, aren't supported.
How it works: TX, RX and RPC
- Sender Shelly i4 Gen3 TX on button 1 pressed
- Group address 239.255.0.1:3333
-
- Receiver Shelly Dimmer Gen4 RX on toggles its light
- Receiver Shelly Pro 4PM RX on toggles relay 1
Every device in a setup joins the same group, identified by an address and a port written together, such as 239.255.0.1:3333. Shelly recommends an address starting 239.255, and port 3333 is fine. Use a different address for each separate setup, so one group's messages can't trigger another's devices.
Each device then has three settings in its Local Network Messaging section, and you turn on only the ones its role needs:
| Setting | What it does | Turn it on for |
|---|---|---|
| TX (Transmit) | Sends the status of the components you tick, such as switch:0 or input:0 | The device others react to |
| RX (Receive) | Listens to the group, so Actions and scripts can react to what arrives | The device that reacts |
| RPC | Lets a device send one command the whole group runs, and lets a device carry one out | Both ends of a group command |
A device never hears its own messages, so you always test with at least two. Receivers carry out a group command but never pass it on, so you can't build a loop by accident.
Set up two devices by hand
The generator writes these steps with your devices' details filled in. Here is the bare version, for a button on one Shelly toggling a relay on another.
- Update both devices
Open each device's web interface at its IP address, go to Settings, then Firmware, and take any update on offer. You need 2.0.1 or newer: LNM arrived in 2.0.0, and 2.0.1 added dimming and colour changes.
- Set the button input
On the sending device, go to Settings, open the input, then Input settings. Choose Button and click Save. If that input also switches the device's own relay and you don't want it to, set the relay to Detached.
- Create the group on the sender
Go to Settings, then Local network messaging, and click +. Enter the group address, such as 239.255.0.1:3333, tick Enable TX (Transmit), choose the button's input under Components to broadcast, and click Create.
- Create the same group on the receiver
On the receiving device, do the same with the same address, but tick Enable RX (Receive) instead, and click Create. Changing the address later needs a restart.
- Check messages arrive
Press the button a few times, then reopen the receiver's Local network messaging page. The RX count should have climbed. If it's still at zero, the problem is the network, not the settings.
- Add the Action
On the receiver, go to Actions, click Create action and choose LNM (200). Pick LNM event received as the event and add the condition ev.event_data.event === "single_push". Under Then do, click Add URL, enter http://localhost/rpc/Switch.Toggle?id=0 and click Save. That tells the receiver to toggle its own relay.
Detached is what stops the button also flicking the relay it's wired to. If the sending device is an i4, there's no relay, so you can skip it.
Your network has to let the messages through
When LNM doesn't work, the network is nearly always why. The messages are multicast: sent once to a group address, and delivered to every device on the same network that has joined it. A few router settings get in the way.
- Same network. Every device has to be on the same Wi-Fi or wired network. A guest or IoT network is kept apart from the main one by design, so a device on it can't hear the others.
- Client isolation off. Also called AP isolation. It stops devices on a network talking to each other, which is exactly what LNM needs them to do.
- IGMP snooping. If your router or switches have it on, they also need an IGMP querier running, or delivery can stop after a while. A router restart brings it back temporarily, which is the giveaway.
- Mesh Wi-Fi. Many mesh systems don't expose these settings. Keep every device on the same network name and use a 239.255 address.
Delivery is fire and forget: a message is sent once and nothing confirms it arrived, so now and then one goes missing. Over Wi-Fi that can happen more often than you'd expect, so press the button a few times when you test.
LNM, an Action or a script?
LNM didn't replace the other ways to link Shelly devices. It sits alongside them.
An ordinary Action can already call another Shelly's web address when something happens. That still works, including on models without LNM, but each Action has to know the other device's IP address, and it talks to one device at a time. LNM needs no addresses and reaches the whole group at once.
A script is the right tool when the decision needs logic, such as switching on above one power level and off below another, or waiting before switching off. LNM delivers the reading and the script on the receiving device decides. The generator's power pattern works that way.
Home Assistant can do all of this and more, but it's another box in the middle. If it's off, so are the automations that run through it. With LNM, the Shelly devices keep working with each other even if everything else on the network is down, apart from the router. A sensible split is to run both: LNM for the links that must always work, such as a light switch, and Home Assistant for everything else.
Limits to know first
- It's a preview. Shelly says the LNM settings may change between firmware releases. Re-test after you update.
- Five groups per device. Each device can join up to five, each with its own address.
- Followers can drift. When one device copies another, switching the follower by hand puts them out of step. A leader that measures power sends updates regularly, so the follower snaps back soon. A plain relay only sends when it switches, so the follower stays as you left it until the leader next changes.
- Covers. A cover controller can send its state, but there is no simple toggle for a blind, so the generator leaves covers out for now.
- Deleting a group deletes its Actions. Remove an LNM instance and any Action built on it goes with it.
Frequently asked questions
Does Shelly LNM work without the internet?
Yes. The messages go straight from one Shelly to the other across your local network, so the internet can be down and it keeps working. Your router does need to be on, because that's the network the messages travel over.
Which Shelly devices support LNM?
Every mains-powered Gen3 and Gen4 Shelly on firmware 2.0.0 or newer, and the Gen2 models still in production, which includes the whole Pro DIN rail range. The Shelly 2PM Gen4, Plus Uni and Plus Plug UK are left out because they don't have enough storage space for it, and battery-powered devices aren't supported.
Is LNM the same as Shelly scenes?
No. Shelly's support site lists scenes among the app features that stop without an internet connection. LNM runs on the devices themselves, so it doesn't need the cloud at all.
Why isn't my receiving Shelly reacting?
Check the RX message counter in its Local Network Messaging section. If it isn't climbing, the messages aren't arriving: confirm both devices use exactly the same address and port, that they're on the same network (not one on a guest or IoT network), and that client isolation is off on your router. If the counter climbs but nothing switches, the problem is the Action's condition or URL.
How many LNM groups can one Shelly be in?
Up to five. Each is its own instance with its own group address, so one device can send its status to one group and listen to another.
Can I control a Shelly 2PM Gen4 with LNM?
Not with LNM. Shelly left it off the 2PM Gen4 because there isn't enough storage space for it. The 2PM Gen3 has it, or you can reach a 2PM Gen4 from another Shelly with an ordinary Action that calls its web address.
Still need a hand?
We answer most messages within one business day. If your question is about an existing order, have your order number ready. It speeds things up.
Contact us