Rule Machine Version 1.8 Released

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: 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.

17 Likes

@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

Thanks!

4 Likes

appears the version info in RM didnā€™t get updatedā€¦

1 Like

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

@bravenel

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

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

1 Like

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 ā€¦

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: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.

5 Likes

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!

The ā€œdonations potā€ is

pay it forward, be kind, answer questions, etc, etcā€¦

Thanks!! I appreciate your remarks.

13 Likes

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) { } }

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

1 Like

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.

Awesome, thanks for making those changes :slight_smile:

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.

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: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.

2 Likes

@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:

2 Likes

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 ā€¦

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.