Shelly Binding

I tested with older binding version 5.2.0.202605210411, can see the error, too. And yes, it’s in the device log / web socket debug log.

I still need to to the tricl with binding 5.1 and than recopy binding 5.2

Could you please explain what you exactly mean?

Some more interesting aspect, I find out on my different OH systems which are 1:1 configured.
on all systems the heartbeat is set to 60 sec. So OH should get every minute an update from the plus 1PM

When I check the logfile on two the Systems I get it every one Minute, on the other I get it every 2 minutes, with the same setting.

info_circle 09:07:16.452	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Luftfeuchtigkeit' changed from 54.1 % to 54 % (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#humidity)
info_circle 09:07:16.452	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:06:16.000+0200 to 2026-05-26T09:07:16.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:07:16.452	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Laufzeit' changed from 1013611 to 1013671 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#uptime)
info_circle 09:07:16.453	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Spannung' changed from 233.3 V to 233.6 V (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:meter#voltage)
info_circle 09:07:16.453	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktualisierung' changed from 2026-05-26T09:06:16.000+0200 to 2026-05-26T09:07:16.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:meter#lastUpdate)
info_circle 09:07:51.679	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:07:16.000+0200 to 2026-05-26T09:07:51.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:08:16.509	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:07:51.000+0200 to 2026-05-26T09:08:16.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:08:16.509	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Laufzeit' changed from 1013671 to 1013731 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#uptime)
info_circle 09:08:16.509	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Geratetemperatur' changed from 54.9 °C to 54.8 °C (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#internalTemp)
info_circle 09:08:16.510	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Spannung' changed from 233.6 V to 233.3 V (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:meter#voltage)
info_circle 09:08:16.510	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktualisierung' changed from 2026-05-26T09:07:16.000+0200 to 2026-05-26T09:08:16.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:meter#lastUpdate)
info_circle 09:09:16.560	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Temperatur_1' changed from 21.7 °C to 21.8 °C (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#temperature1)
info_circle 09:09:16.561	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Luftfeuchtigkeit' changed from 54 % to 53.9 % (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#humidity)
info_circle 09:09:16.561	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:08:16.000+0200 to 2026-05-26T09:09:16.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:09:16.561	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Laufzeit' changed from 1013731 to 1013791 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#uptime)
info_circle 09:09:16.562	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Spannung' changed from 233.3 V to 232.7 V (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:meter#voltage)
info_circle 09:09:16.562	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktualisierung' changed from 2026-05-26T09:08:16.000+0200 to 2026-05-26T09:09:16.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:meter#lastUpdate)



info_circle 09:16:38.696	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:14:38.000+0200 to 2026-05-26T09:16:38.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:18:38.690	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:16:38.000+0200 to 2026-05-26T09:18:38.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)

As you can see, the most of the channels are also missing in the reporting. Only the heartbeat is there but in 120sec timing....

Maybe this helps here somehow for debugging…

This 1PM has an AddOn Module attached with should give me the temperature.
Yesterday I noticed, that it stops reporting. The I restarted the thing. (first yellow mark)
The it works, but in the the middle of the night it seems to be stoped addtional. (secound yellow mark)

So very interesting …

→ I deleted the thing and created them new.
After generation the things become online, but has not reported any values (heartbeat) for some minutes.
→ Then I was bringing the Thing offline and online in the OH and from this moment onward it reports all values as it should be:

