How to upgrade Z-Wave plugin but keep rest of OH intact?

This is probably a FAQ so please point me there if so.

What is the best practice to try out unofficial code on a running OH server? At home I have 80+ device Z-Wave network that I have twice now spent too much time setting up OH things and items while messing with different versions of OH2. On one hand I want to develop and contribute but on the other hand my outside lights have been on for 3 weeks now since I don’t have time to repair my latest configuration mistake. I don’t mind debugging and figuring it out but I do mind spending hours in a GUI, only to have to do it again and again on a different OH installation.

Some questions:

  1. If I grab a OH2.5.0.M1 installation and make that my “production” version for day-to-day automations, can I download/build a ToT or personal fork of the Z-Wave binding and replace it?
  2. If so, will it be a JAR file I replace or place?
  3. If so, where do I put it?
  4. Can I update with just a new device database or is the database embedded in the package along with the code?
  5. Do I need to shut down the whole OH instance or can I just shut down the Z-Wave binding and restart the new version?
  6. What are some gotchas I’m not asking?

In short: how do others here rapidly develop/debug the Z-Wave plugin on a real system?


Of all of the bindings I’ve used the zwave is about the easiest to work with. All the important info is on the controller and except for the move from OH 2.3 to 2.4 where I had to spend 10 minutes recreating my Things, I’ve never had to do anything special or run into problems with upgrades. So it might be worth exploring the specific problems you have encountered.

  1. Yes. Just make sure to uninstall the binding from OH and place the modified jar file in the addons folder. It will be automatically discovered and installed.

  2. Yes, it’s a jar file.

  3. It’s all documented here.

  4. My understanding is the database is embedded. But I’m not expert.

  5. Neither, uninstall the binding first and then place the jar file. Once you are using a custom jar file I believe you can just replace the jar file in the addons folder and OH will automatically replace the currently running one with a new one. But it would be a good idea to check in the Karaf console to make sure you don’t have two installed and running at the same time. This also raises another issue I’ve seen come up. The Zwave binding requires the serial bundle. This gets automatically installed when you install Zwave normally. When you use custom jar files you may need to install that bundle manually through the Karaf console.

  6. Changes to the core will occasionally make it so newer versions of a binding will not be compatible with older versions of the core. Any changes that require updates to Things will require you to recreate your Things.

1 Like

Here is a script and also documentation if you are going to do it manually…

In case you have a lot of Things that need to be deleted…

1 Like

The plugin is not getting installed on my system and the thing is that it is also affecting my system as well. I think there must be a bug because of that I am also having iTunes error 9.

You’re unlikely to get much help without providing more information. Your issue also does not seem related to this topic, so you should open you own. Read this…