I use some repeat loops in apps (irrigation schedule - repeat 3 minute watering every 15 minutes for "variable" times). The last couple weeks we have been having all of our apps that use this feature perform the actions in the loop the first time, then just move on in the app (to the end) and don't perform the actions in the loop again.
Then we run the app again and it works. We use this several times a day and it has been working without fail for a couple years. No changes to the apps.
Is the rule logging turned on? I'd go into the rule and hit Done if you haven't already then check the logs when it doesn't work as expected. If you have the logs then post them.
This should repeat 10 times and it doesn't actually repeat. Interestingly, if we run the app a second time immediately following the failure (say, 5 minutes after), it runs properly and does all repeats.
I'm not seeing anything obvious. Can you make a simple rule and see if you can replicate the behavior? Will it work consistently if you use a set number instead of a variable?
I'm not able to do anything with the export you sent, as it's too large to work with, too many devices referenced. I'm just not equipped to reproduce your exact setup, and as I said, I'm not able to reproduce the basic failure you describe.
One thing you could try would be to create a new rule that only has actions, specifically the actions in the Repeat loop (you can use copy actions, export clipboard, import clipboard, etc). Then in the rule, replace all of the actions in the loop with Run Rule Actions on that other rule. This would separate the two parts. If the result still doesn't work, then make a variant rule that is just the Repeat loop, minus the Notify actions, and provide a list of the variables in use (and their types) as I would need to recreate those. Also strip out the Run Rule Action action, and I will create a rule and add that in after I import your rule. I need something more manageable to import.
I am having the exact problem. A very simple Repeat 4 times every 0:01:00/END-REP does not always repeat. I get Repetition Ended in the log before the correct number of repetitions.
This is the simple Rule Machine rule. However the same problem is occurring intermittently for all rules that use Repeat. Note that this issue is intermittent though frequent, sometimes the rule repeats correctly.
The Delay action was mentioned before as a possible issue - is that true and why because the rule works sometimes. While composing this reply the rule failed to repreat on the very first try (log pasted here) but then worked perfectly (repeated 4 times) a couple of minutes later. The issue has existed for several weeks. I have C-8 hubs that are up to date.
I will look into this. But, could I ask a stupid question? Why are you wanting to repeat these actions at all? Are your shades not responding reliably?
I set up a rule pretty much like yours, and it doesn't fail. So I'm a bit stumped as to what's going on. I don't think the delay has anything to do with it though. Another stupid question, why the delay in the first place? Is this related to the first question above??
The repeat is because the shades do not respond reliably. The shades are controlled by 2 physical Somfy Mylink hubs which are controlled by Hubitat using the Somfy MyLink Hub and Somfy MyLink Shade drivers. Unfortunately the shade response is not totally reliable (not a Hubitat issue) so I repeat the open (also a close in a separate rule) commands to make sure all shades get opened. The 5 second pause between open commands is also to workaround Somfy Mylink shortcomings; if multiple commands are rapidly sent to the Somfy Mylink hub for multiple shades then some shades to not respond at all. This somfy Mylink behavior is also true when Alexa sends multiple rapid commands.
In other words the repeat and the delay are needed to get a reliable result from Somfy Mylink.
Not sure if this information will help but when the correct number of repetitions do occur we do not get the Action: Repetition ended entry in the log. That Action: Repetition ended entry only occurs when the repeat loop ends prematurely, usually after 1 repetition.