Help with a rule - change mode according to lock code used

Leaving on a vacation and my parents will be caring for the house. I need the mode to change from home to away when they use their lock code. I'm not sure how to do this. Well ... I understand what I want, but not sure how to accomplish this. mode is away. Parents arrive and use their lock code to unlock the door. I want the mode to change to home. When they leave, they will lock the door with their lock code again (even though it auto locks after 3 minutes). I would like the mode to change back to away. I managed to create an infinite loop when I tested. It was quite funny. Now that the joke is over, I need to get this working. I'm not sure if I need to do a triggered rule, or a regular rule. Does the house read the lock code and state of the lock. So in terms i need this to happen

mode is away
Lock is unlocked by code mom and dad
change mode to home

then mode is home
lock is locked by code mom and dad
change mode to away

When i set this up it looped because it sees the code and goes "oh shit unlocked nope locked nope unlocked" Yah ... not what i wanted. Please help.

There's no trigger for "locked by code"...what did you use?

I was thinking of the trigger being lock unlocked, but as I look i can't set a condition in a triggered rule to define a lock code.

As far as I know there's currently no capability to determine if a lock was locked via physical or keypad. I've requested this in the past for this exact use case.

Sooo ... what is the condition "lock codes" used for? I'm truly curious.

Lock codes just deals with the unlock. Again, AFAIK, haven't come back to this for a long time. And I'm not sure how it's possible to be a condition, seems like it should be a trigger only.

Here's how I'm using it to set Guest Presence home, which in turn sets mode to Home. I haven't been able to automate the "away" or departure piece because of the lack of differentiation between keypad lock and physical lock.

I didn't realize it was possible to use a code to lock. I never have tried that! I need to do some more 'sperimenting.

Does your lock actually lock when you type in the code while it's unlocked? I just tried on mine and it doesn't do anything.

Dammit .. and we're leaving tomorrow. Sure wish I had time to speriment. too.

1 Like

Yes. I use lock code manager and the lock works either way then typing it into the lock. Not in the device driver page, though, if that's what you're asking?

Must be the way your lock is set up. My Kwikset 916 doesn't do this. Either way, I think the capability to recognize a lock via keypad or code doesn't exist.

Well .. I'll definitely be better prepared come next vacation. I'll have to troubleshoot some scenarios when I get back. Thanks for the quick responses. I know I can always come here for answers. Thanks again.

1 Like

Since I struck out on the lock code solution, my solution was to get some Iris key fobs for guest presence. Those are hard if not impossible to find now, but I've read good things about the SmartThings presence sensors too. Just something they can clip on their keyring.

You could set them up a bookmark on their phones that hits a RM cloud endpoint when they leave to make it go to Away mode. Not sure if it would be practical for them, but it's something that could be set up quickly...

I never paid attention so I went and looked. My Kwikset 914 & 916 zigbee locks do have a different event description depending on how it was locked. I don't remember if it did that when they were z-wave or not - never looked.

Locking manually the description is: Back Door Lock was locked by manual
Locking by keypad the description is: Back Door Lock was locked by keypad

That doesn't help anything. Just an interesting observation.

Mine does too, but that keypad report has not been turned into a trigger or anything that's usable in RM.

I have a Zigbee Schlage lock managed with lock code manager. I tried setting up a custom HSM rule to alert if the lock is unlocked manually in certain modes (Away, Sleeping) - since I don't yet have a contact sensor on the door. At first it worked fine, but started triggering even when we used a code.

I noticed in logs that the lock has reported the following events:

  • Unlocked
  • Locked
  • Unlocked by [Name]
  • Unlocked by manual

It seems like "Unlocked by [Name]" and "Unlocked by manual" have only actually occurred maybe four of the hundred or so times the lock was unlocked in the last few weeks -- all the other events are simply Unlocked and Locked. Not sure what's going on here, was it just a fluke that on a few occasions the event stated the user who unlocked the lock? Ultimately I would like to change mode and disarm based on us entering our lock codes.