When a Piston Fails


#1

Issue:

The piston below ran last night, however it failed to “turn off” the lights after the wait command and stayed on. I’m still new to this program and was wondering if there’s an easy way to detect if the piston failed (for whatever reason) and attempt to run the action that failed. In this case, attempt to turn off the lights. Thanks for any insight and happy to provide additional information if needed.


#2

Click the with and change TCP to never cancel.

Essentially what is happening is that your presence changes and after about 30 seconds the piston is no longer true (because you no longer JUST got home). So this cancels all remaining tasks.

So by changing the TCP to never cancel then your tasks will not be canceled and everything will be executed.


#3

Wow, that’s very interesting…just learned something new on how this works architecturally. Thanks for the explanation, and here I thought the Piston failed for no logical reason.


#4

If I issue a TCP to never cancel at the “highest level” (in this case the IF statement), do all the levels below it also inherit this rule to “never cancel” as well? Or does this setting only work level by level?


#5

Also one additional question:

If a piston runs and is NOT finished running and for some reason is trying to be called BEFORE finishing, is there a way to ignore/cancel that prior run?

So in this case, let’s say presence sensor 1 triggered this event and presence sensor 2 comes in before the piston is done executing, how do I have the piston ignore presence sensor 2’s trigger?


#6

I believe it will inherit this but there is no need to cast it like that. You just want the actions to never cancel.

Could add some logic about both presence sensors age being greater than 10 minutes


#7

Thanks!