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

I can’t see how that could work.

Hrm… maybe not… I was thinking something like ‘motion stopped AND timer >= x min’

This is great! I have a case where if I have a switch turned on, I want to turn it off again within a few seconds. I’m working on a project where I use a push solenoid to physically press the power button on my Mac Mini as part of my media center. It’s an electronic power switch so I can’t automate it with the usual on/off power cycle. When I tell Alexa to turn on my TV, she does so but I still have to get up and power on my Mac Mini (I know I can keep it in sleep mode and press another button or keyboard to wake it but I want to keep it off). Currently, I’m using IFTTT to turn off power to the solenoid after a switch has been turned on but it can be unreliable. When I try to set up a rule to turn off, I’m not able to because there is only a “Switches to turn off when false” option. I think I need a “Switches to turn off when true” option as well or maybe I can “Run a routine when true” option…hmm…I think I just answered my own question. I’m going to try that.

Update: OK, that works! Thanks again for your hard work, your app solved my problem brilliantly. :slight_smile:


The problem is by whom and when the timer is started. The timer would have to be within Rule Machine for it to see it. But, when would it start? Rule Machine runs continuously, looking for events that affect conditions. But, a timer is a one time thing, started by something, and then triggering something when it’s done. It just doesn’t make sense as a Condition.

UPDATE: 2015-11-12
@bravenel has updated his app to parent child, I will be deleting the temp repo I created a few days ago.
Please use Bruces repo.


You don’t need to publish the child, just save it. That way you only see the one you want to install in the list.


they must have fixed that, it didn’t work that way when parent/child info was first released…

Ah, ok… didn’t dive into the code too deeply - you’re polling regularly… yeah, I can’t see how it would work either…

Thanks for your work though Bruce - this is already turning out to be quite handy.

1 Like

Actually, it doesn’t poll at all. It simply subscribes to every event that could affect the state of the conditions.





Interested to see examples of use cases for this :slight_smile:

lets see, turn the bathroom fan on if there’s motion and humidity is above xyz %
turn the lights on if there’s motion, but only if lux is below xxx and there are people home.
Think of it this way, currently there’s no simple way of taking multiple inputs with different values and then triggering something else based on standard logic.
I get that Boolean logic isn’t for everyone, but this fits the bill for complex automations where you may have been forced to create modes to deal with them, or just couldn’t do it all…


Yeah, these make great sense. I was just having ‘writers block’ after install, heh. “Oooh new smart app! Now what do I do with it?” :smiley:

Already used it to replace my Smart Lighting App that was finicky at best. Though Having a trouble figuring out how to do one thing - I have a rule set up to turn on the garage light when the garage door opens between sunset and sunrise. However, I want to leave the garage light open for 5 minutes after the door closes. Can’t quite figure out how to do that in the rule, or if I can do it in one rule?

Or something simple like, If a switch is turned, immediately turn it off again. I needed that to momentarily power on a switch to give power to a solenoid so I didn’t continually leave it energized.

Rule Machine doesn’t have a way of handling timed events. Those have to be done in Smart Lighting or some such app. It can restrict the truth of the rule to a time period, but can’t do anything based on the passage of time, or a timer.

Noticing an issue with the Time Of Day capability. Trying to set rule to lock a door if it’s not locked at midnight (or any time, really) but the only option I have it to set a specific start and end time. Would I just specify the same time in both fields?

Rats! Smart Lighting app has been flaky, at best.

If you set the time of day to be from 12:00 to 12:01, Rule Machine is going to look at the lock at both times. If you set it to be 12:00 to 12:00, it’s going to look at it twice at midnight.

What I was expecting was the option to look at the time once, OR between x time and x time… it’s not set up to do that, just the between x time and x time.

Tomorrow I’ll look at allowing just a single time, which would mean to run the rule evaluation at that time every day. That makes sense. Good idea!