Shelly Binding

Hi @markus7017

I tested and played around a little bit, I found two issues:

Shall I open Tickets for these issues?

All my Blu Devices (DW, Motion, HT) are working fine. All the rest seems to be running, too.

@markus7017, I upgraded to OH 5.1, and installed the latest DEV. I had deleted all my items, but now 22 devices aren’t discovered anymore. I ran sudo openhab-cli clean-cache, tried manually scanning, but no luck


Edit: suddenly one more device popped up
 Maybe I should let the system run for half an hour first


No change after half an hour. I do see stuff in the logs. E.g. for a Shelly Plus Plug S with MAC c82e180a06cc:
In openhab.log:

2025-12-23 11:57:25.292 [INFO ] [g.discovery.internal.PersistentInbox - 2026      ] - Added new thing 'shelly:shellyplusplug:c82e180a06cc' to inbox.

In events.log:

2025-12-23 11:57:25.293 [INFO ] [openhab.event.InboxAddedEvent        - 430       ] - Discovery Result with UID 'shelly:shellyplusplug:c82e180a06cc' has been added.
[...]
2025-12-23 12:15:35.826 [INFO ] [openhab.event.InboxRemovedEvent      - 430       ] - Discovery Result with UID 'shelly:shellyplusplug:c82e180a06cc' has been removed.

In the log of the binding:

2025-12-23 11:57:23.889 [TRACE] [overy.ShellyMDNSDiscoveryParticipant - 498       ] - shellyplusplugs-c82e180a06cc: Shelly device discovered with empty IP address (service-name=[ServiceInfoImpl@1017386855 name: 'shellyplusplugs-c82e180a06cc._http._tcp.local.' address: '(null):0' status: 'DNS: 192-168-1-9.local. [pi.hole/192.168.1.9] state: probing 1 task: null', has NO data
	shellyplusplugs-c82e180a06cc._http._tcp.local.: ])
2025-12-23 11:57:23.890 [DEBUG] [overy.ShellyMDNSDiscoveryParticipant - 498       ] - shellyplusplugs-c82e180a06cc: Shelly device discovered: IP address=192.168.1.42
2025-12-23 11:57:23.896 [TRACE] [shelly.internal.api.ShellyHttpClient - 498       ] - shellyplusplugs-c82e180a06cc: HTTP GET http://192.168.1.42/shelly
Accept-Encoding: gzip
User-Agent: Jetty/9.4.57.v20241219
Content-Type: application/x-www-form-urlencoded
[...]
2025-12-23 11:57:25.234 [TRACE] [shelly.internal.api.ShellyHttpClient - 498       ] - shellyplusplugs-c82e180a06cc: HTTP Response 200: {"name":null,"id":"shellyplusplugs-c82e180a06cc","mac":"C82E180A06CC","slot":0,"model":"SNPL-00112EU","gen":2,"fw_id":"20250924-062721/1.7.1-gd336f31","ver":"1.7.1","app":"PlusPlugS","auth_en":false,"auth_domain":null}
Content-Type: application/json
Content-Length: 218
Pragma: no-cache
Server: ShellyHTTP/1.0.0
Connection: close


2025-12-23 11:57:25.234 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc - 498       ] - shellyplusplugs-c82e180a06cc: Connect Rpc Socket (discovery = true)
2025-12-23 11:57:25.234 [TRACE] [helly.internal.api2.Shelly2RpcSocket - 498       ] - shellyplusplugs-c82e180a06cc: Connect WebSocket, URI=ws://192.168.1.42/rpc
2025-12-23 11:57:25.243 [TRACE] [shelly.internal.api.ShellyHttpClient - 498       ] - shellyplusplugs-c82e180a06cc: HTTP POST http://192.168.1.42/rpc
Accept-Encoding: gzip
User-Agent: Jetty/9.4.57.v20241219
Content-Type: application/json; charset=UTF-8


{"id":1011900206,"src":"openhab-","method":"Shelly.GetConfig"}
2025-12-23 11:57:25.252 [DEBUG] [helly.internal.api2.Shelly2RpcSocket - 2728      ] - shellyplusplugs-c82e180a06cc: WebSocket connected /192.168.1.9:38602<-/192.168.1.42:80, Idle Timeout=2147483647
2025-12-23 11:57:25.253 [TRACE] [helly.internal.api2.Shelly2RpcSocket - 2728      ] - shellyplusplugs-c82e180a06cc: Rpc connection closed: 1006 - Failed to open local endpoint
2025-12-23 11:57:25.256 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc - 2728      ] - shellyplusplugs-c82e180a06cc: WebSocket connection closed, status = 1006/Failed to open local endpoint
2025-12-23 11:57:25.284 [TRACE] [shelly.internal.api.ShellyHttpClient - 498       ] - shellyplusplugs-c82e180a06cc: HTTP Response 200: {"id":1011900206,"src":"shellyplusplugs-c82e180a06cc","dst":"openhab-","result":{"ble":{"enable":true,"rpc":{"enable":true}},"cloud":{"enable":true,"server":"shelly-146-eu.shelly.cloud:6022/jrpc"},"mqtt":{"enable":false,"server":null,"client_id":"shellyplusplugs-c82e180a06cc","user":null,"ssl_ca":null,"topic_prefix":"shellyplusplugs-c82e180a06cc","rpc_ntf":true,"status_ntf":false,"use_client_cert":false,"enable_rpc":true,"enable_control":true},"plugs_ui":{"leds":{"mode":"off","colors":{"switch:0":{"on":{"rgb":[0.000,100.000,0.000],"brightness":100.000},"off":{"rgb":[100.000,0.000,0.000],"brightness":100.000}},"power":{"brightness":100.000}},"night_mode":{"enable":false,"brightness":100.000,"active_between":[]}},"controls":{"switch:0":{"in_mode":"detached"}}},"script:1":{"id":1, "name":"oh-blu-scanner.js", "enable":true},"switch:0":{"id":0, "name":null,"initial_state":"restore_last", "auto_on":false, "auto_on_delay":60.00, "auto_off":false, "auto_off_delay":60.00,"power_limit":2500,"voltage_limit":280,"current_limit":12.000},"sys":{"device":{"name":null,"mac":"C82E180A06CC","fw_id":"20250924-062721/1.7.1-gd336f31","discoverable":true,"eco_mode":false},"location":{"tz":"Europe/Brussels","lat":51.268800,"lon":4.723500},"debug":{"level":2,"file_level":null,"mqtt":{"enable":false},"websocket":{"enable":true},"udp":{"addr":null}},"ui_data":{},"rpc_udp":{"dst_addr":null,"listen_port":null},"sntp":{"server":"time.cloudflare.com"},"cfg_rev":63},"wifi":{"ap":{"ssid":"ShellyPlusPlugS-C82E180A06CC","is_open":true, "enable":false, "range_extender": {"enable":false}},"sta":{"ssid":"49x27-Dn","is_open":false, "enable":true, "ipv4mode":"dhcp","ip":null,"netmask":null,"gw":null,"nameserver":null},"sta1":{"ssid":null,"is_open":true, "enable":false, "ipv4mode":"dhcp","ip":null,"netmask":null,"gw":null,"nameserver":null},"roam":{"rssi_thr":-80,"interval":60}},"ws":{"enable":false,"server":null,"ssl_ca":"ca.pem"}}}
Content-Type: application/json
Content-Length: 1927
Server: ShellyHTTP/1.0.0
Connection: close


2025-12-23 11:57:25.286 [TRACE] [g.shelly.internal.api2.Shelly2ApiRpc - 498       ] - shellyplusplugs-c82e180a06cc: shellyplusplugs-c82e180a06cc is used as serviceName
2025-12-23 11:57:25.286 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc - 498       ] - shellyplusplugs-c82e180a06cc: Closing Rpc API (socket is disconnected, discovery=true)
2025-12-23 11:57:25.287 [DEBUG] [iscovery.ShellyBasicDiscoveryService - 498       ] - shellyplusplugs-c82e180a06cc: Adding Thing to Inbox (type shellyplusplugs, model SNPL-00112EU, mode=)
[...]
2025-12-23 11:59:30.725 [TRACE] [overy.ShellyMDNSDiscoveryParticipant - 498       ] - ServiceInfo [ServiceInfoImpl@98743724 name: 'shellyplusplugs-c82e180a06cc._http._tcp.local.' address: '(null):80' status: 'DNS: 192-168-1-9.local. [pi.hole/192.168.1.9] state: probing 1 task: null', has NO data
	ShellyPlusPlugS-C82E180A06CC.local.: ]
[...]
2025-12-23 12:08:40.458 [TRACE] [overy.ShellyMDNSDiscoveryParticipant - 498       ] - shellyplusplugs-c82e180a06cc: Shelly device discovered with empty IP address (service-name=[ServiceInfoImpl@35593400 name: 'shellyplusplugs-c82e180a06cc._http._tcp.local.' address: '(null):0' status: 'DNS: 192-168-1-9.local. [pi.hole/192.168.1.9] state: probing 1 task: null', has NO data
	shellyplusplugs-c82e180a06cc._http._tcp.local.: ])
