lock-manager icon indicating copy to clipboard operation
lock-manager copied to clipboard

Yale YRD446 not displaying whose PIN was entered on the keypad (+fix)

Open mrmoorey opened this issue 7 years ago • 1 comments

Hi there,

Congratulations on an awesome app. I'm using a YRD446 and noticed that when I tested users entering their PIN codes it was showing code 99 for all of them.

The event from the lock when a user enters a code is payload: 00 71 05 13 01 00 FF 06 06 04 63 03 01 01 00

When I looked at def zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport cmd) in conjunction with the documentation here http://www.cd-jackson.com/zwave_device_uploads/624/Yale-Real-Living-ZWave-Plus-System-Integrators-Guide-YRL-deadbolts-Rev-4.pdf, I noticed the function matches two aspects of the Yale implementation:

  1. cmd.zwaveAlarmType = 0x06 and cmd.zwaveAlarmEvent = 0x06
  2. cmd.alarmType = 0x13, with cmd.zwaveAlarmType = 0x06 and cmd.zwaveAlarmEvent = 0x06

For my lock, it chooses path 1), which goes on to use cmd.eventParameter[0] for the slot number. This does not allow the SmartApp Lock codeUsed() to find the user.

I changed the device handler at line 200 to have the following in my local implementation:

  	case 6:
        	/* Added by Alan Moore for handling YRD446 */
            if(cmd.alarmType == 19) {
  	    	if (cmd.alarmLevel) {
  				map.descriptionText = "$device.displayName was unlocked with code $cmd.alarmLevel"
  				map.data = [ usedCode: cmd.alarmLevel ]
  			}
            } /* Original code */
  		else if (cmd.eventParameter) {
  			map.descriptionText = "$device.displayName was unlocked with code ${cmd.eventParameter.first()}"
  			map.data = [ usedCode: cmd.eventParameter[0] ]
  		}
  		break

The lock handler now correctly reports the end user name. Please let me know if you need further information.

Regards,

Alan

mrmoorey avatar Mar 01 '18 01:03 mrmoorey

Thanks for this fix!! I believe that SmartThings have addressed this issue in their most recent DeviceHandler.

LockManager 2.0 is going to start using the updated DTH from SmartThings. Actually, the custom DTH is no longer needed.

I THINK the new default DTH includes this fix.

https://github.com/ethayer/lock-manager/tree/beta-2

If you get a change to use the beta, let me know if this is still a problem. If it is, I'll include this logic in the new optional DTH for Yale.

I'm planning on releasing this beta branch as the master version soon, I just have to get around to making an install guide for it.

ethayer avatar Mar 05 '18 02:03 ethayer