Help with light command piston not working correctly


#1

if anyone could help me resolve the problem with this piston it would be greatly appreciated. I am moving all of my pistons from core to webcore but I’m finding webcore to be more daunting then core every piston I move over and and create I do it the exact same way as I had it in core but it doesn’t work I have been able to work out most of my other pistons, but this one doesn’t seem to want to work no matter what. I have a door sensor that if it is opened between sunset and sunrise i want it to turn on the light and wait 2 minutes and turn off it works perfectly in core but in webcore it will not work, I have changed it all kinds of way I can thing of but it just won’t work, the light will come on but will not go out unless I turn it off by manually. the piston is below if anyone can help with why it won’t work correctly as stated it would be greatly appreciated I have not come here to ask for help lightly been trying to get this to work correctly for 17 days with no luck thx for any help in advance.


#2

Because you have selected changes to, that expression will become false before the 2 minute timer matures and therefore the piston stops.
Get rid of your second if and use else.
ELSE
With laundry light.
DO
Wait 2 minutes
Turn Off.
Go into the settings for the ELSE and in TCP select never.


#3

Ok Boobles thank you for the help I will try as soon as I get home.


#4

BOOBles. You’ll get me a bad name. lol. :smile:


#5

Sorry Bobbles this damn auto correct on the iphone I hate it, it chnages what it whats to when it wants to, but anywho thx again webcore is a lot more strict in expressions then core was.


#6

Just re-looked at your piston and the real issue is that you have a second ‘IF’ in your piston for turning the lights off.
Just delete the second ‘If’.
Now in the ‘Else’ select ‘action’.
Select the laundry room light.
wait 2 mins.
Turn Off.
Also in your ‘else’ open up the settings cog and for Task Cancellation Policy (TCP) select never.
This means that when your contact changes to open, becomes false (before the 2 min timer can mature) the timer will not cancel (never).
If the contact changes to open again before the 2 min timer matures, it will reset the timer.

THEN
WITH
Laundry Room.
DO
turn On.

ELSE
WITH
Laundry Room. (Set TCP to Never.)
DO
Wait 2 minutes
Turn Off.


#7

Ok Got it I’ll be home in 20 mins i’ll retry it then and let you know if it works or if I messed something up again.