Wait for event

Hi guys im having some writers block. Helo would be appreciated. I have a rule which works great. Basically, if both phones (my wife and I) leave the house, then my alarm then arms (using konnected) and Away mode activates. If a phone returns, then the reverse occurs with no problems. However, I don't want this rule to run if someone is still home, such as a babysitter etc.

Ideally, I'm looking to modify the rule, so if both phones are away and there is motion indoors within 5 minutes of the phones leaving then don't arm away mode. If both phones away and no motion for 5 mins, to then run the rule as described above.

Obviously I'm using rule machine :thinking::+1:

I assume this is best done with wait for events, but I can't get my head around it

@stueyhughes Would you post a screenshot of your rule? It would be easier, for me, to help if I can see what you already have.

You could use a wait for event with a timeout, using the motion sensor as an event. When the timeout is reached or the wait is done recheck the status of the motion sensor. If it is still inactive then you know 5 min passed without it triggering. Something like this:

Might want to use the motion zone controller app to test for multiple motion sensors. And in this case "house occupied" is an aggregated presence sensor calculated from the results of two phones.

I think I've resolved it from @pseudonym and @brad5 helpfulness. Can you guys take a look. I need to add in a load more motion sensors or use the motion sensors app as mentioned. But here's the basic rule

I've just added another END IF at the bottom

Thumbs up :slight_smile:

Yeah I think that should work as long as somewhere else the presence detector leaving triggers the mode change to away.

Yes our two phones trigger the mode to become "Away or Holiday"

Thank you

@stueyhughes Your rule looks like it should work. The only thing I would do different is to make the second IF-THEN check for inactivity. This would eliminate the need for an ELSE and could also be done with a simple condition. Just a bit cleaner, in my opinion, but both are functionally the same.

Cheers, do you mean like this? Now I think I understand :+1:

Yes

You do realize, if someone breaks into, umm enters your house from 0 to 7 minutes after you leave, they are free to do whatever they choose for an unlimited time frame.

Hi, yeah, sorry, I never really explained that this is sort of a prototype. The rule is illustrative. I'll probably condense down to 30 seconds or so👍

1 Like

Oh, and also, I have the Konnected interface kit, so we still have our keypad which we use. This rule is a backstop for when we leave the house and forget to arm the alarm

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.