RM scenario I can’t seem to make it work


(ecksomperudenlign) #1

I have two phones act as presence devices. If any of the phone leave the home; 30 minutes after that, if the home is not arm (Stay or Away). Change it to Arm (Stay). If the mode is Arm (Away), just ignore it. Please give advice. Thanks.

It still kicked in 30 minutes afterward even the mode is already Arm (Away).


#2

well if I look at my conditional clauses they would look like:

trigger like yours
condition: if iphones leave - any leave + SHM sate is disarm
action: your options

at the moment you just look for the trigger while a certain condition is met but you dont combine the trigger and condition to be true for the rule to fire - just what I think - not sure if I made myself clear here :slight_smile:


(Kevin) #3

r4nd0m is correct the condition should include the trigger value plus any condition you want to look for in your case SMH=disarm. So your condition would look like this.

Trigger presence = left
SMH=Disarm

Keep in mind you will need an arrival sequence for you false statement.


(Kevin) #4

One question are you using this trigger to validate if something was already done & correct it if not? If so you could create a conditional trigger or rule to validate things were done.
I use most of my rule machine rules to validate that my local routine settings were completed & if they were not rule machine will complete them after a 1min delay. It’s just my personal preference to try & keep us much as possible locally on my ST Hub. See below for my Conditional trigger to validate my routine ran & if not then rule machine will run it.


(ecksomperudenlign) #5

Thanks for your help.
But the condition for phone is either present or not present. No “leave”.


(ecksomperudenlign) #6

Thanks for your help too.
My thought is to use RM to set the mode to Arm (Stay) 30 minutes after either of us left the house.
The Routine – Goodbye! will set to Arm (Away) in 10 minutes when both of us left. This is working fine.

For some reason. My RM in the initial post still kicks in after 30 minutes we left the house. I would think the “Only when mode isHome and Night will prevent the rule to kick on. Obviously I make a mistake some where.


(Kevin) #7

So you would need to create a rule in RM for goodbye & set it up exactly like your routine. Then create a rule for stay home. Then create a rule for the one person leaving the house. Then you would set up the rule to evaluate both actions. I will see if I can create a screen shot of what you are looking for. However it might be a little bit since I’m at work & really not suppose to be on my pad lol.


(ecksomperudenlign) #8

Thanks K. That will be so helpful.


(Kevin) #9

In the meantime I will try to explain the process.

In RM I have several actions that I have created because I use the same actions for multiple conditional triggers or rules. Furthermore I always label my RM commands with either (CT) (A) (T) or ® to identify what type the command is.

Local Routines if you will decide to keep your setup the way you have it now you will need to add some routines Otherwise everything can be done using RM.

These are the Routines you need to create.

Away: with your armed away criteria.

I’m back: with your criteria

Stay: if one person stays home how do you want things to respond.

Night: both are home & in bed.

For each one of these routines you need to have an action & then the command to activate that action. I like to use (CT) but you can use (CT) or ® in rule machine. It needs to mimic your routine parameters exactly ( Trigger, action, condition) & you will need to have a false parameter to counter the action. Then you can set rule machine to evaluate either your (CT) or ® with a delay. And if your routines didn’t fire the RM will fire after the delay.


(Kevin) #10

For example using the away parameter in rule machine.

Trigger= everyone’s left
Condition=everyone’s away system is armed away.

Action true= Evaluate after delay all lights off, all doors lock, system armed away.

Action false= Evaluate after delay, stay rule & night rule.


(ecksomperudenlign) #11

How about just set the mode to Arm (Stay) 30 minutes after either of us left the house.


(Kevin) #12

that falls under the stay rule with any not present set alarm to stay delay by 30 min


(ecksomperudenlign) #13

Okay.
I will think about it too.


(Kevin) #14

It’s easier if you think of your house in 6 categories (away, stay, sunrise, sunset, sleeping, & I’m back) & then configure them around each other using the opposite action or actions to counter the true action.


(Sully) #15

I think you’re gonna have to set it up as a rule.

Use your presence and alarm state as the conditions.

Use a complex rule
Subrule - Phone 1 is AWAY or Phone 2 is AWAY
AND
SHM state is Disarm

Use the same actions that you have now, but on the “Delay These Actions” screen, you’ll now have an option to “Cancel on truth change?” Set that, and it will cancel if your rule stops being true. (ie - both phones return home or the SHM state changes.

That should fix your issue. Does that help?

(I do something similar in combination with a mode change to leave at night too. You’ll probably need to coordinate with modes if you want the proper result during the day and at night. That way you set up your modes around times or whatever to transition periods of the day, and then, you can use your rules based on those as well to get the correct result. The above works, but it works the same regardless of the time of day.)


(Sully) #16

I still think my first response would work, but it may not be the answer you’re looking for.

It still kicks in because the “Only when mode is” only cares about what the mode is when the action is scheduled. The action is scheduled, and it doesn’t pay any more attention to it. It will run regardless at that point. It’s just delayed.

I haven’t had any issue with too much lag when just checking conditions in a rule, but if you have, try this.

Use the trigger you have to instantly change the mode to “Leaving”. Then, have a second rule watching the mode and SHM state, and use the delay and cancel option I mentioned before. It watches the mode, not the presence. If the mode or SHM changes state, it gets canceled.

Either way should work, but I think this is the one you’re looking for. Hope one of those two ideas help out.


(ecksomperudenlign) #17

I will give it a try and let you know in the next few days.
I can only test it so many times :sweat: Wife will start asking question if I keep stepping away after I got home.


(Sully) #18

Then, you might try it with a virtual switch first:

Use that as a condition or trigger along with your presence sensors. Since it’s basically an or statement, adding in an on/off check shouldn’t be a big deal at all.


(Kevin) #19

Sorry I didn’t get back to you last night, I was fixing some issues with my Hub after the upgrade. I thought about this on my way into work.

what you can do is (see below) & assuming you have return rules & so on.

Create a Conditional Trigger
Trigger event- using something constant like time of day, door sensor opening & closing & so on.

Conditions- select the trigger event above (what ever you picked) & add when anyone is present.

Then select your true action ( Away parameters)

False action would be your stay parameters.

If you look below my house everyone is always gone by 7am so I created a trigger using 7am as my event, pay no attention to the evaluate portion because this rule is a verifying rule to make sure my routine fired after 1min. But the parameters would be similar to yours.

**Conditional trigger

**

**

Conditional trigger

**

**

Action

**

**

Action

**

**

Away conditional trigger

**


(ecksomperudenlign) #20

Thanks. I will give this a try.