Shelly Binding

use the version from my repo in the myfiles/shelly folder

Do you have installed the Tradfi binding?

I suppose that the dev build is this:

https://github.com/markus7017/myfiles/blob/master/shelly/org.openhab.binding.shelly-3.4.0-SNAPSHOT.jar

Seems that is installed:

openhab> bundle:list | grep Shelly
288 │ Installed │  80 │ 3.4.0.202209251201     │ openHAB Add-ons :: Bundles :: Shelly Binding Gen1+2
293 │ Waiting   │  80 │ 3.4.0.M2               │ openHAB Add-ons :: Bundles :: Shelly Binding

But if i go in Things > + > Shelly Binding
In the add manually settings there are no Shelly Plus Items. (see attached picture at the end)

I have these files in the folder /usr/share/openhab/addons

407450 Aug 3 15:19 californium-core-2.0.0.jar
153956 Aug 3 15:19 element-connector-2.0.0.jar
361327294 Sep 11 21:30 openhab-addons-3.4.0.M2.kar
510773 Sep 28 09:25 org.openhab.binding.shelly-3.4.0-SNAPSHOT.jar
150673 Aug 29 15:59 org.openhab.binding.sonoff-3.4.0-SNAPSHOT_R1.jar

Previous releases of the dev Binding was working fine. (if i replace the latests one with a backup of the previous JAR everything works)
This evening i will try with a clean install

Yes i confirm ShellyUI show decimal also for Gen1 devices (at least shelly 2.5)
see here:
Images
Thank you very much.
Enrico.

Hi @markus7017, thanks for your answer, I tried both (jars and tradfi binding) but the error above remains the same. Both additional jars are installed (checked in karaf).

I just realixed that I have same Daniel error:

2022-09-28 11:20:01.502 [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 [296]
  Unresolved requirement: Import-Package: org.eclipse.californium.core; version="[2.7.0,3.0.0)"

I redownloaded californium and element connector from your repo and do all hints in: Updating DEV version paragraph.

but didnt fix.
I have to install tradfri binding or is a binding that can make conflicts?

You have installed two shelly bindings which does not work.
You have to remove at first the stable version (293).

removed. and now i dont see the shelly binding…
Now i get exactly the same errore that get Daniel.
Switched back the the previous release of the binding and works fine.
Which version of the shelly binding are you using? Wich openhab version? Whic californium library?

Hello, just installed the Shelly Plus 2PM and have exactly the same status as @Lamerjack

OH3.3, original Shelly Binding uninstalled (but did not delete a file ?!?), all Shelly items deleted, snapshot 3.4.0 installed, Tradfri binding was already installed.

Now added californium.core from Markus GitHub page but still get the same result

  • Error while starting bundle: file:/openhab/addons/org.openhab.binding.shelly-3.4.0-SNAPSHOT.jar
    org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [277]
    Unresolved requirement: Import-Package: org.eclipse.californium.core; version=“[2.7.0,3.0.0)”

Any help appreciated… :wink: Thx

Frank

you can’t install the version, which comes with the distro and the DEV version at the same time

deinstall both and check with bundle:list on the OH console if Californium is still active

The Shelly binding does not have dependencies to any other binding (also Tradfi), but maybe another binding creates a ref to the Californium jars, which causes a version check

Let me if OH 3.3+ has Californium bundled with the dist or I need to reference a newer version

Hello Frank

This is what I have installed:


As you can see I am on 3.4M2.

hi, here is what I can see with bundle:list:

No other Shelly binding is listed.

Before I switch to 3.4.0.M2 maybe there is another solution …, but thx to @chris4789

Hi @markus7017. I deleted the new Shelly binding from the add-on directory and uninstalled the original Shelly Binding.

Californium is still active, whatever that means :slight_smile:

Thanks for your help

Frank

I have an active system running on openHAB 3.4.0.M2 with the following:

233 x Active x  80 x 2.0.0                  x Californium (Cf) Element Connector
234 │ Active │  80 │ 3.4.0.202209051944     │ openHAB Add-ons :: Bundles :: Shelly Binding
235 x Active x  80 x 2.0.0                  x Californium (Cf) Core

Downloaded the latest Snapshot and replaced the current SNAPSHOT in addons

I also get the error:

11:30:58.926 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/C:/openHAB/addons/org.openhab.binding.shelly-3.4.0-SNAPSHOT%20(1).jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [274]
  Unresolved requirement: Import-Package: org.eclipse.californium.core; version="[2.7.0,3.0.0)"

        at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]

