Shelly Binding

Mine works.
I replied to Sebastian

I have shelly motion sensors when a momevement is detected a shelly2.5 turn on garden lights (if is dark) and the doorbell ring for 45 seconds. (this is handled by shelly without openhab)
When im here i want to disable this but is not possible, so the idea is change the auto off timer of shelly 2.5 to 0.01 seconds (the dorbeel make a very short “ding” that advise me that somebody is in the garden.
One second is too much.
The shelly app let me set the auto off timer to 0.01 seconds and it works so is supported. So will be nice set to 0.01 seconds with openhab.

Thank your for your swift reply!

I managed to downgrade to 3.3.0 and that solved the problem. I was hesitant to go with the DEV build due to the text:

Channel definitions are subject to change with any alpha or beta release. Please make sure to delete all Shelly things before updating* the binding and clean out the JSON DB:

As I have a lot of shelly things I wasn’t keen on this. The pice I pay is I just have to step back to 3.3.0 from 3.4.0.M2 which is an ok trade off for me.

Please set the delay to 0.01, open. browser and the url
<device ip>/rpc/Switch.GetConfig?id=0 and post the result here

The DEV build supports 3.3 and 3.4, there is no need to downgrade, but you have to use the DEV version rather than the one included with the milestone build

On the shelly 2.5 with this command i get “Not Found” maybe because is a gen1 device.
Anyway i have a gen2 (Shelly1 plus PM) device and i tested with this:
Setting from the app:

{"id":0, "name":"Scaldabagno","in_mode":"follow","initial_state":"off", "auto_on":false, "auto_on_delay":60.00, "auto_off":true, "auto_off_delay": 0.01,"power_limit":2500,"voltage_limit":280,"current_limit":16.000}

If i try to set using openhab i have to use openhab 3.4.0 M2 and your lastest gen2+gen1 plugin instead of openhab 3.3.0 and bundled binding and i get in openhab logs:

shellyplus1pm-7c87ce64a7d8: ERROR: Unable to process command 3 for channel shelly:shellyplus1pm:SC_BAGNO:relay#autoOff - API call not implemented(class org.openhab.binding.shelly.internal.api.ShellyApiException)

and the settings is not changed in the shelly.


Hi all

I just got my first Shelly device a Shelly Pro 2PM is there any way to make this device work with this binding it doesn’t discover it anyway. And it is not in the supported devicelist but I thought maybe there’s something one could tweak.

Regards Marcus

Hey @Marcus_Carlsson,
just use the latest DEV built. Works nicely for my two PRO2PM.


Do you think binding or mqtt is thr better way in the long run? I did set my unit to mqtt but I cant seem to get the command topics in shelly docs.

Markus did an awesome job in supporting the new Shell Gen2 protocol. I would go with Shelly binding. MQTT is flexible, but you have to re-implement every single command&control channel yourself. Thats a lot of overhead.


I tried to download the lateset binding but in my 3.2 it will not work I guess I have to update OH environment first. Do anyone know if it’s work with detached switch/relay configuration?

The binding runs on 3.2-3.4. Yes, detached switch mode is supported. Use the DEV build

3.4.0-DEV Gen1/Plus/Pro | README | READMEbeta for more info on first installation
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

Hello! For those using the H&T Plus, how is it working for you? I just received one and cannot get it to stay on my network long enough to interact with it (there’s no indication this is an OpenHAB issue, but a Shelly programming problem). I’m powering up via the USB-C so I am unsure why it even needs to sleep.

if you disconnect/reconnect the usb it should stay online for 1min; in usb mode it wakes up every 10min to send an update

please try updated build, Gen1 accepts integer, Gen2 double values

3.4.0-DEV Gen1/Plus/Pro | README | READMEbeta for more info on first installation
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

Sorry for the delay but i spend a lot of time doing test without understand what i was missing…
Then i realized that the latest build. does not include gen2. (there is no shelly 1pro in the list of devices)
Probably is not loaded and is loaded the default openhab binding.
So i was unable to test it.
p.s. how can i understand wich bionding is used?
pp.s. why only Gen2 use doube values? I’m able to set from shelly app decimal values also to shelly 2.5.

As said, you need to install the DEV build, check the How-To above. Acc to ApI spec Gen1 uses Integer, whereas Gen 2 has a double. Does the Gen 1 device UI shows a double?

Hi @markus7017,

thanks for your hard work, wanted to try gen2 today but there seems to be a dependency poblem (newer version of californium?).

2022-09-27 17:00:08.000 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.shelly-3.4.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [325]
  Unresolved requirement: Import-Package: org.eclipse.californium.core; version="[2.7.0,3.0.0)"

Did anything change in the latest Versions?

Thanks for any hints!

Take a look at

Details prerequisites fir dev builds

Thanks Mark, I saw and read the documentation but it states to use version 2.0.0 of californium.core but this version does not seem to fit the range stated in the error I posted above.

Range [2.7.0,3.0.0)