OH2 Z-Wave refactoring and testing... and SECURITY

@whwkins Have you been able to get the Linear GD00Z-4 working with this Security binding for OH2? I’m in the same boat. I just keep hitting brick walls as I get my system expanded, failing to fully get the details I need apparently until things don’t work. :frowning:

This time I knew it wasn’t going to directly work with my garage door as I have a LiftMaster MyQ Security+2.0 opener which has problems working. But I’ve seen 2 workarounds involving simple soldering jobs. I was going to attempt testing the wire connections first before soldering, but it seems I’m only getting a Barrier Position channel as well. If I look at the node attributes, I can see that it does say it’s using Security, but alas no barrier operator channel.

@chris is it that there is just still something missing at this point? I’m contemplating jumping back onto the 1.x binding for now if I can get the lock working and the garage opener working until the 2.0 is ready for prime time. Just sucks having to re-assign all the items. I’d rather not if I don’t have to or if it’s something I can help get working with you, but I have to weight the options.

I have got my GD00Z-4 working. I had to include/exclude a few times to get Security working as expected, though I think a lot of that was because I was impatient and tried to re-include it too quickly when it showed up as an Unknown device. As for my last problem of control of the Barrier Position command class, I figured that out and have control of my garage door now.

Log files have been emailed.

So are you saying perhaps I need to exclude the device and try to include it again? Let it sit and transfer the appropriate details?

When you say control of the Barrier Position class, I assume you meant operator class? As I believe that is the one that allows functional open/close of the door. What needs to be figured out there? That’s the main issue I’m trying to overcome.

Not that I know of - I believe it should include ok (other than the speed issue which I know the problem, but haven’t looked into in detail at the moment to find a solution), but if it’s not working for you then maybe there’s a bug, or maybe it’s something else. It’s really difficult to say without looking at logs - I know that’s always my statement, and it may sound like an excuse, but really without seeing what’s happening, I can only guess.

I would suggest to email any logs though rather than post them publicly ;).

Note that secure inclusion can ONLY occur within the first 20 seconds or so following the inclusion. If it doesn’t work during this time, then it will never work and you need to exclude and re-include the device from the controller.

That is what I would try. I watched the logs on my last attempt and made sure inclusion was complete before trying to do anything else.

Yes, the Barrier Operator class. It’s handled a little bit different from a Lock. It shows up as a number between 0 and 255. For me, the only useful numbers are 0 for CLOSED and 255 for OPEN. I think 254 is OPENING, 253 is STOPPED and 252 is CLOSING, but I don’t see those with my device. For control I have a Switch with a mapping in my sitemap to open/close the garage door:

Switch item=GarageDoorPosition mappings=[0="CLOSED", 255="OPEN"]

It’s no problem, and I work in the IT world, so trust me logs are my life. It’s nothing crazy for me. Though I do have you in my mind as Mr please send me logs! :stuck_out_tongue: j/k I thought it was securely included pretty quickly when I first did it, and I had included it right while it was plugged into my OH install as it was easier to bring it and plug right in next to the server. I’ll have a go at removing and re-including. I’ll run DEBUG level logs as well and kick those out for you to see in case it still fails.

Ya I did notice that it was reporting those weird numbers back. I was expecting a 0/1, but then saw the 255 and had a moment of thinking before trying to close and open again to see the change. Nice to know it has multiple mappings though, I’ll have to watch for those on the bus next time I test it out. I’m going to try and exclude then re-include the device to see if I can’t get the Operator function to work properly again.

On a side note (aka little off topic) - is there a way to create static mappings like what you listed for items that have been added through PaperUI/HABmin? So far I’ve prided myself on trying to keep almost ALL items adding through the GUI vs manual items files.

Hi @chris.

Again, thanks for continually updating and improving the zwave binding! I’m testing the new binding, and noticed a few issues.

Node4 never finishes initializing endpoints.

