Report Unlock code used

lock

#21

I think my lock has a tamper on it but have to set it manually from the lock and im not sure if that would matter or not


#22

I’m a little late to this thread but here goes.

I have a Schalge BE469 Z-Wave lock. My end goal was to know who came in the front door so I could turn on the appropriate lights when guests came in after close up. We run a small B&B hotel. I started with the Piston from @Dan_Fox and started to make some adjustments. It did not account for empty slots when a code is deleted and I was getting errors in the array. So I added that and then spent 3 days beating my head on the wall, because it was not reliable. I also did away with the array as I discovered I could get the same data from the $args and I don’t really need the String array for any further processing. Then I finally realized that the problem is always when Code 1 is used. Code 0 as discussed, is for any manual unlock (would be nice to know the difference between a key on the outside and the thumb latch on the inside…but I digress). My personal access code happened to be in Slot 1 and the piston worked fine with everyone but me. You can ignore the Push notifications. I will clean them up later. I finally deleted my code and put one of the default codes back in Slot 1 and then re-added myself. So now the DefaultA code in Slot 1 has the problem.

Notice that Unlocked By = null…It should have been DefaultA

I wrote another short piston to:
On Lock events:
Log info to Console

It actually shows the correct name:

image

So what gives??? I originally had UnlockedBy defined as String but changed it to Dynamic and the result was the same. So why does logging to console show it correctly but when pulling the same $arg.codeName in my piston it comes in as “null”.

The lock actually has 2 default codes if you do a factory reset but they were cleared before when I was playing with another lock SmartApp and DTH. I manually added one of them back in after deleting my own personal code. So is there something special about this slot? What am I missing.

Thanks all.