Auto Resume

Is it possible to have a rule that is paused, resume programmatically after some period of time that I specify?

It would have to be a separate rule that resumes it.

A rule could run a separate rule that has a delayed resume of it, then pause itself. The separate rule wouldn't need a trigger, just the delayed resume rule.

1 Like

I recently posted a feature request about this very thing.

1 Like

@waterboysh exactly. I have times when I am going to be away from home and may not want rules to run while I am away. If someone could show me what a rule to resume a rule could look like, that might help..

My old system provided this dialog box as a popup when you suspended (paused) a program (rule)
Screen Shot 2022-12-07 at 7.29.21 AM

@bravenel I am going to give this a go but if you could show me an example of what that rule might look like that would be amazing?

Have you considered the use of a virtual switch? I use modes but keep them simple: Day, Night/Stay, and Away. Away turns things off but the expectation is I will come back soon so I have a Vacation virtual switch that I turn on when gone for longer periods. Many stock apps have restrictions to not fire based on the state of a switch so I have several rules with a restriction of my vacation switch so certain devices will not turn on. You can also use the switch in a Rule Machine condition too.

I also use my Google Calendar integration to automate the vacation switch based on calendar entry.

1 Like

Yeah, the use case you provide is actually accomplished very easily if you use modes. Just put a restriction on your rules to not run when in away mode. Being away from your house is a regular occurrence so you want that functionality baked into your rules.

The Google Calendar integration is nice too and I use it the same way @ritchierich mentioned. I create a calendar even and as long as it has the word "vacation" in it, my hub's mode will switch to vacation until I get back.

The use case I mention is for when you want to suspend a rule/app for the rest of the day (or some other period) but then have it start working again once a condition has been met. You can do that now in RM, but the trigger would be unknown so you'd have to go manually run it which isn't much different from manually pausing the app to begin with. Examples in my case are:

  1. Make the bathroom lights not turn on because I have a migraine.
  2. A kid is sick and going to bed early so stop turning on their light with motion.

These sort of things could be worked around with virtual switches and rules... but they're "one off" occurrences that only happen occasionally. I would even settle for each app just having two buttons. One that says "Pause" like we have now and one that says "Pause until tomorrow" so the app will auto unpause at midnight.

And to be fair, I realize it's a fairly niche use case and might not be worth the development costs.

So basically I have to rewrite the rules to incorporate modes?

You don't have to rewrite the rules. Adding it is really simple. It also doesn't have to be modes. I don't use modes for anything so I just use my presence sensor directly. Just open the rule and add a required expression. I don't normally have a required expression on this rule but added one real quick to show you what it might look like.

I don't work from home on a regular basis, but it's easy to program in a condition that can be checked against to determine if the rule should run or not.

There is no check that RM can do to determine if my 3 year old is sick and going to bed early. So the only way to make the Room Lighting app stop turning the lights on in their room before bedtime is to open the app and pause it. That's the type of situation where I would want an "auto resume when X condition is true/false" type option.

Hummm I am already using modes for my Christmas Lights. So if I change the mode to away for this, none of my Christmas lights will come on..

Am I missing something?

No. You're seeing why I don't use modes. I have a rule for my Christmas lights too. The rule incorporates the time directly into it. The trigger is when time becomes 30 minutes before sunset. The action is to turn on the lights, wait until a certain time, and then turn the lights back off.

I tried using modes but realized I wanted different things to happen at different times and it was not easy to capture that in a mode when only one can be active at a time.

In my Christmas light rule, I have a hub variable that gets set. It acts as a quasi mode of sorts. The boolean becomes true the day after Thanksgiving and becomes false on January 7th.

Same here,

So that circles me back to my original question - how can I auto resume a paused rule of modes if using modes is not an option?

You're using modes in a way that is incompatible with what you want. There can only be one mode active at a time. What happens if you want a rule to trigger only when the mode is night and another to trigger when the mode is holiday? It can't be both modes at the same time so one of the rules will end up not triggering.

Modes are really meant to designate broad time periods. Like, morning, day, night, etc. The Away mode is special because it is based on location. But when your mode changes to Away, any rule that triggers using a mode won't run. That is by design.

You can pause and unpause a rule as an action in another rule.

image

You'd have to build some logic into it and it would function similar to using a hub variable like I do. Make a rule called ItsChristmas! and the trigger would be whatever day you want to unpause the rule. Make another rule called ChristmasIsOver and the trigger would be when you don't want the lights to come on anymore and pause the rule. Instead of pausing an unpause a rule, I use a hub variable because I could use that variable in another rule if I wanted.

There's always the option of using an app as well, like this one.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.