2017-02-23 10:56:33.352 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1
2017-02-23 10:56:34.072 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1
2017-02-23 10:56:34.770 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1
2017-02-23 10:56:35.503 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1
2017-02-23 10:56:36.372 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1
2017-02-23 10:56:37.123 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1
2017-02-23 10:56:37.818 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1
2017-02-23 10:56:38.541 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1
2017-02-23 10:56:39.259 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 4: Initialising endpoints - version 1

and the zwave Start Frames and Frames Acknowledged are large and continually running up

2017-02-23 10:40:19.404 [ItemStateChangedEvent     ] - zStickSof changed from 1479901 to 1479902
2017-02-23 10:40:19.444 [ItemStateChangedEvent     ] - zStickSof changed from 1479902 to 1479903
2017-02-23 10:40:19.467 [ItemStateChangedEvent     ] - zStickSof changed from 1479903 to 1479904
2017-02-23 10:40:19.507 [ItemStateChangedEvent     ] - zStickAck changed from 493294 to 493295
2017-02-23 10:40:19.516 [ItemStateChangedEvent     ] - zStickSof changed from 1479904 to 1479905
2017-02-23 10:40:19.555 [ItemStateChangedEvent     ] - zStickSof changed from 1479905 to 1479906
2017-02-23 10:40:19.579 [ItemStateChangedEvent     ] - zStickSof changed from 1479906 to 1479907
2017-02-23 10:40:19.612 [ItemStateChangedEvent     ] - zStickAck changed from 493295 to 493296
2017-02-23 10:40:19.618 [ItemStateChangedEvent     ] - zStickSof changed from 1479907 to 1479908
2017-02-23 10:40:19.658 [ItemStateChangedEvent     ] - zStickSof changed from 1479908 to 1479909
2017-02-23 10:40:19.682 [ItemStateChangedEvent     ] - zStickSof changed from 1479909 to 1479910
2017-02-23 10:40:19.712 [ItemStateChangedEvent     ] - zStickAck changed from 493296 to 493297
2017-02-23 10:40:19.719 [ItemStateChangedEvent     ] - zStickSof changed from 1479910 to 1479911
2017-02-23 10:40:19.759 [ItemStateChangedEvent     ] - zStickSof changed from 1479911 to 1479912
2017-02-23 10:40:19.783 [ItemStateChangedEvent     ] - zStickSof changed from 1479912 to 1479913
2017-02-23 10:40:19.817 [ItemStateChangedEvent     ] - zStickAck changed from 493297 to 493298

Many of the channels from my other node never get updated, or get updated erratically even though I set the association group to my zstick.

Anyways, I’ve emailed you both the startup log and a later log.

What is node 4? It looks like it’s using a very old (and unfortunately undocumented / deprecated) command class.

@g_g_rich please download the latest test binding - I’ve fixed a bug that will definitely improve your issue (send more logs if it doesn’t get much further though ;)).

It is an older device.
It’s this: http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/426

I’ll download the new jar and let you know if there is improvement.

The new jar seems to have fixed those issues. The node finished initializing the endpoints and all of the frame starts etc have settled down. Thanks.

One thing though, I can’t do any channel configuration for items ie. change scale from C to F. PaperUI gives a 500 internal server error, and habmin allows it, does not show any error, but the configuration does not change, don’t see anything in the logs.

I assume everything is configured using the GUI and not through text files? I’m not sure what else would prevent that saving - is there anything logged?

I am trying to enable secure communication with a Fibaro Dimmer 2 (FGD-212) - as far as I can determine from their documentation they should support secure zwave? I have set the “Secure Inclusion Mode” to “All Devices” under the serial controller. Am I correct in thinking once working, all comms would be encrypted, and the device should not accept non-encryped attempts to control it?

Starting from a clean OpenHab with this latest binding installed (today), the device will be included but remain as “unknown device” (without any attributes) this continues even after a restart of OpenHab. If I then delete and include again within habmin (without excluding) the device is identified correctly, properly added, and shows with “using security”. On subsequent restarts of Openhab the device is stuck showing “Node Initialising STATIC_VALUES” in habmin (I guess this correlates with the device’s configuration parameters in habmin not reflecting that of the actual device).

