Jump to content

Trigger lights on motion at 11pm, before 11pm, keep on


Recommended Posts

Posted (edited)

Hello, I am trying to figure this out. I have 4 outdoor lights on the following schedule:

 

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

 

Front Porch Light - [iD 0004][Parent 0001]
 
If
        From    Sunset 
        To      11:00:00PM (same day)
 
Then
        Set 'Outdoor: Front Porch Light' On
 
Else
        Set 'Outdoor: Front Porch Light' Off
 
------------------
 
Garage Outside Lights - [iD 000A][Parent 0001]
 
If
        From    Sunset 
        To      11:00:00PM (same day)
 
Then
        Set 'Outside: Garage Lights' On
 
Else
        Set 'Outside: Garage Lights' Off
 
-------------
 
Garden Patio Light - [iD 0005][Parent 0001]
 
If
        From    Sunset 
        To      11:00:00PM (same day)
 
Then
        Set 'Outdoor: Garden Patio Light' On
 
Else
        Set 'Outdoor: Garden Patio Light' Off
 
 
---------
 
Walkway Lights Schedule - [iD 0015][Parent 0001]
 
If
        From    Sunset 
        To      11:00:00PM (same day)
 
Then
        Set 'Outdoor: Walkway Lights' On
 
Else
        Set 'Outdoor: Walkway Lights' Off
 
------------
 
So each of these 4 devices will turn ON at sunset and off at 11pm
 
I also have a motion sensor setup. I want the motion sensor to turn these lights on upon motion, starting at 11:05pm until sunrise and go off after 5 mins if triggered on motion.  However, I am finding this schedule isn't working:
 
---------
 
Outdoor Lights Motion - [iD 0013][Parent 0001]
 
If
        From    11:05:00PM
        To      Sunrise (next day)
    And Status  'Driveway Sensor-Sensor' is On
 
Then
        Set 'Outside: Garage Lights' On
        Set 'Outdoor: Front Porch Light' On
        Set 'Outdoor: Garden Patio Light' On
        Set 'Outdoor: Walkway Lights' On
        Wait  5 minutes 
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Walkway Lights' Off
 
Else
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outdoor: Walkway Lights' Off
 
 
---------
 
Any thoughts on the programming here? It seems my last "else statement" is overiding and keeping the lights off from sunset to 11pm.
Edited by jam583
Posted

Here is what I have doing something similar in a scene.. Maybe the concept will work for yours with the devices?

 

Hallway Auto Light - [iD 0021][Parent 0001]
 
If
        From    Sunset  +  1 minute
        To      Sunrise -  1 minute (next day)
    And Status  'Front-Door / Front Door-Opened' is On
 
Then
        Set Scene 'Hallway Auto Light' On
 
Else
        Wait  2 minutes 
        Set Scene 'Hallway' Off
Posted

Have you tried not including any Else statements in the MS program? Also, why not use one program for the outside lights?

Posted
I don't see any reason why a single program would not work for your schedule.  If you don't want to use a scene as sdynak suggested, try:
 
Front Porch Light - [iD 0004][Parent 0001]
 
If
        From    Sunset 
        To      11:00:00PM (same day)
 
Then
        Set 'Outdoor: Front Porch Light' On
Set 'Outside: Garage Lights' On
Set 'Outdoor: Garden Patio Light' On
Set 'Outdoor: Walkway Lights' On
 
Else

        Set 'Outdoor: Front Porch Light' Off

Set 'Outside: Garage Lights' Off

Set 'Outdoor: Garden Patio Light' Off
Set 'Outdoor: Walkway Lights' Off
 
Regarding the motion sensors, I expect your program should work with one minor modification:
 
If
        From    11:05:00PM
        To      Sunrise (next day)
    And Control 'Driveway Sensor-Sensor' is On  <<<change to "control" rather than "status"
 
Then
        Set 'Outside: Garage Lights' On
        Set 'Outdoor: Front Porch Light' On
        Set 'Outdoor: Garden Patio Light' On
        Set 'Outdoor: Walkway Lights' On
        Wait  5 minutes 
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Walkway Lights' Off
 
Else
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outdoor: Walkway Lights' Off
Posted

Ok, so I set 1 program up for the lights from sunset to 11pm:

 

Outdoor Light Schedule - [iD 0004][Parent 0001]
 
If
        From    Sunset 
        To      11:00:00PM (same day)
 
Then
        Set 'Outdoor: Front Porch Light' On
        Set 'Outdoor: Garden Patio Light' On
        Set 'Outdoor: Walkway Lights' On
        Set 'Outside: Garage Lights' On
 
Else
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Walkway Lights' Off
        Set 'Outdoor: Garden Patio Light' Off
 
For the motion, I changed it to control, as mentioned:
 
Outdoor Lights Motion - [iD 0013][Parent 0001]
 
If
        From    11:00:00PM
        To      Sunrise (next day)
    And Control 'Driveway Sensor-Sensor' is switched On
 
Then
        Set 'Outside: Garage Lights' On
        Set 'Outdoor: Front Porch Light' On
        Set 'Outdoor: Garden Patio Light' On
        Set 'Outdoor: Walkway Lights' On
        Wait  5 minutes 
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Walkway Lights' Off
 
Else
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outdoor: Walkway Lights' Off
 
 
 
