Shelly Binding

H

I think the house should operate ‘analogically’ as well as with software.

But it’s fixed now :slight_smile:

Definitely true, therefore the device is not usable for your needs. :wink:

Can you elaborate a bit more? I would also like to get rid of Shelly Cloud but I have no idea what you’re talking about… :grin:
What are those IX3 / IX4 things/devices? The Shelly Plus i3 and i4?

Yes, sorry, Shelly Plus i3 and i4. They are directly mounted behind some wall switches where I for whatever reason could not directly place a Shelly 1 od 2.5.
I have configured different action in the i3 and i4 to send commands to other Shelly 1 or 2.5.
When you define an action, you can enter an URL like

http://192.168.0.153/roller/0?go=stop

That‘s all.

Something is wrong with communication with Shelly Blu motion. I cannot add it according to instructions in documentation. It does not apperar in inbox of discovered things.

BUT if I add it manually and press several times switch in Shelly Blu Motion and add some channels I see that items are updating.

BUT the thing has ERROR:COMM state:

AND in Debug event logs I see such entries:

2024-01-28 15:42:07.032 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyblumotion:6e32aeda78' changed from UNKNOWN (CONFIGURATION_PENDING): Initializing or device in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unable to connect to device - BLU Device not yet connected(class org.openhab.binding.shelly.internal.api.ShellyApiException)

With some users, the BLU gateway doesn’t operate as it should: the script stops working on the gateway device, sometimes as quickly as within two hours.

With me, that also prevents the BLU device from updating its status in the Shelly app (Shelly BLU Door/Window frozen), with MiniOh, that’s not the case (Problems with Shelly BLU Door/Window Sensor - #4 by MiniOh).

Does anyone have the same issue or (better yet) know a fix?

Does anybody has a Plus UNI and implemented the use case “Transform Your Meter Data into Savings”
https://www.shelly.com/en-de/products/product-overview/shelly-plus-uni-1#node-8lpm34j8eglpr

This uses the new pulse counting feature. I want to add those channels to the binding, but also build it myself.

turn on the DEBUG log on the device (using UI), check what happens when script dies

You mean on the Shelly Plus 1PM, which is the Bluetooth gateway?

And how exactly do I do that? I don’t seem to find that option in the Android app, or via the cloud (via my pc browser)?

yes

  • open the device’s web ui
  • on the left you find Diagnostics
  • click the play button on the upper right corner of the panel
  • wait until script dies
  • download debug data

Of course, via the IP address…

Okay, will come back with the logs later.

I have to leave the “Diagnostics” window open in the browser? Otherwise it doesn’t seem to log…

Furthermore, which log should I enable?

Here is the error when the script stops:

shelly_bluetooth_rel:91 ADV b0:c7:de:32:b9:90: mfd={“0ba9”:“AQEACwIACpC5Mt7HsA==”}, svc={“fcd2”:“RADIAWQFhAMALQA/AADwAgLxAAkAAQ==”}

12:13:00

Uncaught Error: Cannot read property ‘t’ of undefined

12:13:00

at _value = this.getBufValue(_bth.t, buffer);

12:13:00

^

12:13:00

in function “unpack” called from …ice_data[BTHOME_SVC_ID_STR]);

12:13:00

^

12:13:01

in function “getData” called from …ShellyBLUParser.getData(res); // skip if parsing failed

12:13:01

^

12:13:01

in function called from system

12:13:01

12:13:01

shelly_user_script.:397 error: Error in EjsCall

12:13:01

shelly_notification:163 Status change of script:1: {“id”:1,“errors”:[“error”],“running”:false}

Here’s mine (I have a more elaborate file in case there’s previous stuff important, but it looks like attachments are impossible):

shelly_notification:163 Status change of switch:0: {"id":0,"aenergy":{"by_minute":[0.000,0.000,0.000],"minute_ts":1706558939,"total":49589.837}}
21:09:00
shos_rpc_inst.c:355 0x3ffe2b00: duplicate id 'shellyplus1pm-d4d4da7df89c'
21:09:32
shos_rpc_inst.c:230 Shelly.GetStatus via HTTP_in POST 192.168.1.9:52218
21:09:32
shelly_bluetooth_rel:91 ADV 3c:2e:f5:69:4b:59: mfd={"0ba9":"AQEACwIACllLafUuPA=="}, svc={"fcd2":"RAAuAWQFAAAALQA/AADwAgLxAAkAAQ=="}
21:09:33
Uncaught Error: Cannot read property 't' of undefined
21:09:33
at _value = this.getBufValue(_bth.t, buffer);
21:09:33
^
21:09:33
in function "unpack" called from ...ice_data[BTHOME_SVC_ID_STR]);
21:09:33
^
21:09:33
in function "getData" called from ...ShellyBLUParser.getData(res); // skip if parsing failed
21:09:33
^
21:09:33
in function called from system
21:09:33
21:09:33
shelly_user_script.:397 error: Error in EjsCall
21:09:33
shelly_notification:163 Status change of script:1: {"id":1,"errors":["error"],"running":false}
21:09:34

Is there a bug in the shelly binding or another Problems with Shelly BLU Sensors? There are some problems, because the status is not updatet. For much details, have a look at: Problems with Shelly BLU Door/Window Sensor - Add-ons / Bindings - openHAB Community

Thanks Sebastian

See above :wink:

I took an (uneducated) guess and changed line 97 of the script from

if (_bth === "undefined") {

to:

if (typeof _bth === "undefined") {

I would expect there to be either “typeof”, or no quotation marks. But I could be wrong, of course.

Let’s see if this new code stays alive. @MiniOh, can you try this as well?

I tried in the meantime. For me is running for more than 6 hours until know.

Unfortunatelly it stopped again.

Same Error?