info_circle 09:36:40.367	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:36:35.000+0200 to 2026-05-26T09:36:40.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:36:40.370	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Aussentemperatur' changed from 22.5 °C to 22.4 °C (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#temperature1)
info_circle 09:37:00.075	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:36:40.000+0200 to 2026-05-26T09:37:00.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:37:00.257	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Luftfeuchtigkeit' changed from 52.3 % to 52.2 % (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#humidity)
info_circle 09:37:00.259	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Laufzeit' changed from 1015395 to 1015455 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#uptime)
info_circle 09:37:00.259	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Innentemperatur' changed from 54.6 °C to 54.5 °C (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#internalTemp)
info_circle 09:37:00.375	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Aussentemperatur' changed from 22.4 °C to 22.5 °C (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#temperature1)
info_circle 09:37:10.366	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:37:00.000+0200 to 2026-05-26T09:37:10.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:37:10.369	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Aussentemperatur' changed from 22.5 °C to 22.4 °C (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#temperature1)
info_circle 09:37:20.368	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:37:10.000+0200 to 2026-05-26T09:37:20.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:37:20.375	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Aussentemperatur' changed from 22.4 °C to 22.5 °C (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#temperature1)
info_circle 09:38:00.076	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:37:20.000+0200 to 2026-05-26T09:38:00.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:38:00.314	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Laufzeit' changed from 1015455 to 1015515 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#uptime)
info_circle 09:38:00.317	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Innentemperatur' changed from 54.5 °C to 54.8 °C (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#internalTemp)
info_circle 09:39:00.086	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Letzte_Aktivitat' changed from 2026-05-26T09:38:00.000+0200 to 2026-05-26T09:39:00.000+0200 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#heartBeat)
info_circle 09:39:00.433	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Luftfeuchtigkeit' changed from 52.2 % to 52.1 % (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:sensors#humidity)
info_circle 09:39:00.434	INFO	
openhab.event.ItemStateChangedEvent
Item 'Test_Temperatur_Buro_Laufzeit' changed from 1015515 to 1015575 (source: org.openhab.core.thing$shelly:shellyplus1pm:80646fe55984:device#uptime)

All my three systems are now infected in this kind and art, that during the night,
my Shelly 1PM wit the AddOn Module stops reporting of the temperatur.
Heartbeat is still there but no temperature anymore.
A hard reboot the shelly was NOT succesfully.

Only a stop and start in the OH itself from the Shelly was bringing the values back…

What we probably need is DEBUG log from around the time they stop reporting. That’s the point something goes wrong, the restart when they start working again probably isn’t of much help.

Something’s wrong with the handling of BLU devices. I’ve noticed it a few times that after working, my BLU Motion sensors suddenly don’t get their signal across to openHAB. I’ve got two BLU Motion sensors in a room: b0c7de422d7a & ``

In log 1 (https://drive.google.com/open?id=1YfNaqA92AZiA4Ee0KE7vQE7ZUmYxcf_c&usp=drive_fs), the (probably) last motion of the day was recorded:

2026-05-26 21:56:58.581 [DEBUG] [y.internal.handler.ShellyBaseHandler - 63588     ] - shellyblumotion-b0c7de422d7a: Channel sensors#motion updated with OFF (type class org.openhab.core.library.types.OnOffType).

Later in that log file, there’s no motion detected (regex searches for b0c7de422d7a.*#motion and e8e07e8cc832.*#motion), but I don’t think there were other motions to be detected, as the log file reached its maximum size in the middle of the night.

In log 2 (https://drive.google.com/open?id=1QIYi3eNfERO4f4vzwSo24tbtKewTcDoZ&usp=drive_fs), no motion is detected, although the Shelly app did detect it. (I don’t have a screen shot of it, but I hope you can take my word about it.) In fact, there are no entries for b0:c7:de:42:2d:7a or e8:e0:7e:8c:c8:32. A search for the MAC addresses without colons only shows two kind of entries:

2026-05-27 00:45:31.546 [TRACE] [y.internal.handler.ShellyBaseHandler - 928       ] - shellyblumotion-e8e07e8cc832: Watchdog restarted (expires in 43860 sec)

or

2026-05-27 00:46:30.134 [DEBUG] [y.internal.handler.ShellyBaseHandler - 943       ] - shellyblumotion-b0c7de422d7a: Channel device#heartBeat updated with 2026-05-27T00:46:30.000+0200 (type class org.openhab.core.library.types.DateTimeType).

I then restarted openHAB, and the motions are detected again, as seen in log 3 (https://drive.google.com/open?id=15-7mkxRZOj1WDDBhqUqfoBIGDC5eExI_&usp=drive_fs).

@markus7017, do you have any idea what might cause this (silent) breaking of the communication between the BLU Motion and openHAB?

(After the first times I detected this, I deleted and recreated all my “BLU Gateway” Things, later all my BLU things. But the problem keeps coming back…)

I am experiencing similar issues here, though I haven’t yet figured out the underlying cause—or, more importantly, how to reliably reproduce it in order to provide further assistance via a debug log.

One thing I have noticed is that when my Wi-Fi restarts—for instance—I encounter a problem where my BLU devices (H&T, DW, Motion) stop sending data to openHAB. However, for some reason, this doesn’t affect all of them; some continue to function normally. Restarting the “THINGS” associated with the BLU gateways—specifically by disabling and then re-enabling them—often resolves the issue. Yet, most of the time, the only thing that truly works is a full reboot of the Shelly devices using the openhab-blu script.

To me, it appears as though the Shelly devices are losing their connection to openHAB. This is because the BLU updates generated by the openhab-blu-scanner script still continue to appear in the system logs.

That is all I can say on the matter for the moment. The problem also seems to have only crept in with one of the recent DEV builds. I will keep investigating and will post an update here as soon as I figure out how to reliably reproduce the issue.

Aha, now you mention it. My router updated itself and restarted this night. So that might indeed trigger it. I’ll reboot my router now and see what happens.

Either way, I don’t see anything in the Shelly logs that’s significant. On the other hand, there’s so much to see, that I might be looking over it.

Edit:
Rebooting my router indeed triggers the problem.

Notable is that “heartbeat” logs still appear…

yes, that could be, I had also a software update that night and directly after that some of my BLU H&T didn’t send new Data to my influxdb persistence. I have about 7 BLU GW Things in openHAB, and perhaps some of them reconnected correctly to openHAB again after wifi was away. What I know, because I monitor every shelly relais, none of my devices had problems with reconnecting to wifi, so all Shellys were online.

Perhaps this new problem is related to the new web socket connection of the binding.

@Nadahar, is that possible? It sounds unlikely, but then again, it sounds unlikely that reconnecting WiFi has an impact on this BLU stuff…

(Almost) anything is possible, but I’m afraid that I know a bit too little about how the BT stuff is working to be of much help. What I can say is that the WebSocket refactoring has been there for a while now, so if that was the reason, I’d think you’d have discovered the problem earlier.

As far as I know, there is a WS connection between the “gateway” and OH, and a script that runs on the gateway that forwards BT events to OH over Wi-Fi. This WS connection is, I believe, initiated by the binding. If the gateway device reboots or otherwise lose connectivity so that the WS connection is broken, maybe something has happened to the logic so that the binding no longer tries to reestablish the connection. The binding would have to try to reconnect periodically to “recover” from such an event, the Thing should go offline and then online again when reconnection succeeds. My guess is that the problem is somewhere in this logic.

I actually did notice this a few weeks ago. I sent you and @markus7017 some messages about it (12/05 and the following days).

Sounds reasonable.

Something else:

I got a new Shelly Plug S Gen3 today, and it looks like oh-blu-scanner.js keeps crashing:

shelly_user_script.:203 JS RAM stat: initial: 73140 after: 73104, used: 36
21:23:35
shelly_espruino.cpp:275 JS Error [5] out_of_memory out_of_memory used=598 peak=599 total=599
21:23:35
shelly_user_script.:236 UserScript.HandleError (script:1) [5] out_of_memory out_of_memory
21:23:35
shelly_script.cpp:205   script:1 0.2% CPU utilization
21:23:35
shelly_notification:164 Status change of script:1: {"error_msg":null,"errors":[],"running":true}
21:23:35
shelly_notification:164 Status change of script:1: {"error_msg":null,"errors":["out_of_memory"],"running":false}
21:23:35

(from the UI of the Shelly device, so http://192.168.1.144/#/diagnostics)

I once again rebooted my router, and the BLU Button doesn’t work anymore.

Logs from a BLU Gateway Shelly (http://192.168.1.42/#/diagnostics):

New device found: address= b0:c7:de:bd:41:4c , name= SBBT-002C
21:32:29
Parsed BTH data from device  SBBT-002C :  {"encryption":false,"BTHome_version":2,"pid":137,"Battery":100,"Button":[1],"addr":"b0
21:32:29
:c7:de:bd:41:4c","rssi":-72,"packet":"44 00 89 01 64 3a 01"}
21:32:29
shelly_notification:210 Event from script:1: {"component":"script:1","id":1,"event":"oh-blu.scan_result","data":{"addr":"b0:c7:de:bd:41:4c","name":"SBBT-002C","rssi":-72},"ts":1779910349.22}
21:32:29
shelly_notification:116 ch type=WS_in info=192.168.1.9:35726 has no DST
21:32:29
shelly_notification:210 Event from script:1: {"component":"script:1","id":1,"event":"oh-blu.data","data":{"encryption":false,"BTHome_version":2,"pid":137,"Battery":100,"Button":[1],"addr":"b0:c7:de:bd:41:4c","rssi":-72,"packet":"44 00 89 01 64 3a 01"},"ts":1779910349.42}
21:32:29
shelly_notification:116 ch type=WS_in info=192.168.1.9:35726 has no DST
21:32:29

So the script still does something.

But this info doesn’t reach (the Shelly binding logs in) openHAB…

After openHAB restart, there’s no more mentioning of has no DST. 192.168.1.9 is my openHAB Linux box. Is that a clue?

Very much. Until now it’s been unclear if DST has referred to timezones or destination, it sounds very much like it means destination now. While you reboot, do your gateway Thing go offline and then online again?

Perhaps the script must be “reinitialized” after the connection has been reestablished to be able to “find” the destination to send to?

We need to look at several communication paths

  • The BLU device itself, which sends the data, which gets captured by one or more BLU Gateway / Shelly devices
  • The Shelly Hub device / BLU GW
  • the oh-scanner script, which is runnung on the hub device and forwarding the BLU events to the hun device
  • The WS connect between the binding and the hub device delivering the events

BLU device > oh-scanner > WS connection > bunding NotifyEvent handler > channel updates

If the router reboots the Wifi connection and the WS connection gets lost and new to be recovered. You should see a „ fromm ONLINE to COMM error" in the OH event log, thing gets offline, followed by a re-initialization of the thing, which re-creates the WS connection and sends GetStatus through this to trigger the notification events.

If that doesn’t happen properly no more events get delivered to the binding.

Test

  • make sure binding, gateway thing and BLU thing are up
  • reboot router
  • You should see the gateway thing going offline
  • Now you should see CONFIG_PENDING for the gateway thing, which results in ONLINE if the gateway connection was re-established or COMM error if the connect failed (e.g. router is still booting / Wifi not up yet). I so you should see another cycle 60-70s later
  • Check device debug log if you see the BT events getting forwarded to OH
  • Check OH log if connection was established successful, events are received, channels get updated

I can’t do that, because I need the router to reach the openHAB UI… But I assume event.log (or openhab.log) will hold all this info?

How would that look?

I can conclude this already from previous tests. Mind you, this is only about the BLE devices. I haven’t noticed problems with ‘regular’ WiFi device Things.

Yes, but you need to correlate them (thing status changes only go to events.log)

Check device log for messages including “oh-blu.data” or “oh-blu.scan_result” (you need to enable debug on the device and check the device debug log)

From a first look yes, but as you see above they play together. The connection to the gateway device (BLU Gateway or Shelly Plus/Pro) deliver the BLU device messages to the binding. If this WebSocket connection is not recovered correctly you can access the gateway device, but will not see NotifyEvent messages triggered by the oh-scanner script.