Testing Z-Wave binding on openHAB-2

OK, I did a uninstall…
and the log is cleaner, but there’s still no items;

17:26:28.763 [DEBUG] [org.openhab.binding.zwave ] - BundleEvent STARTING - org.openhab.binding.zwave 17:26:28.764 [DEBUG] [inding.zwave.internal.ZWaveActivator] - ZWave binding started. Version 17:26:28.766 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.zwave.internal.ZWaveHandlerFactory, component.id=177, service.id=297, service.bundleid=188, service.scope=bundle} - org.openhab.binding.zwave 17:26:28.780 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.ConfigOptionProvider, org.eclipse.smarthome.config.core.ConfigDescriptionProvider}={component.name=org.openhab.binding.zwave.ConfigDescription, component.id=178, service.id=298, service.bundleid=188, service.scope=bundle} - org.openhab.binding.zwave 17:26:28.780 [DEBUG] [org.openhab.binding.zwave ] - BundleEvent STARTED - org.openhab.binding.zwave

The running list now has;
185 | Resolved | 80 | | HABmin User Interface 187 | Resolved | 80 | | openHAB Serial Transport Bundle 188 | Resolved | 80 | | ZWave Binding

Resolved means it’s not running, but all dependancies are resolved… So, try “start 188”.

I should also add, that the binding doesn’t currently re-initialise after you set the COM port, so you might for now need to “stop 188”, then “start 188” after setting the COM port (I know you’ve not got that far yet, but thought I’d mention it…).

I went away and took a shower, when I came back the three came up as “Active”. Guess I was too quick to list the first time.
However, in the shower, I thought about the fact that the first version from this morning came up as “Installed”. Maybe that was just because of the conflict though.

Does the version number look about alright?

I restarted oh2 once again, to see if there was any changes, but no.

If you want to see if others are more successful, I understand! Maybe it is something with my oh2 after all. I have only hue, mqtt, and sonos running on it currently, so it is safe to say that I’m a beginner.

I think that’s normal - you can have two installed versions, but you can’t have two active versions…

Yes - it’s the one I compiled this afternoon…

Now that the binding is running, do you still have the same situation where the list doesn’t show any things listed? I guess you also reloaded HABmin (?) - if you look in the Bindings Configuration page, do you also see ZWave listed there, and if you click on ZWave, do you get the description displayed? (just checking that the binding is really running ok).

I hope to try and contribute to the testing, but not sure how to proceed. Currently I am using an Aeotec USB zwave controller with OH1, but…

For OH2, and to avoid conflicts I have a spare ZME-UZB1 stick as well. And also, OH1 and OH2 are running on separate Ubuntu Server VM’s.

So far, I have.

  1. Added/replaced the JAR files and restarted OH2.
  2. In Habmin, I added the Zwave Controller, and then also found to configure that item and assignged the port to “/dev/ttyACM0”

But as I’m not familiar with the ZME-UZB1 controller, I don’t know how to add devices to it. If I can figure that out, I can try and move a few devices off of my Aeotec and OH1 over to the ZME and OH2 to keep trying to test and learn.

Any thoughts?

Yes, I am always restarting oh2 every time, and also start web browser from localhost:8080/ every time.
And, Yes, in the bindings page, I get zwave and the description. Everything looks good.

If you start device discovery for Z-Wave (in HABmin, in the Thing Configuration page, click on the search icon in the top nav bar and select Z-Wave) this will put the stick into inclusion mode (well, I think so anyway - it’s been a while since I tested this!). It will stay in inclusion mode for 30 seconds, or until it finds the first device…

1 Like

Strange - I see from the post from @ptmuldoon that he has managed to get the controller ‘thing’ installed ok… I’m not sure what else to suggest. I guess there are no exceptions in the log?

No, not in the karaf log. There’s some http errors that has been around for a while, and the odd sonos parsing error, and MyOpenHABClient which is understandable, since I haven’t configured myopenhab.

OK, so I have one exception which came up after clicking around in habmin, is it related? To me it looks like Sonos plugin…

18:19:03.388 [WARN ] [org.eclipse.jetty.server.Response   ] - Committed before 501 Method NOTIFY is not defined in RFC 2068 and is not supported by the Servlet API 
18:19:03.392 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /upnpcallback/dev/RINCON_000E5810B0AE01400_MR/svc/upnp-org/AVTransport/event/cb
java.lang.IllegalStateException: Committed
        at org.eclipse.jetty.server.Response.resetBuffer(Response.java:1253)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.Response.sendError(Response.java:567)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:732)[18:javax.servlet-api:3.1.0]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[18:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[71:org.eclipse.jetty.servlet:9.2.10.v20150310]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[71:org.eclipse.jetty.servlet:9.2.10.v20150310]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[135:org.ops4j.pax.web.pax-web-jetty:4.2.3]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:595)[69:org.eclipse.jetty.security:9.2.10.v20150310]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[135:org.ops4j.pax.web.pax-web-jetty:4.2.3]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[71:org.eclipse.jetty.servlet:9.2.10.v20150310]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:99)[135:org.ops4j.pax.web.pax-web-jetty:4.2.3]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.Server.handleAsync(Server.java:553)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:261)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[73:org.eclipse.jetty.util:9.2.10.v20150310]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[73:org.eclipse.jetty.util:9.2.10.v20150310]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_66]
