Rule Machine® Introduction



Thanks for the suggestions. They were very helpful.


I finally wrapped my brain around the WC "stays" capability in RM (using the cancel capability). Now, I'm trying to figure out how to implement a WC piston in RM that uses a "changed in the last n minutes" condition. The logic is:

Something Happens
Motion changed in the last 45 minutes
Then do it

Is there a way to do that in one triggered rule?

I think a rule with the Private Boolean of a trigger would work, e.g.

Rule 1
If motion, set Rule 2 PB TRUE
Delay 45 minutes, set FALSE Rule 2 PB [cancel]

Triggered Rule 2
Something happens
Private Boolean TRUE
Then do it

Is there a simpler way?


I had to do it with PB. My blinds trip my motion sensors. I actually need a rule and an "action". The trigger fires when the the blinds change setting the PB for the motion rule. It also runs an "action" that has within it a delay of a few seconds and setting the PB back to true. That's the only way that I'be been able to figure out how to do it.


I think this would work, but you don't need a condition of PB true in the second rule. If PB is false, the rule will do nothing by default.

You do need to enable the PB restriction in the second rule though.


When doing this I find it easier for my brain to just look at RULE1 in RULE2.

Rule 1
If motion
Delay 45 minutes[cancel]

Triggered Rule 2
Something happens
Then do it


That really makes no sense because rule 1 is true if motion is active. Your cancel only applies to the action. The rule is still true immediately. So, you don't accomplish anything by breaking it up. Basically, you would get the same functionality if they were in the same rule.


Because the rule goes false as soon as motion stops right? It's just the actions that are delayed.

** said this already :rofl: