Shelly Binding

… right - this is what I did: I split the rule and introduced a virtual switch to trigger the action through “received command” on that virtual switch. Using the physical button is not changing the virtual switch state.

Does the device has a static IP / did you make sure that it always get the same IP assigned by the router (DHCP)?

Did another device used that IP before? If yes, you the to remove the definition from the JSON DB before adding the device again. Otherwise, OH will restore channels etc. from the previous device and mixing them with the channels, schick will be created by the new device.

Otherwise, I need a DEBUG log from the full initialization. It shows the discovered device with IP address etc., but if you see it in the Inbox this should have worked as expected.

Which device do you try to added?

Update to the latest build. I added some missing model ids for the latest Pro production time.
Use http://<device ip>/shelly to find the model id. Pro devices have up to 3 model IDs indicating, e.g.
SPSW-001PE16EU
SPSW-101PE16EU
SPSW-201PE16EU"
for different hardware revisions of the Pro 1PM

I‘m going to create the PR bringing Plus/Pro support into the official distro.

I there anything open, any issues you see?

4 Likes

Lovely,
I moved to the Gen2 binding 4 Weeks ago having about 20 Shellys using 4 Gen2 devices. It was all a breeze.
II just received 2 new Pro 2PM which I plan to install this weekend. Need to upgrade to the latest binding since they were discovered as unknownshelly with my 4 week old binding.
Will report any possible findings here.

could relate to the model ids of latest production line and should work with the latest build (see above)

I updated the DEV build

  • DEV and gen2 builds are merged - no longer a separate gen2 build
  • always-on devices (no battery devices except sensor devices, Sense and Motion) Devices go into status COMM_ERROR if they are not reachable at thing initialization. Or more detailed reasons is displayed
  • Motion2 reports temperature even if no CoIoT packet is received
  • device#innerTemp channel is not created if the device doesn’t report the internal temp
  • powerFactor is now Number (was Percent)

Make sure to remove the -gen2 jar before installing the DEV build (without -gen2)


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

Make sure to remove the -gen2 jar before installing the DEV build (without -gen2)

2 Likes

Today i Upgrade to the new openHAB 3.4.0 Milestone 2 and a new Shelly 2.5 Relay have all channels again. Thanks!!!

1 Like

@markus7017, updating to the latest build (SNAPSHOT) fixed the adoption issue for me (device SPSW-202XE16EU, note -202XE…). All is good, thank you once again.

Hello to everyone, can someone summarize what I need to do to make a Shelly 4PM PRO working with OH 3.3.0? I’m really sorry if I don’t understand all the topics (maybe I am not so advanced in OH to understand everything), but I think it is the correct one to ask for information.

At the moment when I install the Shelly binding from the available add-on in OH 3.3.0 the Shelly 4PM PRO is not discovered, while the Shelly 1PM are discovered very well. I updated the firmware of Shelly 4PM PRO to 0.11, but the discovery doesn’t find teh Shelly device, and if I manually try to add the thing with the IP Address the state remains on CONFIGURATION_PENDING, and this is very sad since I just bought 2 Shelly 4PM… :slight_smile:

Is there a procedure in order to make it working with a workaround, or it is still under development? If it’s still under development, would this be added to the next OH version (e.g. 3.4.0?). In this case maybe should I wait for it, depending on the release date, I see for example that in another topic it is mentioned a way to make it wokring with mqtt, even if in my opinion is not the best way because is more complex?

If there is a workaround with the binding, can someone help me and wirte a short summary of the steps that I need to execute?

Sorry again, maybe the answers are in the previous messages in this topic, but I’m quite new with OH and any help will be much appreciated.

And thank you very much to all the people working to make things work.

Hey Luca,
The Pro devices are currently not yet supported from the stable shelly binding. You have to install Markus DEV build. HE has some really good docu on the installation part. Just check his signature in one of the comments here. There you will find all needed info.
best

Many thanks Sebastian, I will follow your suggestion, and maybe report some test restuls if it can help on the development.

Hi Markus,
I’m trying to change the auto off settings of a shelly 2.5.
Seems that doesnt’ accept floating point values. Is a bug or a my mistake?
In items i created this item:

Number SUONERIA_TIMER			"Suoneria Auto OFF"			<time>					{channel="shelly:shelly25-relay:LUCI_ESTERNE:relay2#autoOff"}

and inside the rules i try to change with this:

sendCommand(SUONERIA_TIMER,0.01)

the result is that in the app the timer is set to 0 (that means no off timer) if i change from the app to 0.01 it works.
Thank you for you work.
Regards.
Enrico.

you specify a number of seconds, why should this support decimal numbers, use an integer value, this should be fine

Quick question about polling interval of power measurement.
I installed my new Pro 2PMs and started playing around. I have a rule that calculates the 5min average power consumption in Watts in order to track the dryer and washing mashine.

Seems like when the Pro 2PM does not change watt usage, there is no value sent to openhab. So my calculated average remains “hanging” on higher level since no subsequent updated with 0 Watt come through.
Heres some log from when the washing machine finished at 20 to 2pm. Since few hours no power measurement from Shelly.

2022-09-19 13:37:44.326 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'gShelly17_Meter1_CurrentWatts' changed from 259.3 W to 246.1 W
2022-09-19 13:37:57.399 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'gShelly17_Meter1_CurrentWatts' changed from 246.1 W to 244.6 W
2022-09-19 13:38:25.911 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'gShelly17_Meter1_CurrentWatts' changed from 244.6 W to 14 W
2022-09-19 13:38:33.845 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'gShelly17_Meter1_CurrentWatts' changed from 14 W to 3.5 W
2022-09-19 13:38:39.776 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'gShelly17_Meter1_CurrentWatts' changed from 3.5 W to 2.4 W
2022-09-19 13:38:57.483 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'gShelly17_Meter1_CurrentWatts' changed from 2.4 W to 2.7 W
2022-09-19 13:39:57.563 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'gShelly17_Meter1_CurrentWatts' changed from 2.7 W to 2.8 W
2022-09-19 13:40:02.948 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'gShelly17_Meter1_CurrentWatts' changed from 2.8 W to 0 W
swa@nuc:/etc/openhab$ date
Mo 19. Sep 16:20:56 CEST 2022

And this is how my grafana looks like:


Blue: native value from Shelly Pro 2PM
yellow: calculated 5min average every time item changes

Anyone an idea?
Thanks

Trigger the rule when the item gets updated instead. This includes updates without changes.


I’m having problems with my newly installed dimmer2. I’m on Openhab 3.4.0.M2 and I can’t see the “Dimmer” and “Power Meter” channels. The other units (also dimmer2) installed somewhere around openhab 3.2-3.3 works fine. I haven’t dared remove one and try to re-add it in fear of losing the control…

I’ve tried factory default on the dimmer2 (two newly installed, has this same problem) but the problem persists.

I feel like I’m missing a simple setting on the dimmer2 itself but all units seem to have the same settings, same firmware etc. I thought I’d check here first if there are any known issues, before I post a more detailed debug in a new topic.

Anyone experienced something similar?

My old Shelly1PM has a value ‘meter#lastPower1’ Durchschnitt letzte Minute.
this is what I use for the dryer. Isn’t it available in Shelly 2pm?
You can start a rule when watt=0. After a time if it is still 0 watt your machine has finished…

upgrade to the latest 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

It should work similar
you should have a rule checking the item change

Mine works.
I replied to Sebastian
Thx