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.
@bravenel@Mike_Maxwell If Rule Machine was eligible for Oscarsā¦ then you would win all the awards! Leo would have no chance at all ā¦
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
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
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 ā¦
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.
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!
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.
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.
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.
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.
@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.