Unknown Z-Wave device: How to proceed?

Tags: #<Tag:0x00007f4348d24848>

Thanks, @sihui. I did find details in the forum, and I’ve tried to follow the procedures – and it’s not at all behaving as described! I’m deeply frustrated at this point, please bear with my explanation.
Here’s what I’ve done so far. I’m running on a raspberry pi with raspbian, installed through apt-get.

  • Cloned the entire SSD with clonezilla (as a backup)
  • Uninstalled the Z-Wave binding in PaperUI
  • sudo service openhab2 shutdown
  • rm -rf /var/lib/openhab2/cache
  • rm -rf /var/lib/openhab2/tmp
  • Then I placed org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar in /usr/share/openhab2/addons
  • sudo service openhab2 start

…No Z-wave binding at all. I waited a while, no binding.
Then I read some more forum posts and found that I must add it into addons.cfg, so I added it:
binding = zwave,ntp,astro

Now Z-Wave Binding appears in the Paper UI list, but it’s 2.4.0! It did not use the new jar file.
On a hunch, I renamed the file to org.openhab.binding.zwave.jar, uninstalled the binding again, and stopped openhab2, deleted cache/tmp, started openhab2 again. STILL installs as 2.4.0!

So then I went to the karaf console.

bundle, list
ZWave binding shows as 2.4.0.
So I uninstalled it through karaf.
Then looked up help for install.
bundle:install [options] urls
Okay, so it wants a URL. Fine, I’ll let it download by itself:

openhab> install https://ci.openhab.org/job/openHAB2-Bundles/lastSuccessfulBuild/artifact/bindings/org.openhab.binding.zwave/target/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar

It thinks for a while (obviously downloading the JAR file) and then …

Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle https://ci.openhab.org/job/openHAB2-Bundles/lastSuccessfulBuild/artifact/bindings/org.openhab.binding.zwave/target/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar: org.osgi.framework.BundleException: A bundle is already installed with the name “org.openhab.binding.zwave” and version “”


Now this is when frustration starts to set in. IT’S NOT INSTALLED. I just uninstalled it. And what I uninstalled was 2.4.0. WTF.

Now I’m not sure exactly what I did – I thought maybe it was a permissions issue so i chmod’ed the jar file to 777 in …/addons, then i deleted it and downloaded it through wget on the pi (the first time I had copied it over to the pi using samba and then used mc (midnight commander) to copy it to …/addons).

At one point, in the karaf console, Z-Wave binding 2.5.x did show up in the installed bundle list… but the paper UI still claimed Z-Wave binding 2.4.0.
So, I figured it needed a restart, so sudo service openhab2 restart

And then again it came back up as 2.4.0 (in paper ui) and again as 2.4.0 in karaf bundle list!

So, that’s where I am now, with the same joyous feeling of utter defeat I had during my first few days of trying to get openHAB to do anything at all…

It’s just not working for me. How the heck do I get it to accept the 2.5.0 snapshot binding??

Help, please?


No, bad idea, this installs the stable zwave binding as you already found out. Installing through PaperUI oder putting the binding in addons.cfg is the same thing.

To fix all your attempts make sure you uninstall the current binding, remove it from PaperUI, remove it from addons.cfg, clear cache and tmp, restart openHAB, check through Karaf if no zwave binding is available.
Download the latest 2.5 zwave snapshot binding, put it in your addons folder, check through Karaf if it is in “Active” state.
Now there could be two problems if your controller does not show up or your devices are not working: either the serial driver is missing (as a workaround just install the Serial binding, this will install the serial driver dependency) or sometimes the xstream dependency could be missing due to all the recent changes to the openHAB core and the Build system changes, this one can be fixed with:

Now reinitialize your device in question and you should be good to go.

Okay, understanding a bit more now. It’s complaining about an Unresolved requirement: Import-Package:

One major pitfall with the karaf console is that if your window is too small to show the entire width of the list, grep won’t find anything either because apparently the text is cut off at the head-end, way before it ever gets to the console window?? That’s just bad, highly counter-intuitive behavior, this tripped me up for a while.

