Bug: UI for Repeat While action messed up

I have rules setup to manage by blinds that include variable repeat intervals so I can play with the timing in one place instead of updating all of the rules.

When I click through and try to change the variable:

The cursor moves to the repeat n times box and wants me to enter in something, even though the repeat variable n times switch is not on. Nothing I can do will get me a done on this page. Trued entering 0, then a value, then turning the switch on and then off, etc.

However, if I do change the variable and then click back and refresh - it does indeed change the variable. So this is maybe just a UI issue?

Also, it does appear that Hubitat does not show the variable as in use even though it is showing in the rule:

This is the normal way the UI works for every page in the hub -- the cursor automatically goes to the first unfilled field of the page. It has no significance, and is only for convenience. You can still select the pulldown for the Variable repeat interval to change the variable.

You have to hit Update or Done before it will show in use for the changed variable. In my test, this works as expected.

@bravenel I probably didn't explain myself properly. If you look at the attached video you will see me changing the variable and then I am stuck. No Done or Update button to click on. Even cancel does nothing. And when I try to click back it yells at me:

It does appear to save the variable change because if I hit Back repeatedly and then go back into the rule the new variable name has been saved.

Ah, now I see....

It is a Repeat While issue. Yeah, I think that is a bug. I will track it down.

The bug has to do with the UI sequencing of the Expression for the While part. Here is the action the first time one tries to edit it:

There are two things here.

  1. The Cancel editing action button doesn't work
  2. Hitting Done with While Expression works as the Done button for editing the action.

That UI is pretty messed up. I think it needs to be completely redone.

I also think this is a pretty rare situation. I am only using variables as I wanted to be able to easily adjust the while times for a whole series of rules.

But when I did it originally it didn't occur to me that some blinds would need more time than others. So I used one variable for all and as a result had some blinds going up in stops and starts.

But it definitely is nice to have variable control here.

You should be able to work around the problems. If you get the screen with Define Expression element (a bug), add any existing Condition from the dropdown, and then immediately Edit While Expression to remove that Condition.

If you change the variable, hit Done editing Expression to exit that page.

Also I have since learned that hitting the back button a few times to break out of this screen and then clicking done on the first screen does appear to do the job.

@bravenel In follow-up to this I had some further questions about this rule and I wasn't sure they were related to the bug or my logic.

In this block my intention is to have the rule send the open command then while it is showing something other than open - closing, closed, partially open - to repeat the command every 2 minutes. A normal time from rule start to shade open is about 30 seconds. If the shade happened to get stuck, not received the open command, etc. then it would try the open command again.

I noticed that the open command was being sent repeatedly - I can tell as the shade pauses each time it gets it.

So I put a pushover in there and sure enough it sends me repeated pushover messages until the shade reaches the desired open state.

So the variable repeat interval, which is set to 2 minutes on this example, should mean that it doesn't retry the commands for 2 minutes? Is my logic wrong or is this related to the issue above that somehow it is not processing the rule correctly? Thanks.


The UI issue is fixed in 2.3.8, now in beta. You need to look at the logs to know what's going on, show them here if you think they're unexpected.

1 Like

Hi @bravenel - here is a log of the rule when I send an open command.

As far as I can tell it is dropping into the repeat and then repeating constantly until the shade reaches the open position. My assumption in setting up the rule is that it would repeat the actions every 2 minutes. Incidentally I have tested by using the variable delay and also by just entering the time and get the same response. I don't know if I have set something up incorrectly or whether something is not working the way it should.

