Zigbee and zwave manual install script

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:

The manual procedure worked - the latest snapshot of the Z-wave binding is now running. Thanks (and sorry for skipping the README :frowning: )

1 Like

Just followed the direction for manually install the latest binding (zwave)

And now i’m missing every(?) addon? and the logs keep giving me Errors on Failed installing

`2020-11-29 11:03:51.258 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-persistence-mapdb, openhab-ui-homebuilder, openhab-ui-basic, openhab-misc-openhabcloud, openhab-binding-tibber, openhab-binding-astro, openhab-ui-habmin, openhab-persistence-influxdb, openhab-misc-ruleengine, openhab-ui-habpanel, openhab-ui-paper, openhab-binding-zwave'`

When i think about it. The file I RM from /addons, was a /openhab-addons-2.5.10.kar Did I screw it up?

ls /usr/share/openhab2/addons/
org.apache.servicemix.bundles.xstream-1.4.7_1.jar  org.openhab.binding.zwave-2.5.11-20201128.033910-10.jar  README
    openhab> list -s | grep zwave
    263 │ Active │  80 │ 2.5.10                  │ org.openhab.binding.zwave
    283 │ Active │  80 │ 2.5.11.202011280333     │ org.openhab.binding.zwave

Yes… that .kar file has all of the add-ons in it for use offline. If you had not removed it, I think everything would have worked OK. This is the first time this has come up!

If you don’t have it, you can download the .kar from the openhab.org site.

Haha thanks. Ill check it out!

Uninstalling any managed binding(s) and installing serial transport...
... if prompted for a password for the Karaf console, the default password is 'habopen'...

Logging in as openhab
Password:
... a 'No matching bundles' error mesage is normal, if a binding had not been previously installed.

Backing up and uninstalling any unmanaged installs of Z-Wave...

!!!!! It has taken more than two minutes to uninstall the Z-Wave binding, so exiting !!!!!

Cant figure out what i’m doing wrong.
(From SSH)
sudo -E -u openhab bash zzManualInstaller.sh
from
openhabian@openHABianDevice:/usr/share/openhab2/addons$

openhab 2.5.10
rpi 4 with openhabian
Script version: 1.2.8

edit: nevermind. did the:
openhab> bundle:update org.openhab.binding.zwave *.jar

Does this script still work with OpenHab 3.0 ?

@5iver
I’d like to know this too! :grinning:

The author is taking a break,. He expects it to work but has not tested it.

2 Likes

Hi

The script does not work on my Openhab3, as it queries for latest Openhab 2 snapshot releases, so I modified the OH_VERSION line to the following:

OH_VERSION=$(curl -s --connect-timeout 10 --max-time 10 "openHAB3-Distribution #2131 Console [Jenkins]" | grep -a “Building openHAB” | grep -aoP -m1 “[0-9]+.[0-9]+.[0-9]+”)

Furthermore Openhab3 has added authentification to the REST API, for me it worked with enabling “basic authentification”.

1 Like

It looks like you have to uninstall the bindings manually. I am unable to get it to uninstall Z-Wave. This is what it’s running:

openhab> bundle:uninstall 'org.openhab.binding.zwave;' feature:install 'openhab-transport-serial;'
Error executing command: No matching bundles

I assume it’s trying to use OH2 names for OH3 components?