Help with Rule to Cycle Switch On and Off

I am wanting a rule to cycle a switch/outlet on and off every XX minutes and then shut off completely after XX minutes. Is this possible with RM and if so any advise in writing it will be greatly appreciated.

You can use a repeat loop with toggle. How often and for how long? From that you can calculate the number of repeats. What do you want to be the trigger?

Here's an example that'll toggle the outlet 10 times every 5 minutes then ensure the light is off.

Trigger Events:
When time is 08:00 AM

Actions to Run:
Repeat 10 times every 0:05:00
    Toggle: outlet
END-REF
Off: outlet

You might need to add a Wait before the Off if the light could be on when the Repeat starts.

2 Likes

Thanks. I’ll give it a try

I think I did something wrong, not quite working right. I forgot to mention that when I turn it on manually I want it to stay on for 2 minutes first, then start the timed repeat and then OFF. Couldyou take a look please? :smile:

image

That depends on whether or not the outlet has separate event types for physical vs digital. Check the events page for the device to make sure it differentiates. You can test by turning it on in HE and turn it off physically.

2 Likes

You've also got the off inside the repeat, I think that needs to sit outside,according to @pseudonym 's suggestion

3 Likes

I think all you need to do is move the Off to after the END-REP.

2 Likes

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