Shelly Binding

for me the same issue my button 1 is in config pending status and nothing works. I actually restarted and reinstalled the button but no effect.

in my shelly app etc. the button works.

Ups, you are righ, I need to checkt.
I used system defined channel types where applicable. This would be a breaking change.
Could you please open an issue so I have it on the list.
Maybe we should have a channel with the current percentage + the low battery switch

I doubt that this has the same reason. Enable DEBUG log and check if you see an event when you press the button. Is OH running in an Docker environment? Then most likely the config is not set to pass CoAP multicast into the container or a router is filtering the packets.

New issue has been opened for you Markus.

I think you linked the wrong channel
batteryLevel is of type system.battery-level, which is a Number (dimensionless)
lowBattery is of type system.low-battery, which is a Switch
to get the low battery indicator you need to link the lowBattery channels to a switch item

this matches the definition in the binding. Is you linkage correct? Please check openhab.log and events.log

Hello @markus7017 


The setup has been working for more the three years now without any changes in the setup of the rules or something else. Every new OH version was going to be used, and also the binding is up-to-date, with the DEV version. I have seven button1 in use (SW version 1.14.0) which all have the same setup. They report once a day, e.g. their battery value. e.g. last 6 month, ever day:

BTW: The purple line is an TRV Thermostat :slight_smile:

The value itself is in the shelly active, that the LOW BATTERY is reach, because the shelly app itself showed me that yesterday. Last night I charged the button1 for 5 min, so current it is above the 20%, with 27%. red line in the grafik



But we are talking about the switch for low battery: It was going to be ON, when the battery was less than 20%. Since when ever, the low battery was NOT MORE GOING TO BE “ON”, when the battery was less the 20%, e.g. yesterday!.

So it is NOT about the selected value (switch), it is about that, the switch is not more going to be “ON”, when the Battery level is lower that 20%. So Markus, please check your binding, what has been changed here in detecting if the button1 send the battery low switch as “OFF”, or “ON”.

I would say: calm down
as you might noticed I already checked the channel types, now I need to look into the logic

Thanks, for your help.

Hi Dawid, I am facing the same issues with M3 and btw there was a shelly binding change. It is listed in the release note you provided, but you have to click on “read more” 


I think this PR is the culprit:
[shelly] Add support for Shelly Plus HT Gen3 by markus7017 · Pull Request #16625 · openhab/openhab-addons (github.com)

Regards,
Karsten

please provide DEBUG log of the initialization
then switch to DE build and try again

4.2-DEV | 4.1-DEV | 4.0.-DEV | 3.4.5-DEV | README | READMEbeta
Avdanced Users - Shelly Manager - Bugs/Features - API Doc | Firmware Index - Firmware Archive


Note: The DEV build is always newer than the version in the official Distro or Milestone builds. Current development is based on 4.2-SNAPSHOT, 4.1.x, 4.0.x and 3.4.x are outdated.

One more observation about Shelly Blu Motion. Currently I’m on Openhab 4.2 M2. I have 3 shelly blu motion with latest firmware, working, reporting movements to openhab, but in Things page they have “ERROR:COMM” status, and in the events logs you can see that:

2024-05-30 08:25:03.507 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyblumotion:e8e07e944880' 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)

BUT, If i have switch ON the beacon mode the shelly blu motion thing status change to ONLINE.

please provide a DEBUG log showing device init. There should be no active connection setup for BLU devices

fyi: Today Shelly presented a buch of very interesting devices, an extended 3 / 5yr warranty for Plus/Pro devices and Shelly X as complete new platform - you have to watch this video
(for me that means more and more devices to handle, so it stays to be fun :-))

2 Likes

i am actually on
openhab> bundle:list | grep Shelly
282 x Active x 80 x 4.2.0.202405241838 x openHAB Add-ons :: Bundles :: Shelly Binding

2024-05-31 10:48:51.874 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyblubutton:9ec0653684' changed from UNKNOWN (CONFIGURATION_PENDING): Initialisierung oder GerÀt im Schlafmodus. to UNINITIALIZED

2024-05-31 10:48:51.876 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Stopping Thing

2024-05-31 10:48:51.876 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Shutting down

2024-05-31 10:48:51.876 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Shelly statusJob stopped

2024-05-31 10:48:51.876 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyblubutton-9ec0653684: Closing Rpc API (socket is disconnected, discovery=false)

2024-05-31 10:48:51.877 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Shutting down

2024-05-31 10:48:51.878 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyblubutton:9ec0653684' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)

2024-05-31 10:48:52.683 [DEBUG] [shelly.internal.ShellyHandlerFactory] - Shelly BLU Button: Create new thing of type shelly:shellyblubutton using ShellyBluSensorHandler

2024-05-31 10:48:52.691 [DEBUG] [shelly.internal.ShellyHandlerFactory] - Thing handler for uid shelly:shellyblubutton:9ec0653684 added, total things = 15

