kwikset unlock notification only if pin code not used

Need some help here with notifications of door unlock when no pin is used. For example if it’s unlocked from the inside mostly since I don’t give out keys.

I have notifications for each user that unlocks the door. But just so I can see when they unlock from the inside I have notifications showing any time the door is unlocked… Well this causes a problem when they unlock from outside now I get a double notification of unlocked and a certain pin unlocked. I’m trying to get the unlock to only send a notification if the keypad hasn’t been used.

Anyone have a way to make this work?

You might try the following as I don’t monitor my locks (if manually unlocked) this way and haven’t tested. Let’s assume you consolidated the scenes into one. This scene would trigger off the door being unlocked, then use LUA code (call a function) to check the UserName. I’m guessing IF a PIN wasn’t used then the name should return a null - so check for that with conditional logic. So in short, if the name is not null then notify you that ‘Henry has unlocked the front door’ ELSE ‘The front door was manually unlocked’.

function userName()
	user = luup.variable_get("urn:micasaverde-com:serviceId:DoorLock1","sl_UserCode", kwkst_devId)
	name = user:match('UserName="(.-)"')

	return name
end

Hope that helps

Thanks for the info, I have never used the code manually. I’ll play around with it and try it out. Any more directions you can point me toward would help speed up the process?

No problem, let me know if you hit a wall on this. If I get some time this weekend, I might try and add a function to my current LUA that checks to see if the lock has been disengaged manually and if left that way (x minutes) - send me a reminder.

I still haven’t been successful. I would love to see what LUA code you got to learn from it. Thanks,

I have a different but related problem. If any pin code is entered or if the door is unlocked over z-wave, I get a “bolt not fully extended” error, and I never get a notification that the pin code was entered. This happens 100% of the time without fail–to the point that I gave up and use the error code as the trigger for “door was unlocked.” The major disadvantage to that is that I can’t distinguish which code opened the door.

Oh, and I meant to ask: Has anybody ever seen my issue before? Anybody know of a fix? I’d like to be able to use the pin codes properly.

Folks, this paper have enough information to find out if the Kwikset lock was unlocked via a pin code or manually.

http://s7d5.scene7.com/is/content/BDHHI/ApplicationNote-UsingASCII-Z-Wave-Locks

Hope this helps,

-TC

[quote=“TC1, post:8, topic:178403”]Folks, this paper have enough information to find out if the Kwikset lock was unlocked via a pin code or manually.

http://s7d5.scene7.com/is/content/BDHHI/ApplicationNote-UsingASCII-Z-Wave-Locks

Hope this helps,

-TC[/quote]

Thanks, TC! I had never seen that document before. Looking over the codes, now I’m completely stumped. There aren’t any alarm conditions for “not fully extended” in addition to the unlocking process. What on earth could cause “unlock” to be misread as “not fully extended”?

Though I own Schlage locks, I know how all these locks in general are engineered. There are gear cams inside the locking mechanism that can detect the current deadbolt position. So if you were to unlock or lock, and the bolt did not fully extend or withdrawal, both would be classified as a “not fully extended” condition.

I’m not sure about your particular situation since I don’t own a Kwikset. Have you tried contacting them?

Much apologies, I guess I’m not scribed to this post.

I did a few quick checks and it appears regardless of PIN entry or manual disengagement of the bolt, their both unlock events which is the issue. I thought the lock (when manually disengaged) would return ‘Nil’ (username) if I disengaged manually but it actually returned the last PIN user (uh-oh). I assume this is because that’s what was stored to the device plug-in. Also it doesn’t appear that we have access to the date variables assuming those are indicative of the last entry via PIN. So here’s what a propose.

[1] Create a single scene (per lock) with two triggers; PIN entered and Bolt disengaged. Add LUUP code per trigger.
[2] If a PIN is entered & valid, store variables into a container and proceed to execute LUUP code (do other things; i.e. Lights, lock and feel safe).
[3] If the bolt is disengaged manually (in or out), check the PIN variables (via container) and perform a deduplication process (i.e. discern between manual and PIN).
[4] Based on the outcome of [3], the decision would be to exit (PIN was entered) or proceed to execute LUUP code (do other things; i.e. Lights, lock and feel safe).

