Shelly Binding - Things constantly changing between ONLINE and Websocket error

I have a bunch of shelly Devices installed. Shelly 1 Relais, Shelly Plugs, 3em and for the rollershutters shelly plus 2pm.

Since quite some time, for these ShellyPlus 2PM I see constant error messages in events.log. They keep changing from OFFLINE to ONLINE:

2025-07-14 19:49:44.885 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:Kueche' changed from ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
2025-07-14 19:49:45.029 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:Kueche' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE
2025-07-14 19:49:45.365 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:Buero' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode.
2025-07-14 19:49:45.455 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:Buero' changed from ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
2025-07-14 19:49:45.779 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:Kinderzimmer' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode.
2025-07-14 19:49:45.974 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:WohnzimmerRechts' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode.
2025-07-14 19:49:58.028 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:Kinderzimmer' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
2025-07-14 19:49:58.523 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:WohnzimmerRechts' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
2025-07-14 19:50:00.028 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:Kueche' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
2025-07-14 19:50:14.370 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-roller:WohnzimmerLinks' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode.

The devices seem to work, I can move the rollershutters up and down, also the status is reported.

Any idea where these errors might be coming from and how to get rid of them? CoIoT is disabled.

This is the place to be: Shelly Binding :slight_smile:

I had the same issue with ShellyPlus 2PM constantly switching ONLINE/OFFLINE in the logs. In my case it was likely related to unstable websocket behavior due to network polling or firmware quirks.

What helped a bit was switching to a newer Shelly Gen3 plug… not 100% solving it, but the status reports became much more stable and predictable. I’m currently testing them with a web3 tool called Combinder (they offer some discount to Shelly Gen 3 plug, saw it on Twitter), so maybe worth a try if you’re looking to replace any of the existing devices.

There is no need to buy new Gen3 or 4 devices. With the Firmware 1.6.1 or newer the Shelly has an issue with the offical Shelly binding, which is used in 3.4.6 OH installation.
You can fix this if you are going to use the DEV Binding.
How it works and what needs to be done from you is documented here very well:

This was a problem the last months. Since a couple of weeks the problem was fixed in the new
4.3.6 binding.

BTW: Today a new overall release OH 5.0.0 will be ready for download. Here this fix is already in the default Installation, so an DEV binding installation is not more needed.

Have fun which way you want to go, definitiv no need to buy new shelly hardware. Spend the money for donation.

I am still seeing this issue with my shellypmmini Gen2, FW 1.7.1 and OH5.0.1. All other 12 shellys are okay. Anyone else?

I have the same problem with 4x Shelly PM mini, fw 1.7.1 and 5x Shelly Plug S 1.14.0. OH version 5.1.0

My AI sais problem is in the shelly log

shos_rpc_inst.c:376     0x3fcbdf6c: duplicate id 'openhab-192.168.17.1'

while

ss -pt dst 192.168.17.28:80
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
ESTAB 0 0 [::ffff:192.168.17.1]:38592 [::ffff:192.168.17.28]:http
ESTAB 0 0 [::ffff:192.168.17.1]:57226 [::ffff:192.168.17.28]:http

(sometimes) shows multiple connections.

My AI and i are giving up … meaning MQTT is the workaround.

I think this is the place to be: Shelly Binding

thanks @ErikDB! The beta solved the issue.

1 Like