Do something if lock is locked with code

I would like to execute my arm alarm routine if the lock is locked using a code (or code/user ID). I found on another thread that $currentEventDeviceIndex holds the ID I need, but how would I go about setting the condition? It’s easy to check if the code changes to locked, but how do I add the And it was locked using a code condition?

You will need to use a custom DTH and SmartApp. One that will work for you can be found here:

@RBoy also has a highly rated lock manager and DTH from his site.

1 Like

I believe only the old app has that feature, that is on the legacy branch of the app here:

I should have time this weekend to complete the edits to Lock Manager with it’s first v1 release that will include the feature OP is asking for.


Thanks I just realized that feature is not yet available and was going to update my post. You beat me to it.

Just curious if the lock will only lock using code?

I’m actually using your app right now (and really like it) but I haven’t seen the ability to trigger actions when the lock is locked by a specific user, where would that be?

This is the app @jhamstead is referring to.

If you do decide to use note that it does not need a custom DH but works with the stock ST DH for standard feature like programming user codes and running routines etc when a user unlocks using their codes.

There is a custom DH available also if to allow for enhanced features which a lock may provide like alarms/sensors and one touch locking using codes (and running custom routines / actions etc). But for what you’re asking the stock DH will suit it fine.

There is an alternative version of the app available if you don’t want to program codes remotely and only monitor and execute actions when users use the lock.

I believe you can also use CoRE to achieve then same (execute actions when users unlock the door) but I would recommend that if you have a few users. When the list grows its helps to have a dedicated user management and user monitoring app.

Thank you @rboy can your app trigger routines on user lock? I have the user
unlock part all set, it’s just the “do if lock” piece that I’m still missing

Yes it can. If you want a generic run routine on lock you can use the stock ST DH.

However if you’d like specify custom routines for each user or based on type of lock events (RFID, Remote, Manual, Key, User code, one touch, electronic etc) you’ll need the custom Enhanced Z-Wave Lock DH.

Great. Thank you

1 Like