[Released] Rule Machine 3.0


How can I configure a rule that runs at 12:01am on the 1st day of every month? I tried a scheduled rule, trigger, triggered rule. I cannot find a combination that let's me schedule an action based on a specific day(s) of each Month.

Ideally I would like to capture my energy meter's energy value into a global variable and then reset the meter's value once a month


There's something weird going on with private booleans. I think all my erroring rules have private booleans.

Edit: no, not all my erroring rules are private booleans, and as per the screen shot above, they produce different errors.


@bravenel I think that there is an issue when multiple IF are nested (don't know if it's supported), consider this example:

At this point I should be able to add an "END IF" or "ELSE" or "ELSE IF" because the last END IF is for the nested IF Virt_Rules_SpazzaturaSkipNextThursday, not for the "main" ELSE IF Day is Thursday

If it's not possible to add nested IF, then maybe it should be disallowed to add the nested IF ?



Use a Periodic trigger or triggered rule:


Nested IFs are not allowed. You could only have created one by fooling the action creation logic somehow. It is designed to prevent that... But, no doubt there is some way to get around that logic.


I sometimes wonder if @bravenel has RM based nightmares.....


I like the idea of nested nightmares, but sadly RM at v3.0 won't allow them :smiley: :smiley: :smiley:


Side note - Although not explicitly necessary, I used the conditional action feature in RM 3.0 to consolidate 15 rules yesterday. Specific interaction that needed two separate rules before, now only needed one rule.

No change in functionality, but it makes it a lot easier to understand (and thereby maintain) long term.

So thanks @bravenel !


Bruce @bravenel. You've overlooked my question.

I have 3 custom commands calling Alexa routines for my IR controlled fireplace which are formatted as executeRoutineId('amzn1.alexa.automation.automationid), where automationid is a 36 symbols string representing Amazon internal id. How I'm supposed to distinguish between them if I can't give each a custom command name?
And in this case what is the benefit to give custom names for custom commands?


Custom Commands has a different author than Rule Machine, and hasn't been worked on for some time. Adding new features to it is not a high priority.

There is another way you could accomplish what you want though: Create a Rule Machine Action (from the choice of Rule, Trigger, etc.) for each of your different commands. The action for each would be to run the unique Custom Command. These Actions can have unique names, thus hiding the detail of the Custom Command used. These Actions can then be used by other Rules using Run Rule Actions action. This way you get a unique name for each.

Instead of using Custom Command, in each Action you could just use Custom Action instead. Accomplishes the same result.


I guess it's a good workaround. Let me try it. Thanks, Bruce


Agreed! This is huge! Conditionals are brilliant. Thanks @bravenel !

I've been puttering around with RM 3 almost solely to implement conditional actions.



Thanks Bruce.


Bruce, I know it would be fairly low down the priority list, but any chance of getting an indication on the main apps page when a rule is restricted by private boolean (like paused and false (for rules)?


This "feature" was removed some time ago due to the confusion it causes since the apps page is not dynamic. The rule would appear "restricted" even if it wasn't unless you opened the settings page. If the rule is a conditional one you can already tell it's restricted because it won't show true/false in the apps page. Bruce may have something in the works as an alternative, but currently that's where we're at.


Yeah, I'm aware of that removal a few months ago. The issue is that it's there for "paused", and it wouldnt take much to add it back for Private Boolean.


Trying to understand how to use conditional actions. In my office I have 2 motion sensors. I want the light the turn on if only one of them is active, but turn off only if both of them are inactive. my first stab at this isn’t working. the light turns on, but won’t turn off. here is my rule:


Check out the built in Zone Motion Controller app. Create a zone with both sensors and set the zone to activate with 'any active' and deactivate with 'all inactive'. This avoids any conditional actions.
Edit: It's motion aggregation in the app


Yes, I’m aware thanks. I’m trying to learn Rule machine 3. I don’t want to use the motion lighting app either.


I'm trying to repeat a set of actions an N number of times, regardless of how long it takes them to complete but this doesn't seem possible in 3.0 like it was in Rule 2.5. Whenever I select repeat, it doesn't allow me to save the action until I select a time to repeat it every so many seconds or minutes. What if i just want to turn through the sequence of events 3 times, regardless of how long it takes?

Also, you describes a "While loop" in the podcast. Can you give an example of how you would set that up? I can't seem to find how.