muck4618 Posted May 16, 2012 Posted May 16, 2012 I have a TriggerLinc on a back door that I would like to turn on the light (SwitchLinc) the first time the door is opened/closed and then off the next time the door is opened/closed. Scenario is that the wife wants the light to come on when we let the dog out and turn off when we open the door to let the dog in. I can't figure it out. Thanks in advance for your help. Scott
biredale Posted May 16, 2012 Posted May 16, 2012 There are several options. First, is this always the behavior whenever that door is used or are there other scenarios? You could use a variable that flip flops between on and off state to direct the on or off activity. Have you consider a simple on with a wait for n minutes possibility? Cheers. Brian
muck4618 Posted May 16, 2012 Author Posted May 16, 2012 I think that using a variable is the way to go but I don't know how to set them up. I have a feeling that after I figure out how to create variables it will open up a lot of options to me.
Xathros Posted May 16, 2012 Posted May 16, 2012 Well this is the general idea for what you want to do. Maybe put these programs in a folder "3DogNight" with a "From Sunset to Sunrise the next day" condition on it. Define an integer variable: iDogOut Init 0 Value 0 Program 1 - DogOut If Control.TriggerLinc On And iDogOut=0 Then Set Scene DogLight On iDogOut = 1 Program 2 - HeadinIn If Control.TriggerLinc On And iDogOut=1 Then iDogOut=2 Program 3 - LightsOut If Control.Triggerlinc Off And iDogOut=2 Then Set Scene DogLight Off iDogOut=0 Program 2 simply notifies the iDogOut Variable that we are letting the dog back in. Once the door closes after that, program 3 turns off the light. This way the light is not turned off as soon as you open the door to let the dog back in but rather when the door is closed. Hope this helps. -Xathros
muck4618 Posted May 16, 2012 Author Posted May 16, 2012 Thanks! I will see if I can get it working tonight.
Xathros Posted May 17, 2012 Posted May 17, 2012 That worked! Thanks for your help! Excellent! Glad I could help. -Xathros
Recommended Posts