Help with HSM and Locks

So I'm trying to make a rule in rule machine to where when both my wife and I leave the house, the locks lock, lights turn off, and alarm arms. And if either one of us arrive, it disarms and unlocks the front door.

Here is my current rule:

IF (User1, User2 all not present(F) [FALSE]) THEN
HSM Arm Away
Lock: Front Door Lock, Back Door Lock
Off: Pantry Light, Harmony-PowerOff, Kitchen Light, Foyer Light, Dining Room Light, Stair Light, Garage Light, Toilet Light, Master Closet Light, Blake’s Closet Light, Kids Hall Light, Master Bathroom Light, Master Bedroom Light, Aubreys Light, Dads Lamp, Moms Lamp, Wash Room Light
Mode: Away
ELSE
HSM Disarm
Mode: Home
Unlock: Front Door Lock
END-IF

The problem is if my wife wife is leaving, manually locks the door, and im still home. The front door will automatically unlock when it detects she had left. So im a bit confused at A.) how this is happening. and B.) how to get it to work the way i want.

One solution would be to replace the “else” statement by a “wait” for User 1 or User 2 to arrive. The rest can remain the same.

I think thats exactly what I'm looking for. Im having a heck of a time editting this in Rule Machine. Am I missing something? Is it easier to just create a whole new rule? Im a bit of a newb just coming over from smartthings.

IF (User1, User2 all not present(F) [FALSE]) THEN
HSM Arm Away
Lock: Front Door Lock, Back Door Lock
Off: Pantry Light, Harmony-PowerOff, Kitchen Light, Foyer Light, Dining Room Light, Stair Light, Garage Light, Toilet Light, Master Closet Light, Blake’s Closet Light, Kids Hall Light, Aubrey’s Closet Light, Blake’s Light, Master Bathroom Light, Master Bedroom Light, Aubreys Light, Dads Lamp, Liams Light, Moms Lamp, Wash Room Light
Wait for event: User1, User2 any arrives
Unlock: Front Door Lock
HSM Disarm
END-IF

This is what I have now. It solved the issue of the door unlocking when only one of us leave if the door is already locked. But part of what I want is if one of us leaves and the other one is home and the door is locked, when the person arrives, automagically unlock the door for them. I'm thinking this may have to be done in two separate rules. Thoughts?

1 Like

If you want to always unlock on arrival of either of you, you could remove the wait condition and everything below it (except the end-if).

Then create a new rule that triggers on User1 and also User2 arrival. The rule will be to unlock and disarm.

Be aware that if your presence changes in the middle of the night, the door will unlock and the HSM will disarm. Because of this, I would recommend either setting a precondition of a certain mode (Ex.: Don’t run the rule if the mode is “Night”) or setting a specific time when it will not disarm or unlock (Ex.: midnight to 6am).

This worked perfectly! I really appreciate your help!

1 Like

Glad to hear! :smiley: