Shelly Binding

ok, please try the updated version of shelly/org.openhab.binding.shelly-5.0.0-SNAPSHOT-fix161.jar

With the updated org.openhab.binding.shelly-5.0.0-SNAPSHOT-fix161.jar , both ShellyPlus2PMs become online, however the one with firmware 1.6.2 has a websocket-error. The log says

shellyplus2pm-c82e180962cc: WebSocket error: Cannot invoke "java.lang.Integer.intValue()" because "cs.id" is null 

However, it comes online very quickly.
I don’t know whether you are testing for different bugs here - I do test it with firmware 1.6.2, your jar file mentions 1.6.1. If so, I cannot downgrade to 1.6.1 since I don’t have a firmware file for this.

Hi, 1.6.1 or 1.6.2 doesn’t matter
grr, found another one comparing cs.id == 0 rather than cs.id == null
please try updated build

thx for supporting

Hi Markus,
shellyplus2pm (FW 1.62, roller mode) with openhab 5M3 and snapshot binding v5.0.0.202506141353 working without any problems here.
How can I help?

Confirming that openhab.binding.shelly-5.0.0-SNAPSHOT-fix161.jar binding 5.0.0.202506220739 seems to be working fine with my two ShellyPlus2PM (FW 1.6.2 roller-mode and 1.3.3 roller-mode).

1 Like

perfect, so I could finalize the PR

2 Likes

Hi all! @markus7017 thank you for the great binding! This one is in heavy use in my home!

I’m experiencing the FW 1.6.x id = null issue with a 2PMG3, openHAB 4.3.5.

In the same setup, I also have a Plus2PM with 1.5.1, which is working fine.

I use both these devices with the switches detached, so it’s the input status I’m interested in - issue shown below:

18:00:40.039	DEBUG	org.openhab.binding.shelly.internal.api2.Shelly2ApiRpc	shellyplus2pm-relay-<shellyid2pmg3>: NotifyStatus update received: {"src":"shelly2pmg3-<shellyid>","dst":"openhab-[ip]","method":"NotifyStatus","params":{"ts":1.75052524005E9,"input:1":{"state":true}}}
18:00:40.042	DEBUG	org.openhab.binding.shelly.internal.api2.Shelly2ApiClient	shellyplus2pm-relay-<shellyid2pmg3>: Invalid input id: null

You see above that as mentioned, there’s no ā€œidā€ field for the 2PMG3, which has FW 1.6.2 (although also same in 1.7.0 beta).

18:01:12.515	DEBUG	org.openhab.binding.shelly.internal.api2.Shelly2ApiRpc	shellyplus2pm-<shellyidPlus2PM>: NotifyStatus update received: {"src":"shellyplus2pm-<shellyidPlus2PM>","dst":"openhab-[ip]","method":"NotifyStatus","params":{"ts":1.75052527244E9,"input:1":{"id":1,"state":true}}}

The above is from the Plus2PM, which has FW 1.5.1, has the ā€œidā€ field, and is working fine, no errors thrown.

If I can help testing the backport binding, I’d love to give it a try, and will report back - please let me know!

the problem is already solved and the PR under review, use the DEV build

—
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

Hi,
I’m currently preparing a PR with support for Shelly BLU Button 4 ( which covers both, Wall Switch 4 and RC Button 4 ).
Testing and feedback welcome, pre-build snapshots for OH5.0.x and OH4.3.x can be found here.

Note: the javascript oh-blu-scanner.js (which is uploaded to Shelly devices functioning as BLU gateway) has changed, the JSON stream sent is not fully backwards compatible with the current productive shelly binding, so I recommend to use dedicated devices and test instance of OH.

br,
Udo

2 Likes

Trying to add a Gen4 Shelly1 and get an error. I’m using OH 5.0 with the test version (openHAB 5.0.0.M3). The error is

shos_http_server.cp:266 192.168.0.30: No handler for '/settings'

This seems to be an ongoing thing. Has native support for Shelly been deprecated for the newer devices ?

use the current DEV build, see above

Thx, that works better.
Can I use this in production ? The docs seem to indicate it could be unstable - will the fix become available in a release soon ?

We are working to merge some PRs, which hopefully make it into the 5.0 release.
Between releases I’m fixing bugs, enhancive features or additional devices like Gen4 series. You could use those so you don’t need to wait until next official release.
And you should use the DEV build to do testing and report bugs, which can be fixed before the next release is published.

2 Likes

I updated the DEV build (5.0 and 4.3.6) to include support for Shelly PlugS Gen3, Shelly Plus Outdoor Plug and amazon Shelly Plug. Thanks @wborn for implementation.


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
2 Likes

3 x under OH4.3.5 the DEV 4.3.6 binding installed, without an problems so far…
No WebSocket issue more :slight_smile:
Please continue with the implementation of new shelly devices @markus7017 and thanks for you development work!!

1 Like

I have update the firmware of my ShellyPlus2PM from version 1.5.1 to 1.6.2 without having found this topic in advance and now facing issues as well.
I am now wondering there is the possibility to downgrade the firmware back to 1.5.1 in general using the respective firmware file for the time being and if someone has downloaded and can share the firmware version 1.5.1 for ShellyPlus2PM file?

Thanks for the fixes and the update. I’m new to OH, although have 30+ years of Windows based line of business development experience. So might dive into the code base to see if there is anything I can do to help.

simply move to the DEV build, which includes work arounds for the firmware bugs

1 Like

Hi, I have a shelly outdoor (running openhab 4.3.5). I’ve tried the current build 4.3.6.202507011114

Unfortunately, the outdoor plug shows up as an unknown shelly device and it’s also not listed as a selectable device type when trying to add it manually. Any advice?

I’ve moved to ā€œopenHAB 5.0.0-SNAPSHOT - Build #4718ā€ but firmware 1.6.2 bugs do continue. ShellyPlus2PM is constantly switching form Online to Offline and vice versa showing ā€œUnexpected error: WebSocket errorā€ in the logs.