Is it possible that the dependencies have changed in the latest SNAPSHOT build?

Also, if I remove the two Californium jars and try runn the SHelly SNAPSHOT I get:

11:40:34.449 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/C:/openHAB/addons/org.openhab.binding.shelly-3.4.0-gen2-mem%20leak%20fix.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [276]
  Unresolved requirement: Import-Package: org.eclipse.californium.core; version="[2.0.0,3.0.0)"

        at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]

So:

Import-Package: org.eclipse.californium.core; version="[2.7.0,3.0.0)"

VS:

Import-Package: org.eclipse.californium.core; version="[2.0.0,3.0.0)

Mark

I try also with californium 2.7.0 from here but no success.
https://mvnrepository.com/artifact/org.eclipse.californium/californium-core/2.7.0
Tested over Openhab 3.3.0 and 3.4.0M2

I have the same problem as @mr_Emil that i do not se the channels on Dimmer 2.
I do not want to downgrade and i can not get the DEV version to work depending on the californium issue.

@Lamerjack @Mark_VG @Frank121 @chris4789
I added the Californium 2.7.3 files to my repo (core + element)

Please try

  • removed californium + element jar from adding folder, wait 30sec
  • stop OH
  • copy californium-core-2.7.3.jar and element-connector-2.7.3.jar to the adding folder
  • start OH

It seems that the distro updated the included Californium jar. The binding just references the feature “openhab-transport-coap”, but not a specific version.

I’ll look into that later today

@mr_Emil @tnemrap
Which channels are you missing? Mine looks fine. Do you have a password protected device? What’s the status of the thing? Channels are created on successful initialization. Keep in mind some of the channels are marked advanced so you need to tick the checkbox.

This is the only not advanced i ses and i expect something with dimmer.


This is the config.

what is the thing status?

please create a DEBUG log

Hi @markus7017 , thanks for the new Californium and Element jar files. For me the new jars do not seem to be enough, I am on Openhab 3.3 and now there are addional dependency problems

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [334]
  Unresolved requirement: Import-Package: org.eclipse.californium.core; version="[2.7.0,3.0.0)"
    -> Export-Package: org.eclipse.californium.core; bundle-symbolic-name="org.eclipse.californium.core"; bundle-version="2.7.3"; version="2.7.3"; uses:="org.eclipse.californium.core.coap,org.eclipse.californium.core.network,org.eclipse.californium.core.network.config,org.eclipse.californium.core.observe,org.eclipse.californium.core.server,org.eclipse.californium.core.server.resources,org.eclipse.californium.elements,org.eclipse.californium.elements.exception,org.slf4j"
       org.eclipse.californium.core [333]
         Unresolved requirement: Import-Package: org.eclipse.californium.elements.exception; version="[2.7.0,3.0.0)"
           -> Export-Package: org.eclipse.californium.elements.exception; bundle-symbolic-name="org.eclipse.californium.element-connector"; bundle-version="2.7.3"; version="2.7.3"
              org.eclipse.californium.element-connector [332]
                Unresolved requirement: Import-Package: net.i2p.crypto.eddsa; version="[0.3.0,1.0.0)"
         Unresolved requirement: Import-Package: org.eclipse.californium.elements; version="[2.7.0,3.0.0)"
           -> Export-Package: org.eclipse.californium.elements; bundle-symbolic-name="org.eclipse.californium.element-connector"; bundle-version="2.7.3"; version="2.7.3"; uses:="org.slf4j"
  Unresolved requirement: Import-Package: org.eclipse.californium.core.coap; version="[2.7.0,3.0.0)"
    -> Export-Package: org.eclipse.californium.core.coap; bundle-symbolic-name="org.eclipse.californium.core"; bundle-version="2.7.3"; version="2.7.3"; uses:="org.eclipse.californium.core,org.eclipse.californium.core.network,org.eclipse.californium.core.network.stack,org.eclipse.californium.core.server.resources,org.eclipse.californium.elements,org.eclipse.californium.elements.util,org.slf4j"

Anyone else getting these problems?

Regards,
Daniel