Zigbee and zwave manual install script

I found some missing libraries for the Zigbee console. Try the latest and see if the dependencies are now resolved.

2 Likes

Installs fine and boots up without any errors now. Thank you!

1 Like

6 posts were split to a new topic: Problem installing ZWave binding

I updated my openhab instance to the latest stable version (Openhab 2.5.4) and updated also the Zigbee binding to the latest version using this script (Script 1.2.7).

When booting openhab, I get the following error in the log, but even the binding seems to be working.

2020-05-09 12:27:33.415 [INFO ] [bee.discovery.ZigBeeDiscoveryService] - 00158D0004116DF3: Starting ZigBee device discovery
2020-05-09 12:27:33.417 [INFO ] [bee.discovery.ZigBeeDiscoveryService] - 00158D00042318CF: Starting ZigBee device discovery
2020-05-09 12:27:33.420 [INFO ] [bee.discovery.ZigBeeDiscoveryService] - 00158D0004470A55: Starting ZigBee device discovery
2020-05-09 12:27:33.424 [INFO ] [bee.discovery.ZigBeeDiscoveryService] - 00158D0004A1140F: Starting ZigBee device discovery
2020-05-09 12:27:33.424 [INFO ] [bee.discovery.ZigBeeDiscoveryService] - 00158D000479A295: Starting ZigBee device discovery
2020-05-09 12:27:37.600 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/com.zsmartsystems.zigbee.console.main.jar
org.osgi.framework.BundleException: Could not resolve module: com.zsmartsystems.zigbee.console.main [312]
  Unresolved requirement: Import-Package: com.zsmartsystems.zigbee.serial; version="[1.3.0,2.0.0)"
    -> Export-Package: com.zsmartsystems.zigbee.serial; bundle-symbolic-name="com.zsmartsystems.zigbee.serial"; bundle-version="1.3.4"; version="1.3.4"; uses:="com.zsmartsystems.zigbee.transport,jssc"
       com.zsmartsystems.zigbee.serial [324]
         Unresolved requirement: Import-Package: jssc
	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
2020-05-09 12:27:37.614 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/com.zsmartsystems.zigbee.serial.jar
org.osgi.framework.BundleException: Could not resolve module: com.zsmartsystems.zigbee.serial [324]
  Unresolved requirement: Import-Package: jssc
	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]

Bildschirmfoto 2020-05-09 um 12.34.39

@5iver does the script pull in this JAR? If so, it shouldnā€™t - this seems to be causing a missing dependency on jssc library, but the console canā€™t run within Karaf.

@autossincool if you see the file com.zsmartsystems.zigbee.console.main.jar in your addons folder, please remove it and see if it starts.

Iā€™ve removed the file you mentioned, but the issue is the same.
The following files are available in the addons directory. Are those correct?

Bildschirmfoto 2020-05-09 um 13.46.07

Personally, I would recommend moving all those manually installed bindings aside, get openHAB 2.4.4 running and install the Zigbee binding. You should then be able to replace the install script and run it to update to the snapshot binding, if desired.

I suspect that if running 2.5.x the script expects you to have already installed the Zigbee binding which also installs the serial binding.

If the same error is coming up, then the file is presumably still in the system. It could be cached in which case you would need to uninstall it using Karaf.

I can still see the file I said needs removing in this image which may explain why the problem is still thereā€¦

It doesā€¦

If this should not have been included, then I am confused about this deliverableā€¦

jssc and commcons-cli are also included to resolve the dependenciesā€¦

Iā€™m quite certain that when I tested this, everything worked without error. Iā€™m currently using OH snapshots and do need the library snapshots, so I havenā€™t used the script in a while. Nothing has changed in the script since March 9th and nobody has complained, so I would be surprised if there is an issue.

Just the OH console bundles, and their corresponding ZSS dependencies need to be added. The zss.console.main bundle is a standalone console that will not work with Karaf or openHAB.

Pulling this in may or may not cause a problem - Iā€™ve never tried, but itā€™s definitely a very bad idea even if it doesnā€™t cause problems (although it clearly is an issue here - maybe for other reasons, but in any case this issue is caused by a dependency that is not required).

2 Likes

Sorry I was not clear with my last post. Iā€™ve made the screenshot before Iā€™ve deleted the file ā€œcom.zsmartsystems.zigbee.console.main.jarā€

After another reboot the console.main is not available anymore, but the following error is still there.

2020-05-09 16:34:18.933 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/com.zsmartsystems.zigbee.serial.jar
org.osgi.framework.BundleException: Could not resolve module: com.zsmartsystems.zigbee.serial [324]
Unresolved requirement: Import-Package: jssc
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]

Bildschirmfoto 2020-05-09 um 16.20.59

Iā€™ve seen the script gives also the option ā€œ4) Install serial transportā€ - which Iā€™ve executed.
@5iver: I guess itā€™s not required to install the zigbee binding through PaperUI in advance, right?

Delete the bundle com.zsmartsystems.zigbee.serial.jar as well. I donā€™t think this will make any difference though as the binding is running.

Iā€™ve done so. Issue is gone and the binding is still working.
Thank you very much to all of you.

2 Likes

I think that was needed to install a 2.5.x snapshot on OH 2.4,

If you install Zigbee or Z-Wave using the script, it will include all of the dependencies, including the serial transport. If you installed the Zigbee binding through Paper UI before running the script, it will uninstall it. Do not install Zigbee through Paper UI after running the script.

Nope. I included this as a simple way for people who had manually installed Zigbee or Z-Wave to reinstall the serial transport after clearing their cache. It gets wiped and you would need to reinstall the feature through the console, which most people donā€™t know how to do off the top if their heads.

I think I got everything cleaned up and also fixed an error in the URLs for the regular snapshot install for Zigbee. The 2.5 branches have moved around a few times in CI and bintray. I havenā€™t tested yet from a clean install, but Iā€™ll try it out tonight.

Release 1.2.8

Iā€™ll keep their names anonymous, but for the two people who have donated, thank you very much! Times are tight and it is very much appreciated! :beers:

2 Likes

@pingleren, what do you see in your openhab.log? When the uninstall fails, it is usually an incorrect Karaf password. Can you successfully log into the console manually?

1 Like

The only things I see that may be related are (without debug):
2020-05-24 18:40:06.571 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null
2020-05-24 18:40:11.615 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2020-05-24 18:40:11.615 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

And I am able to log into the Karaf console. I also noticed that when giving a wrong password, I was prompted for a new password.

I think you get 3 tries

I was looking for some things other than Z-Wave logs. There should be logs about installing bindings. Another thing to check is if the jars downloaded properly. If the URLs changed again, the files will be 80Kb and not a compressed file that can be e.g. unzipped.

If the files are downloaded, try an OH restart. Just watch your openhab.log for errors.

Iā€™m not aware of any other logs than under /var/logs where I donā€™t see any traces of this - any hints? And I donā€™t seem to get to the point where jars are downloaded (not archive/staging/)

Is there a more manual procedure to follow?

But Iā€™m fine with waiting until tomorrow to install the new snapshot.

The file is openhab.log, which is where you would find your zwave logs too, unless you added a separate appender for it. The only other thing I can think of is that you are not running the script with an account that has permissions to move the files. The script should be run using the openhab account.

There are manual steps listed in the readme.

:+1: