How to upgrade Zwave-Binding to latest Snapshot?

Now it’s back working perfectly fine. Both secure door lock and my new wall mount device WS15Z5-1. Thanks for your help!

@chris, any chance you could upload a new snapshot with the devices updated since Jan 2?
Also, I’m curious how development is going, if you’re up for letting us peons know! :grinning:

Yes, I will try and do one today (well, more likely tonight as I am doing some more work to tidy the database first).

Hi! I have the same problem. How do you solve it?
Thanks.

Hi, i have installed the z-wave snapshot 2.2.0 of 2018-01-07. Now i would update to the latest snapshot 2.3.0 of 2018-03-07. I have replace the old jar-file in folder add-ons with the new 2.3.0 jar-file.
is this update complete or is there more to do?

Nope. But you may want to double check via karaf and

bundle:list|grep -i zwave

if your new snapshot is the one and only active zwave binding.

Late reply, but I too could not remove the Z-wave binding using the GUI, neither Habmin, nor Paper UI in this (rather good!!) recipe from Mark Cornhill at the top of this thread.

I’m using Openhab 2.2.0 from late december on a Rasperry Pi 3 using Openhabian. Maybe the GUI uninstall button broke at some point between juni 2017 and december 2017? I don’t know.

What did work was removing the Zwave binding via the openhab commandline (Karaf).

First, put the new Zwave binding in the addons directory. At the moment of this writing, it worked using this command (download link may vary of course every week), from the /usr/share/openhab2/addons directory:

/usr/share/openhab2/addons$ wget https://openhab.ci.cloudbees.com/job/openHAB2-Bundles/lastStableBuild/org.openhab.binding%24org.openhab.binding.zwave/artifact/org.openhab.binding/org.openhab.binding.zwave/2.3.0-SNAPSHOT/org.openhab.binding.zwave-2.3.0-SNAPSHOT.jar

Second, find the number of the zwave binding using Karaf:

openhab> bundle:list | grep -i zwave
202 │ Active    │  80 │ 2.2.0                  │ ZWave Binding
210 │ Installed │  80 │ 2.3.0.201805091233     │ ZWave Bind

Then, using that number (202), deactivate it. Note that the 2.3.0 .jar file is installed here, because I had a reboot in between. This may not be the case any time, but it is only installed, not active) :

openhab>  bundle:stop
openhab > bundle:uninstall org.openhab.binding.zwave

I verified that all zwave entries are gone using

openhab> bundle:list | grep -i zwave 
202 │ Resolved  │  80 │ 2.2.0                  │ ZWave Binding
210 │ Installed │  80 │ 2.3.0.201805091233     │ ZWave Binding

The 2.2.0 binding becomes “resolved”, don’t know what it means exactly, but it is not active any more.

Then I restarted Openhab from the commandline (perhaps bundle:start would also do the job, I did not try that) :

 sudo systemctl restart openhab2

And verified it:

openhab> bundle:list | grep -i zwave                                                                                                                      
211 │ Active   │  80 │ 2.3.0.201805091233     │ ZWave Binding

And, yes, it has been replaced!! :grinning:

Note that the GUI still reports 2.2.0, but I tend to believe a command line tool more than a GUI :wink:

I’d be happy to make some documentation about this somewhere, when somebody gives me the right pointers to where and how to do that… !

The GUI presents to you the “standard” versions of the (Z-Wave) binding which comes bundled with the OH (2.2) distribution that you can install.
If you use a manually deployed binding, you shouldn’t worry about what PaperUI shows you for the version of the specific binding since you won’t be using that (leave it uninstalled). PaperUI won’t show you the version of a manually deployed binding.

Thank you @tonus for detailed guide, I am preparing (more mentally) for my first manual upgrade of z-wave binding in order to start using sensative comfort strips http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/747

Does anyone know btw when might official openhab 2.3 be released (couldn’t find any info on the web)?

Next week.

2 Likes

I found that it is actually this simple:

  • (from Windows) copy the .jar from the first line in this post to the openHAB2-conf Samba share.
  • on the box just do a sudo cp /etc/openhab2/org.openhab.binding.zwave-2.3.0-SNAPSHOT.jar /usr/share/openhab2/addons/ . The binding will restart itself. Check with bundle:list | grep -i z in karaf.
  • if you have also upgraded the OH2 snapshot and the binding doesn’t become Active, chances are you need to do a feature:install openhab-transport-serial in karaf.

My experience (on Windows) was pretty much this (and yes, this simple). And these steps all worked on an OpenHab 2.3.0-1 stable release build.

And I wanted to thank @chris for his effort on this binding. I submitted a new device a few weeks ago, and he had a snapshot out including my new device within a week. Thanks, Chris!

1 Like

I have been trying to do the same - upgrade the Zwave binding with the snapshot to upgrade the database. Dropping the jar file did make the openhab pick the new binding, but OH2 is unable to initialize the device (zwave serial controller). It keeps throwing HANDLER_INITIALIZING_ERROR. I have already installed the openhab-transport-serial and restarted OH2 a couple of times. It is also active as shown by the Karaf console below.
211 | Active | 80 | 3.12.0.OH | nrjavaserial
Here is the log in case someone gets a clue why it is happening.

11:53:55.768 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0123’ changed from UNINITIALIZED to INITIALIZING
11:53:55.768 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Initializing ZWave serial controller.
11:53:55.771 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initializing ZWave Controller.
11:53:55.776 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0123’ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR)
11:53:55.776 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing ‘zwave:serial_zstick:0123’: java.lang.NullPointerException

Thanks in advance!

Can you provide the full stack trace from the exception - just the exception itself doesn’t provide any information about why/where it occurred.

That was a quick reply. Here is the complete log.

12:16:58.097 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:0123' changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR)
12:16:58.098 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing 'zwave:serial_zstick:0123': java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_151]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_151]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.doInitializeHandler(ThingManager.java:738)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.initializeHandler(ThingManager.java:664)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.access$12(ThingManager.java:639)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$2.apply(ThingManager.java:681)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$2.apply(ThingManager.java:1)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.config.core.BundleProcessorVetoManager.bundleFinished(BundleProcessorVetoManager.java:68)[95:org.eclipse.smarthome.config.core:0.9.0.b5]
        at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor.informListeners(AbstractAsyncBundleProcessor.java:253)[98:org.eclipse.smarthome.config.xml:0.9.0.b5]
        at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor.access$3(AbstractAsyncBundleProcessor.java:251)[98:org.eclipse.smarthome.config.xml:0.9.0.b5]
        at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor$1.run(AbstractAsyncBundleProcessor.java:242)[98:org.eclipse.smarthome.config.xml:0.9.0.b5]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_151]
Caused by: java.lang.NullPointerException
        at org.openhab.binding.zwave.internal.ZWaveConfigProvider.getThingTypeConfig(ZWaveConfigProvider.java:374)[212:org.openhab.binding.zwave:2.4.0.201807081945]
        at org.openhab.binding.zwave.handler.ZWaveControllerHandler.initialize(ZWaveControllerHandler.java:95)[212:org.openhab.binding.zwave:2.4.0.201807081945]
        at org.openhab.binding.zwave.handler.ZWaveSerialHandler.initialize(ZWaveSerialHandler.java:78)[212:org.openhab.binding.zwave:2.4.0.201807081945]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9.call(ThingManager.java:741)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9.call(ThingManager.java:1)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_151]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_151]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_151]
        ... 1 more

Okay, so it seems upgrading to OH2.3.0-1 has solved the problem. I did have to reinstall the serial feature again, but thereafter the serial controller was added and it is now able to find the 29+ nodes that were originally deleted!

Strange - the ZWave binding is exactly the same between these versions…

Anyway, if it’s gone, then that’s good :slight_smile: .

Hi! Thnk you very much for your documentation!

I was able to get to this:

Blockquoteopenhab> bundle:list | grep -i zwave
224 │ Installed │ 80 │ 2.5.0.201909170405 │ openHAB Add-ons :: Bundles :: ZWave Binding
225 │ Active │ 80 │ 2.4.0 │ ZWave Binding

Can you o someone please elaborate a bit further what needs to be done to get the newer version active and the old resolved?

Many thanks!
BR
Uwe

bundle:uninstall 225

Thank you!

That didn’t work, so I had to put this file org.apache.servicemix.bundles.xstream-1.4.7_1.jar into the Addons folder too, to get 2.5.x activated.

BR
Uwe