Jump to content
C4 Forums | Control4

Door contact triggering lights with timer problem


Recommended Posts

I need some help configuring my lighting with my DSC alarm door contact and a timer

i have a DSC alarm system which is connected to my HC250 running 2.7 and i would like to turn on a outdoor light at night when alarm door contact point 19 opens and then turn off after the timer expires after 8 minutes.

i have gone into HE 2.7 and in the timer section under agents created a timer called back door for eight minutes

i then went into programming under my door contact and created an event when back door opens

i then created a sunset conditional with ?

this is where I get confused, do i use the reset back door timer, start back timer, then turn on my back porch light, then stop timer then turn off back porch lights? Any help would be appreciated

Link to comment
Share on other sites


Under your conditional (for nightime) you will need two lines of code, namely:

1. Turn on the lights.

2. Start the timer - this will work fine (reset the timer will work just as well in this case - see below)

Then go to your timers and choose the when timer expires event. Here you can add a line of code to turn off the lights.

 

Both start and reset timer will run the timer for the full 8 minutes.  Reset timer will run the events when timer stops and when timer starts as it starts. Start timer will only run the event when timer starts. As you don't need either of these events for your example, it really does not matter which you use. Both will run the event when timer expires at the end of the 8 minutes.

Link to comment
Share on other sites

This is my script

When the Security System back door opens

? If time is night time

     Turn on the back porch Back Yard Flood Lights

.    Turn on the back porch Back porch can lights

.     Start Timer back door timer (i created this under agents) 

? If timer back door timer is not running

.   Turn off the back porch back porch can lights

.    Turn off the back porch back yard flood lights

I didnt see when timer expires event to use to turn off the lights, any help with my programming would be appreciated

Link to comment
Share on other sites

Ah, was surprised for a second but I see where you're going sideways.

WHEN the Security System back door opens
? If time is night time
	Turn on the back porch Back Yard Flood Lights
	Turn on the back porch Back porch can lights
	Start Timer back door timer (i created this under agents) 

That part is fine.

But for the lights off, you need to have a separate EVENT

WHEN timer expires
Turn off the back porch back porch can lights
Turn off the back porch back yard flood lights 

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...