Suggestions for How to Stop a Runaway Automation?


#1

I think I originally got this piston from @Robin and it works great, but somehow, I forgot to program in something to make it stop, or to give it a limit, or some kind of interactive mechanism.

So, basically, I just need to figure that out, and add it to the code.

Anybody have ideas?

I suspect I should probably go back to a thread I recall somebody working on a while back where they listed out a whole bunch of ways of limiting a piston. I will look there when I get another free minute…

1) Give a description of the problem
Runaway Automation (OK, maybe that’s a bit too dramatic, but…)

2) What is the expected behavior?
Perform the automation, but only until the user interacts somehow, or a period of time passes.

3) What is happening/not happening?
When there’s a tornado warning, it flashes my a particular light red and white (which is great), but then, even after I’ve noticed it happening, and I’ve been very well aware of the tornado warning now for a good fifteen minutes, the d@mn thing is still flashing lol .

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
Probably not relevant.

REMOVE BELOW AFTER READING


#2

Add a variable that you can use to count the number of times it has ran.

The make a restriction that as long as that variable is < let say 5 times. It will continue to run. Once it reaches 6 times cancel all pending tasks

Also add a line to when weather condition is not equal to TOR reset variable to 0

That should do it.


#3

To solve the manual interaction issue, you could add an IF statement (outside the every other minute command) that says “IF porch 1 switch is set to off (or level is set to 0%, whichever your device works best with) THEN set variable Counter to 6”.

If you increase the number of cycles for your warning above the 5 in the example above, just make sure the IF statement you add sets it to one number higher.