Also, one other thing I don't understand. I am triggering this by a virtual device. I click Open on the virtual device and it triggers the rule as expected. Yet the log shows that it passes through the rule with the virtual device testing as Closed, when in fact it is open, and then drops out and triggers immediately again and this time the virtual device tests correctly:

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:37.204 AM[info](http://192.168.2.108/logs#)Triggered: Breakfast Room Shade (Virtual) shade *changed*

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:37.118 AM[info](http://192.168.2.108/logs#)Event: Breakfast Room Shade (Virtual) windowShade open

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.614 AM[info](http://192.168.2.108/logs#)Action: END-IF

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.609 AM[info](http://192.168.2.108/logs#)Action: END-IF

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.604 AM[info](http://192.168.2.108/logs#)~~Action: END-REP~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.436 AM[info](http://192.168.2.108/logs#)~~Action: Close: Breakfast Room Shade on HubitatC8~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.432 AM[info](http://192.168.2.108/logs#)~~Action: Delay 0:00:45~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.427 AM[info](http://192.168.2.108/logs#)~~Action: While (Breakfast Room Shade on HubitatC8 shade opening(F) OR Breakfast Room Shade on HubitatC8 shade open(F) OR Breakfast Room Shade on HubitatC8 shade partially open(F) [FALSE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00)~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.393 AM[info](http://192.168.2.108/logs#)~~Action: Close: Breakfast Room Shade on HubitatC8~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.389 AM[info](http://192.168.2.108/logs#)Action: IF (Breakfast Room Shade (Virtual) shade closed(F) [FALSE]) THEN (skipping)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.384 AM[info](http://192.168.2.108/logs#)Action: ELSE (do actions)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.368 AM[info](http://192.168.2.108/logs#)~~Action: END-REP~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.363 AM[info](http://192.168.2.108/logs#)~~Action: Open: Breakfast Room Shade on HubitatC8~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.354 AM[info](http://192.168.2.108/logs#)~~Action: Log: 'In repeat loop opening breakfast room shade'~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.350 AM[info](http://192.168.2.108/logs#)~~Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(T) OR Breakfast Room Shade on HubitatC8 shade partially open(F) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00)~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.163 AM[info](http://192.168.2.108/logs#)~~Action: Open: Breakfast Room Shade on HubitatC8~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:28.151 AM[info](http://192.168.2.108/logs#)Action: IF (Breakfast Room Shade (Virtual) shade open(F) [FALSE]) THEN (skipping)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:27.306 AM[info](http://192.168.2.108/logs#)Event: Actions stopped by Blinds/Shades: Breakfast Room Shades (Virtual) - Perform Actions

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:27.107 AM[info](http://192.168.2.108/logs#)Action: Cancel Timed Actions: **This Rule**

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:27.041 AM[info](http://192.168.2.108/logs#)Triggered: Breakfast Room Shade (Virtual) shade *changed*

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:21:26.828 AM[info](http://192.168.2.108/logs#)Event: Breakfast Room Shade (Virtual) windowShade opening

Here is the rule:

And here is the remainder of the execution showing the continuous repeating:

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.603 AM[info](http://192.168.2.108/logs#)Action: END-IF

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.599 AM[info](http://192.168.2.108/logs#)~~Action: END-IF~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.595 AM[info](http://192.168.2.108/logs#)~~Action: END-REP~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.592 AM[info](http://192.168.2.108/logs#)~~Action: Close: Breakfast Room Shade on HubitatC8~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.588 AM[info](http://192.168.2.108/logs#)~~Action: Delay 0:00:45~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.584 AM[info](http://192.168.2.108/logs#)~~Action: While (Breakfast Room Shade on HubitatC8 shade opening(F) OR Breakfast Room Shade on HubitatC8 shade open(T) OR Breakfast Room Shade on HubitatC8 shade partially open(F) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00)~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.560 AM[info](http://192.168.2.108/logs#)~~Action: Close: Breakfast Room Shade on HubitatC8~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.556 AM[info](http://192.168.2.108/logs#)~~Action: IF (Breakfast Room Shade (Virtual) shade closed(F) [FALSE]) THEN~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.546 AM[info](http://192.168.2.108/logs#)~~Action: ELSE~~ (skipping)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.350 AM[info](http://192.168.2.108/logs#)Action: END-REP

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.346 AM[info](http://192.168.2.108/logs#)~~Action: Open: Breakfast Room Shade on HubitatC8~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.342 AM[info](http://192.168.2.108/logs#)~~Action: Log: 'In repeat loop opening breakfast room shade'~~ (skipped)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.269 AM[info](http://192.168.2.108/logs#)Action: Repetition ended

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:12.234 AM[info](http://192.168.2.108/logs#)~~Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(F) [FALSE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00)~~ (not repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:09.246 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:09.180 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:09.175 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:09.171 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:09.145 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:08.953 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:05.925 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:05.896 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:05.891 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:05.887 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:05.863 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:05.791 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:02.806 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:02.738 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:02.735 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:02.731 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:02.705 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:04:02.633 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:59.608 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:59.439 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:59.434 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:59.431 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:59.407 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:59.337 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:56.280 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:56.252 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:56.249 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:56.245 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:56.220 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:56.042 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:53.027 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:52.962 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:52.957 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:52.953 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:52.925 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:52.729 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:51.101 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:49.767 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:49.640 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:49.636 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:49.609 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:49.535 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:46.477 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:46.448 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:46.443 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:46.439 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:46.413 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:46.341 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:43.221 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:43.151 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:43.147 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:43.141 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:43.114 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:43.041 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:39.941 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:39.849 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:39.845 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:39.841 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:39.818 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:39.747 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(F) OR Breakfast Room Shade on HubitatC8 shade partially open(T) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:36.614 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:36.575 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:36.569 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:36.565 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:36.528 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:36.356 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(T) OR Breakfast Room Shade on HubitatC8 shade partially open(F) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:33.341 AM[info](http://192.168.2.108/logs#)Action: END-REP (waiting for next)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:33.309 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:33.275 AM[info](http://192.168.2.108/logs#)In repeat loop opening breakfast room shade

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:33.271 AM[info](http://192.168.2.108/logs#)Action: Log: 'In repeat loop opening breakfast room shade'

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:33.237 AM[info](http://192.168.2.108/logs#)Action: Repeating Actions While True

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:33.063 AM[info](http://192.168.2.108/logs#)Action: While (Breakfast Room Shade on HubitatC8 shade closing(F) OR Breakfast Room Shade on HubitatC8 shade closed(T) OR Breakfast Room Shade on HubitatC8 shade partially open(F) [TRUE]) Repeat every BlindRepeatCommandDelaySomfy(0:02:00) (repeating)

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:32.981 AM[info](http://192.168.2.108/logs#)Action: Open: Breakfast Room Shade on HubitatC8

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:32.977 AM[info](http://192.168.2.108/logs#)Action: IF (Breakfast Room Shade (Virtual) shade open(T) [TRUE]) THEN

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:32.431 AM[info](http://192.168.2.108/logs#)Event: Actions stopped by Blinds/Shades: Breakfast Room Shades (Virtual) - Perform Actions

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:32.215 AM[info](http://192.168.2.108/logs#)Action: Cancel Timed Actions: **This Rule**

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:32.113 AM[info](http://192.168.2.108/logs#)Triggered: Breakfast Room Shade (Virtual) shade *changed*

[app:3656](http://192.168.2.108/logs#)2024-01-23 07:03:31.951 AM[info](http://192.168.2.108/logs#)Event: Breakfast Room Shade (Virtual) windowShade open

Logs need to be posted as screenshots only. Sorry, but can't effectively read the cut and paste logs.

Here you go. If I am reading this correctly the repeat is not waiting 2 minutes but is just repeating constantly until the open state is reached?




@bravenel Just putting this to the top of your list. It definitely is not working as planned. I have played around with this and no matter what I do the while repeats continuously. Bug or is there something I could be doing differently? Thanks.

I am not able to reproduce this problem. Here is the simple test case I used:

And here are the logs:

This leaves me having no idea what is happening with your rule, beyond the obvious issue you show with your logs. My suggestion is to start with something much simpler, like mine, test it, and grow the rule from that starting point.

II think yout have a multiple simultaneous instance problem with this rule -- that it, it's being triggered multiple times before it completes, hence launching multiple copies of the rule. The common form of this is a Delay embedded in IF-THEN-ELSE actions with multiple trigger events. Your case is equivalent, because the repeat is a form of a delay. This is exacerbated by your *changed* trigger.

You must protect this rule against having this problem. Use a Required Expression of Private Boolean true. Make your first action to be set Private Boolean to false, and your last action to set Private Boolean to true.

Try this, and after adding that, hit Update. Then verify on the App Status page that there are no Scheduled Jobs then pending for the rule. If there are, toggle the Private Boolean manually in the rule UI to false and then back to true. Check again for Scheduled Jobs.

1 Like

The rule is indeed triggering multiple times. The virtual shade that I use to trigger this reports multiple states when it is set to open or closed.

I removed the delays - they were only there because the loop wasn't working and I was trying to get it to wait to re-issue the open or close command.

I inserted the Private Boolean and this stopped the rule re-triggering but didn't solve for the while loop not performing correctly.

So I went back to your previous comment and started to rethink the rule. I decided to try a different approach and test for while not open or closed vs. all of the different states.

This appears to work. I put pushover commands in the beginning of the rule, in the loop, and exiting the rule. And all I get is three messages.

I am not home this weekend so doing this all remotely so the final test will be to see what the shade is actually doing - but according to the logs this seems to have solved the problem. Will report back when I am able to test locally.

@bravenel Still having issues here. Instead of testing for all of the blind positions I went with NOT the position I wanted it to be in.

The rules seem to get stuck every time they execute.

When it drops into the rule the blind is not open so I am asking it to repeat while blind 1 is NOT open. But when blind 1 becomes open the while will now be TRUE and shouldn't it drop out? But you can see in the log that it is TRUE and keeps repeating.

Thanks for any help.

Details below.

@bravenel I gave up. As far as I can tell there are some challenges with the while and shades. It seems that the while loops are getting stuck when they should release control.

I converted all of my rules over to brute force - instead of looping just repeated the commands three times and hope that they get through.

If there is an interest in testing this further just let me know. Thanks.