Rule Machine Version 1.9 Released

Rule Machine Version 1.9 Released

With this release comes a new and powerful scheduling feature, a new Trigger Event called Periodic.

Release Notes:

  • Added Periodic Trigger Event
  • Added option to disable logging from a Rule
  • Bug fixes for ZWN-SC7 button controller

Periodic

The Periodic feature brings the power of CRON scheduling to Rule Machine. There are many different kinds of periodic schedules you can create:

  • Minutes
    Every N minutes
    Each selected minute
  • Hourly
    Every N hours, starting at a selected time
    Each selected hour, at a selected minute after the hour
  • Daily
    Every N days
    Every weekday
    Each selected day of the month
    – At a selected time
  • Weekly
    Each selected day of the week
    – At a selected time
  • Monthly
    On a selected day of every N months
    On a selected day of selected months
    On a selected day of the week in a selected week of the month of every N months
    – At a selected time

SmartThings has recently rolled out their new scheduling system. It’s seems appropriate to commemorate that with something that uses it extensively.

For this update you should update both Rule Machine and Rule:

Rule Machine github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule-machine.src/rule-machine.groovy. Save and Publish for me.

Rule github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.

24 Likes

Screen Shots:

4 Likes

Woohooo! ! ! You just made my day! ! ! This is awesome and totally changes how I do things in RM! Thank you Bruce!

1 Like

This CRON scheduling will be nice. Hoping it can replace some of my IFTTT scheduling.

The documentation for scheduling recurring events says not to use chained runIn()s, but to use cron scheduling instead. When you create a loop using a virtual switch or private Boolean, you’re using chained runIn()s. By using Periodic, you’ll be using cron scheduling.

The shortest time period is one minute.

2 Likes

If I understand the release notes on the new scheduler, using a chained RunIn() will be automatically rescheduled.

I like this update as we can now schedule things more reliably. It definitely opens up RM to a new level of power.

The first thing I see changing is how I’ve programmed my thermostats. I can work in more seasonal changes to them instead of going day by day.

Actually, no. They can’t change chained RunIn() into schedules. And no, RM update does not mean the schedules will be more reliable.

If the schedules are more reliable, it’s because of what SmartThings has done.

1 Like

Plus, thanks to your nagging, I put in the option to turn off logging. :grinning: It’s at the bottom of More Options.

3 Likes

I think we need to start paying @slagle to make sure your garage door opens ‘accidentally’ because every time something pisses you off, the Rule becomes more powerful! Nice job! Thank you…

4 Likes

Actually, Mr. Slagle spent hours holding my hand this morning while I chased down what turned out to be my own bug. I feel really bad about wasting his time. I found it eventually, and all is good. Thanks Tim!! @slagle

14 Likes

You can actually use this to create a Trigger that will remind you of your Mom’s birthday every year with a SMS message. You can also do the things people wanted like enabling their holiday lighting rules automatically, and then disabling them automatically, on a schedule you set up.

4 Likes

Oh man… I can imagine the excuses now.

“Mom, I meant to call you on your birthday but the SmartThings scheduler went wonky again and I didn’t get the text”

7 Likes

So awesome! Now we’ll collectively break the new scheduler with this!

5 Likes

Awesome!!! Thanks for bringing this feature …This is awesome!

This definitely addresses what I was looking for… And Bruce delivered yet once again!!!

2 Likes

Wow amazing! Now I can make my own color loop for my Osram lights that don’t support it yet! I have a rule set to run every minute and set them to a random color and it works pretty well so far :slight_smile: would be nice to make it more frequent but it works for now! Thanks!!!

2 Likes

Thanks, so it WAS you who suggested it! I was going to go search to find that post. :grinning:

It was a fair amount of work. Frankly, I came to it backasswards, as usual. I was messing around with cron, which I never use, and saw these cool sites that show how cron can do cool things, like CronMaker. ST uses CronMaker to test all of their cron schedules for validity, or even to create them in the first place. I used it extensively to test as I worked on it, and to see how it’s supposed to work.

At some point along the way, the light bulb went on, that this was Periodic, and cron is the ugly Unix command that needs a UI to present the power to the user. RM brings more than CronMaker will create, with the Select Minute, Hour, Day, Month stuff, thanks to another website that showed how that stuff works.

5 Likes

Very nice! Thank you, this will be a distracting release because I’ll be thinking of where I can use this instead of listening/interacting with people.

I understand. I think my wife could say something about that wrt me working on RM. :grinning:

Hey Bruce, I use Sonos reminders extensively, but one thing I was never able to do, is setting a reminder for every other week on Thursday. Is there a way to do it using the periodic? Maybe a future enhancement of every n weeks?!

Cron doesn’t support that. There are actually many things you can’t do with cron directly, such as every 90 minutes. For some of these it just takes two triggers, e.g., one for 1st week of every month, and another for third week.

But, you can only have one Periodic per Trigger. The second trigger could just run the first one’s actions, and you’d be all set.

1 Like