[Released] Rule Machine 3.0


If you select conditional action and select time of day it pulls up this


doh. I was thinking of something else completely in that you could have separate conditions. Thanks for getting back to me so fast.


From looking at your rule yes it should turn off firing the false actions since your VS would turn off if it became sunny

EDIT: Your false actions doesn't have a turn off lights during that time listed.....maybe not


So even though the False Actions are for an everyday occurrance and run between sunset-40 and 11:00, if the illuminance goes above the threshold to be False, if the lights are on and it isn't sunset-40 -11:00 the lights should go off. Right?


But it does have the action as on just between those times. So if it isn't between those times then shouldn't the lights be off?


The actions for true only fire if the "rule" becomes true which is your Lux VS trigger
Same with False, the actions for false would only fire if the "rule" becomes false.


99% sure this would work for both times instead of 2 rules as I previous thought. This takes care of your daytime "cloudy" scenario AND this would make sure they come on at -40 sunset and This won't turn them back on after the good night routine as the rule would only be evaluated at -40 before sunset that turns them on. It also turns them off if it becomes sunny again.


This looks good also but I think that the lights might come on if the goodnight routine runs at say 10:00pm because it is evaluating the time Between sunset-40 and 11:00pm. But a Stop Action could be added or a Restriction of not running when in Night Mode.


It shouldn't evaluate the rule if the true is already true (only when false becomes true) which being after -40 sunset would make it true......when you do the good night routine, the rule itself should "stay" true but would not run the actions again, even after good night routine runs and shuts off lights at which the rule wouldn't be evaluated again until 1100 pm then and would run the false which would keep them off. But doing the stop routine probably wouldn't hurt.


OK, I see your point. You really have to warp the brain to reach the logic using RM.:stuck_out_tongue_winking_eye: This was my first crack at rewriting a couple of Rules into one using RM3. I used to use WC a lot when I had ST and I loved it. But the logic was a little clearer. However, I will get used to this also.


Same here it takes me a bit to figure it out also, especially if I have multiple things I'm doing at once like now...lol


I've made the exact same comment last week...

"ENDIF" should replace "IF (condition) THEN" is this exact same situation.


Without rewriting the whole thing again, I took what @waynespringer79 suggested and tried to incorporate something that would work in this rule. I think this would work also but with the Stop Actions....do they need to be inside the IF ENDIF or can they be after it, as I have it?


This is a bug that has been fixed, and the fix will be in the upcoming 2.1.1 release.


Thanks @pcgirl for putting this one up here for us all to see.

Keep in mind, Rule Machine is just a tool and there is no one way to do anything with a tool. It just so happens I was able to wrap my head around this tool using it this way. There almost certainly is a more efficient way to do this but in Rule Machine’s current state, this is what worked for me.

I still have to break things down into small pieces and Bruce's 3.0 RM helped me do this.

It looks like the highest level condition or trigger for @pcgirl's example is when Illuminance is equal to or less than 7845.

For this test I used a Trigger just to see what Bruce would say. Not to be confused with a Triggered Rule.

With this example when luminance drops to or below 25 this Trigger does one thing, it runs an Action, not to be confused with a Custom Action.


The Trigger,


Defining the Action(s)

In this Action there is a list of If Do, Conditional Actions

After I did several automations breaking things down in to triggers, Actions with conditional actions, then I could begin to do more complex routines in a single Rule.

I'm not completely sure this example would run properly but I am sure @bravenel can tell us.


Oh I see what you are doing here! That is very interesting! So you setup an Action Rule with the different times and lightings. Then you setup a Trigger Rule that just calls the Action Rule? I can see how this might make it less complicated! Many different ways of doing the same thing!


It's that word being used for too many things that's causing a lot of the confusion, IMHO.


Yes, way back in the other RM we decided to use a different term but I forget now what it was.:stuck_out_tongue_winking_eye:


Bruce, perhaps you can confirm/deny a question that comes up often.

If delay "all" actions (cancel on truth change) is used are the actions afterward also cancelled if the rule truth changes?


Yes. The rule exits with a scheduled event to start up the actions that follow the Delay Actions. When the delay is cancelled, that scheduled event is removed. Consequently, the rule's actions will not start up again (until the rule is triggered again from the top).