Schlage Lock Not returning Code number - in Canada


#1

1) Give a description of the problem
I have four codes programmed into my Z-Wave Plus lock BE469ZP. When I use any of the PIN the lock cannot identify the user with the PIN entered.
Is there a way for me to get the correct identifier?

2) What is the expected behaviour?

  1. Dad - PIN - 1234 (when unlocked using PIN 1234 should be identified as #0
  2. Brother - PIN - 2468 (when unlocked using PIN 1234 should be identifed as #1
  3. Siva - PIN - 2268 (when unlocked using PIN 1234 should be identifed as #2
  4. Arun - PIN - 5268 (when unlocked using PIN 1234 should be identifed as #3

“Front Door’s Lock #3 gets unlocked” should return True when PIN 5268 pressed on the lock.

3) What is happening/not happening?
I get 0 or 1 when the lock is unlocked and the same when the lock is locked. No consistent result. I installed a device hander to see whether it resolves the problem. I deleted the lock and re-added to ST. I started the simulator on the ST “My device handler” and clicked on simulation and picked the physical lock (not virtual). I could see the correct indentifier on the log. I am sending you that log below as well. Is there a way for me to get the correct identifier?

https://raw.githubusercontent.com/SmartThingsCommunity/SmartThingsPublic/master/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy

7:08:24 PM: info [DTH] parse() - returning result=[[name:lock, value:locked, descriptionText:Locked by "Code 2", data:[codeId:2, usedCode:2, codeName:Code 2, method:keypad, lockName:Front Door], linkText:Front Door, isStateChange:true, displayed:true]]

7:08:24 PM: debug [DTH] zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport) returning with result = [[name:lock, value:locked, descriptionText:Locked by "Code 2", data:[codeId:2, usedCode:2, codeName:Code 2, method:keypad, lockName:Front Door], linkText:Front Door, isStateChange:true, displayed:true]]

7:08:24 PM: trace [DTH] Executing ‘handleAccessAlarmReport’ with cmd = AlarmReport(eventParameter: [2], numberOfEventParameters: 1, zensorNetSourceNodeId: 0, zwaveAlarmType: 6, alarmLevel: 2, zwaveAlarmStatus: 255, zwaveAlarmEvent: 5, alarmType: 18)

7:08:24 PM: trace [DTH] Executing ‘zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport)’ with cmd = AlarmReport(eventParameter: [2], numberOfEventParameters: 1, zensorNetSourceNodeId: 0, zwaveAlarmType: 6, alarmLevel: 2, zwaveAlarmStatus: 255, zwaveAlarmEvent: 5, alarmType: 18)

7:08:24 PM: trace [DTH] Executing ‘parse(String description)’ for device Front Door with description = zw device: 0E, command: 7105, payload: 12 02 00 FF 06 05 01 02

7:07:58 PM: info [DTH] parse() - returning result=[name:lock, data:[lockName:Front Door], value:unlocked, descriptionText:Unlocked, linkText:Front Door, isStateChange:false, displayed:false]

7:07:58 PM: trace [DTH] Executing ‘zwaveEvent(DoorLockOperationReport)’ with cmd = DoorLockOperationReport(lockTimeoutMinutes: 254, doorLockMode: 0, insideDoorHandlesMode: 0, doorCondition: 2, outsideDoorHandlesMode: 0, lockTimeoutSeconds: 254)

7:07:58 PM: trace [DTH] Executing ‘parse(String description)’ for device Front Door with description = zw device: 0E, command: 6203, payload: 00 00 02 FE FE

7:07:58 PM: info [DTH] parse() - returning result=[[name:lock, value:unlocked, descriptionText:Unlocked by "Code 4", data:[codeId:4, usedCode:4, codeName:Code 4, method:keypad, lockName:Front Door], linkText:Front Door, isStateChange:true, displayed:true]]

7:07:58 PM: debug [DTH] zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport) returning with result = [[name:lock, value:unlocked, descriptionText:Unlocked by "Code 4", data:[codeId:4, usedCode:4, codeName:Code 4, method:keypad, lockName:Front Door], linkText:Front Door, isStateChange:true, displayed:true]]

Can I get the correct identifier from the device handler? I dont know whether I am using the device handler correctly.

**4) Post a Green Snapshot of the piston![image|45x37]


