RM Exit Rule

Just asking a question
In RM 4, does anybody know for sure that Repeat Actions stops when Exit Rule is called?

I wrote this LightChaser for fun one evening. I am using Shelly 1 switches for the lights (the local switch greatly improves the WAF if the WiFi is out) and was concerned about discussions of the slowness of WiFi devices.

In the first version, I used 3 Sengled lights, Each light stays on for 1 second and makes 10 trips around and cuts off. Everything worked great. Then I tried starting and stopping the trigger during the 30 seconds. The order was not affected but the timing was. Some lights stayed in longer and some shorter. I believe that the Repeat Actions continues to run after the Exit Rule is called. If this is true it is not a big deal for a little 30 second routine, but it could be if there are longer routines that really start to stack up.

See the rule, with changes noted between V1 and V2. V2 runs a lot better than V1 (see the logs)


V2

V1

I do not believe that Exit Rule will stop any repeating actions, nor will it cancel any timers that are active in a rule.

You may want to start a new thread for a topic such as this, as it does not appear to be related to the original poster's subject matter for this thread. :wink:

3 Likes

I have found the opposite.. I found cases where ending the repeat doesn't actually end the repeat - and the only way to fully stop the rule is by using Exit Rule

Could you post a rule where this happens?

As far as I can tell, it shouldn't happen, so it should be brought to @bravenel's attention to permit a fix in a future RM release.

Thanks!

1 Like

I ended up deleting the rules where this was happening and rewriting them to work differently - but I would be surprised if this isn't picked up by others as it happened more than once in different rules. Anyone who is using repeats in complex tasks (where the repeat is nested in one or more if statements for example) will surely come across this issue.

It does not stop. You would have to take an action to explicitly stop the repetition. Exit rule simply exits the rule at that point. It does no "cleanup". Delayed and repeated actions are not affected.

7 Likes

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