2024-05-31 10:48:52.691 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyblubutton:9ec0653684' changed from UNINITIALIZED (DISABLED) to INITIALIZING

2024-05-31 10:48:52.693 [DEBUG] [ernal.handler.ShellyBluSensorHandler] - Thing is using  class org.openhab.binding.shelly.internal.handler.ShellyBluSensorHandler

2024-05-31 10:48:54.707 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Using default userId admin from binding config

2024-05-31 10:48:54.708 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Using default password from bindingConfig (userId=admin)

2024-05-31 10:48:54.708 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Config: Device address=38398f8bae2c, HTTP user/password=admin/***, update interval=60

Blu Gateway=false, Range Extender: true

2024-05-31 10:48:54.708 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Start initializing for thing Shelly BLU Button, type shellyblubutton, IP address 38398f8bae2c, Gen2: true, CoIoT: false

2024-05-31 10:48:54.709 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Unable to initialize: BLU Device not yet connected(class org.openhab.binding.shelly.internal.api.ShellyApiException), retrying later

2024-05-31 10:48:54.709 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Update status job started, interval=20*3=60sec.

2024-05-31 10:48:54.710 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyblubutton:9ec0653684' changed from INITIALIZING to UNKNOWN (CONFIGURATION_PENDING): Initialisierung oder GerÀt im Schlafmodus.
2024-05-31 10:49:53.996 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Status update triggered thing initialization
2024-05-31 10:49:53.996 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Start initializing for thing Shelly BLU Button, type shellyblubutton, IP address 38398f8bae2c, Gen2: true, CoIoT: false
2024-05-31 10:49:53.997 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyblubutton-9ec0653684: Unable to initialize: BLU Device not yet connected(class org.openhab.binding.shelly.internal.api.ShellyApiException), retrying later
2024-05-31 10:49:53.997 [DEBUG] [y.internal.handler.ShellyBaseHandler] - 
shellyblubutton-9ec0653684: Enabling channel cache (20 updates / 60s)

From the ShellyPlug where the BLU is actually connected i see the log entry “res.local_name undefined” when i click on the button

Hi,
I have the same issue, only getting undefined res.local_name

found: https://github.com/ALLTERCO/shelly-script-examples/issues/47

but until now I cannot see a fix. I think it is an issue in the shelly scripting


Hello all,

I’ve updated today to the latest version of openhab and now I get (for all my shelly things):

Status: UNINITIALIZED
HANDLER_MISSING_ERROR
Handler factory not found

I suspect the manual installation of 4.2-DEV is ignored and I have to “do” something ?

Edit: I just had to do “feature:install openhab-transport-coap” in the openhab console. Everything is in order. What’s the way to make it permanent ?

Hello,
I saw that the autoon and autooff parameters are missing in the binding documentation for the shellyplugs device. I am desperately hoping that this may only be missing in the documentation but working in reality? Can someone confirm or deny this?

My wife is looking for an easy way to have a portable power plug with a timer to charge her smart devices (phone, watch, ear buds, tablet) and the Shelly Plug S would be perfect. The native Shelly web gui is too complicated and hence I would like to provide a slider for the “autooff” timer to switch off the plug when the device as been fully charged (the estimated charging time is given by the device).

Are the autoon / autooff parameters available for the shellyplugs or is there a chance to add them near-term so that I can provide that feature for my wife :wink: ?

EDIT:
I did some testing an added the following two items:

Number:Time ShellyPS_aofftime "Shelly Plug S [%.0f %unit%]" (gShelly)  {channel="shelly:shellyplugs:'######:relay#autoOff"}
Switch ShellyPS_tactive "Shelly Plug S" (gShelly)  {channel="shelly:shellyplugs:######:relay#timerActive"}

I can set a time interval in seconds and also turn the timer switch on and off but the changes are not passed to the device and vice versa when I change the timer settings the web UI of the plug.

Hence, my conclusion is that the parameters are not(yet) implemented for the Plug S.
And hence, I would kindly like to ask @markus7017 to add them into the binding :slight_smile:

EDIT 2:

It seems that the parameters are available in the Gen 2 version shellyplusplug so I am thinking of getting one of those but I would like to keep and still use my existing plug s devices and hence my request might still be considered with a lower priority :slight_smile:

Cheers
Justus

My Shelly BLU Door/Window sensors don’t always work like they should: Shelly BLU Door/Window not reporting correct state - #2 by ErikDB.

Does anyone recognize this behavior?

Are you on the latest DEV build? It also includes an updated BLU gateway script
provide DEBUG logs if the problem persists

No, there is no way to make it permanent,
but try to install the Shelly beta via UI (after removing it from the addons folder), this should bring the same DEV build, otherwise let me know

1 Like