openhab / openhab-addons

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

Neeo binding will not load on M2 nightly #5891

Closed morph166955 closed 5 years ago

morph166955 commented 5 years ago

Please see https://community.openhab.org/t/neeo-remote-binding-transport/33408/390 and associated replies for the longer discussion.

When installing or starting OH with the Neeo binding and IO installed, system does not load properly. This seems to cause many other bindings to fail at startup and the system is unusable. 2019-06-01 14:55:56.258 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-misc-neeo’

The only way this seems to work is to extract org.openhab.io.neeo-2.5.0.M1.jar and org.openhab.binding.neeo-2.5.0.M1.jar from the M1 kar, wait until OH has started completely, and then put the two files into the addons folder. If the files are in the addons folder at start it causes the same effect.

J-N-K commented 5 years ago

Is this the only error message? Nothing else in the logs?

morph166955 commented 5 years ago

The logs are riddled with errors from the other bindings failing to load. It's hard to know what is and what isn't being caused by the binding directly. I did pull this out back in June, my apologies I thought I pasted this in as well:

[WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.io.neeo-2.5.0.M1.jar org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.neeo [206] Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional" Unresolved requirement: Import-Package: org.openhab.ui.dashboard

    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) [10:org.apache.felix.fileinstall:3.6.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

If it helps, this is what my addons.config looks like:

:org.apache.felix.configadmin.revision:=L"22" action="ecobee" binding="ntp,globalcache,exec,http1,weatherunderground,weather1,ecobee1,chromecast,network,astro,snmp1,tcp1,denonmarantz,serial1,lutron,wemo,myq1,sonos,samsungtv" felix.fileinstall.filename="file:/var/lib/openhab2/etc/org.openhab.addons.cfg" misc="market" package="expert" persistence="influxdb" remote="true" service.pid="org.openhab.addons" transformation="map,regex,xslt,exec,javascript,scale,xpath,jsonpath" ui="basic,paper,classic,habmin,habpanel,restdocs,dashboard" voice="voicerss"

morph166955 commented 5 years ago

Also to note, confirmed this locally on nightly 1645.

J-N-K commented 5 years ago

Please go to the karaf console and do bundle:list -s | grep -i ui and post the result.

morph166955 commented 5 years ago

openhab> bundle:list -s | grep -i ui 74 │ Active │ 80 │ 3.9.0.v20170207-1454 │ org.eclipse.equinox.common 187 │ Active │ 80 │ 2.5.0.201907230313 │ org.openhab.core.ui 188 │ Active │ 80 │ 2.5.0.201907230331 │ org.openhab.core.ui.icon 211 │ Active │ 80 │ 2.5.0.201907101007 │ org.openhab.ui.dashboard 276 │ Active │ 80 │ 2.5.0.201907101012 │ org.openhab.ui.basic 277 │ Active │ 80 │ 2.5.0.201907101012 │ org.openhab.ui.classic 278 │ Active │ 80 │ 2.5.0.201907101024 │ org.openhab.ui.iconset.classic 279 │ Active │ 80 │ 2.5.0.201907101024 │ org.openhab.ui.paper 280 │ Active │ 80 │ 2.5.0.201907101015 │ org.openhab.ui.reactor.bundles 281 │ Active │ 80 │ 2.5.0.201907101018 │ org.openhab.ui.reactor.bundles 282 │ Active │ 80 │ 2.5.0.201907101024 │ org.openhab.ui.restdocs openhab> bundle:list -s | grep -i neeo 287 │ Active │ 80 │ 2.5.0.M1 │ org.openhab.io.neeo 288 │ Active │ 80 │ 2.5.0.M1 │ org.openhab.binding.neeo

I added the neeo bindings/io as well for good measure. To note, this is working just fine in this configuration because I added the .jar files about 5 minutes after OH was started.

J-N-K commented 5 years ago

Ok, is this also working with the Snapshot bundles if added later? Probably the feature needs a reference to the dashboard bundle. Will check that tomorrow.

I wonder why the karaf feature check is not complaining about that.

lolodomo commented 5 years ago

Why is there a reference to the dashboard ? That looks very weird...

J-N-K commented 5 years ago

Found at least a problem. The feature for org.openhab.io.neeo is missing the neeo bundle. That explains the error in the initial comment. Didn’t see that the dashboard was M1 and not HEAD. The current codebase shows no such dependency.

wborn commented 5 years ago

The neeo dashboard dependency was removed during the bnd migration see:

morph166955 commented 5 years ago

I have updated to 1654 to test the changes. I installed Neeo via bindings. The system seems stable however the neeo web interface is now not available. This is normally reachable at http://openhab-ip:8080/neeo/index.html. Without this interface it is impossible to reconfigure the system.

The IO does not seem to have installed: openhab> bundle:list -s | grep -i neeo 287 │ Active │ 80 │ 2.5.0.201908060031 │ org.openhab.binding.neeo openhab>

I can not find any reference to the IO module on PaperUI to install that addon.

EDIT: Further investigation looks like the org.openhab.io.neeo.jar file (or anything other than the binding jar) does not exist inside of the openhab2-addons_2.5.0~S1654-1_all.deb file.

J-N-K commented 5 years ago

Probably too early, timestamp is 00:31, the changes were merged after that. Today’s build should be ok.

morph166955 commented 5 years ago

I will update to 1655 tomorrow then and report back success/failure. Thank you.

morph166955 commented 5 years ago

Updated to 1655. The following error is presented when I click the install button on PaperUI for Neeo Integration under Misc.

2019-08-07 16:24:42.496 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-misc-neeo': Error restarting bundles: Exception in org.eclipse.smarthome.io.rest.sse.internal.SseActivator.start() of bundle org.openhab.core.io.rest.sse.

On install, the web gui is reachable if you go to /neeo/index.html however it does not show up on the main /start/index as it used to. Additionally, it is unable to find any neeo brains.

A full OH restart seems to resolve the issues. openhab> bundle:list -s | grep -i neeo 245 │ Active │ 80 │ 2.5.0.201908062216 │ org.openhab.binding.neeo 288 │ Active │ 80 │ 2.5.0.201908062227 │ org.openhab.io.neeo openhab>

I would agree with this being closed minus the loss of the button which is cosmetic and can probably be pushed.