Assistance with RM4 and Door Unlock Code Triggers

Hi All - I have a Schlage Connect BE469 and a simple rule in RM4 that states whenever I enter the Kate & Joe lock code to turn on my First Floor lights:

However, sometimes myself like many of us after leaving the house/ locking up forget something in the house. So I quickly go back and type in my code again and all my lights turn on again. This is when I don't want the rule to fire off.

I need assistance writing the following:

If front door is UNLOCKED with user code Kate & Joe within 2 minutes of front door being LOCKED,
Then: Do Nothing.
If front door is UNLOCKED with user code Kate & Joe after 2 minutes of front door being LOCKED,
Then: turn on First Floor

I cant seem to find the right attributes/conditions to accomplish this in RM4. Mind you, I know that I "could" potentially set another user code that doesnt have this rule attached, but the less user codes on my door the better/safer I feel.

Thank you!

FYI *I use Alexa to say goodbye and turn my first floor lights off, I have no HE rules set for this. The partial reason for this rule is so I dont have to say Alexa Goodbye AGAIN...

When do you arm HSM? It is possible that you could put a condition that HSM is Armed-Away above the whole action and that means that it wouldn't happen unless HSM is armed-away. If you are arming manually as you leave, you could put an arm delay in to give you time to leave (and run back in) if you need to.

1 Like

Making this up off the top of my head, so no guarantee... You probably need to use private boolean.

Trigger:
    Lock *changed*

Actions:
    IF door locked THEN
      Set Private Boolean True
      Set Private Boolean False --> Delay 0:02:00 
    ELSE
      IF unlocked code = Kate & Joe 
      AND Private Boolean = False THEN
        Turn on First Floor
      END-IF
    END-IF

Another thought is to use your Alexa goodbye routine to set a virtual switch. If the switch is on, use RM to turn off the lights when the door locks. You'd need something to reset the switch to off when you come home so that your lights don't turn off when you're home but lock the door.

1 Like

Brilliant, thank you both. I never really toyed with private boolean probably because I didnt fully understand it. Used in an example helps me do that. I'll play around with these solutions and find the one that works best for my needs.

Cheers!