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

Alarm General is just giving me an On/Off vs what the issue is.

Sure - I know what they do. My question is do you want both channels or will just the alarm_number be enough?

Sorry, misunderstood and thought you were asking the opposite ( if alarm General was enough) Yes, would be happy with just alarm_number.

Ok - Iā€™ll update the database with this. Iā€™ll do an update shortly (ie in around 5 minutes).

Note to all - pay careful attention to notifications (ie alarms) - Iā€™ve changed the way notifications are defined so that it reduces reliance on the database. This should make things work better, and will mean database entries that havenā€™t been configured for notifications now shouldnā€™t need to be, however, with the change comes the possibility Iā€™ve messed something up.

All my unit tests pass, so I donā€™t anticipate problems with standard sensors (door, smoke, heatā€¦) but more obscure notifications might have a problem if Iā€™ve not defined them in the binding. If you have a problem, please send me the log of the sensor receive message.

OK,

I noticed in the xml (https://github.com/openhab/org.openhab.binding.zwave/blob/development/ESH-INF/thing/idlock_idl101_0_0.xml) for my lock that alarm_number is OnOffType. But with your last change (less dependent on the database) I assume this wouldnā€™t matter?

 <channel id="alarm_number" typeId="alarm_number">
        <label>Alarm (number)</label>
        <properties>
          <property name="binding:*:OnOffType">COMMAND_CLASS_ALARM</property>
</properties>

Thanks - thats a database issue - Iā€™ll update that now although I think with the version Iā€™ve just loaded a few minutes ago, this shouldnā€™t matter now. (let me know :wink: ).

1 Like

Just loaded the jar from the url again, but still the same with reg. to OnOffType for alarm_number

Hmmm - strange. I just ran another test here and it seems to return a DecimalType in the the unit tests. Can you send me over the log again please?

I have a Schlage BE469 and Iā€™m having a hard time getting it to show up as a secured device.
When I run OZWCP on the same server, using the same controller (Aeotec z-Stick S2) I can see the battery level and I can remotely lock and unlock the device, so I believe that means the secure inclusion was done correctly.
When I switch to OH2, the device shows up, but it doesnā€™t show up as secured. I cut and pasted the security key from the OZWCP options.xml file into the controller network settings, so I assume it is correct. Iā€™m using the 2.1.0.201704151149 version of the binding, but have been having the same problem with a number of generations of the binding.
What else am I missing?

I uploaded the zwave log to the zwave log viewer. Iā€™m not sure what Iā€™m looking at there or what to expect, but I do notice the following for BE469 node:
18:12:32.255 2 Stage advanced to FAILED_CHECK
ā€¦
18:12:32.316 2 TX REQ IsFailedNodeID Check if NODE 2 is failed
18:12:32.319 RX ACK
18:12:32.322 2 RX RES IsFailedNodeID NODE 2 is marked as HEALTHY by controller.

Thanks,
Bart

Please open a ticket on my website and provide the debug log (note you need to be logged in). Iā€™m not sure it will show much other than the failure of the secure messages, which probably indicates the security key is incorrect, but Iā€™ll take a look.

Why not just do the inclusion with OH?

That looks fine - perfectly normal.

Thanks Chris, I opened a ticket and updated the zwave log.

I tried with just OH2 to start with but wasnā€™t getting anywhere. I decided to try OZWCP to get more diagnostic information and to assure the inclusion process was working for my setup (hardware, distance, etc.).

I had a quick look at your log, and it looks like itā€™s working - the log shows that the device sent the battery level - all securely.

Chris, thanks for the quick response.
This is what it shows in Habmin:

I assume the red x by the Using Security means something is not quite correct yet.

One thing I note in your log is that the log doesnā€™t do the initialisation. So, maybe something didnā€™t work properly initially, and it things itā€™s not secure - but Iā€™m pretty sure this is wrong based on the fact that the device sent a secure message backā€¦

Iā€™d suggest to delete the node2.xml file from the userdata/zwave folder and restart the binding and send me the log again if itā€™s not showing up with a tick in the security box next time.

I did a restart after installing the latest snapshot and now Iā€™m getting the dreaded canā€™t find serial port error. I didnā€™t change anything else in my system and have tried a full reboot. Thoughts?

Here is my debug log:

2017-04-15 15:34:20.381 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update port to /dev/ttyACM0
2017-04-15 15:34:20.396 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
2017-04-15 15:34:20.397 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Initializing ZWave serial controller.
2017-04-15 15:34:20.410 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initializing ZWave Controller zwave:serial_zstick:15aac39433e.
2017-04-15 15:34:20.411 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Scheduling network mesh heal for 11 hours time.
2017-04-15 15:34:20.414 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Controller status changed to OFFLINE.
2017-04-15 15:34:20.414 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 43: Controller status changed to OFFLINE.
2017-04-15 15:34:20.415 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'
2017-04-15 15:34:20.416 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 44: Controller is not online.
2017-04-15 15:34:20.416 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 41: Controller status changed to OFFLINE.

Chris, my BE469 shows up as secured now.
For the record, what I did:

  • Delete the Things for the all the zwave nodes from habmin
  • Shut down OH2
  • I had one device that wasnā€™t powered on, so I finished its physical install and powered it on
  • removed the zwave .xml files.
  • Started OZWCP to be sure the devices all looked good (sorry :slight_smile: )
  • Started OH2 and added all the devices back in. It took some time before it recognized the lock for what it was, but now it shows as Using Security

I suspect I might have been too impatient before and cycled OH2 before it had completed fully initializing the device.

Thanks again for your help and thanks for all the work you do to make this binding work.
Bart

Is there anyway to turn on reporting of user codes used to unlock a lock?

I think the first few times I had tried, I was just impatient. Then I unpaired, made sure there was no trace of the device (no old/lingering xml files) and paired and let it do itā€™s thing. Just had to be patient.

With the current alarm_number channel, I donā€™t think there is. On the Kwikset (that I have) and the Yale (Iā€™ve seen documentation for), they report alarm 19 with a value of the user code that is used. As we just have access to the alarm number and not the value, I donā€™t think we can report the user code used also.

I updated earlier today. Had an issue with maven and compiling tests. It wasnā€™t the most helpful in determining the issue, so I ignored them. Installed the new jar and the the new alarm_number channel seems to work well. I have a set of rules to report locks/unlocks via push notifications. Iā€™ll get a virtual switch setup for the lock and work on some a rule to handle updating the virtual switch. Once I do Iā€™ll start a new thread with it and post a link here.

Thanks for all your work on this @chris .

Thanks. I guess we need to walk before we run. Is your Kwikset working correctly with the new binding? Mine is inverted from how I would expect it to work (i.e. ā€œOnā€ = Unlocked and ā€œOffā€ = locked).

Also, where did you find the reference list of Alarm ID #'s to what they mean?

Thanks,