2025-12-23 12:08:40.458 [DEBUG] [overy.ShellyMDNSDiscoveryParticipant - 498       ] - shellyplusplugs-c82e180a06cc: Shelly device discovered: IP address=192.168.1.42
2025-12-23 12:08:40.464 [TRACE] [shelly.internal.api.ShellyHttpClient - 498       ] - shellyplusplugs-c82e180a06cc: HTTP GET http://192.168.1.42/shelly
Accept-Encoding: gzip
User-Agent: Jetty/9.4.57.v20241219
Content-Type: application/x-www-form-urlencoded



2025-12-23 12:08:40.502 [TRACE] [shelly.internal.api.ShellyHttpClient - 498       ] - shellyplusplugs-c82e180a06cc: HTTP Response 200: {"name":null,"id":"shellyplusplugs-c82e180a06cc","mac":"C82E180A06CC","slot":0,"model":"SNPL-00112EU","gen":2,"fw_id":"20250924-062721/1.7.1-gd336f31","ver":"1.7.1","app":"PlusPlugS","auth_en":false,"auth_domain":null}
Content-Type: application/json
Content-Length: 218
Pragma: no-cache
Server: ShellyHTTP/1.0.0
Connection: close


2025-12-23 12:08:40.503 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc - 498       ] - shellyplusplugs-c82e180a06cc: Connect Rpc Socket (discovery = true)
2025-12-23 12:08:40.503 [TRACE] [helly.internal.api2.Shelly2RpcSocket - 498       ] - shellyplusplugs-c82e180a06cc: Connect WebSocket, URI=ws://192.168.1.42/rpc
2025-12-23 12:08:40.511 [TRACE] [shelly.internal.api.ShellyHttpClient - 498       ] - shellyplusplugs-c82e180a06cc: HTTP POST http://192.168.1.42/rpc
Accept-Encoding: gzip
User-Agent: Jetty/9.4.57.v20241219
Content-Type: application/json; charset=UTF-8


{"id":627784562,"src":"openhab-","method":"Shelly.GetConfig"}
2025-12-23 12:08:40.594 [DEBUG] [helly.internal.api2.Shelly2RpcSocket - 3480      ] - shellyplusplugs-c82e180a06cc: WebSocket connected /192.168.1.9:59432<-/192.168.1.42:80, Idle Timeout=2147483647
2025-12-23 12:08:40.594 [TRACE] [helly.internal.api2.Shelly2RpcSocket - 3480      ] - shellyplusplugs-c82e180a06cc: Rpc connection closed: 1006 - Failed to open local endpoint
2025-12-23 12:08:40.596 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc - 3480      ] - shellyplusplugs-c82e180a06cc: WebSocket connection closed, status = 1006/Failed to open local endpoint
2025-12-23 12:08:40.607 [TRACE] [shelly.internal.api.ShellyHttpClient - 498       ] - shellyplusplugs-c82e180a06cc: HTTP Response 200: {"id":627784562,"src":"shellyplusplugs-c82e180a06cc","dst":"openhab-","result":{"ble":{"enable":true,"rpc":{"enable":true}},"cloud":{"enable":true,"server":"shelly-146-eu.shelly.cloud:6022/jrpc"},"mqtt":{"enable":false,"server":null,"client_id":"shellyplusplugs-c82e180a06cc","user":null,"ssl_ca":null,"topic_prefix":"shellyplusplugs-c82e180a06cc","rpc_ntf":true,"status_ntf":false,"use_client_cert":false,"enable_rpc":true,"enable_control":true},"plugs_ui":{"leds":{"mode":"off","colors":{"switch:0":{"on":{"rgb":[0.000,100.000,0.000],"brightness":100.000},"off":{"rgb":[100.000,0.000,0.000],"brightness":100.000}},"power":{"brightness":100.000}},"night_mode":{"enable":false,"brightness":100.000,"active_between":[]}},"controls":{"switch:0":{"in_mode":"detached"}}},"script:1":{"id":1, "name":"oh-blu-scanner.js", "enable":true},"switch:0":{"id":0, "name":null,"initial_state":"restore_last", "auto_on":false, "auto_on_delay":60.00, "auto_off":false, "auto_off_delay":60.00,"power_limit":2500,"voltage_limit":280,"current_limit":12.000},"sys":{"device":{"name":null,"mac":"C82E180A06CC","fw_id":"20250924-062721/1.7.1-gd336f31","discoverable":true,"eco_mode":false},"location":{"tz":"Europe/Brussels","lat":51.268800,"lon":4.723500},"debug":{"level":2,"file_level":null,"mqtt":{"enable":false},"websocket":{"enable":true},"udp":{"addr":null}},"ui_data":{},"rpc_udp":{"dst_addr":null,"listen_port":null},"sntp":{"server":"time.cloudflare.com"},"cfg_rev":63},"wifi":{"ap":{"ssid":"ShellyPlusPlugS-C82E180A06CC","is_open":true, "enable":false, "range_extender": {"enable":false}},"sta":{"ssid":"49x27-Dn","is_open":false, "enable":true, "ipv4mode":"dhcp","ip":null,"netmask":null,"gw":null,"nameserver":null},"sta1":{"ssid":null,"is_open":true, "enable":false, "ipv4mode":"dhcp","ip":null,"netmask":null,"gw":null,"nameserver":null},"roam":{"rssi_thr":-80,"interval":60}},"ws":{"enable":false,"server":null,"ssl_ca":"ca.pem"}}}
Content-Type: application/json
Content-Length: 1926
Server: ShellyHTTP/1.0.0
Connection: close


