Rule Machine Version 1.7 Released

Thanks!
I think I’m catching on to how this works.
Looks like it will be a very useful app once I have it figured out.

I’m trying to setup a “honey I’m cold” button using my Amazon Echo. I’ve already got the virtual switch and echo integration working, but I can’t figure out how to set it up in Rule Machine. I have the trigger as the virtual switch, but I can’t find an action that will let me turn up my nest 1 degree from wherever it is at the moment. Is this possible? Thanks!

@bravenel, you have the patience of a god! Im sure seeing the same/similar questions about this amazing app get frustrating, and you flick that off your shoulder like a sir. Not all of us think like a programmer and you, sir, handle that very well.

For that (and this app) I commend you!

3 Likes

Rule Machine Version 1.7.11 Released

Release Notes:

  • Added seconds of delay as option for Turn On/Off After a Delay
  • Further UI refinement to better distinguish Triggers

There are now two distinct varieties of Triggers: a Trigger and a Conditional Trigger. When you Create a New Rule, there now four choices: Rule, Trigger, Conditional Trigger, Actions. See screenshots below.

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

Top screen is new Rule page. Below that, on left is a Trigger, and on the right a Conditional Trigger.

3 Likes

Is the seconds of delay just to make it more user friendly, or is there a benefit to switching from milliseconds?

It will do minutes, seconds and milliseconds. Minutes and seconds use runIn(), and milliseconds uses a different method ([delay: msecs]).

Not sure which is better.

And, UI consistency with Delay These Actions.

1 Like

In my experience, [delay: msecs] is far, far more reliable than other types of scheduling. I don’t know if delays are scheduled differently than runIn() on the backend, but I do know that I’ve had a smartapp using delay (to trigger my hot water recirculating pump to pump for 27 seconds) running for 18 months, and it’s never once failed.

“never once failed” is not a phrase I can apply to any other part of my ST setup.

2 Likes

Can you add seconds/milliseconds to the “Turn on or off these switches after a delay, pending cancellation”? It has only minutes available right now. Thanks for all of your work!

You can do that with Delay These Actions, Cancel. Milliseconds wouldn’t work for that. Seconds are iffy.

Got it… Could there be a bug with this release? I don’t see the “cancel” option under the “Delay These Actions” menu. I see minutes/seconds/milliseconds"… just don’t see the “Cancel” slider that use to be there. Or is it just me?

If you’re using a Trigger, cancel is not available. It’s only for Rules.

Hm… Mine doesnt seem to be working that way. I just tried defining a new rule and i dont get the cancel option. Im on 1.7.3/1.7.11a.

Are you on Android? … If so, go back into the delay setting a second time, and then back out, and it should show up.

Also, it won’t show up in Actions for True (or False) until you have defined Conditions.

IOS… here are screenshots… i have conditions defined and no cancel option. I’ve seen it in the past… just not with this release. I’ve gone back in multiple times after defining conditions, actions for true, actions for false, etc… and no cancel option. I’m baffled.

Cancel doesn’t show up as an option until you select minutes of delay, enter a number.

If all you want to delay is on or off, then use Turn On/Off After a Delay, Pending Cancellation.

When I select “minute” i get the cancel option… when I try to use milliseconds I don’t get the cancel option. That is what I was trying to do… use milliseconds as the time unit and then use cancel. I guess I am understanding your earlier comment about milliseconds. my bad I guess for not understanding. I was trying to use milliseconds and hoping to get a better scheduling result per the previous comments in this post… but also be able to use cancel. I guess I can use milliseconds in delay and then use delay pending cancellation for just a short period of time and maybe the chance of a schedule mishap is smaller.

There is no way to cancel the milliseconds delay – it uses a completely different mechanism in the cloud. It may be a more reliable mechanism than seconds delay, but cancel doesn’t work.

1 Like

Just got the new stuff and I’m having a problem. On Rules with a trigger, everything looks fine but on Rules with only Actions, when I try to edit the rule there is only a ‘Define Actions’ header with nothing between it and the ‘More Options’ header so I can’t get to my Actions to edit them. Did I miss a memo or something?

@bravenel
I second this, when an action is created and done is selected, the action is no longer editable.

Also, I had four actions created for the same set of lights. Each action set the lights to a different dimmer level. Each action was restricted to a different mode.
A rule was created that when true ran all four actions. But the only action that should have affected the lights would have been the one matching the current mode.

All of the actions ranat once, which of course created an interesting effect with my lights.

Yep, I goofed something up. I will investigate.

OK. Fixed that. Pushed the tweak to Github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.

@bamarayne, sorry for that, fixed that bug also. That should work now, with mode restrictions (or any other restriction) on Actions.

1 Like