Is this relevant in the logs (device is NODE 11)?

2017-02-24 12:38:15.190 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 11: No data from device, but it was ACK’d. Possibly not supported? (Try 5)

I take it the device is not responding causing the process to hang? or is this business as usual?

I’m not sure - this is down to the device. For most devices, it’s probably a correct statement - most devices stop accepting unencrypted commands once securely included.

Probably this is the case, but it’s hard to say without seeing a debug log.

@whwkins - ok as a followup, I think I might see what I’m missing, but want to clarify.

I’ve securely included the Linear GD00Z-4. It shows up in OH properly. But I’m only seeing 1 Channel labeled “Barrier Position”. This channel seems to be the one mapping to the status of the door (aka 0=Closed, 255=Open, etc).

  • Are you seeing more than 1 channel for your device?
  • I was expecting to see 2 channels - 1 for Barrier Position (Open, Close, Opening, etc) and 1 for Barrier Operator to send an Open/Close or On/Off signal to control the door.
  • If only 1 device, then do I need to create a switch mapped as well to Barrier Position with 2 possible mappings?

The device only has one channel defined in the database.

@chris - Ok, I think I’m narrowing down the issue here. I’ll send you a reply to my earlier message with a second set of logs. I do see some security class errors, and I’m noticing 2 different sets of info coming into the DEBUG logs referencing 2 different items that I believe need mappings to a channel.

1 is an Alarm state which is reporting the #(0, 255) that is being translated to the channel (I believe), and the second is a STATE_OPEN/STATE_CLOSED request to process the open/close of the door.

If I’m correct, the COMMAND_CLASS_BARRIER_OPERATOR is the Class containing the open/close commands, and the COMMAND_CLASS_ALARM is the Class containing the value of the door status. Since I know you may not have one of these devices, I’ll outline that there are functionally 2 working parts - 1 is the sensor on the door for open/close status, which I believe is mapped to the ALARM, and 1 is the actual relay part which I believe sends the low voltage on/off trigger to the Garage Door controller to actuate the opening/closing of the door which is mapped (again my guess) to the BARRIER_OPERATOR class.

EDIT: It seems perhaps these 2 items are in tandem? I’m hoping @whwkins can help shed some light on how he has this configured successfully so I can attempt to emulate and validate.

Ok - that’s fine. I see that there are alarms supported that aren’t linked to channels, so the database may not be fully defined…[quote=“shawnmix, post:309, topic:21653”]
and the COMMAND_CLASS_ALARM is the Class containing the value of the door status

This may be right, but it is also defined by the barrier command class. The alarm class may also provide events, but I would not use them - I would stick to using the barrier since linking an alarm to another item will not be simple. You want a single item on your UI that shows the state of the gate/door, and can also be controlled. So, it should (I think) be the same as a switch - you want to be able to show its state as ON/OFF, but also to turn it on and off. You don’t want a button to turn it on and off, but an alarm when someone manually changes it (at least that’s what I would expect).

The barrier command class defines the states as follows -:

        STATE_CLOSED(0x00, "Closed"),
        STATE_CLOSING(0xFC, "Closing"),
        STATE_OPENED(0xFF, "Open"),
        STATE_OPENING(0xFE, "Opening"),
        STATE_STOPPED(0xFD, "Stopped");

Thanks, I’ll take a look this afternoon then and see if I can define this properly. When I initially set it up with HABmin, it seemed to want to put it as a contact sensor type. So that’s what threw me off initially. re-reading @whwkins message, it seems perhaps that is what he was describing setting up as well as a single item. I for some reason expected 2 channels.

I’ll test this afternoon and see if I can get some more positive results and respond appropriately (hopefully on a successful) working garage opener.

Thanks for the help as always and sorry to hijack and throw a bunch of info here. Hopefully it can help someone else stuck in the same boat/thought process as I. :slight_smile: