Rule Machine Version 1.9 Released


(Bruce) #1

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.


SHM or Home Mode Indicator lights
Rule Machine Feature Requests
Do you guys use virtual switches for groups of lights?
Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support
Hue Bridge, ST and resetting to last colour used
Minimote V1
Forum formatting tips/tricks
(Bruce) #2

Screen Shots:


(Jason "The Enabler" as deemed so by @Smart) #3

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


(Brian Diehl) #4

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


(Bruce) #5

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.


(Jason "The Enabler" as deemed so by @Smart) #6

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.


(Bruce) #7

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.


(Bruce) #8

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


(Bobby) #9

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…


(Bruce) #10

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


(Bruce) #11

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.


(Brian Diehl) #12

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”


(Michael Hess) #13

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


(Ash (www.smart-dots.com) / Ashutosh Jaiswal) #14

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

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


#15

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!!!


(Bruce) #16

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.


#17

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.


(Bruce) #18

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


(Bobby) #19

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?!


(Bruce) #20

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.