2025-12-23 12:08:40.610 [TRACE] [g.shelly.internal.api2.Shelly2ApiRpc - 498       ] - shellyplusplugs-c82e180a06cc: shellyplusplugs-c82e180a06cc is used as serviceName
2025-12-23 12:08:40.610 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc - 498       ] - shellyplusplugs-c82e180a06cc: Closing Rpc API (socket is disconnected, discovery=true)
2025-12-23 12:08:40.610 [DEBUG] [iscovery.ShellyBasicDiscoveryService - 498       ] - shellyplusplugs-c82e180a06cc: Adding Thing to Inbox (type shellyplusplugs, model SNPL-00112EU, mode=)
[...]
2025-12-23 12:11:30.736 [TRACE] [overy.ShellyMDNSDiscoveryParticipant - 498       ] - ServiceInfo [ServiceInfoImpl@731784087 name: 'shellyplusplugs-c82e180a06cc._http._tcp.local.' address: '(null):80' status: 'DNS: 192-168-1-9.local. [pi.hole/192.168.1.9] state: probing 1 task: null', has NO data
	ShellyPlusPlugS-C82E180A06CC.local.: ]

I tried adding Shelly Plus Plug S with MAC e465b8b80068 manually, and that worked.

What’s the problem here?


Edit: and now suddenly 8 more devices popped up in the inbox


Strange things happening here, meanwhile my impression shifts into the direction that it’s a firmware bug of Shelly instead of the oh-blu-scanner script:

  • Several factory resets later
 the (new) oh-blu-scanner runs stable on my two Shelly Blu Gateways for days, even in parallel with other scripts.
  • It still immediately crashes on both of my Plug S Gen3, with “out of memory” (note that they named “increased memory for scripts” as one main feature of the Plug S Gen3!)
  • But I could boil it down to a few-lines-script which fires a rolling counter over MQTT, using a repeating timer - even that “reliably” crashes / reboots the plugs multiple times per day (but not the Gateway, btw).
  • I have an open support ticket at Shelly, they already received the logs of the crashes, so we’ll see what happens.

I think you have to reboot the devices, so the mdns publish is triggered again.

Aha. I ended up adding then manually. Probably less work. :slight_smile:

@markus7017, is it possible something went wrong with the Shelly BLU Door/Window things?

It doesn’t have the proper channels. Instead, it has the channels of a BLU Button


Also curious:

openhab> bundle:list | grep -i shelly
openhab>

But:


?

Now I am on openHAB 5.1.0 with dev binding:

openhab> bundle:list | grep -i shelly
249 │ Active │  80 │ 5.1.0.202512211311    │ openHAB Add-ons :: Bundles :: Shelly Binding

that’s working on my side. I didn’t delete my things, so on my side door window blu devices are working still fine. But can also see some channels which are wrong I think:

I think this statement was inaccurate. Or at least now (with the official binding), the proper channels are there. The eventchannels are still there, but maybe they relate to the button on the BLU Door/Window?

yes the DW has a button and channels are added automatically

check updated DEV build

there is no Gust Direction, I removed the channel, see

https://shelly-api-docs.shelly.cloud/docs-ble/Devices/BLU_ZB/wstation/

1 Like

The EM Mini has only 1 power meter. It doesn’t make sense to have the total on the meter level as well as on the device level, totalKWH accumulates >= 2 meters.