Look good? I'll monitor and see how it looks tonight.
Posted

You don't need the Else in the MS program.

Posted

I actually like the else clause. This guards against the possibilty when sunrise occurs during the 5 miunte wait period. Without the else clause, the lights would remain on.

Posted

Ok .. so I came home tonight, all the lights were on. It appears, for some reason, they cut off once I pulled into the driveway. Doesn't make any sense as the motion sensor isn't supposed to kick on until 11pm .. I've reviewed what I've pasted in this and it seems as if it all should work and many have said it looks right as well. Perhaps anyone else have any insights?

Posted (edited)

Well, your first program turns them on at sunset and off at 11. What time did you arrive home?

 

Did you create any scenes that include the motion sensor (controller) and lights (as responder)? If so, delete the scene.

Edited by oberkc
Posted

They were on but turned off it seems when the MS detected me, even though the MS shouldn't go into effect until 11pm. The MS isn't connected to do anything else, other than send an email on detection.

Posted

I may also have to apologize to you. I think I gave you bad advice. I thought simple motion programs could be handled in a single program, but may even have to break it into two programs (pretty common solution).

 

For your motion program, try the following approach:

 

If

Time is from 1100

To sunrise (next day)

Then

Run next program (then path)

Else

Nothing

 

Next program:

 

If

Nothing

Then

Turn all the lights on

Wait 5 minutes

Turn all the lights off

Else

Nothing

Posted

I may also have to apologize to you. I think I gave you bad advice. I thought simple motion programs could be handled in a single program, but may even have to break it into two programs (pretty common solution).

 

For your motion program, try the following approach:

 

If

Time is from 1100

To sunrise (next day)

Then

Run next program (then path)

Else

Nothing

 

Next program:

 

If

Nothing

Then

Turn all the lights on

Wait 5 minutes

Turn all the lights off

Else

Nothing

 

I don't follow on the motion program. Currently, it's set as:

 

Outdoor Lights Motion - [iD 0013][Parent 0001]
 
If
        From    11:00:00PM
        To      Sunrise (next day)
    And Control 'Driveway Sensor-Sensor' is switched On
 
Then
        Set 'Outside: Garage Lights' On
        Set 'Outdoor: Front Porch Light' On
        Set 'Outdoor: Garden Patio Light' On
        Set 'Outdoor: Walkway Lights' On
        Wait  5 minutes 
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Walkway Lights' Off
 
Else
   - No Actions - (To add one, press 'Action')
 
 
What do you mean run next program, then path?
Posted

Break it into two programs.

 

Program 1

 

If
        From    11:00:00PM
        To      Sunrise (next day)
    And Control 'Driveway Sensor-Sensor' is switched On
then
       run program 2 (then path)
else
nothing
 
Program 2 
 
if
nothing
then
Then
        Set 'Outside: Garage Lights' On
        Set 'Outdoor: Front Porch Light' On
        Set 'Outdoor: Garden Patio Light' On
        Set 'Outdoor: Walkway Lights' On
        Wait  5 minutes 
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Walkway Lights' Off

 

else

nothing

 

What do you mean run next program, then path?

 

When one calls a program from another program, one must specify what part of the program to run.  In this case, I want it to run the "then" path.  (Not the IF path.  Not the ELSE path.)

Posted

Ok, it's setup as follows now:

 

Outdoor Light Schedule - [iD 0004][Parent 0001]
 
If
        From    Sunset 
        To      11:00:00PM (same day)
 
Then
        Set 'Outdoor: Front Porch Light' On
        Set 'Outdoor: Garden Patio Light' On
        Set 'Outdoor: Walkway Lights' On
        Set 'Outside: Garage Lights' On
 
Else
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Walkway Lights' Off
        Set 'Outdoor: Garden Patio Light' Off
 
 
MOTION SENSOR
 
Outdoor Lights Motion - [iD 0013][Parent 0001]
 
If
        From    11:00:00PM
        To      Sunrise (next day)
    And Control 'Driveway Sensor-Sensor' is switched On
 
Then
        Run Program 'Outdoor Lights Motion Prog' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 
 
AND
 
 
Outdoor Lights Motion Prog - [iD 0005][Parent 0001]
 
If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Set 'Outside: Garage Lights' On
        Set 'Outdoor: Front Porch Light' On
        Set 'Outdoor: Garden Patio Light' On
        Set 'Outdoor: Walkway Lights' On
        Wait  5 minutes 
        Set 'Outdoor: Garden Patio Light' Off
        Set 'Outside: Garage Lights' Off
        Set 'Outdoor: Front Porch Light' Off
        Set 'Outdoor: Walkway Lights' Off
 
Else
   - No Actions - (To add one, press 'Action')
 
 
Posted

OK.  Hopefully, I did not give you bad advice this time.

 

As I asked before, also, make sure your motion sensor is not in any scenes.

Posted

Hi, first make a troubleshoot, trying to setup the program part by part. Add a line and try. Maybe you can try configuring a scene with MS and switches, then MS set to On Only and Night only modes, then program a short timer for the day and 5mins timer after 11:00pm.

 

 

Enviado desde mi iPhone utilizando Tapatalk

Posted

jam583, are the programs working the way you want?

Guest
This topic is now closed to further replies.

  • Recently Browsing

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

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.5k
×
×
  • Create New...