Jump to content

Occupancy program review


jgorm

Recommended Posts

Posted (edited)

I've been going nuts with my wife leaving the kitchen lights on in the middle of the day.  I'm looking for any tips or evaluation of this program set.  I did have an issue with the motion sensor not turning the lights on.  I'm assuming I'm missing something because it seems that the motion sensor trigger should restart the 5 minute timer on kitchen day light action.

 

Trigger Program = Kitchen Light motion.  Kitchen motion is the motion sensor in the kitchen.

If
        Control 'Kitchen motion' is switched On
    And From    Sunrise - 14 minutes
        To      Sunset  + 20 minutes and 20 seconds (same day)


Then
        Run Program 'kitchen day light action' (Then Path)


Else
        Run Program 'kitchen night action' (Then Path)

2nd Trigger program = Kitchen day light reminder


If
        Control 'Kitchen lights' is switched On
    And From    Sunrise
        To      Sunset  (same day)
 
Then
        Set 'Kitchen lights' 2 (Beep Duration)
        Set 'Kitchen lights' 2 (Beep Duration)
        Set 'Kitchen lights' 2 (Beep Duration)
        Set 'Kitchen lights' 2 (Beep Duration)
        Run Program 'kitchen day light action' (Then Path)
 
Else
        Run Program 'kitchen night action' (Then Path)
 
 
   - No Actions - (To add one, press 'Action')

 

 

Program = kitchen day light action

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')


Then
        Set 'Kitchen lights' On
        Wait  5 minutes and 20 seconds
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' Fast Off


Else
   - No Actions - (To add one, press 'Action')
Program = Kitchen night action
If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')


Then
        Set 'Kitchen lights' On
        Wait  10 minutes 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 2 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 2 (Beep Duration)
        Set 'Kitchen lights' Off


Else
   - No Actions - (To add one, press 'Action')
 
 
 
Edited by jgorm
Posted

I am curious why you have "Run Program 'kitchen day light action' (Then Path)" in two programs.  I see that you also have "Run Program 'kitchen night action' (Then Path)" in two programs.  I suspect these two programs can, at times, fight each other.  Perhaps taking these actions out of the reminder program will help reduce your problems?

Posted (edited)
Trigger Program = Kitchen Light motion.  Kitchen motion is the motion sensor in the kitchen.



If
        Control 'Kitchen motion' is switched On
    And From    Sunrise - 14 minutes
        To      Sunset  + 20 minutes and 20 seconds (same day)
Then
        Run Program 'kitchen day light action' (Then Path)
Else
        Run Program 'kitchen night action' (Then Path)



 

Program = Kitchen night action




If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
Then
        Set 'Kitchen lights' On
        Wait  10 minutes 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 2 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 2 (Beep Duration)
        Set 'Kitchen lights' Off
Else
   - No Actions - (To add one, press 'Action')


 

Have you noticed that your kitchen lights turn on at

   "Sunset  + 20 minutes and 20 seconds (same day)" every night?

 

