Jump to content

Rules for lights


Seb50

Recommended Posts

Posted

Hi everybody,

 

I'm trying to set up a rule to turn on my backyard lights when the patio door opens to let the dog out. I'm able to have the lights turn on when the patio door open to let the dog out but I would also want then to close when I let the dog back in. If I tell the ISY to have the light open for 10 minutes after the door opens when I let the dog back in and open the door again it will start a new countdown.

 

Is it possible to have something in the rule that would not start a new countdown for when I open the door the second time to let the dog in?

 

This is what I have for now

 

If

Time is sunset +1hour

Or Time is Sunrise - 1minutes

And Elk Zone Patio Physical Status is Open

 

Then

Set Balcony light On

Set pool house On

 

Else

Wait 12 minutes

Set Balcony lights Off

Set pool house lights Off

Posted
I think I will stand by my suggestion on cocoontech. Did you try it?

 

what do you mean by:

 

then

Run second program (then path)

Posted

When one chooses a program under "action", there are choices that include "run (if)", "run then", and "run else". These refer to which of the three sections of a program (if, then, or else) to run. Once selected, it shows up in the program content as

 

Run Program "XXXX" (then path)

Posted

This is what I have done. The first program triggers when you open the door and the light is already off. If the light is already on, then nothing happens.

 

This calls the second program "else" path. After 10 minutes it beeps to warn you that the light is going to shut off. If you want it to stay on, you have to hit the "on" paddle and that will re-trigger the second program to run "true" which will abort the timer that shuts off the light.

 

If
       Program 'Dark Outside' is True
   And Elk Zone 'Front Door' is Violated
   And Status  'Foyer / Foyer-Portico Can L' is Off

Then
       Run Program 'front door 2' (Else Path)

Else
  - No Actions - (To add one, press 'Action')


 

If
       Control 'Foyer / Foyer-Portico Can L' is switched On

Then
  - No Actions - (To add one, press 'Action')

Else
       Set 'Foyer / Foyer-Portico Can L' 100%
       Wait  10 minutes 
       Set 'Foyer / Foyer-Portico Can L' 250 (Beep Duration)
       Wait  30 seconds
       Set 'Foyer / Foyer-Portico Can L' Off


Posted
This is what I have done. The first program triggers when you open the door and the light is already off. If the light is already on, then nothing happens.

 

This calls the second program "else" path. After 10 minutes it beeps to warn you that the light is going to shut off. If you want it to stay on, you have to hit the "on" paddle and that will re-trigger the second program to run "true" which will abort the timer that shuts off the light.

 

If
       Program 'Dark Outside' is True
   And Elk Zone 'Front Door' is Violated
   And Status  'Foyer / Foyer-Portico Can L' is Off [color=#FF0040]***This is where I would indicate if patio lights are off, right?*****[/color]

Then
       Run Program 'front door 2' (Else Path) [color=#FF8040]*** would I indicate open patio light and pool house lights here?***[/color]

Else
  - No Actions - (To add one, press 'Action')


 

If
       Control 'Foyer / Foyer-Portico Can L' is switched On

Then
  - No Actions - (To add one, press 'Action')

Else
       Set 'Foyer / Foyer-Portico Can L' 100%
       Wait  10 minutes 
       Set 'Foyer / Foyer-Portico Can L' 250 (Beep Duration)
       Wait  30 seconds
       Set 'Foyer / Foyer-Portico Can L' Off


Having a trouble setting this up. Made some comments directly on the above example. Thanks in advance for your help

Posted

This is the rule I programmed

 

If:

Program "Dark Outside" is true

and ELK Zone "Patio" "physical Status is open

and status "pool house" is off

and Status "shed spots" is off

 

Then:

Set "pool house" on

set "patio"on

 

Else:

wait minutes

set "pool house" off

set "balcony"off

Posted

I am not sure that it does all that you asked for (does it start a new countdown when you close the door, or when you open it a second time?), but if you are happy with it, then that is good enough for me.

Posted

I doubt your program is doing what you think it is. Every time you turn your pool house lights or shed spots on, that program will run and it will be false and the lights will shut off after the wait, even though the door was never opened or if "dark outside" is false. Also, at dusk, the dark outside program will change state and trigger the program to run false and the lights (if they were on) would shut off after the wait.

 

The goal of my program was to check the status of the light when the door was opened. If the light is already on, then the assumption is that it is on for a reason and we don't want it to shut off after the wait. If the light is off to start with, opening the door will turn it on and start the timer. You need two programs to do that.

 

You really need to do this with 2 programs. The reason is that you are going to have lots of un-intended runs of the "else" clause.

Posted
I doubt your program is doing what you think it is. Every time you turn your pool house lights or shed spots on, that program will run and it will be false and the lights will shut off after the wait, even though the door was never opened or if "dark outside" is false. Also, at dusk, the dark outside program will change state and trigger the program to run false and the lights (if they were on) would shut off after the wait.

 

The goal of my program was to check the status of the light when the door was opened. If the light is already on, then the assumption is that it is on for a reason and we don't want it to shut off after the wait. If the light is off to start with, opening the door will turn it on and start the timer. You need two programs to do that.

 

You really need to do this with 2 programs. The reason is that you are going to have lots of un-intended runs of the "else" clause.

 

 

Thank you for the feedback and help. I'm having issues write the rule with 2 rules as per your example. Does the below sound right?

If :

Program «Dark outside » is true (program outside is: If between midnight and 6am)

And ELK zone “patio door†is open

And balcony light is off

And pool house light are off

 

Then Run program “pitbull in the yard†(Else path) (pitbull in the yard is, Else: open balcony and pool house lights)

 

2nd rule

This is where I’m confused. Does anything look at our place so far?

Posted

That looks fine. It will run the Else path on your second program if the door is opened while the lights are off.

 

In your second program just have the else path turn on the light you want, wait the number of minutes you want, and turn the light off.

 

In the "if" section put any conditions that you would like to have abort the wait.

 

Like

 

If

If balcony light is switched on

 

Then

- - -blank

 

Else

Set balcony light on

set pool house light on

wait 10 minutes

set balcony light off

set pool house light off

 

In this case, if someone pushes the "on" paddle of balcony light during the 10 minute wait, it will abort the wait and run the "then" clause. .. which is blank so it just does nothing.

Posted

cool perfect it works. Thanks everybody for your input.

 

I do have another question about writing rules. I have the below program, anything wrong with it?

 

If

Program Dark Outside is true

 

Then

Run program Christmas Tree (if)

 

Else

Set Christmas tree off

Posted

thanks everybody for your patience and help. Enjoying the learning. I wish I could find something I can read that would accelerate my learning and I wont really need to bug you all

Guest
This topic is now closed to further replies.

×
×
  • Create New...