WebCoRE - Piston keeps canceling


(Antony Pugh) #1

I have a piston setup to turn on my landing light on motion if it’s off. Also only turn on if no other lights are in upstairs

I have tried the never bits with out success. The position starts. But after 2 mins it’s still on even if no other lights change.

What am I doing wrong.

//
/* Landing Sensor */
/
/
/* Author : Behold81 /
/
Created : 08/08/2017, 21:40:21 /
/
Modified : 13/08/2017, 23:16:28 /
/
Build : 10 /
/
UI version : v0.2.0e5.20170812 */
/**************************************************************/

only when
Time is between 30 minutes to sunset and 30 minutes past sunrise
and
Smart Home Monitor status is Disarmed
and
Bathroom Hue’s switch is off
and
Bedroom Hue’s switch is off
and
Landing Hue’s switch is off
and
Spare Room Hue’s switch is off
execute
if
Landing Sensor’s motion changes to active
then
with
Landing Hue
do
Set level to 30%;
Set color to Warm White;
Turn on;
Wait 2 minutes;
Turn off;
end with;
end if;
end execute;


(Robin) #2

Set the ‘with landing light’ part to 'Task Cancelation Policy (TCP) - ‘never cancel’.

This can be done in the pop-up window by clicking the cog symbol or by highlighting the line and changing the options in the top right corner.

What is happening is that the landing light turns on, the ‘only when’ becomes false and the wait / turn off gets cancelled.

Note - it’s easier for peeps to help when you post a green snapshot of your piston, rather than the raw text above.


(Antony Pugh) #3

I have a never cancels on the if and with it still seems to cancel. It always seems set a time to re execute not wait.


(Robin) #4

Post the green snapshot please.


(Antony Pugh) #5


(Robin) #6

Try moving the ‘only when’ restrictions into the ‘IF’ conditions.

You can put the 4nr bulb off restrictions into one condition.

Mark all but the motion condition as ‘never subscribe’.

I remember having a similar issue with the ‘never cancel’ not respecting restriction change.

Another method, which keeps the light on during continuous motion, might be as follows:

IF (1)
Motion IS active
THEN
IF (2)
X Y Z or N’s switch is off
AND
SHM is disarmed
AND
Time is between x and Y
THEN
turn on light
END IF (1)
ELSE
wait 2 minutes
turn off light
END IF (2)


(Antony Pugh) #7

Solved. Thanks. Moving just the lights in to the if and the never on the if. Solved!!!