Shelly BLU Motion looses connection

I’m running openHab 5.1.0.M2 in a docker on a synology NAS.

I have many Shelly devices running without any problems.

I just bought two Shelly Mini 1 Gen 3 and two Shelly BLU Motion. I had some trouble to get everything working, but eventually everything was fine. All motion events from both BLU devices (which I added with autodiscovery to openHab) were sent to openHab. That was day before yesterday. Today, I noticed that those events are not send to openHab any more.

Here are some additional information about my setup:

The two Shelly 1 are located in two rooms next to each other. So each Shelly 1 is able to receiv motion event from both Shelly BLU (which are located in those rooms). That might even be the cause of the problem.

On both Shelly 1 the OH-Script is running and the diagnostics show CPU Utilization about every 10 seconds. When everything was working, I could see Log Messages on the Shelly 1 like

Parsed BTH data from device….

shelly_notification:210 Event from script…

I enabled DEBUG-Logging for the Shelly-binding and saw something like

17:08:09.271[DEBUG] [org.openhab.binding.shelly.internal.api2.ShellyBluApi] - shellyblumotion-e8e07ed09ea0: BLU event oh-blu.data received from address e8:e0:7e:d0:9e:a0, pid=60 (JSON={"src":"shelly1minig3-e4b323268eac","dst":"openhab-172.20.0.10","method":"NotifyEvent","params":{"ts":1765296489.22,"events":[{"component":"script:1","id":1,"event":"oh-blu.data","data":{"encryption":false,"BTHome_version":2,"pid":60,"Battery":100,"Illuminance":18,"Motion":0,"addr":"e8:e0:7e:d0:9e:a0","rssi":-75,"packet":"44 00 3c 01 64 05 08 07 00 21 00"},"ts":1765296489.22}]}})
17:08:09.272[DEBUG] [org.openhab.binding.shelly.internal.handler.ShellyBaseHandler] - shellyblumotion-e8e07ed09ea0: Channel sensors#lux updated with 18 lx (type class org.openhab.core.library.types.QuantityType).
17:08:09.272[DEBUG] [org.openhab.binding.shelly.internal.handler.ShellyBaseHandler] - shellyblumotion-e8e07ed09ea0: Channel sensors#motion updated with OFF (type class org.openhab.core.library.types.OnOffType).
17:08:09.273[INFO] [openhab.event.ItemStateChangedEvent] - Item 'Shelly_Motion_Keller_Lux' changed from 84 lx to 18 lx (source: org.openhab.core.thing$shelly:shellyblumotion:e8e07ed09ea0:sensors#lux)
17:08:09.273[INFO] [openhab.event.ItemStateChangedEvent] - Item 'Shelly_Motion_Keller_Bewegung' changed from ON to OFF (source: org.openhab.core.thing$shelly:shellyblumotion:e8e07ed09ea0:sensors#motion)

So everything was fine. I also saw both BLU devices in the Shelly manager.

Now, I don’t see any events on the diagnostic log on neither of the two Shelly 1 devices even though the script is running (at least it generates CPUutilization messages).

I should not say, I don’t see any events, because sometimes an event is received and forwarded to openHab. But that is really rare and not every time the motion detector detects a motion event (signaled by the red light).

I have the problem with both BLU devices. Strangely enough, I just see one BLU device in the Shelly manager any more. The other one disappeared. Both Things seem to bei “online” in openHab.

Additional information:

I’m running firmware 1.7.1 on the Shelly 1 mini and I also upgraded the BLU devices via the Shelly BLE App to the latest version (I don’t know the number from the top of my head).

After rebooting both Shelly 1 mini, everything seems to work normally again. I will keep an eye on it for how long it will work….

:frowning:

[….]

Ok, it lasted about 1 minute. I reveived a motion event but the “motion off” was lost/never sent….

:face_with_peeking_eye:

I also had in the past (past = when Shelly BLU devices came to the market) alot of trouble with them. I can remember, that the scripts often stopped randomly).

Then I changed the communication to MQTT, and it works perfect. (I’ve got several BLU motion, Door+window (even outdoor for the mailbox), HT).

Configuration looks like this, in a .things file:

Thing mqtt:topic:mosquitto:mqtt_Shelly "MQTT Shelly" (mqtt:broker:mosquitto) {
    Channels:
      Type number :  Bad_Humidity    "Shelly Bad Feuchte"  [ stateTopic="shelly/events/rpc", transformationPattern="REGEX:(.*38:39:8e:71:11:50.*)∩JSONPATH:$.params.events[0].data.Humidity" ]

      Type number :  Bad_HT_Batt     "BLU HT Batterie"     [ stateTopic="shelly/events/rpc", transformationPattern="REGEX:(.*38:19:8f:61:09:50.*)∩JSONPATH:$.params.events[0].data.Battery" ]  

      Type contact : cBriefkasten    "Briefkasten"         [ stateTopic="shelly/events/rpc", transformationPattern="REGEX:(.*60:ee:ab:4b:44:2c.*)∩JSONPATH:$.params.events[0].data.Window",  off="0" , on="1" ]

Ok, but to get this working you have to connect the BLU device to the Shelly 1 mini ( at least in my case), right?

Otherwise, the event won’t get recognized by the Shelly 1. So different concept to the “official” version with oh-script (which has not to be bad :wink: )

Yes, that’s right - the Shelly 1 (or any other Shelly) is the gateway. You just have to configure it in the Shelly app.
But also by using the script, another Shelly needs to be the Gateway from Bluetooth to LAN.

BTW: I’d say, both approaches are official :wink:

I also switched to MQTT and it works really well.

1 Like