18:19:03.397 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - 
java.lang.IllegalStateException: committed
        at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:772)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:781)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.HttpChannel.handleException(HttpChannel.java:472)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.HttpConnection$HttpChannelOverHttp.handleException(HttpConnection.java:576)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:398)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:261)[70:org.eclipse.jetty.server:9.2.10.v20150310]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[73:org.eclipse.jetty.util:9.2.10.v20150310]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[73:org.eclipse.jetty.util:9.2.10.v20150310]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_66]
18:19:03.399 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - Unexpected thread death: org.eclipse.jetty.util.thread.QueuedThreadPool$3@2980c4bc in qtp1498926427{STARTED,2<=16<=20,i=5,q=0}

I don’t think it’s related - I’m not sure what it is except it seems to be related to upnp which shouldn’t be anything to do with Z-Wave or HABmin.

@vespaman Some of the steps I took are.

  1. First make sure in the PaperUI you have uninstalled the Zwave 1.9 binding if it showing as I think manually adding the 2.0 JAR in your addons may give a few errors in your log such as the dev/tty0 device already in use, etc.

  2. I also have a zwave.cfg file in my conf\services location pointing to the correct port. For me that is port= /dev/ttyACM0, but that may not be needed anymore>. Then after a restart, and using Habmin only (not the paperUI), I added my zwave controller. Then after that was added as an item, I also then found the ‘parameters’ for the device and again added my correct port info.

For me currently, I am seeing only 1 error in the log of an Node 2 is dead error and everything else looks good. Except I’m still struggling to actually add a device to the controller in habmin. I removed one device from my OH1 install/stick but can’t get this ZME-UZB1 stick to find anything after putting it into inclusion mode.

The switch is about 15 feed away from the PC/Controller, but that should be close enough (and I really can’t move it either)

I see this in the events log as well. Does this mean the device is actually in inclusion/discovery mode?

2016-02-14 13:39:28.959 [ItemStateChangedEvent     ] - zwave_serial_zstick_152e09d16e6_serial_ack changed from 29 to 30
2016-02-14 13:39:29.109 [ItemStateChangedEvent     ] - zwave_serial_zstick_152e09d16e6_serial_sof changed from 37 to 38
2016-02-14 13:39:29.132 [ItemStateChangedEvent     ] - zwave_serial_zstick_152e09d16e6_serial_ack changed from 30 to 31
2016-02-14 13:39:29.135 [ItemStateChangedEvent     ] - zwave_serial_zstick_152e09d16e6_serial_sof changed from 38 to 39
2016-02-14 13:39:59.551 [ItemStateChangedEvent     ] - zwave_serial_zstick_152e09d16e6_serial_ack changed from 31 to 32
2016-02-14 13:39:59.701 [ItemStateChangedEvent     ] - zwave_serial_zstick_152e09d16e6_serial_sof changed from 39 to 40

No - this is just the channel data being updated for the controller status counters. I might need to change the way this works at some stage since I’m sure someone will complain it’s updating too often :wink:

@ptmuldoon Thanks for descibing your steps - I tried to add the config file as per your suggestions, however that did not make any difference.
I never run the 1.9 z-wave, maybe that is what is setting me apart? The other thing I am thinking, is that maybe I have some broken setting from the installation from this morning. Since I have nothing in the logs, I think I need to start oh2 installation from scratch, to see if it makes any difference. It just stays silent.

One thing I have noted is that I get “Internal error” (500) in paper ui/things configuration whenever the three zwave related jar are started, so there’s something fishy here.

Now I have stopped each of the three, and it is zwave binding that is making the internal error, as soon as it is started (active), I get problems in paper ui.

Sorry - I missed this comment earlier - the config file isn’t used…

I’ve also never run the 1.9 binding in my system, so I don’t think this will make any difference - generally, everything is independent between the two versions.

some things I saw and some questions:

  • from paper UI I could add the zwave stick as at thing but once I was editing the port I couldnt save that
  • to set the port I had to go to habmin and add the port there
  • a restart of openhab was nenessary for me to get the zwave stick from initializing to online in paper ui

now the stick is shown as ONLINE in paper ui…
shouldnt I see the Node 1 in HAbmin -> Tools? I see nothing there :frowning:

I think I’m making some further progress (while working around a crazy 5 year old in the house).

I went and moved my ZME-UZB1 over to a windows laptop with OH2.

After installing the Windows driver and after identifying the correct Com port, I started up OH2. First thing again was to set the correct port (in my case com4).

I think again put the device in inclusion mode. This time as I am right next to the usb device I could confirm the light came on searching.

And it does appear to have found and added the device. In Habmin, in the top right the ‘number’ increased and I see something like Node 3.

But also in Habmin, that Node 3 does not show up under ‘Thing Configuration’

However, in the PaperUI, under the Setup Wizard, I do see a ‘Unknown Node 3’ as well.

I’m going to continue now in a few to try and add that item to a sitemap and control it.

No - it won’t. The list in the top right of HABmin is just the inbox. You need to click the ADD button below the Node 3 line. Once you click on this ADD button, then it should show up in the Thing Configuration. This is the same concept as in PaperUI (but a different presentation).

I don’t use PaperUI myself, so can’t comment too much. However, until recently PaperUI didn’t support configuration updates “properly” (it used a method to completely update and restart the device). I think I saw some merges recently that this has now been fixed, so maybe if you use the latest version it might work (no guarantees though since I don’t use it here).

Yes - I mentioned this above. This is something I need to resolve in the binding - it’s nothing to do with the UI.

Hmmm - I’m not sure what you’re looking for. The only thing in the tools menu is the log viewer…

However, the controller won’t show up as a device - the Z-Wave Serial Controller thing is a proxy for the controller.