openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[samsungtv] Samsung TV binding fails to install #4709

Closed lnxslck closed 5 years ago

lnxslck commented 5 years ago

Openhab can install binding SamsungTV

Expected Behavior

Binding should install, and show the information as installed on OpenHab.

Current Behavior

After clicking the Install button, nothing happens.

Steps to Reproduce (for Bugs)

  1. Install openHAB version: 2.4.0-1 on Ubuntu 18.10
  2. Try to install SamsungTV binding

Context

Trying to connect my Samsung TVs to OpenHab

Your Environment

Platform information:
    Hardware: AMD Ryzen 7 / x64 / 32GB RAM / 1 TB
    OS: Ubuntu 18.10
    Java Runtime Environment: Zulu 8
    openHAB version: 2.4.0-1

`

Jan 24 21:40:03 ubuntu karaf[8977]: org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-samsungtv; type=karaf.feature; version="[2.4.0,2.4.0]"; filter:="(&(osgi.identity=openhab-binding-samsungtv)(type=karaf.feature)(version>=2.4.0)(version<=2.4.0))" [caused by: Unable to resolve openhab-binding-samsungtv/2.4.0: missing requirement [openhab-binding-samsungtv/2.4.0] osgi.identity; osgi.identity=org.openhab.binding.samsungtv; type=osgi.bundle; version="[2.4.0,2.4.0]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.samsungtv/2.4.0: missing requirement [org.openhab.binding.samsungtv/2.4.0] osgi.wiring.package; filter:="(osgi.wiring.package=org.apache.commons.net.util)"]]
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392)
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378)
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332)
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257)
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
Jan 24 21:40:03 ubuntu karaf[8977]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Jan 24 21:40:03 ubuntu karaf[8977]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Jan 24 21:40:03 ubuntu karaf[8977]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Jan 24 21:40:03 ubuntu karaf[8977]: at java.lang.Thread.run(Thread.java:748)
Jan 24 21:40:03 ubuntu karaf[8977]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve openhab-binding-samsungtv/2.4.0: missing requirement [openhab-binding-samsungtv/2.4.0] osgi.identity; osgi.identity=org.openhab.binding.samsungtv; type=osgi.bundle; version="[2.4.0,2.4.0]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.samsungtv/2.4.0: missing requirement [org.openhab.binding.samsungtv/2.4.0] osgi.wiring.package; filter:="(osgi.wiring.package=org.apache.commons.net.util)"]
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Jan 24 21:40:03 ubuntu karaf[8977]: … 12 more
Jan 24 21:40:03 ubuntu karaf[8977]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.binding.samsungtv/2.4.0: missing requirement [org.openhab.binding.samsungtv/2.4.0] osgi.wiring.package; filter:="(osgi.wiring.package=org.apache.commons.net.util)"
Jan 24 21:40:03 ubuntu karaf[8977]: at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Jan 24 21:40:03 ubuntu karaf[8977]: … 13 more`
wborn commented 5 years ago

I can reproduce the issue when I select the Simple package during initial setup. Which one did you choose? If I select Standard or Demo it seems to work.

I was also able to workaround this issue by first installing the MQTT Binding (which installed Commons Net). Maybe that works for you too?

This might have the same root cause as https://github.com/openhab/openhab2-addons/issues/4574.

lnxslck commented 5 years ago

@wborn I think i chose Simple. I installed MQTT binding and coincidence or not, the Samsung TV binding is now installed.

However, when i try to turn the TV ON or OFF, i get the error:

2019-01-27 15:40:11.928 [WARN ] [tv.internal.handler.SamsungTvHandler] - Channel 'samsungtv:tv:3cfba6d1:power' not supported

Do you have any idea on this one?

wborn commented 5 years ago

This issue should be fixed in 2.5.0-SNAPSHOT with https://github.com/openhab/openhab-core/pull/545.

The workaround in 2.4.0 is to install the Standard package instead of the Simple package.

Another workaround is to add the commons-net feature dependency using The Console:

feature:install esh.tp-commons-net

Do you have any idea on this one?

I'm not using the binding myself so if you still have this issue please search/use the openHAB Community for support.