Jump to content

Program using TriggerLinc to control door light


muck4618

Recommended Posts

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

Link to comment

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

Link to comment

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

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...