Just wanted to leave a comment that I am also affected by this WebSocket connection closed, status = 1006/Failed to open local endpoint issue that @BruderB came up with here.
Some days ago, I noticed that the auto-update of the OpenHab Docker Container didn’t work and therefore my OH was stuck on v5.0.0 . I fixed the script and updated to v5.1.2 . As I was in some kind of “Update-Flow”
I also updated the Shelly Fimrware to 1.7.4 on some Plus 2PMs. Exactly those are making me trouble at the moment: The devices are reported as Offline in OH with above mentioned error. Restarting them in OH UI sometimes make them work for a while, but not always / with every device.
To track down the issue, I have now downgraded to v5.0.0 again and it seems that my issues are gone. If it helps, I can upgrade to some other version between 5.0.0 and 5.1.2 to find the version that introduced the issue.
Here is a TRACE log, if it helps
TRACE Log
openhab> bundle:list | grep Shelly
314 │ Active │ 80 │ 5.1.2 │ openHAB Add-ons :: Bundles :: Shelly Binding
2026-02-11 20:19:14.261 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus2pm-e86beae5dd84: Status update triggered thing initialization
2026-02-11 20:19:14.262 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus2pm-e86beae5dd84: Start initializing for thing Wohnzimmer Rollladen 0, type shellyplus2pm-roller, Device address 192.168.101.217, Gen2: true, isBlu: false, alwaysOn: true, hasBattery: false, CoIoT: false
2026-02-11 20:19:14.263 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:wohnzimmer-r0' changed from OFFLINE (COMMUNICATION_ERROR): Unerwarteter Fehler - WebSocket connection closed abnormally to ONLINE (CONFIGURATION_PENDING): Gerät wird initialisiert oder im Schlafmodus.
2026-02-11 20:19:14.264 [TRACE] [shelly.internal.api.ShellyHttpClient] - shellyplus2pm-e86beae5dd84: HTTP GET http://192.168.101.217/shelly
Accept-Encoding: gzip
User-Agent: Jetty/9.4.57.v20241219
Content-Type: application/x-www-form-urlencoded
2026-02-11 20:19:14.274 [TRACE] [shelly.internal.api.ShellyHttpClient] - shellyplus2pm-e86beae5dd84: HTTP Response 200: {"name":"shellyplus2pm-e86beae5dd84","id":"shellyplus2pm-e86beae5dd84","mac":"E86BEAE5DD84","slot":1,"model":"SNSW-102P16EU","gen":2,"fw_id":"20260120-145245/1.7.4-gf9878b6","ver":"1.7.4","app":"Plus2PM","auth_en":false,"auth_domain":null,"profile":"cover"}
Content-Type: application/json
Content-Length: 248
Pragma: no-cache
Server: ShellyHTTP/1.0.0
Connection: close
2026-02-11 20:19:14.275 [TRACE] [helly.internal.api2.Shelly2ApiClient] - shellyplus2pm-e86beae5dd84: API value was mapped to 'roller'
2026-02-11 20:19:14.275 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus2pm-e86beae5dd84: Connect Rpc Socket (discovery = false)
2026-02-11 20:19:14.275 [TRACE] [helly.internal.api2.Shelly2RpcSocket] - shellyplus2pm-e86beae5dd84: Connect WebSocket, URI=ws://192.168.101.217/rpc
2026-02-11 20:19:14.278 [TRACE] [shelly.internal.api.ShellyHttpClient] - shellyplus2pm-e86beae5dd84: HTTP POST http://192.168.101.217/rpc
Accept-Encoding: gzip
User-Agent: Jetty/9.4.57.v20241219
Content-Type: application/json; charset=UTF-8
{"id":1659318910,"src":"openhab-192.168.101.203","method":"Shelly.GetConfig"}
2026-02-11 20:19:14.298 [DEBUG] [helly.internal.api2.Shelly2RpcSocket] - shellyplus2pm-e86beae5dd84: WebSocket connected /192.168.101.14:47468<-/192.168.101.217:80, Idle Timeout=2147483647
2026-02-11 20:19:14.299 [TRACE] [helly.internal.api2.Shelly2RpcSocket] - shellyplus2pm-e86beae5dd84: Rpc connection closed: 1006 - Failed to open local endpoint
2026-02-11 20:19:14.301 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus2pm-e86beae5dd84: WebSocket connection closed, status = 1006/Failed to open local endpoint
2026-02-11 20:19:14.301 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus2pm-e86beae5dd84: Closing Rpc API (socket is disconnected, discovery=false)
2026-02-11 20:19:14.301 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:wohnzimmer-r0' changed from ONLINE (CONFIGURATION_PENDING): Gerät wird initialisiert oder im Schlafmodus. to OFFLINE (COMMUNICATION_ERROR): Unerwarteter Fehler - WebSocket connection closed abnormally
2026-02-11 20:19:14.348 [TRACE] [shelly.internal.api.ShellyHttpClient] - shellyplus2pm-e86beae5dd84: HTTP Response 200: {"id":1659318910,"src":"shellyplus2pm-e86beae5dd84","dst":"openhab-192.168.101.203","result":{"ble":{"enable":true,"rpc":{"enable":true}},"cloud":{"enable":false,"server":"iot.shelly.cloud:6012/jrpc"},"cover:0":{"id":0, "name":null, "motor":{"idle_power_thr":2.00, "idle_confirm_period":0.25},"maxtime_open":120.00, "maxtime_close":120.00, "initial_state":"stopped", "invert_directions":false,"maintenance_mode":false,"in_mode":"dual","in_locked":false,"swap_inputs":false, "safety_switch":{"enable":false, "direction":"both", "action":"stop","allowed_move":null},"power_limit":2800,"voltage_limit":280,"undervoltage_limit":0,"current_limit":10.00,"obstruction_detection":{"enable":false, "direction":"both", "action":"stop", "power_thr":127, "holdoff":1.00},"slat":{"enable":false,"open_time":1.50,"close_time":1.50,"step":20,"retain_pos":false,"precise_ctl":false}},"input:0":{"id":0,"name":null,"type":"switch","enable":true,"invert":false,"factory_reset":true},"input:1":{"id":1,"name":null,"type":"switch","enable":true,"invert":false,"factory_reset":true},"mqtt":{"enable":false,"server":null,"client_id":"shellyplus2pm-e86beae5dd84","user":null,"ssl_ca":null,"topic_prefix":"shellyplus2pm-e86beae5dd84","rpc_ntf":true,"status_ntf":false,"use_client_cert":false,"enable_rpc":true,"enable_control":true},"sys":{"device":{"name":"shellyplus2pm-e86beae5dd84","mac":"E86BEAE5DD84","fw_id":"20260120-145245/1.7.4-gf9878b6","discoverable":true,"eco_mode":false,"profile":"cover","addon_type":null},"location":{"tz":"Europe/Berlin","lat":51.471900,"lon":7.022400},"debug":{"level":2,"file_level":null,"mqtt":{"enable":false},"websocket":{"enable":false},"udp":{"addr":null}},"ui_data":{"cover":""},"rpc_udp":{"dst_addr":null,"listen_port":null},"sntp":{"server":"time.cloudflare.com"},"cfg_rev":14},"wifi":{"ap":{"ssid":"ShellyPlus2PM-E86BEAE5DD84","is_open":true, "enable":false, "range_extender": {"enable":false}},"sta":{"ssid":"REDACTED","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: 2250
Server: ShellyHTTP/1.0.0
Connection: close
2026-02-11 20:19:14.349 [TRACE] [helly.internal.api2.Shelly2ApiClient] - shellyplus2pm-e86beae5dd84: API value was mapped to 'openclose'
2026-02-11 20:19:14.349 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus2pm-e86beae5dd84: Connect Rpc Socket (discovery = false)
2026-02-11 20:19:14.350 [TRACE] [helly.internal.api2.Shelly2RpcSocket] - shellyplus2pm-e86beae5dd84: Connect WebSocket, URI=ws://192.168.101.217/rpc
2026-02-11 20:19:14.352 [TRACE] [shelly.internal.api.ShellyHttpClient] - shellyplus2pm-e86beae5dd84: HTTP POST http://192.168.101.217/rpc
Accept-Encoding: gzip
User-Agent: Jetty/9.4.57.v20241219
Content-Type: application/json; charset=UTF-8
{"id":712305683,"src":"openhab-192.168.101.203","method":"Shelly.GetStatus"}
2026-02-11 20:19:14.364 [DEBUG] [helly.internal.api2.Shelly2RpcSocket] - shellyplus2pm-e86beae5dd84: WebSocket connected /192.168.101.14:47488<-/192.168.101.217:80, Idle Timeout=2147483647
2026-02-11 20:19:14.364 [TRACE] [helly.internal.api2.Shelly2RpcSocket] - shellyplus2pm-e86beae5dd84: Rpc connection closed: 1006 - Failed to open local endpoint
2026-02-11 20:19:14.366 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus2pm-e86beae5dd84: WebSocket connection closed, status = 1006/Failed to open local endpoint
2026-02-11 20:19:14.396 [TRACE] [shelly.internal.api.ShellyHttpClient] - shellyplus2pm-e86beae5dd84: HTTP Response 200: {"id":712305683,"src":"shellyplus2pm-e86beae5dd84","dst":"openhab-192.168.101.203","result":{"ble":{},"cloud":{"connected":false},"cover:0":{"id":0, "source":"init", "state":"closed","apower":0.0,"voltage":228.7,"current":0.000,"pf":0.00,"freq":50.0,"aenergy":{"total":1448.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1770837540},"temperature":{"tC":51.8, "tF":125.3},"pos_control":true,"last_direction":null,"current_pos":0},"input:0":{"id":0,"state":true},"input:1":{"id":1,"state":false},"mqtt":{"connected":false},"sys":{"mac":"E86BEAE5DD84","restart_required":false,"time":"20:19","unixtime":1770837554,"last_sync_ts":1770836295,"uptime":3005,"ram_size":263144,"ram_free":80444,"ram_min_free":72836,"fs_size":393216,"fs_free":114688,"cfg_rev":14,"kvs_rev":0,"schedule_rev":1,"webhook_rev":1,"btrelay_rev":0,"available_updates":{},"reset_reason":4,"utc_offset":3600},"wifi":{"sta_ip":"192.168.101.217","status":"got ip","ssid":"REDACTED","bssid":"44:4e:6d:2c:16:7c","rssi":-61},"ws":{"connected":false}}}
Content-Type: application/json
Content-Length: 1008
Server: ShellyHTTP/1.0.0
Connection: close
2026-02-11 20:19:14.397 [TRACE] [helly.internal.api2.Shelly2ApiClient] - shellyplus2pm-e86beae5dd84: API value was mapped to 'close'
2026-02-11 20:19:14.397 [DEBUG] [helly.internal.api2.Shelly2ApiClient] - shellyplus2pm-e86beae5dd84: Roller status changed from null to close, updateChannels=false
2026-02-11 20:19:14.397 [TRACE] [helly.internal.api2.Shelly2ApiClient] - shellyplus2pm-e86beae5dd84: API value was mapped to 'close'
2026-02-11 20:19:14.398 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus2pm-e86beae5dd84: Connect Rpc Socket (discovery = false)
2026-02-11 20:19:14.398 [TRACE] [helly.internal.api2.Shelly2RpcSocket] - shellyplus2pm-e86beae5dd84: Connect WebSocket, URI=ws://192.168.101.217/rpc
2026-02-11 20:19:14.401 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus2pm-e86beae5dd84: WebSocket error
java.nio.channels.AsynchronousCloseException: null
at org.eclipse.jetty.client.HttpDestination.close(HttpDestination.java:481) ~[?:?]
at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:286) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:94) ~[?:?]
at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:180) ~[?:?]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:201) ~[?:?]
at org.eclipse.jetty.websocket.client.WebSocketClient.doStop(WebSocketClient.java:429) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:94) ~[?:?]
at org.openhab.binding.shelly.internal.api2.Shelly2RpcSocket.disconnect(Shelly2RpcSocket.java:218) ~[?:?]
at org.openhab.binding.shelly.internal.api2.Shelly2ApiRpc.disconnect(Shelly2ApiRpc.java:1363) ~[?:?]
at org.openhab.binding.shelly.internal.api2.Shelly2ApiRpc.close(Shelly2ApiRpc.java:1376) ~[?:?]
at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.setThingOfflineAndDisconnect(ShellyBaseHandler.java:711) ~[?:?]
at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.handleApiException(ShellyBaseHandler.java:232) ~[?:?]
at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.refreshStatus(ShellyBaseHandler.java:593) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]