Not understanding a second event


#1

1) Give a description of the problem
Lights are not turning off after a contact is closed.

2) What is the expected behavior?
I created the piston for the lights in my garage. Basically I want the lights to come on when the door is opened. Sometimes if I am working or hanging out in the garage, I will leave the door open. So when I close the door, I want the lights to turn off 30 min after the door is closed.

3) What is happening/not happening?
The lights are not turning off. I have a feeling it has to do with an incorrect setup of the second part. I am guessing WebCoRE sees the first event, but then stops and never knows to look for the second event as it could be at random times.


#2

@Sprout004 Yes, you are right…
the second part is happening just like this…

the door closes…
Piston is triggered…
the door IS CLOSED now…
so piston’s job is done…
forget the 30 minutes wait…:))))

Just change TASK CANCELATION POLICY to NEVER CANCEL TASKS
that means, even if the piston’s current job is done JUST WAIT until everything is done…

let me change your piston a bit and re-post it.
Edit : I just saw you already used never cancel task in part one, so you know how it’s done.

note : I would just change the design a bit for the second part,

IF contact sensor 12 changes to closed
with
lightbulb 5 and 6
Wait 30 minutes
Turn Off


#3

Awesome! I changed the task cancellation policy right before I posted it. I will make the other adjustments.

With this set up, if I open the door, then close it and open and close again (let’s say I am taking the trash out and don’t want the dog in the garage), well those actions repeatedly rest the timer?


#4

I don’t know which one is the door but
if sensor 12 is opened and closed AGAIN… yes that will reset the 30 minutes count down because the piston will be triggred again (CHANGES TO CLOSED)

in my experience it’s always “best to test” :))))

maybe a coder can see what will happen even before it happens, but I am not a coder so I always test test and test:))_)


#5

That is what I figured. Thanks again for the help! It seems to working.