Jump to content
C4 Forums | Control4

Lighting/Sensor Timer Programming


Bandit

Recommended Posts

Hey guys,

Been coming here to find advice for a while now, but thought I'd share some of my programming and see what critique you might have for me.

I wanted to add a timer to some lights in my house to be tripped by door and alarm IR sensors. However, I didn't want them to start when the lights are on already. I solved this problem by ramping to 30% and adding the variable that when the timer expires, if the light is at 30% it will shut off that light (so you can make the light stay on even if the timer is tripped).

I would appreciate it if you could let me know if there is a more efficient way to program the lights?

Heres the programming (Also attached an image):

WHEN THE UPPER HALLWAY->UPSTAIRS HALLWAY MOTION SENSES MOTION

If time is night time

-If Upper Hallway->Chandelier is off

--Reset Timer 'Upper Hallway'

--Ramp to Level 30 on the Upper Hallway->Chandelier over 1 Seconds

-If the Upper Hallway->Chandelier level is = 30%

--Reset Timer 'Upper Hallway'

Untitled.jpg

Link to comment
Share on other sites


I achieve the same result without using a level (like your 30%) by using a Boolean variable which is defaulted to false.  I then set it to true if the lights are off and and then turned on by the IR sensor. When the timer expires, I check to see whether the variable is true and only turn them off if the variable is true. Whenever the lights are turned off, I reset the variable to false.

My method is essentially the same as yours, but will work for lights on a switch as well as on a dimmer and won't act erroneously if the user happens to set the lights go 30% manually.

Link to comment
Share on other sites

ive set mine to be a little more in control looks like this.

when motion is detected

    reset timer

if keep light on is true

   stop

    IF night 

        turn light on at XXX

     if day turn light on at XXX (hallway has no natural light)

When timer expires

    If motion 

           reset timer

            stop

     If keep lights on is True

             stop

ramp lights off 3 seconds

 

Then i set all the motion and timer controller lights to 

 if double tapped 

     set keep lights on to true.

 

then when light level changes

      set keep lights on to false

 

 

 

how it works

 

lights will turn on with motion with a xx (depends on the room)second timer

if motion is still detected it will reset timer

if an user needs the lights on all the time (unlikely as i have timers setup to our use) it will stay on until the light is turned off by any means then it will continue normal operation.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.