WAIT > TURN OFF Function Not Executing


#1

1) Give a description of the problem
I migrated a few ‘night-light’ pistons from CoRE to WebCoRE. These pistons are triggered off a motion sensor activation. They turn on a light, wait a fixed interval, then turn off the light.

2) What is the expected behavior?
Once the WAIT interval has expired, the TURN OFF function should be executed. This worked fine in CoRE with the exact same pistion setup.

3) What is happening/not happening?
The light comes on as expected, but never turns off. I’ve seen the same behavior on two separate pistons, with different types of switches, motion sensors, and wait intervals.

4) Post a Green Snapshot of the pistonimage

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


#2

You need to change Task Cancellation Policy (TCP) to never.
Click on the WITH.
Click on the settings cog and change TCP to never.
This means that when the piston or conditions change in the IF, they never cancel the tasks in the WITH.

This way when it is active the light turns on.
When it goes inactive the timer starts.
If motion should be active again before the timer expires, the timer stops.
When it goes inactive again the timer starts again.
The light could stay on permanently while there is motion which I assume you want.


#3

Thank you Bob!