Jump to content

Program using TriggerLinc to control door light


muck4618

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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

Posted
That worked! Thanks for your help!

 

 

Excellent! Glad I could help.

 

-Xathros

Guest
This topic is now closed to further replies.

×
×
  • Create New...