I’ll play around with this tonight and if this seems of interest let me know and I’ll post some LUUP code.

[quote=“CudaNet, post:11, topic:178403”]Much apologies, I guess I’m not scribed to this post.

I did a few quick checks and it appears regardless of PIN entry or manual disengagement of the bolt, their both unlock events which is the issue. I thought the lock (when manually disengaged) would return ‘Nil’ (username) if I disengaged manually but it actually returned the last PIN user (uh-oh). I assume this is because that’s what was stored to the device plug-in. Also it doesn’t appear that we have access to the date variables assuming those are indicative of the last entry via PIN. So here’s what a propose.

[1] Create a single scene (per lock) with two triggers; PIN entered and Bolt disengaged. Add LUUP code per trigger.
[2] If a PIN is entered & valid, store variables into a container and proceed to execute LUUP code (do other things; i.e. Lights, lock and feel safe).
[3] If the bolt is disengaged manually (in or out), check the PIN variables (via container) and perform a deduplication process (i.e. discern between manual and PIN).
[4] Based on the outcome of [3], the decision would be to exit (PIN was entered) or proceed to execute LUUP code (do other things; i.e. Lights, lock and feel safe).

I’ll play around with this tonight and if this seems of interest let me know and I’ll post some LUUP code.[/quote]

I’m not that advanced but some of this make sense to me. I did figure that the lock wasn’t giving the info we needed so we would need to combine 2 triggers. (pin entered and bolt status) I just have no idea how to write a code.

Excel formulas are about as much as I know and was learned but seeing a bunch in action then manipulating them to fit my needs. I’m hoping after using someones code and getting that to work first I can then learn to manipulate it to learn from there, but since I have never even used a LUUP code before let alone wrote one I’m having a problem just getting started.
Thanks for your help.

Yes - as you discovered, both triggers occur simultaneously which is why we must delay the code within one (manual unlocking) to peek at the outcome of the other (pin unlocking). Anyway, no worries, we’re all here for the same reason - to learn, ask questions and contribute. There seems to to be a few posts out there about needing this option so I hope this helps. If all goes well in testing tonight, I’ll post step-by-step instructions & code to alleviate any guess work. All you’ll have to do to the code is change the device ID’s to identify your lock, variable container and day or night plugin.

Disclaimer (now he tells me): I’m definitely not advanced whatsoever in LUA but I understand the basic concepts, so I ask that if anyone can improve efficiency - that would be great.

@integlikewhoa

OK, I finished putting together some code last night and gave it a couple of unit tests. It works well so I’d like to send you the code to test and make recommendations before actually posting it publicly. Since it looks like I can’t attach anything to PM’s I’ll send you the code and some instructions. Keep me posted if you run into any issues.

I am new to the forum…sorry if I missed the answer elsewhere. Did anything come of the last message and tests? I am trying to do pretty much the same thing, except I am trying not to turn on lights when the lock is disengaged manually instead of sending the alert.

I have been playing with the lock watching the logs. I can’t seem to figure out a good way to isolate the manual opens & closes. The lock seems to report the last user regardless of if it was this time or 20 times ago. Any help would be greatly appreciated.

[quote=“gjstangel, post:15, topic:178403”]I am new to the forum…sorry if I missed the answer elsewhere. Did anything come of the last message and tests? I am trying to do pretty much the same thing, except I am trying not to turn on lights when the lock is disengaged manually instead of sending the alert.

I have been playing with the lock watching the logs. I can’t seem to figure out a good way to isolate the manual opens & closes. The lock seems to report the last user regardless of if it was this time or 20 times ago. Any help would be greatly appreciated.[/quote]

I started using PLEG after the last post.