(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
9/2/2020, 7:08:25 PM +642ms
+3ms ╔Received event [Front Door].lock = locked with a delay of 1245ms
+1078ms ║RunTime Analysis CS > 1013ms > PS > 27ms > PE > 38ms > CE
+1081ms ║Runtime (43896 bytes) successfully initialized in 27ms (v0.3.110.20191009) (1076ms)
+1082ms ║╔Execution stage started
+1103ms ║║Comparison (enum) locked gets (string) locked = false (9ms)
+1105ms ║║Condition #4 evaluated false (15ms)
+1107ms ║║Condition group #1 evaluated false (state did not change) (17ms)
+1112ms ║║Comparison (enum) locked gets (string) unlocked = false (1ms)
+1114ms ║║Condition #5 evaluated false (5ms)
+1115ms ║║Condition group #2 evaluated false (state did not change) (6ms)
+1119ms ║║Comparison (enum) locked gets (string) unlocked = false (1ms)
+1121ms ║║Condition #8 evaluated false (5ms)
+1122ms ║║Condition group #3 evaluated false (state did not change) (6ms)
+1127ms ║║Comparison (enum) locked gets (string) locked = false (0ms)
+1128ms ║║Condition #14 evaluated false (5ms)
+1131ms ║║Condition group #13 evaluated false (state did not change) (8ms)
+1136ms ║║Comparison (enum) locked gets (string) unlocked = false (1ms)
+1141ms ║║Condition #20 evaluated false (9ms)
+1144ms ║║Condition group #17 evaluated false (state did not change) (11ms)
+1155ms ║║Comparison (enum) locked gets (string) unlocked = false (1ms)
+1157ms ║║Condition #23 evaluated false (6ms)
+1158ms ║║Condition group #18 evaluated false (state did not change) (8ms)
+1163ms ║║Comparison (enum) locked gets (string) locked = true (1ms)
+1164ms ║║Cancelling condition #26’s schedules…
+1165ms ║║Condition #26 evaluated true (6ms)
+1167ms ║║Cancelling condition #19’s schedules…
+1168ms ║║Condition group #19 evaluated true (state changed) (8ms)
+1170ms ║║Cancelling statement #27’s schedules…
+1184ms ║║lock 2
+1186ms ║║Executed virtual command log (1ms)
+1190ms ║║Cancelling statement #29’s schedules…
+1205ms ║║Scanning
+1206ms ║║Executed virtual command [Front Door].log (2ms)
+1221ms ║╚Execution stage complete. (139ms)
+1222ms ╚Event processed successfully (1222ms)
9/2/2020, 7:07:59 PM +810ms
+3ms ╔Received event [Front Door].lock = unlocked with a delay of 3069ms
+996ms ║RunTime Analysis CS > 937ms > PS > 24ms > PE > 35ms > CE
+999ms ║Runtime (43890 bytes) successfully initialized in 24ms (v0.3.110.20191009) (993ms)
+1000ms ║╔Execution stage started
+1012ms ║║Comparison (enum) unlocked gets (string) locked = false (1ms)
+1014ms ║║Condition #4 evaluated false (7ms)
+1015ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+1026ms ║║Comparison (enum) unlocked gets (string) unlocked = false (8ms)
+1028ms ║║Condition #5 evaluated false (11ms)
+1029ms ║║Condition group #2 evaluated false (state did not change) (12ms)
+1033ms ║║Comparison (enum) unlocked gets (string) unlocked = false (0ms)
+1034ms ║║Condition #8 evaluated false (4ms)
+1035ms ║║Condition group #3 evaluated false (state did not change) (6ms)
+1039ms ║║Comparison (enum) unlocked gets (string) locked = false (0ms)
+1040ms ║║Cancelling condition #14’s schedules…
+1041ms ║║Condition #14 evaluated false (5ms)
+1042ms ║║Cancelling condition #13’s schedules…
+1043ms ║║Condition group #13 evaluated false (state changed) (7ms)
+1048ms ║║Comparison (enum) unlocked gets (string) unlocked = false (1ms)
+1049ms ║║Condition #20 evaluated false (5ms)
+1050ms ║║Condition group #17 evaluated false (state did not change) (6ms)
+1055ms ║║Comparison (enum) unlocked gets (string) unlocked = false (1ms)
+1056ms ║║Cancelling condition #23’s schedules…
+1057ms ║║Condition #23 evaluated false (6ms)
+1058ms ║║Cancelling condition #18’s schedules…
+1059ms ║║Condition group #18 evaluated false (state changed) (8ms)
+1063ms ║║Comparison (enum) unlocked gets (string) locked = false (1ms)
+1064ms ║║Condition #26 evaluated false (4ms)
+1065ms ║║Condition group #19 evaluated false (state did not change) (5ms)
+1068ms ║║Cancelling statement #29’s schedules…
+1088ms ║║Scanning
+1089ms ║║Executed virtual command [Front Door].log (1ms)
+1103ms ║╚Execution stage complete. (104ms)
+1105ms ╚Event processed successfully (1105ms)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

If I am understanding your piston correctly, then why not eliminate all of the ELSE statements and make all of your statements IF statements…

IF lock 1's lock #0 gets locked
  Then
    Do Stuff

IF lock 1's lock #0 gets unlocked
  THEN
    Do Stuff

Nested Else statements can get messy and difficult to debug.


#3

I would take a few minutes and read some of the other posts here on Schlage locks.
(This post, as well as a few others)


#4

The issue here is I am not able to find who has arrived home by using the PIN. The Webgate event (see snapshot) reports 0, 1 or 2 but doesn’t seem to follow a logic. I cannot say 0 mean PIN 1234 (DAD) or 1 mean PIN 2468 (Brother). It is only accurate enough to say the door is locked or unlocked. I could see the ST device handler receive the correct consistant identifier but the webgate doesn’t seem to get it. Any help is appreciated.


#5

Thank you, Please let me know if you need anything. ST device handler log shows (debug) code 4 and code 2. But webgate is getting valve 1 without any pattern or logic.


#6

The first link above shows you how to parse that number, so you can do different things depending on what it is.

Some of the 2nd link demonstrates alternative versions of this.


#7

WCmore. Thanks for your quick reply. You Nailed it. I am able to identify the user by the PIN number entered. The Structure on the 2nd link is perfect. I built on top of it. I corrected a few things based on my requirement.

. This works for Schlage Lock users from Canada. ST app seem to be different for customers from USA and Canada. ST tech support didn’t help us but webcore did. I will make a donation for WebCore soon…


#8

Sweet! Glad it helped!

Thanks for coming back to update us…