Jump to content

Time based lighting control using the 2420 Motion Sensor


morreale

Recommended Posts

Posted

I have a motion sensor configured in a bathroom that control a switchlinc dimmer and i would like to have it come on at 15% from 11p-6a and 100% the rest of the time.

 

i have tried many variations to my programs and this is what i have currently

 

i have tried with and without the parentheses

 

this is the program from 11p-6a, followed by 6a-11p and then the timer to turn them off.   the program is working but it always turns on the lights at 100%  what am i missing or how can i simplify this code?

If
        (
             From    11:00:00PM
             To       6:00:00AM (next day)
         And Status  'Master Bathroom / Master Bathroom Lights' is Off
         And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On
        )
 
Then
        Set 'Master Bathroom / Master Bathroom Lights' 15%
 
Else
   - No Actions - (To add one, press 'Action')
 

If
        (
             From     6:00:01AM
             To      10:59:59PM (next day)
         And Status  'Master Bathroom / Master Bathroom Lights' is Off
         And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On
        )
 
Then
        Set 'Master Bathroom / Master Bathroom Lights' 100%
 
Else
   - No Actions - (To add one, press 'Action')
 

If
        Status  'Master Bathroom / Master Bathroom Motion-Sensor' is Off
 
Then
        Wait  4 minutes 
        Set 'Master Bathroom / Master Bathroom Lights' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

Posted

The second Program If needs a change.  It should be (same day) rather than (next day).

 

If
(
From 6:00:01AM
To 10:59:59PM (same day)
And Status 'Master Bathroom / Master Bathroom Lights' is Off
And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On
)

Posted

I always use a variable for the "quiet" time. If the time is between 10:59:59 and 6:00 then quiet_time_var= 1, else quiet_time_var= 0

So in the morning when i leave, i dont wake up the rest of the family. So now all the programs based on "quiet time" i set as "if variable is 0 then do this else do that."

 

Have you tried setting manually your light at 15%?

I had a similar problem for my lights for the stairs, when i leave the house and its still dark, the hallway light downstairs goes on 10% so iluminates my path on the stairs.

Because the bulb i had wasnt dimmable, i couldnt get it at 10%...

Hope ur problem is fixed, let us know what u did because there is always people looking for the same answer.

 

Cheers

 

Thiago

Posted

The second Program If needs a change.  It should be (same day) rather than (next day).

 

If

(

From 6:00:01AM

To 10:59:59PM (same day)

And Status 'Master Bathroom / Master Bathroom Lights' is Off

And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On

)

 

good catch.  let me change that and test it.

Posted

I always use a variable for the "quiet" time. If the time is between 10:59:59 and 6:00 then quiet_time_var= 1, else quiet_time_var= 0

So in the morning when i leave, i dont wake up the rest of the family. So now all the programs based on "quiet time" i set as "if variable is 0 then do this else do that."

 

Have you tried setting manually your light at 15%?

I had a similar problem for my lights for the stairs, when i leave the house and its still dark, the hallway light downstairs goes on 10% so iluminates my path on the stairs.

Because the bulb i had wasnt dimmable, i couldnt get it at 10%...

Hope ur problem is fixed, let us know what u did because there is always people looking for the same answer.

 

Cheers

 

Thiago

 

good suggestion.  yes they are dimmable LED bulbs.

Posted

The second Program If needs a change.  It should be (same day) rather than (next day).

 

If

(

From 6:00:01AM

To 10:59:59PM (same day)

And Status 'Master Bathroom / Master Bathroom Lights' is Off

And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On

)

 

that did the trick..thanks so much for the help.

Posted

morreale,

 

Just curious... why did you put "( )" around your lines in the IF statement?

Posted

From the initial post

 

"i have tried with and without the parentheses"

 

The parens are not needed in this case since all the statements in the If are Anded.  The Programs works the same with or without the parens.  

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...