Shelly Binding

When I try to add a link to a point (category lightbulp and semantic call point), I can choose the thing (e.g. shelly 1 plus) but the thing will not be added to the point and I see no channels. This happens when I use Google Chrome.

With Microsoft Edge Browser, I can add the thing and link the channel successfully.

I have no clue why, if so it’s a UI issue. I not on Windows :slight_smile:


Good news,
PR #13439 has been merged, so Plus/Pro support will be included with the next milestone build / 3.4 final.

I updated the build:

  • 3.4.0-M2 build, which also serves 3.2.0 and 3.3.0, but not current dist snapshot/nightly

It includes another fix: When roller was moving and reached open or close state the position was not updated (0/100%).

1 Like

Hi Markus,

I might have a feature request for the “shelly dimmer 2”, cause I did not found a solution to solve my problem.

I plan to install 10 dimmable lights across a wall, which will usually be powered on or off in parallel. I did not found a solution to dimm the 10 lights in parallel. I have to do it for each dimmer itself which is quite uncomfortable,

Usually I set the dimmer function via Model/Shellydimmer2/Item/Helligkeit, where I can set a value between 0-100. Do you see a chance to set the dimmer value 0-100 for multiple “shelly dimmer 2” actors in parallel? The idea is then, that all 10 lights have allways the same brightness.

Why dont you put your 10 Dimmers into a group and send the brifhtness command to the group?

good idea thanks.

I did play around a while until I found a solution:

When I add a new point, and choose type dimmer, I get the values 0-100 for dimming lights, I can add then a new link for each shellydimmer2 and choose “Helligkeit”

I did test it now with 10 dimmable garden lights and it works perfect.

My log gets flooded with countless updates.

2022-10-10 06:06:51.840 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LEDs_Power' changed from 7.19 to 7.18
2022-10-10 06:07:00.295 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LEDs_Power' changed from 7.18 to 7.20
2022-10-10 06:07:06.847 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LEDs_Power' changed from 7.20 to 7.19
2022-10-10 06:07:09.405 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LEDs_Power' changed from 7.19 to 7.20

Is there any possibility to specify the precision e.g. on the thing?
I’d like to have only one state with 7.2.

Is there any possibility to specify the precision e.g. on the thing?

I handle this by specifying a JS profile when linking the channel to the item. I have a mini JS script that does what I need to do on the decimals. I hope this helps.

Would you be so kind and provide an example? E.g. the JS profile and how you link it (if you use an items file).

Yes, my pleasure, I could not do it yesterday as I was from my phone


An example of a filterdecimal.js file. I have also other versions to filter the unit out if the binding reports the numbers with units
 Let me know if you’d like to see it.

(function(i) {
var entier = Math.round(i*100)/100;
return (entier);
})(input)

And I use only the UI for the config of my items, so I can’t really help on the .items file syntax. But there seem to be good examples here:

I hope this helps.

Just upgraded to openHAB 3.4.0.M3 from M2 and have a strange thing happening: My Shelly2 controllers (shelly2-roller) controllers display HANDLER_MISSING_ERROR. Other Shellies (eg shelly25-roller) seem to be fine. Any idea?

Acutally just saw that it was removed in this PR: [shelly] Add Plus/Pro support, some bugfixes by markus7017 · Pull Request #13439 · openhab/openhab-addons · GitHub Was this on purpose?

Minor Update:

  • Updated to openHAB 3.4.0.M3 (docker alpine) (including shelly Enhancements 13439 Add Plus/Pro support, some bugfixes)
  • Updated both of my Shelly Plus H&Ts

Still was not possible to find the devices via “Scan” button (despite the fact that they were in discovery mode)
But adding them manually via setting IP was possible

Now it seems like its basically working, but it also looks like the values never get updated
I know, that the update frequency of these devices is very low on purpose but at the moment i relly see only the very very first value from the discovering of the device

Any other users experiencing this?

Ups, you are right. I removed shelly2-roller, because we thought the Shelly 2 doesn’t support roller mode lacking the power meter. I can re-add the thing the next days.

Does the H&T gets ONINE? Otherwise the event reporting is not initialized.

  • remove thing
  • remove battery from device
  • reinsert battery, wait a few secs
  • run discovery in OH, sometimes you need to run it multiple times

If device is not discovered post a DEBUG log of the initialization.

Thanks! Btw, Shelly2 does have a power meter: API Reference

Configuring them manually yesterday made me have all of them Online.
Looking at it today again, only the Shelly Plus H&Ts are back to “the yellow state” again (which i do not see anymore because i deleted the things as you said.

This means my Shelly1 and the two Shelly2.5s work as expected after manual configuration → OK for me but also these do not get discovered

I have no idea how this works but at the bottom line, even if i manually configure the H&Ts manually and get them to Online, they never update values and stop working i think

I did now try to give you further debugs:

  1. Activate Logging
$ /openhab/runtime/bin/client
Entering password: habopen
openhab> log:set DEBUG org.openhab.binding.shelly
  1. Deleted Things
  2. Removed Battery
  3. Reinsert Battery
  4. Wait a bit
  5. Scan multiple times
  6. See log → No Activity in Log
  7. Uninstall shelly binding → I fear this forced my openHAB container to crash and reboot
  8. Re-installed shelly binding → Crashed container again and rebooted

My container should be configured propery and never crashes → At the moment i only did see this in relation to the shelly binding

  1. Re-inserted the batteries
  2. Back to the Things section and → Shelly → Scan → Nothing

I wish i could give you more
Am i doing something wrong?

Hi @markus7017 ,
i have a problem with the shelly binding. My shelly motion throws a exception on every update. I am using the milestone release 3.4 M3. Do you know this problem?
thanks for helping
Ralph

> 2022-10-12 19:37:01.258 [WARN ] [.californium.core.network.UdpMatcher] - error receiving response NON-2.05   MID=   10, Token=, OptionSet={"Uri-Path":["cit","d"], "Unknown (3332)":0x53484d4f532d3031233630413432333836463030322332}, "{"blk":[{"I":1,"D":"sens".. 472 bytes for Exchange[R2233]
> java.lang.NullPointerException: null
>         at org.eclipse.californium.elements.UdpEndpointContextMatcher.isResponseRelatedToRequest(UdpEndpointContextMatcher.java:80) ~[bundleFile:?]
>         at org.eclipse.californium.core.network.UdpMatcher$3.run(UdpMatcher.java:316) [bundleFile:?]
>         at org.eclipse.californium.elements.util.SerialExecutor$1.run(SerialExecutor.java:289) [bundleFile:?]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
>         at java.lang.Thread.run(Thread.java:829) [?:?]

Do you habe H&T or Plus HT?
If H&T male sure that the binding receives multicast packets in the container.

Do you use the version which comes with the dist? I didn‘t tried M3 so far

I used 3.3 and 3.4 from the dist. With the same error