While Loop not running


#1

1) Give a description of the problem
The while loop is not running in my piston currently, It was working last week and I’m not sure when it stopped.

2) What is the expected behavior?
Should dim/bright lights every 0, 15, 30, 45 minute of the hour during specified time range

3) What is happening/not happening?
The while loop is no longer triggering, no logs from on the piston.

4) Post a Green Snapshot of the piston!

5) Attach any logs (From ST IDE and by turning logging level to Full)
None related


#2

Maybe because the while condition isn’t subscribed to anything?

Your 2nd and 3rd IF statements are duplicates… was that there when it was working? Just wondering if the addition of a trigger maybe unsubscribed your while statement.


#3

Unrelated, you should look at using Timer in place of your first two IF statements. The IF statements you have are OK and will work. I just wanted to point out a different approach you could use. :slight_smile:

co-2017-12-20-21-43-02


#4

The duplicate If was there before, not sure how I managed that…

I managed to get the while to subscribe by making a new piston, but it unsubscribed as soon as I added the first 2 if’s back in… So I’ll need multiple pistons, no big deal there I guess.

But the new one still doesn’t run, I get no logs and no notification.


#5

Did you change the subscribe method on your WHILE statement to Always? You can do it by clicking on the statement and choosing Always (instead of auto) in the upper right corner of your screen, or by clicking on the statement to open up the dialog box and change it in settings (click the gear cog to expand).

image


#6

Changing to Always Subscribe lets the while statement subscribe, but it still doesn’t run.