Help installing binding - Could not resolve module

Hi

Im running openhab 2.3 until now without any problems.
Now I want to add the milight binding until I have a LED Strip here which I want to control.
LED Strip is in the network and can be controlled by the milgiht App with iOS.

If I try to install the binding the “circle” runs endless and in logfile I see:

Logfile says

09:39:46.901 [INFO ] [.core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-binding-milight'
09:39:46.904 [INFO ] [smarthome.event.ExtensionEvent       ] - Extension 'binding-milight' has been uninstalled.
09:39:52.594 [ERROR] [.core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-milight': Error restarting bundles:
        Could not resolve module: org.openhab.binding.milight [239]
  Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="2.1.0.201706241744"; osgi.identity="org.openhab.binding.milight"; singleton:="true"

09:40:04.632 [INFO ] [smarthome.event.ItemStateChangedEvent] - Schaltmessdose4Lst_Zlr changed from 19849.30 to 19850.90

Internet connection is checked and okay.

Installation of other bindigs will cause the same issue - I tried MQTT binding too.

After that neither discovery nor manally adding the bridge will work.
Whats the problem here? Any recommendations are welcome because I stuck a little bit here…

Best regards
Kay

Did you clear the cache?

Hi Vincent,

thank you for the fast reply. I tried your approach but it did not changed anything. I still have this install issue in log files

10:27:41.094 [INFO ] [smarthome.event.ItemStateChangedEvent] - SchaltmessdoseMotivatorLeistung changed from 189.10 to 180.80
10:27:41.097 [INFO ] [smarthome.event.ItemStateChangedEvent] - Schaltmessdose4Leistung changed from 189.10 to 180.80
10:28:05.931 [ERROR] [.core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-milight': Error restarting bundles:
        Could not resolve module: org.openhab.binding.milight [226]
  Another singleton bundle selected: osgi.identity; osgi.identity="org.openhab.binding.milight"; type="osgi.bundle"; version:Version="2.1.0.201706241744"; singleton:="true"

10:28:11.089 [INFO ] [smarthome.event.ItemStateChangedEvent] - Schaltmessdose4Lst_Zlr changed from 19996.30 to 19997.80
10:28:11.091 [INFO ] [smarthome.event.ItemStateChangedEvent] - SchaltmessdoseMotivatorLst_Zlr changed from 19996.30 to 19997.80

Any ideas…

Best regards
Kay

This has worked for others having issues with the milight binding.
https://openhab.ci.cloudbees.com/job/openHAB2-Bundles/lastSuccessfulBuild/org.openhab.binding$org.openhab.binding.milight/

Remove the binding from PaperUI and place the jar file in your addons folder then restart OH.

Hi H102,

thanks for the reply. We come closer to the problem. As I tried to install your linked snapshot binding I found the old milight binding already here. So I remembered, that someone else was playing with milight binding 6 months ago. The version statet in the error message look like the same as installed in the addon folder.
So i tried to remove this old addon, but the error stays. Even after I placed the new 2.4 binding the old module is still somewhere sitting:

15:53:14.252 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.milight-2.4.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.milight [243]
  Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="2.1.0.201706241744"; osgi.identity="org.openhab.binding.milight"; singleton:="true"

        at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [9:org.apache.felix.fileinstall:3.6.4]
15:53:14.262 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.milight-2.4.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.milight [243]
  Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="2.1.0.201706241744"; osgi.identity="org.openhab.binding.milight"; singleton:="true"

        at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [9:org.apache.felix.fileinstall:3.6.4]

Any ideas how get rid of this old binding?

Best regards Kay

Try stoping OH then clearing the contents of cache and tmp folders, then restart OH. Just don’t delete the actual folders.
For me using openhabian install I use this:

sudo service openhab2 stop && sudo rm -rf /var/lib/openhab2/cache/* 
&& sudo rm -rf /var/lib/openhab2/tmp/* && sudo reboot 

If that doesn’t work check the Karaf console and see if you still have two installs of the binding. You can also remove a binding with Karaf, I can’t remember the actual commands but it’s in the doc’s.

Hi H102,

while you replied so quick I tried bundle:uninstall in cosole and placed the file again in the addon folder and now it is working! Juhuu!
I try i its still working after a reboot… Thanks a lot!

Glad its working!:grinning:
If you would please mark the post solved by checking the square box on the post that provided the solution.
Thanks

1 Like

You can now use:
openhab-cli clean-cache

1 Like

I always forget about that. Guess I’m just accustom to the hard way.:roll_eyes:
Thanks