Rule Machine - Get peer assistance here with setting up rules

One last post before moving to the other thread. Here are screenshots of my rules. “A light is on” is the name of my virtual switch.

Oops, I was using Triggers rather than Conditions. Moved Triggers to Conditions and works correctly. How would I do this with just one rule though?

Just use the false actions of the other one. Logic works this way:

if a OR b OR c On is True, then the opposite is False. The opposite is a AND b OR c, where this time a, b and c are to be off. So one Rule does it.

Hey, I know this forever old… But did you get it to work?

I was think use the presence arrival as a trigger with modes and sunset/sunrise as your conditions, this should work.

Is this a private list? :wink:

It is right now. I started a big experiment at the beginning of the month where I took down my entire system and rebuilt from scratch attempting to program the system to the max but maintain simplicity…

Then ST broke everything dealing with timers and now the Android app…

I’ve been reduced to barely working with an iphone 4s…

But, the list is growing and I’ll these release it soon

1 Like

I could use some help getting it installed? I looked in the App release thread but did not see any info on how to install. Could you help? If its not obvious im new to the ST community just installing the hub last night.

From that topic where you did not see any info:

How to Install or Update Rule Machine

There are two SmartApps on Github. The first is called Rule Machine. You should install this in the IDE and Publish For Me. The second app is called Rule. This you should also install in the IDE, and Publish for Me. Rule Machine is a parent-child app, where you can create as many rules or triggers as you want, each an instance of Rule.

After you install Rule Machine and Rule as described above, then you can install Rule Machine in your mobile app. It can be found in the Marketplace, under SmartApps, My Apps. When you install it, the first thing you should do is click on Done in the upper right hand corner. After that, Rule Machine will appear in the list of your installed SmartApps.

Thanks man. I found it and have it installed on the IDE. Waiting until I am home to add rules.

Is your purpose built lighting app available?

thanks

A

Not anymore, as it was completely replaced by Rule Machine. The main thing it had was dimmer level per mode, which RM now can do.

@bravenel

I have a little problem with these rules.

Here is what I have set up. The master bedroom is fully automated and all lighting is triggered by the motion sensor that detects you coming into the room. This is the rule for three of my modes. The boolean in the conditions is being set by a second rule.

This is the second rule. When this rule occurs it changes the boolean in the conditions of the first rule making it go false.

Here is the problem…

The lights come on as my wife walks into the room. They are set to go off after X minutes. The automation has started and so has the timer for the lights to go off. The is a Trigger with conditions. She sits down and turns on her pump. After about 40 seconds the power meter senses the load and the rule goes true, which then changes the boolean of the lights automation. I was thinking that the lights would stay on, but they do not. At the end of the set time for pending off, they go off. The boolean change is not stopping the countdown.

I do however have a VS switch built into the rule. At the bottom I am using the “Use this switch to disable the rule” option. When that switch is turned via her minimote, the lights stay on.

Here is what I’m thinking…

  1. The Trigger will only fire the rule when the trigger event occurs, thus starting the countdown. Even if the boolean condition changes it does not effect the rule because the Trigger event has not occured again. But, if the the Trigger event does happen again the rule will not fire because of the condition being false, thus the countdown will not be reset and the lights will still turn off.

Here is what I’m thinking will fix it???

  1. Forget about the boolean. Have the second rule turn on the Virtual Switch. But, I’m trying to get rid of the VS and utilize the full power of Rule Machine.

  2. Change the Trigger with conditions to an Actual rule, therefore when the rules conditions change the rule is reevaluated. But since the conditions are false, the rule will not continue.

Questions…

  1. Removing the boolean and using the VS will work, but that defeats the purpose of using the boolean and my goal of removing the VS. Is this correct?

  2. If I change the Trigger to a Rule, will the lights still go off if the boolean condition changes to false?

  3. I can’t put in the actions for false to turn on the lights, as that would keep the lights on all of the time. Right?

  4. I thought as I typed this out that I had figured it out, but I have just confused myself again.

Recap…

  1. Trigger will only fire when the trigger even occurs. Correct
  2. Changing the conditions of the Trigger after the trigger event occurs but before the Trigger countdown is finished will not stop the countdown???
  3. Am I being clear on what I am asking?

Thanks

Triggers aren’t useful if you want to cancel a countdown, only Rules.

The remainder of your post is an exercise for the reader…:grinning:

Ok, yes, it was… That’s how I figure things out in my head… Try being me sometime! !

Ok, so anything with s a countdown should be a rule, not a trigger… Got it.

Only if you want to be able to cancel the timer…

So in a rule with a private Boolean as a condition and a cancellable pending off as an action, will changing the Boolean (causing the rule to go false) stop the countdown?

Hmmm, tough question. Let’s see, the conditions go from true to false, so probably rule truth changes? What happens to a cancellable timer when rule truth changes?

I don’t know! ! ! ! I’m sooooooo confused! ! !

I’ve over thought the entire thing and broke it! ! ! !

Aaaaaaaccccccckkk!

@bravenel

I changed the trigger to a rule with motion, mode, and Boolean as the conditions for the rule.

The rule changed from true to false, but the lights still turned off… ?

Did you put Cancel on the delayed off? Or use Turn Off After Delay Pending Cancellation?

Show the new rule…

I created two test rules similar to yours, and it works fine.

Ahhhh… That’s what I forgot to do. Pending off cancellation is not an option with a trigger.

When I changed it from a trigger to a rule I forgot to changed that.

It’s changed now… So it should work this time.

I’ve been beating my head against the wall for days on this stupid simple rule!

I’ll let you know if it works.

Here’s the new rule, the right way! I think!