[Released] Rule 4.0

Bruce, yes, clicking on Actions from the main page and no, nothing gets me out of adding And/Or/XOR, in fact I have added several as you can see above and each time, I am brought back to adding more of them.

My concern is this. I now have other rules exhibiting this same behavior and they haven't been touched in weeks. Something is really a miss here

Rick

Well, something has to make it run. Conditions by themselves in the actions are evaluated when the rule runs. So there are two possibilities: a Trigger Event makes it run or another rule causes it to run.

In the case you show, you need a Trigger Event of Virtual Switch changed. If you had put that in first, it would have created the "If Virtual Switch is ON" condition for you automatically, and you could just pick that when creating the conditional action. It all depends: What is supposed to make this rule run? The switch turning on, or the presence arriving, both? or at 5am? 20 minutes before sunset? Obviously, you need to decide what causes it to run.

Custom Commands are in Rule 3.0, not Rule 4.0. In Rule 4.0 you use Custom Action instead.

Sorry, yes, I meant Custom Actions - would be nice if we could edit one vs delete and start over.

Sounds like something is messed up. When did this start?

Please make an identical rule from scratch for one of the ones that has this issue. And then see if it exhibits this problem or not. Also, for one that has this problem, show screenshots of the app status page (preferably by PM).

This harks back to Rule 3.0, the way a Rule works there. Have you tried doing that? There, you would put in the conditions as you've shown, and Actions for True and Actions for False, and it would automatically run when those conditions change. Some people find this a more natural way to express a rule than 4.0, where it is pretty bare bones, forcing you to be explicit about what makes it run.

Are you talking about editing the parameters?

Yes, once I put in %GV% I cannot change or remove that parameter (and if I fat-finger the name...).

Just this morning. Here is another simple Rule that now is showing the same behavior


When I select Actions, all I see is this

I recreated this rule, no issues at this point.
This all started this morning when I was editing the If/Then statement in the rule I sent you via PM. I hit done at some point and remember it took like 20 seconds for the page to refresh, then the issue started.

I had this issue early on with RM 4, reported it and it was suggested to delete the rule and start over.

Rick

This is being added. It's been requested a number of times, and fairly easy to add.

Yeah...that one is very confusing. So, one criteria has to be true and one has to be false but it doesn't matter which is which?
So

If A (True) XOR B (False) = TRUE
If A (True) XOR B (True) = False
If A(False) XOR B (True) = True

That only works with two conditions though, right? Yeah, I don't see the practical application of that one either.

All of the logic operators except NOT work with two conditions: A AND B, C OR D, E XOR F.

The part I was confused about was why not just add the conditions as you intend them so both will be true in the first place?

Which is why I was hoping to see someones example of using it practically

My question exactly.

But XOR ONLY works with two conditions, correct? OR and AND work with any number of conditions.

It's complex to create XOR out of AND, OR and NOT.

(A AND NOT B) OR (NOT A AND B)

No, all three only work with two conditions. If you're thinking about A AND B AND C, that's actually (A AND B) AND C

Just like + only works with two: A + B + C is actually (A + B) + C

These are called "binary" operators -- they have two operands. Not is a "unary" operator, with a single operand.

But in that case, only one of the statements in the list can be true for the expression to be true, right?

If you mean with XOR, yes.

A XOR B XOR C means (A XOR B) XOR C. (A XOR B) is true only if just one of A or B is true. Suppose one is, then (...) XOR C would only be true if just one is true. Etc.

A OR B OR C is true if ANY is true.
A AND B AND C is true if ALL are true.
A XOR B XOR C is true if just one is true.

Actually I think i'm wrong. If you have a list of 4 and only one is false, then it is true also.

A XOR B XOR C XOR D.

A True
B True
C FalseD True

T XOR T = False
F XOR F = False
F XOR T= TRUE

Basically, one condition must be unique within the list of conditions. If any two of them match, it will be false.

1 Like