So anyway, after fighting this for another hour (seriously, this is like pulling teeth), I googled and found the org.eclipse.smarthome.io.transport.serial package here

I placed it in openhab2/addons and now finally xstream, serial, and zwave are now all Active!

But, my Z-Wave Serial Controller now shows OFFLINE - COMMUNICATION_ERROR: Serial Error: Port{0} does not exist.

The selected serial port is /dev/ttyACM0 which is what it has always been.

Is that no longer the correct name?

This is unfortunatly an issue with the serial driver and/or openhab 2.5.

You can enter the controller and save it´s setting, and it will most probably change to ONLINE again. For some reason all you have to do is to manipulate the setting (and save). wihtout actually change anything.
Chris and the rest of the team is aware of this, but untill now there havn´t been any fix. It´s a real pain in the ass issue, cause you´ll probably have to do this, each time openhab starts, which means, if openhab restarts itself for some reason, and you not available, then you´re zwave devices wont be running :frowning: In my opinion, this is a very serious matter.
I had to change my controller settings to be using things files, as it makes it easier to “fix”. But it´s still something I need to do each time I restart openhab.

Thanks for your response, Kim. Ouch!

Actually, that wasn’t it in my case.
It was the way I installed org.eclipse.smarthome.io.transport.serial
It wasn’t the only file needed. In the end, I deleted it from addons, stopped openhab and deleted the /tmp and /cache for the umpteenth time, and then finally in Karaf:

feature:install openhab-transport-serial

After that, suddenly Z-wave 2.5.0 snapshot is working.

That only took ALL &#)(%#¤ DAY.

It’s working now though. Phew. And the next time it won’t be so hard, but holy crap, maybe this procedure could be made a little easier?

1 Like

This should be resolved in…

If you don’t want to use a snapshot, add all of your ports to EXTRA_JAVA_OPTS.

That sounds like trouble. The serial transport is already there, and what you downloaded is probably outdated. After deleting the file, you’ll likely need to clear the cache to get rid of it. In Karaf, run…

feature:install org.openhab.transport.serial

Here is a script (and documentation if you want to do it all manually) for manually installing the zwave binding…

Nope, it does not work even adding all ports to Extra_java_opts. I have been using symlinks for quite some time now, and have never been able to get it to work,
I have not tried with newer builds, as the google cloud seems to be broken.

Best and easist way to get the serial driver installed, is to install zigbee binding from PaperUI, even though you´re not using it… @5iver script might also be an option, but I have never gotten that to work regarding the serial driver.


Thanks for this, @Kim_Andersen

@5iver: feature:install org.openhab.transport.serial doesn’t work, because “Error executing command: No matching features for org.openhab.transport.serial/0”
feature:install openhab.transport.serial works, but it’s volatile. Deleting the cache and tmp folders and the org.eclipse.smarthome.io.transport.serial disappears again, disabling the z-wave binding and taking the entire z-wave network with it.

2019-06-20 12:17:35.149 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.zwave [192]
  Unresolved requirement: Import-Package: org.eclipse.smarthome.io.transport.serial 

Kim’s method (installing the Zigbee binding because it includes openhab.transport.serial as a dependency I guess?) works so far, but I have not yet tried to delete /tmp and /cache again.

Oops… sorry…

Yes, that will happen, since dependencies are not resolved for manually installed bindings. The easiest workaround is to install a binding that has the same dependency, such as the Serial binding. Zigbee works too, unless you end up using it and also install it manually.

1 Like

Makes sense now. Thank you!
Is there a way to declare dependencies manually, the way you can declare bindings manually in addons.cfg?

Unfortunately, no. You could use a kar file (instead of a jar), which include the dependencies, but it looks like they are no longer being built. Something else you can do, which I haven’t tried since I don’t use a repository installation, is to change the repo to the snapshots and use the console to update the binding…

bundle:update org.openhab.binding.zwave

Yet another option is to use the console to pull the binding from the repo…

bundle:update org.openhab.binding.zwave https://openhab.jfrog.io/openhab/online-repo-snapshot/2.5/org/openhab/binding/org.openhab.binding.zwave/2.5.0-SNAPSHOT/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar

When the binding is installed through Karaf, the dependencies will be resolved. However, I’ve only played with this once and don’t know how well this will survive cache clearing. I’ve been meaning to play with this to use in my install script, rather than copying jars to the addons directory.

Edit: I just tried this and that link pulled down an older version of the zwave binding. This one got the latest…

bundle:update org.openhab.binding.zwave 'https://ci.openhab.org/job/openHAB2-Bundles/lastSuccessfulBuild/org.openhab.addons.bundles$org.openhab.binding.zwave/artifact/org.openhab.addons.bundles/org.openhab.binding.zwave/2.5.0-SNAPSHOT/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar'

Edit: It is best not to use the CI server for this… use Bintray…

bundle:update https://openhab.jfrog.io/openhab/online-repo-snapshot/2.5/org/openhab/addons/bundles/org.openhab.binding.zwave/2.5.0-SNAPSHOT/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar
1 Like

Is there any specific reason why org.openhab.transport.serial isn´t installed as default. Even though a user may not be using it?
There seem to be alot of struggle around this, and I my opinion it could have been easily solved just by having the org.openhab.transport.serial installed as default from start.

1 Like

I believe it was needed after 2.4 was released.

That command gives me this error:

Error executing command: Server returned HTTP response code: 403 for URL: https://ci.openhab.org/job/openHAB2-Bundles/lastSuccessfulBuild/org.openhab.addons.bundles$org.openhab.binding.zwave/artifact/org.openhab.addons.bundles/org.openhab.binding.zwave/2.5.0-SNAPSHOT/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar

EDIT: I think this command works. The file date looks correct.

bundle:update org.openhab.binding.zwave 'https://openhab.jfrog.io/openhab/online-repo-snapshot/2.5/org/openhab/addons/bundles/org.openhab.binding.zwave/2.5.0-SNAPSHOT/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar'

Don’t use the CI server… it is not meant for downloads and is not always available, That is what Bintray is for. Use this (I’ll correct the old post)…

bundle:update https://openhab.jfrog.io/openhab/online-repo-snapshot/2.5/org/openhab/addons/bundles/org.openhab.binding.zwave/2.5.0-SNAPSHOT/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar
1 Like

My the way, the command I ran did not seem to find the xstream dependency from 2.4. I doubt using the bintray link would make any difference.

Sorry, I did not realize I was chaining off an old post. O was looking for the one you posted earlier today.

Interesting. I’ll need to try again on 2.4. When I tested it, I did not run into this, but I also did not have a controller in the system. I am surprised that xstream would not have been resolved, but maybe it’s an ESH reintegration thing.

Looks like if 2.4, upgrade to 2.5 or use a manual install. If 2.5, then use bundle:update/install.

I am getting ready to retry now. I have 2.4 installed with the 2.4 zwave binding & a controller.
I will then try the console upgrade again.

EDIT: Nope

Error executing command: Bundle https://openhab.jfrog.io/openhab/online-repo-snapshot/2.5/org/openhab/addons/bundles/org.openhab.binding.zwave/2.5.0-SNAPSHOT/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar does not match any bundle

I think you meant

bundle:update org.openhab.binding.zwave 'https://openhab.jfrog.io/openhab/online-repo-snapshot/2.5/org/openhab/addons/bundles/org.openhab.binding.zwave/2.5.0-SNAPSHOT/org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar'

EDIT2: Cannot resolve dependency

207 │ Installed │  80 │     │ openHAB Add-ons :: Bundles :: ZWave Binding
openhab> bundle:start 207
Error executing command: Error executing command on bundles:
        Error starting bundle 207: Could not resolve module: org.openhab.binding.zwave [207]
  Unresolved requirement: Import-Package: com.thoughtworks.xstream; version="[1.4.0,2.0.0)"

Yes - we don’t install something that the user doesn’t need - it takes memory which may be essential on small systems so the system should only install bundles that it needs. Otherwise you extend your statement to just installing everything even if the user doesn’t require it!