Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support

I am using rule-machine.groovy 1.7.0, and rule.groovy v. 1.7.2b. I just now tried deleting all 3 rules an recreating, with the same results… I’m sure i’m missing something but can’t see what it is.

Am I missing something about using a Rule Truth as a trigger for another rule? I’ve created the following Triggered Rule.

Then I created the following second rule but I don’t see the first rule as an option under Define Triggers > Select capability “Rule Truth” > Rules.

At first I thought it was because my first rule was a Triggered Rule but I do see other Triggered Rules as options. Thanks in advance for any help.

Please either post your screenshots here, or send me a PM with them.

In theory, a triggered rule should not show up as an option, and can’t be used this way. Not sure why others are showing up on the list.

Here is what I am experiencing…

First rule:

Second and third rules, using rule truth from first rule:

That’s strange. I just set up 3 rules, just like yours, and it showed True for the rule-false, and False for the rule-true, as it should. So, I’m not able to reproduce this behavior.

This seems pretty convoluted. What are you trying to accomplish?

The reason I’m doing it this way vs. using a simple scheduler is so that if I lose power, the switch will return to its scheduled position on power return. That part of it works well, it’s just this rule truth issue I’m stuck on.

Please try removing the one that is wrong, and putting it in again. See if it still reports the wrong value.

I tried removing and re-adding the rules without success, so what I did just now was removed Rule Machine completely from my device and IDE, and then put everything back in. It came up reading correctly! Maybe somehow in updating I caused some sort of corruption… but all seems ok now.
Thanks for you support and for this great tool.

1 Like

has there been any thought to group rules? for example, just like the ST has devices split into rooms

There is no mechanism by which to do this. SmartApp developers like myself have very limited API access. I have no control at all over how the Rules are presented in Rule Machine. I have 72 rules, and I’ve become used to my naming conventions and a long alphabetized list.

@bravenel - I thought this was the case with Triggered Rules not being an option for Rule Truth evaluations. But I definitely have several showing up. All of the “House: Front Door - Unlock” options are triggered rules. Let me know if you need anything to investigate why they are showing up.

I figured out why they show up. When the rule is triggered, and evaluates the rule, it stores the result in the parent app. It doesn’t put the rule into the parent list when it’s first setup, nor is it evaluated when its first setup. I may fix that.

The problem with triggered rules is that rule truth isn’t determined by changes in the conditions. The conditions can change, but not until the rule is triggered are they evaluated.

72😜geez
not that im surprised from the person that authored this awesome app

Don’t feel that way. The ST guys didn’t develop RM because quite frankly it’s beyond the ken of most of their audience.

A while back, I posted a couple of screen shots of a single rule that does something like what you’re doing in a single rule. I’m not sure if it will work with your bulbs, but it works with Sylvania iQ, GE Link, and Cree bulbs in my house. Post 2182.

I receive an authorisation error when trying to edit one particular rule - in the logs the following shows:

error java.lang.ArrayIndexOutOfBoundsException: Negative array index [-8] too large for array size 7 @ line 474

how can I remove this particular rule without losing all the others?

In the IDE, go to My Locations / List SmartApps / Edit (upper right corner) / scroll to those rules and Uninstall.

Something got messed up with a partially constructed rule. Uninstall it and try again.

1 Like

thanks mate - worked a treat …

@bravenel
I have a feature request…

Currently wet can set up rules based on days of the week.

Is it possible to use monthly? Or even a Julian date rule of calendar?

That could allow for rules to be ran and evaluated based on a number of days between them. Instead of every Wednesday, it could be every third day or whatever.

This may not have a wide use case, but I’m thinking of this. Rules for my seasonal months. This way I have one for winter, spring, summer, and fall. I can put in trigger switches for those unseasonal days.

This way we don’t have to tweak our rules weekly or monthly.

I especially like the Julian date calendar.

Unfortunately, ST does not support any date input. That is to say, that whatever I would implement would be ad hoc. This isn’t necessarily all that hard, but I’m reluctant to do it due to a number of factors: (1) no API for inputing dates; (2) feature creep pressure to full calendaring; (3) de minimis use cases for it.

Can’t you get IFTTT or something to do the calendaring? Flip a switch. Heck, get your phone to remind you to flip the switch.