Door Code + Presence


#1

I've been using RM for basic rules and now I'm looking to fully immerse myself into making my automatons more useful. However I've confused myself with the amazing complexity available with RM 3.0 and If-Then-Else.

I have a Schlage lock with multiple door codes that are used by family, cleaning service, landlord, etc..., I utilize presence thru life 360; I live alone. I have most of my lighting defined by ST motion sensors grouped by room, using Lightify Zigbee bulbs, except for my porch light using a GE Z-Wave+ toggle switch and a LED yellow bug light.

Here is an example of what I want to see happen...
Facts are:

  • Partner arrives and enters code into the lock to unlock the door
  • Presence is Away
  • Mode is Away
  • HSM is set to armed Away
    Action:
  • Mode changed to Home
  • Backdoor locked on delay of 10 min
  • HSM is set to disarmed

And when my partner leaves:
Fact:

  • Door code enter to lock the door
  • Presence is away
    Action:
  • Mode Change to Away
  • All lights turned off IF its before sunset, ELSE only certain lights turned off
  • HSM armed away

I'm having trouble determining when to use the IF with ELSE-IF to manage the above while also thinking about changing the fact that my Presence = Home complicates the ELSE.

If you could point me in the right direction as I have been trying to define this for about 2 hours and I keep finding fault to my logic of defining the design and have royally confused myself.


#2

Do you have presence devices or is the lock decide that? If you do you could remove the presence part from it and use mode manager to decide the mode that way depending on the mode and the time you turn off all lights or some.


#3

I use life 360 for presence but in the scenario I've outlined, and for the others as well, the lock code triggers the event and evaluates against my presence.


#4

The logic for this is rather simple, you just need to make sure that you have all your lock codes defined in Lock Code Manager. Once you have that done, you'll want to trigger on lock codes and select the code(s) from the list provided.

However, you'll need to create rules for each code as AFAIK there is no way to test which code was used. Also, for your door code enter to lock the door, you'll have to rethink that logic as there is also no method in RM (again, AFAIK) to trigger on a lock code to lock a door. It's an all or nothing type of thing. You could just trigger on the lock being locked and then run the rest of your logic OR you could trigger that after 10 minutes.

The other thing to do is try to add the other people coming into your property to Life360 and then just using simple presence logic.


#5

I've considered adding them to Life 360, they don't want to because of the ability to see there whereabouts, LOL. HMMMM I thought the Lock Manager distinguished between the lock and unlock status?


#6

Lock Manager does, but I couldn't find a way to trigger on a code being used to lock a door in RM. The only trigger I found was Lock Code. One could probably check to see if the lock is locked or unlocked in the rule though. But... all my locks (Yale) always lock without a code being entered. I'm not sure how it is with other locks though.


#7

Because i set it up to require a code, you can't just lock it, unless you use a key which triggers a manual lock notification. I'll have to investigate that part further.


#8

That's actually a cool feature. I'll poke around RM a bit more to see if there is some logic I can use to trigger on a lock code being used for locking.


#9

For this set up I'm assuming that the lock or unlock of the door sends a state command (as I don't have a lock your have to confirm)

I would use a triggered rule
Triggers are door locked and unlocked.

Conditions

Partner presence "present" AND mode is "Away" AND HSM is set to "armed away" (personally I would combine the last two in HSM for when away it's armed away when in home mode it's disarmed makes more sense IMO)

Actions for true

Mode to "Home"
HSM set to "disarmed" (again not needed if done in HSM already done once then not repeated in every rule)
Backdoor locked delayed for 10 mins.

Actions for false.

IF Mode is (home) THEN
change to away
Arm away HSM
End if

I think another rule trigger by AWAY
Conditions between X and sunset.

True
Turn off lights

False

Turn off other lights


#10

Thank you both for the reply's and have me needing to do a bit of review but are definitely pointing me in the right direction.