Unknown Z-Wave device: How to proceed?

Tags: #<Tag:0x00007fc3f9784208>

Interestingly, there is another device with the same issue… Myself and @TimScottz8 have been discussing off list the MCO MH8-FC. This seems to have done the same thing - ie there is a newer version that is ZWave Plus, and contains similar parameters to the PM2.5 we were discussing earlier.

Currently Tim has updated the old database entry, but I think we probably should take the same approach as we did above with the PM2.5 as the version Tim has is the Plus version -:

http://manuals-backend.z-wave.info/make.php?lang=en&sku=MCOEMH8-FC&cert=

I wanted to move this discussion onto the forum so there’s a record of what/why we’ve done this :slight_smile:

@sihui how did you differentiate the devices earlier - was it just with the firmware versions? I think we should do the same here…

1 Like

Yes, looks like exact the same issue.

Yes.

Would be great to have the xml as a starting poiint :sunglasses:
If it is not available I could add them manually … tomorrow :grinning:

Arghhhh, did it again: unfortunately I hit the “Export” button, sorry … :sunglasses:

Done:
non plus device:
https://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/336

plus device:
https://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/1057

Added a comment to this post as reference, omitted the “Export” this time :grinning:
As I don’t know the device type and id you were talking about I added them all, please remove if necessary.

2 Likes

Thanks @sihui I’ve now merged this all in to the binding…

Fantastic (and quick) work, guys!

So… here’s a stupid question. What do I have to do to get the new binding?
I’m brand new to openhab, running 2.4 release. I have never updated yet. Any guide / recommendations?
I’ve already backed up my entire SSD just in case… I definitely do not want to lose my setup.

Uninstall the old zwave binding, download the 2.5 snapshot zwave binding, place it in your addons folder. (this question is asked at least twice a week, so you may find more details through the forum search button).

1 Like

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 “2.5.0.201906161432”

!!!

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?

///Leif

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:
org.eclipse.smarthome.io.transport.serial

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?

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.

2 Likes

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'
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