When the whole If section is false the "else" runs and that calls your Kitchen Night Action (then) program. The "else" clauses have to be propulated very cautiously, especially with multiple condition triggers. If an event happens and any one of them are false (under the logic "and" definition,, else runs.

This is a common gottcha' using the time frame conditions. At the "to" time else will run.


Edited by larryllix
Posted

You could try something like this. I find this algorithm works very well.

 

 

Program 1

--------------

If

  automatic trigger

Then

   turn light on

   wait xx minutes

   turn light off

Else

  --

 

Program 2

--------------

If

   Manual switch on

And

   Manual switch is not off (runs else and cancels then timers)

Then

   disable program 1

   turn light on

   wait 2 hours (just in case)

   call program 2 (else)

Else

   turn light off

   enable Program 1

Posted (edited)

When I want different ON durations based on time or other criteria I use another program too.

I like to turn the light on immediately and then decide when to turn if off when the human can't detect more on delay. You have have the TimeOfDay program make one decision and use the else to call another program to make a further time slice decision.

 

Program 1

--------------

If

   automatic trigger

Then

    turn light on

    call Program 1.TimeOfDay

Else

  --

 

 Program 1.TimeOfDay (disabled OK)

-----------------------------

If

   time is from 8 AM -  6 PM (or room brightness or guests sensor or bathroom break)

Then

     Wait short time

     Turn lights off

Else

     Wait long time

     Turn light off

Edited by larryllix
Posted

When I want different ON durations based on time or other criteria I use another program too.

 

Good idea!

 

 

 
Have you noticed that your kitchen lights turn on at
   "Sunset  + 20 minutes and 20 seconds (same day)" every night?
 

Haha, so that's why they were on at weird times.  

 

You guys rock! Thanks a ton.  I tried changing the motion trigger to a status on instead of control on.  I was having problems where it would work when I first walked in, but then the lights would time out even though the motion sensor was lighting up from motion.  This is what I have changed the programs to based on your suggestion.  

Kitchen light motion

If
        Status  'Kitchen motion' is On
 
Then
        Run Program 'kitchen light time of day motion (disable)' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 

Kitchen light time of day motion (disable)

If
        From    Sunrise - 15 minutes
        To      Sunset  (same day)
 
Then
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
 
Else
        Set 'Kitchen lights' On
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  10 minutes 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' Off
 

Kitchen light time of day switch (disable)

If
        From    Sunrise - 15 minutes
        To      Sunset  (same day)
 
Then
        Set 'Kitchen lights' On
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
        Wait  5 minutes 
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' Fast Off
 
Else
        Set 'Kitchen lights' On
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  10 minutes 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' Off
 

Posted

Have you also noticed the 'beep duration' doesn't affect the length of beep?

 

Mine aren't worth beeping as they can't be heard more than 10 feet away (3m) if there is even wind outside.

Posted

Have you also noticed the 'beep duration' doesn't affect the length of beep?

 

Mine aren't worth beeping as they can't be heard more than 10 feet away (3m) if there is even wind outside.

I beep a switch every 2 seconds in my laundry room when the light is on and the alarm is armed night. It stops my wife from forgetting to disarm the alarm before opening the garage door. Other than that, I've not found a use for the beep.
Posted (edited)

Have you also noticed the 'beep duration' doesn't affect the length of beep?

 

 

Yeah, I just click whatever pops up.  It would be awesome if the duration or volume worked! I love the beeps.  I have beeps in nearly every program.  Sometime it's a single switch beep to confirm the program triggered.  I beep my entire house when someone drives into the driveway, walks towards the front door, opens the front door,etc.  I have different beep codes with delays and number of beeps.  I beep my bedroom and office with a 5 beep 'alarm' when my daughter opens her door.  The beeps in the motion programs are for evaluating where  I want the motion sensor.  I'll remove those once I get things worked out.  

 

So I ran into some issues with the above programs.  I add to add another program to get things in check.  I had an issue when the switch would be turned on, during the day, but the motion sensor would not keep the lights on. I don't want the motion sensor to turn the lights on during the day, but I want it to reset the 5 min timer if the switch is already on.  I added a switch check program.  I would really love if you could add some better logic to the if statement, like adding a series of things similar to

if (time =x, switch x on, and motion on)

and (program x running)

 

Here are my current programs

Kitchen day light reminder

If
        Control 'Kitchen lights' is switched On
 
Then
        Run Program 'kitchen light time of day switch (disable)' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

Kitchen light motion

If
        Status  'Kitchen motion' is On
 
Then
        Run Program 'kitchen light switch check (disable)' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 

kitchen light switch check (disable)

If
        Status  'Kitchen motion' is On
    And Status  'Kitchen lights' is On
 
Then
        Run Program 'kitchen light time of day switch (disable)' (If Path)
 
Else
        Run Program 'kitchen light time of day motion (disable)' (If Path)

Kitchen light TOD motion (disable)

If
        From    Sunrise - 15 minutes
        To      Sunset  (same day)
 
Then
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
 
Else
        Set 'Kitchen lights' On
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  10 minutes 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' Off
 

kitchen light TOD switch (disable)

If
        From    Sunrise - 15 minutes
        To      Sunset  (same day)
 
Then
        Set 'Kitchen lights' On
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
        Wait  5 minutes 
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 8 (Beep Duration)
        Set 'Kitchen lights' Fast Off
 
Else
        Set 'Kitchen lights' On
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  10 minutes 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' 1 (Beep Duration)
        Wait  1 minute 
        Set 'Kitchen lights' 1 (Beep Duration)
        Set 'Kitchen lights' Off
 

Edited by jgorm
Guest
This topic is now closed to further replies.

×
×
  • Create New...