Shelly Binding

Hi @markus7017 , do you have a recommendation?
After upgrading to the latest 5.0.0 binding and to firmware version 1.62 all my Gen2 devices appear additionally in the inbox.

They have already been added as a thing with their device ID, like

shelly:shellyplus1:b8d61a86561c

Now, they are additionally in the inbox with their device name, like

shelly:shellyplus1:klingel

What to do? Keep the “old” ones or add the new ones which will be a lot of work to move linked items to the new thing.

this seems to be a bug
keep the old ones

Hello wehre do I find the new jar file for OH5.0 ?

right here

Just in case I missed it:
Shelly Plus UNI counter channel issue was not addressed so far in any of the DEV builds, was it?
Last time I asked if my feedback was of help was back in February

I can confirm that your ShellyBinding (5.0.0.202506020151) now works fine with a ShellyPlus2PM (roller-mode) with both firmware 1.6.2 and 1.7.0-beta1 . It fixed the “websocket”-error that happened at the start of every minute. Thanks for fixing this!

good news, thanks. Did you tried to discover a 2PM while in roller mode?

What‘s about Gen4 devices? Did somebody tried 1/1PM Gen4 or Mini 1/1PM/EM Gen4

I also fixed the Plug US. Could somebody test?

Support dor Pro Dimmer 1PM/2PM is almost done. Could somebody help testing?

Discovery worked fine with the 2PM in roller mode. I only have this device to test at the moment.

Do you still have a 2PM Roller with 1.5.x?
I need to separate the changes into 3 PRs to simplify review/merging process so would be good to test each PR separately.

Unfortunately, I only have this single 2PM roller. In about three weeks I would have access to 2PMs with older 1.4.4 firmware, but even with those - I’d need someone to send me the 1.5.x firmware file, because Shelly only offers access to 1.6.2 firmware at the moment.

fyi: I created a new PR: #18782

  • Adds support for Gen4 Devices: 1, 1PM and Mini 1, 1PM, EM
  • Firmware 1.6.1, which as a serious bug reporting status.id == null rather than component id. The PR adds a work around to explicitly set the id value if it’s null
  • Some Gen4 devices are providing the measure frequency (new channel)
  • Add decoding for new profile types
  • Plus Plug US needs special handling, because serviceName doesn’t indicate a Plus device (“shellyplugus” rather than “shellyplusplugus”)
  • README updated/fixed

This does NOT include the Plus2PM fix, this will be the next PW

1.4.4 would also be ok for the test
I prepared a separated PR for this, but it doesn’t include the 1.6.1+ work around

In this case you could try this build: https://github.com/markus7017/myfiles/blob/master/shelly/org.openhab.binding.shelly-5.0.0-SNAPSHOT-plus2pm.jar?raw=true

Hello all,

it looks like @markus7017 has also fixed today with a new version of the 4.3.6 binding this errors:

  • No (or less) Shelly where listed when trying to install a new one
  • The websocket error that brings the shellys offline in the overview.

Tested with OH 3.4.5 on three different installation.
Shelly Plus 1, Plus 1PM, have different FW 1.4.4. 1.5.1, and also 1.7.0 Beta1
→ All works now, at least for me.

Thanks @markus7017 !!!

thanks for confirming that the 4.3.6 build also works. It‘s based on the 5.0.0 code with some modifications that OH4 does not support


5.0.0-DEV | 4.3.6-DEV | README | READMEbeta
Avdanced Users | Shelly Manager | Bugs/Features | API Doc
Note:

  • The DEV build is always newer than the version in the official Distro or Milestone builds.
  • 5.0.0 build might be newer than 4.3.x

EDIT: Tried again and now it works. Maybe I swapped the versions…

@markus7017 :slight_smile:

I tried the new 4.3.6 version too:
All channels of my installed things were now shown correctly.

But when I tried to create a new thing the Shelly binding was not shown at all. Did anybody else experience this?

EDIT: Problem solved

Have you checked that is listet?

the upper is the offical, the unoffical is listet down.

Are you sure it is running?

Have you manual added the command in the OH console:

“feature:install openhab-transport-coap” ?

It should work fine now.

Meanwhilie I also flashed my shelly plus 1 with th 1.7.0-beta1 and it has been working over the night.

I tried again and now it works. Probably I swapped versions during copying. Thank you.

Instead I keep the tradfri-binding installed because that installs coap too.

Thanks for the fixes! Unfortunately i still got the exception at the status call:

[ly.internal.handler.ShellyBaseHandler] - shelly2pmg3-b08184e9dce8: Unable to refresh status: Status konnte nicht aktualisiert werden
java.lang.NullPointerException: Cannot invoke "java.lang.Double.doubleValue()" because "cs.temperature.tC" is null
        at org.openhab.binding.shelly.internal.api2.Shelly2ApiClient.updateRollerStatus(Shelly2ApiClient.java:633) ~[?:?]
        at org.openhab.binding.shelly.internal.api2.Shelly2ApiClient.fillDeviceStatus(Shelly2ApiClient.java:235) ~[?:?]
        at org.openhab.binding.shelly.internal.api2.Shelly2ApiRpc.getStatus(Shelly2ApiRpc.java:844) ~[?:?]
        at org.openhab.binding.shelly.internal.api2.Shelly2ApiRpc.getDeviceProfile(Shelly2ApiRpc.java:327) ~[?:?]
        at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.initializeThing(ShellyBaseHandler.java:336) ~[?:?]
        at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.refreshStatus(ShellyBaseHandler.java:561) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]

I tested with 5.0.0.202506020151 (https://github.com/markus7017/myfiles/blob/master/shelly/org.openhab.binding.shelly-5.0.0-SNAPSHOT.jar) as well as with the dedicated plus2pm-jar that i found here:
shelly/org.openhab.binding.shelly-5.0.0-SNAPSHOT-plus2pm.jar

Am i doing something wrong here?

obviously another firmware bug. If coverStatus.temperature is != null, coverStatus.temperature.tmpC has to have a value. I added an additional check, in your case inner device temp will not be available/updated.
try updated jar (5.0 build only)

Thanks a lot Markus! Now it seems to work just fine :slight_smile: