Rule Machine - Get peer assistance here with setting up rules

Ok, thanks. There would be other use cases for this, like if you want to make incremental temperature changes during activities like beer fermentation (another hobby of mine :slight_smile: ). I’m sure there are much higher development priorities on your list but it never hurts to mention it. :wink:

This feature has been released. See this post:

Bruce this works perfect with my nest thermostat. Glad I spent an hour last night messing around with custom commands to try and adjust the heat by 1 degree, haha. This took less than a min to setup now, thanks for all that you do for the community.

1 Like

Works flawlessly with my CT100 using a custom device type. Thanks!

1 Like

Is there any sort of written tutorial on how to get the most out of Rule Machine, or is it just a matter of reading through many threads on the subject?

I’m particularly interested in learning how to set up a convenient way to temporarily disable a rule with out having to delete it and then start over when I want to use it again.
It sounds like the use of the Private Boolean feature might be preferable to the Virtual Switch approach (which I have used), but I’m have some difficulty figuring out the PB approach.


There is a User Guide, although that’s not much of a tutorial. The original Rule Machine post is probably the most in depth discussion of how it works.

The easiest way to go about selectively disabling a SmartApp, be it a Rule or just about anything, is to restrict it to a special mode, one that you don’t use, one that exists solely for this purpose. You could call it Disable. Then in the More Options section of a Rule, select Only When Mode is and set it to Disable. Then, that rule is toast until you remove the restriction.

If you want to do this programmatically, you could use Enable/Disable with private Boolean, also under More Options. Some other rule could set this rule’s private Boolean to false, and that would disable it, or set it back to true to re-enable it.

I have a virtual switch called “RM Disable” that I use for that purpose. I like that better than using a fake Mode because 1) the state of it is readily visible while the current mode is not, and 2) it’s very easy to turn on/off, again while the mode is not.

1 Like

I think you misunderstood my post. The current mode or changing the mode has nothing at all to do with this. The mode restriction is just a mechanism that kills the rule without deleting it.

Exactly. And using a virtual switch to disable the rule (“Switch to disable Rule”) works in the same way, yes? And the switch has the advantages that I listed vs the mode, yes?

Options are good. There are lots of ways to do this. :grinning:

Personally, when I want to turn off a rule, I show it pictures of Hillary Clinton at the beach!


Are there 2 different ways to turn off lights (Actions for False) with motion stop?

I’ve seen the “Delay These Action” with minutes of delay with “Cancel on truth change”

(this is what I have for all my rules now)

…and "Turn on or off these switches after a delay, pending cancellation (default is OFF)

Are both of these similar when applied to a motion sensor in condition and rule?

I have set up a rule (“Front Morning”) to run my outside lights each morning between 06:18 and 07:20: a)on days that I work and b) only when the result of another rule (“SunriseCheck”) is true (see below for both rules).

This morning, the result of SunriseCheck should have been False because the math works out to be negative (I.e., sunrise was too early). But the lights ran anyway. When I looked at both rules, the results of SunriseCheck were still shown as true. I went into SunriseCheck and then hit “Done” - which evaluated the rule and changed the results to False in both rules. The lights then turned off. So although it appears my math/logic is fine, the lights ran when they shouldn’t have because it appears SunriseCheck didn’t run/evaluate on its own.

Edit: I also added a capture of SunriseCheck’s history

So after all that, my question is: Should SunriseCheck have been evaluated because it was called from Front Morning or do I need to add a trigger to SunriseCheck to force it to evaluate before Front Morning runs. In other words, did I miss something or was it due to a Smart Things issue?

Hope that all makes sense. TIA


Yes, they are similar. “Delay These Actions” delays all of the actions, and the second is simply a delayed off. Both offer cancel as a choice. If you are just doing motion, either will work.

1 Like

There was a bug with using Rule Truth as a condition. I bet that’s what bit you. Please tell me the version number shown at the bottom of Rule Machine main page. Current versions are 1.7.6a/1.7.15b.

Would you please get the latest source from Github for both Rule Machine and Rule.

Rule Machine github: Save and Publish for me.

Rule github: Save and Publish for me.

Please let me know if that solves the problem.

Thank you for your response. Unfortunately, between the time that I had the issue and then posted the question, I updated to versions 1.7.6a/1.7.15b. So, I’m not sure what versions I was on at the time of the error this morning. I believe the last time I updated Rule Machine/Rule previously was late last week or maybe earlier this week. Sorry!

The next time the Rule Truth of SunriseCheck will be evaluated to true and called from FrontMorning without any changes is on 13 March when daylight savings time starts. However, I will write a test pair of rules that are similar so I can test them and I’ll let you know - hopefully later today.

Thanks again.


Can’t figure out how to setup a simple rule.

I’d like to have a switch on for 15 minutes and off for 45 minutes. Between the hours of 6am and 9pm.

There is a lot of missing info here.

What do you want as your trigger (what turns on/off there light).
Exact time you want it to come on, and go off.
Do you want it on for 45 continued minutes? Or do you want it on for say, the 15 minute periods?

Let us know exactly what you want.

The trigger would be TIME
Between the hours of 6am and 9pm

6:00am switch on
6:15am switch off
7:00am switch on
7:15am switch off
and so on until 9pm

Does that makes sense? Thank you.

Yes, that makes sense. This will probably take a whole handful of rules. Let me think about it and I’ll work something up.

I’m sure others will be happy to help as always.

This one seems simple, but the programming will be pretty interesting on it.