try the updated DEV build, note new snapshot release numbers (4.3.10, 5.0.4, 5.1.0)

Is the thing ONLINE? (The BLUDW also has a button)

Channels get created when thing goes online

I’m preparing the WS90 PR and then switch to 5.2

but there is no total kWh channel.

And I know there is like on the other pm devices an output for that. I am using the device via MQTT at the moment.

I will test the new dev build within the next days.

I tried the new dev build: 5.1.0.202512261525

50em has now a totalkWh channel, but not for meter 1 and meter 2. There it has only the returned kWh as a channel.

The WS90 is not recognized any more. I deleted the old Thing which was uninitialized, but no new device is coming to the autodiscovery. –> after disabling and enabling all my BLU GW Things, it appears in the inbox.

Also it would be awesome to see the Shelly BLU H&T Display ZB supported by the binding. I ordered some of them, so I can support with testing.

I just upgraded my OH from 4.3.7 to OH 5.1.0.

I have a few strange issues with the Shelly binding.
I have two devices. Shelly Pro 2 and a Shelly 3EM.

Shelly Pro 2:
It keeps on telling me there is a new firmware, even though the Shelly app says its running the latest.
I have tried to set it OFF using the api explorer, but after a short time (minutes) its back to ON.

Shelly EM3:
Yesterday I added the channel #totalkWh - It returns 0.0 kWh even though the device has been running for more than 2 years. Will I have to do a restart of the device to update this?

The channel for Uptime doesnt seem to work at all. This has been configured for more than two years, bu it still returns -:-:- -.-.-
Last heartbeat works fine though.

Hi again,

I was experiencing frequent reboots on my Shelly Plug S Gen3 devices. I thought it to be an issue with the firmware first, as I could reproduce it with simple means like running a 10 line script.
The Plug S are on FW 1.7.3 (but the effect also occurs on 1.7.1 and 1.7.4beta).

Meanwhile the Shelly support analyzed the syslogs and core dumps, and it turned out to be completely different.

The Shelly binding (OH 5.1.0) floods the devices with multiple and parallel Shelly.GetConfig requests via HTTP - so many that the heap diminishes further and further until at some point the JS runtime is the first instance to fail and freezes the system.

Furthermore, the binding floods the devices with a duplicate client ID, which is called “openhab-ipaddr”, with ipaddr being the IP address of another Shelly device (EM3 power monitor) which has been active for almost 3 years and has absolutely nothing to do with the Plug S.

The absolute WTF moment was that this also happens if I manually disable the Things of the Plug S devices. They show “DISABLED” / grey in the Things list but continue flooding the Plug S devices with GetStatus.

There is an already older Ticket open in GIT which sounds similar.

What would you suggest to do?

1 Like

Hi,

today I updated to openhab5.1

Now if I switch a Shelly 1 without openhab (ie from hardware-switch or shelly app) the item in openhab isnt synced.. It looks like with the 60sec poll it gets in sync again.

with offical openhab 5.1 shelly binding or dev-build 5.1.0.202512261525

with openhab 4.3.x the item was near instantly changed in openhab. I didnt change coap or something else..

From openHab i can change the item and the Shelly works.

Edit: I had several problems with Shelly now and reverted back to 4.3

Sorry

Greets

Hello I have an issue with my shelly i4. I use it to trigger some rules. At first it works but sporadically nothing happens when I press the buttons. Then openhab does not receive the button events. The device#heartBeat channel gets updates. When I disable and enable the thing in openhab everything works again. Sometimes it works for month, sometimes only for hours. This issue appears with different shellys but currently only the i4 is concerned.
Any suggestions whats wrong here?
Openhab 5.1.0.M1
Shelly Dev Binding 5.1.0.202512041531 but I’ve tested serval stable and dev versions over the time.

I have also the OH5.1 installation running with the per-installed Shelly binding working on a RPI5.
When I use the Shelly App to switch the Shelly 1 with FW 1.14.0 to switch on/off, the OH directly notified this and switch the channel on/off immediately.

So all here works as it should.

Hello and happy New Year!
I was wondering if it has been confirmed that the jetty warning (below) is caused by the Shelly Binding and if a root cause / remedy has been identified?

jetty.util.thread.QueuedThreadPool - Stopped without executing or closing null

We had some discussions in this forum in August last year, but they seemed inconclusive.
I am running a variety of Shelly devices with OH 5.1 in Docker on Raspi, using stock bindings.
Any pointers (e.g. debug approach) would be appreciated.
Thanks!
Jörg