Rule Machine® Introduction

You clearly didn't use computers in the 80's (Wordperfect for DOS!). :crazy_face:

I'll be honest, RM is an acquired taste and I've spent ~3 weeks using it daily now (long time I know) and Im more comfortable with it and I certainly like what i've been able to do with it do date and Im finding it less and less confusing the more I use it.

I still haven’t gotten over what they did to vi when all that vim nonsense came out

Edit: I just looked it up and I was 4 when vim came out! I hope you guys all feel old now!

1 Like

Maybe I shouldn't mention that I use nano then..... :rofl:

Is there a way I can un-heart this post?

Click the heart again?

Lol, I was 16. I feel old anyway. :cry:

I think I saw @bravenel start to reply like 3 times while we got off topic with my word processor analogy.

I guess he stopped because I was doing a good enough job defending the system. Which is really crazy when you look back through my post history.

I've looked at this in some detail. My conclusions are as follows:

  1. This is a tricky automation problem.
  2. This doesn't fit RM trigger events at all, for structural, UI, and philosophical reasons.
  3. This does fit easily into Simple Automation Rule. In this context, it could be used to turn on a virtual switch that in turn could trigger other automations.

I've already put this into the development version of Simple Automation Rules. It should be in the next release. The screenshot below has a sneak peek at some UI improvements for Simple Automation Rule.

1 Like

I dunno about that, anyway aside from my snarky UX remark, I wasnt taking shots at RM, just asking for something that most other platforms support (eg HomeAssitant) because it's useful and saves a lot of time and logic when writing rules for many HA scenarios :

Cool, thank you - it will be very handy.

EDIT: thinking through my use cases; putting this trigger mode into "Simple Automation Rules" will be great, everything I plan to use it for will work well.

Thanks for doing this, it's much appreciated. :sunglasses:

This is what I was hinting at before. While I agree it doesn’t fit the RM event trigger it did feel like something that could meet a need.

I will probably use my wait for condition “hack” for my transitions as they are a bit more complicated than turning on a few lights. But after enough thought I now have a pretty elegant solution.

Thanks, for adding the delay option based on one trigger. Sure didn't take you long to implement. Thanks again, looking forward to seeing it an upcoming release.

@bravenel Can you please clarify how RM deals with OR conditions?

So using this example does the OR condition only apply to the condition immediately before and after the OR statement
OR opt 1

or does it split the entire condition statement into everything before the OR and everything after it?
OR opt 2

I hope Im making sense. :sunglasses:

Not Bruce, but since this is testable, I figured I'd verify the assumptions I've always held about how RM handles these. Here are three different evaluations of the same variables with different truth values in different positions:

F && F || T == F
F && T || T == F
T &&T || F == T

As you can see, it follows the convention of treating AND and OR with equal precedence, evaluating from left to right. If you want something different, you can always use parentheses (though I don't happen to consider those expressions fun to edit). :slight_smile:

2 Likes

What @bertabcd1234 said above. Strictly left to right evaluation with no precedence. If either of the first two conditions are false (false when it encounters an AND), it will bail on the rest of the expression with false. If it's true when it finds the OR, it bails with true.

4 Likes

So if I understand you correctly; using the below example and assuming the following conditions are True:

ELSE-IF (Mode is Home(T)  AND 
	Thermostat mode of Upstairs cool(T)  AND 
	Temperature of Upstairs(21.0) is >= 22.0(T)  AND 
	Temperature of Outdoors(24.1) is >= 36.0(F)  OR 
	Time between 6:30 PM AEDT and 7:00 PM AEDT(T) [FALSE]) THEN
	Thermostats: Upstairs --> Mode: cool --> Cool: 22 --> Fan: auto

Would the logic bail at this False Contition:

Temperature of Outdoors(24.1) is >= 36.0(F)

or keep going to the OR:

Time between 6:30 PM AEDT and 7:00 PM AEDT(T) [FALSE]

EDIT: I'm an idiot - Im still changing my mind set from what im used to (Reactor) and what I should be doing in this scenario (I think) is this:

ELSE-IF (Mode is Home(T)  AND 
	Thermostat mode of Upstairs cool(F)  AND 
	Temperature of Upstairs(22.5) is >= 22.0(T)  AND 
	(	Temperature of Outdoors(24.9) is >= 36.0(F)  OR 
		Time between 6:30 PM AEDT and 7:00 PM AEDT(F)
	) [FALSE]) THEN
	Thermostats: Upstairs --> Mode: cool --> Cool: 22 --> Fan: auto

:man_facepalming:

@bravenel I think I've found a bug or unintended feature in RM when cloning rules.

If you clone a rule that uses:

Cancel Timed Actions: **This Rule**

The copy of the rule will have the **This Rule** replaced by the rule name that was cloned. It's repeatable too - I made 4 clones of a rule tonight and I couldn't work out why the cancel part was failing in the cloned rules. Then I noticed the "Cancel Timed Actions" was pointing to the original rule.

Gents,

I would appreciate your help in getting corrected a simple rule that I am using the get notification when I receive any mail in our mailbox. As per attached photo, I am using a motion sensor to detect any incoming mail and a contact sensor attached to the door to cancel the notifications canceled when the door is open which means that I am picking up the mail myself. The rule works well in getting notifications when the mail is placed in the box but I am still receiving the notifications when I open the mailbox. It appears that the motion sensor is generating the event first, thus I have employed a 5 seconds cancelable delay but this did not fix it. Definitely , I am doing something wrong and I would be grateful for any suggestion or comment. Please see a snapshot of the rule as well.
Regards
IMG_9869

No, it would keep going, because it got past the two ANDs (both true), and false into an OR means to keep going.

1 Like

Meh, it's a reference to the original rule. Let's call it a "feature" of that particular action when cloned. I can tell you this: cloning is an all-in process that just copies all state and all settings of the original rule, not a process with any refinement. It's not going to go through the rule to find things like this. Now that you know this feature exists, you know what to do about it.

2 Likes