Rule Machine Version 1.8 Released

(Bruce) #1

Rule Machine Version 1.8 Released

This release of Rule Machine introduces a few features, but more importantly is the result of some major effort with the code base. Entire sections of Rule Machine have been rewritten and cleaned up, including Actions selections, Delay These Actions, and Send messages. As that work progressed some bugs were identified and fixed, and refinements made.

Release Notes

  • Decimal values are now allowed for Power meters and Energy meter conditions
  • Random color can be selected in actions; picks random values for hue and saturation, and shows the values in the logs (this leaves something to be desired, too many colors are off-white)
  • Capability Door Control is now supported
  • Both Door Control and Garage Door control now have attributes of open, closed, opening, closing, unknown
  • Random delay refinements: if minutes delay selected with greater than 1 minute, shortest period is 60 seconds. If 1 minute selected, shortest period is 10 seconds (runIn() of less that 10 seconds dubious). In each case the delay is for a random number of seconds up to the number of minutes selected, and that is logged.
  • Run rule actions bug for actions that have a delay fixed.
  • Various UI refinements for Actions

The Rule Machine User Guide will be updated shortly. For this release, please update both Rule Machine and Rule.

Rule Machine github: Save and Publish for me.

Rule github: Save and Publish for me.

Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support
Notification of SHM Status Change
Any way to get a routine to dim to 15 percent?
Rule Machine Feature Requests
(Ash ( / Ashutosh Jaiswal) #3

@bravenel @Mike_Maxwell If Rule Machine was eligible for Oscars… then you would win all the awards! Leo would have no chance at all … :slightly_smiling:
Thanks a lot for your contribution. We appreciate all the hard work you are putting into this and making this from good to great to awesome to amazing to supercalifragilisticexpialidocious


(Mike Maxwell) #4

appears the version info in RM didn’t get updated…

(Mike Maxwell) #5

while i appreciate the mention, I played a very very small part in this app, this is @bravenel’s baby all the way.



just to mention - since the last 2 updates I no longer have to run through all my rules to confirm they are updated and dont have any pending changes - so I guess you cured the code - working as should

(Bruce) #7

You should not have to touch existing rules. But, that’s always been true, at least since early December.


that is what you have said the last time I did report it - I just mention it to confirm now - I dont need to no more - dont know if there was a glitch in the code …

(Bruce) #9

Rule Machine Version 1.8.1a Released

This update adds the logical NOT operator to rules. NOT may precede any Condition or parenthesized sub-rule in a rule. It’s meaning should be obvious, namely, to negate the truth of the condition or sub-rule it precedes.

Be sure to get the latest from Github: 1.8.1a:

Rule github: Save and Publish for me.

Rule Machine Feature Requests
Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support
(Benji) #10

RM is ridiculously powerful and continues to improve.

While I’m sure there is a lot that needs to be considered for SmartApp to run locally, I can see why, at the very least, everyone wants RM to be considered first for local processing above everything else. I can can tell you right now it can replace the functionality of two other SmartApps but at the same time, it could replace a lot of the child Smart Lighting ‘apps’ I have that duplicate a lot of functionality, just to cater for all scenarios where it could be done in one RM rule.

@bravenel , where’s your donations pot or have I missed it? I owe you!

(Bruce) #11

The “donations pot” is

pay it forward, be kind, answer questions, etc, etc…

Thanks!! I appreciate your remarks.


hmm just realised that the android app still shows rule machine to be 1.7.6a and not 1.8 …

maybe thats due to lines 76ff:
} if(state.ver) section ("Version 1.7.6a/" + state.ver) { } }

(Bruce) #13

That got fixed. Update your Rule Machine. You must have grabbed it in the first 4 minutes.


I have a SmartThings motion sensor that likes to “freeze” up and not report motion or temperature occasionally. The fix is to just pull the battery for a second. It’s only happened 2 maybe 3 times in several months, but last time it happened I was out of town for a week and I was nervous that one of my main motion detectors was simply not going to detect an intruder. So instead of manually checking it every few days to make sure the motion detector is still checking in to the hub, I’d like to create a rule to do this for me.

My first attempt looks like this:
Rule [any motion sensor] inactive AND mode = Home
Action for True: Delay by 5 hours, cancel, send me a push notice.

Basically I want it to be that if no motion has been detected by any motion sensor in my house for 5 hours and the home mode has been set to “Home” that entire time, I suspect my motion detector is malfunctioning.

But I don’t like the rule above because it creates a lot of extra chatter because the ST motion sensors have low cool downs and that rule would be a schedule() and unschedule() nightmare.

Is there a better condition to test of there has been no motion for X amount of minutes like “Things Quiet Down”?

My work around will be to run a routine to change my home mode to “Buggy” and have that routine automatically run, only if the home mode is “Home” and Things Quiet Down enabled for 5 hours. Then setup a trigger that if the home mode gets set to buggy, send me a text and instantly change the mode back to home. That seems really convoluted though.

(Mark) #15

Awesome, thanks for making those changes :slight_smile:

(Bruce) #16

This isn’t quite true. Rule Machine does not use unschedule() in this context. It does use runIn() to schedule the potentially canceled event. Each time motion goes inactive that starts a new timer, wiping out any old timer. This is normal for motion controlled lighting. The chatter, as you put it, is irrelevant.

No matter how you try to do this, some app has to respond to every motion event.

(Bruce) #17

Rule Machine Version 1.8.2a Released

This release features a complete reorganization of the Actions selection pages. These pages had grown to be so big, with so many options, that they were becoming very slow to update in the mobile app. What this new version does is break the action selections into a number of sub-pages around common things, like switches, dimmers, etc. With this change, mobile app responsiveness is back to what it should be.

There is an issue in this release with editing old rules. When you go into Actions the first time, your actions will not be shown under the headings. If you go into the headings and back out, your actions will show up. The rule itself is fine and will function properly. Just the display of the action in the headings is affected.

This version, in 1.8.2a, shows the private Boolean truth in the Restrictions section, with Enable/Disable with private Boolean.

Rule github: Save and Publish for me.

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

@bravenel, you are a machine!!

I literally just update RM in my IDE 5 minutes ago! lol

Serious kudos to you Bruce for all of the dedication and hard work that you put into RM!

Once I have some free time from my coding effort for employment, I am going to spend some time learning Groovy and “pay it forward” to the degree that I am able.

You have earned more than a few of these: :beer:

(Kevin) #19

I agree with David Thank you Bruce.


@bravenel this is one of those situations again where I need to run through all my rules so the details are shown correctly - the initial values are still shown but if you drill down the actions for example dont show up - do net render correctly unless I confirm them again - the rules however still work …

(Bruce) #21

You can do that if you want. The intermediate pages cannot populate the text description until you open them. But the actions are displayed correctly on the main page, and will work correctly. If you like playing with rules, knock yourself out.

The tradeoff here is the responsiveness of the mobile app, or lack thereof when there is a monster page like the former Actions selection pages.