ISY99 Rule

Guy669

Member
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
 
 
 
Do you have it tied into an Elk (and thus reason for posting in this forum)? If so, what about using an output as a "flag"? Test to see if output is on when door is opened. If not, turn it on for x minutes. If so, just ignore and do nothing. Tie light on and off to the output on and off rather than actual zone change.
Let us know how it works.
 
You could set up a state variable to toggle when the door is opened, then, turn the light on or off based on that variable.
 
FYI: your time condition will probably not work.  It should be:
 
if
from sunset + 1 hour
to sunrise - 1 minute (next day)
 
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?
 
Yes.  I think I would rewrite the program as follows:
 
if
time is from sunset
to sunrise (next day)
and
And Elk Zone Patio Physical Status is Open
And status "second program" is false
 
then
Run second program (then path)
 
else
 
Add a second program;
 
IF
 
THEN
Set Balcony light On
Set pool house On
Wait 12 minutes
Set Balcony lights Off
Set pool house lights Off
Run this program (else path)
 
ELSE
 
I agree, however, with the others...you will get a broader audience of ISY enthusiasts and universal devices forum.
 
TonyNo said:
You could set up a state variable to toggle when the door is opened, then, turn the light on or off based on that variable.
When I try to use the Variable option all the other drop down menus are empty and cant select anything?
 
In your IF condition, just check if the light is already on.   
 
Since Day/Night is such a common thing (especially if you are used to the Elk), I just ended up making 3 small programs to set Day and Night variables that I can check in my other programs.  The DayNightInit is just there to get the variables set properly on ISY restart.  You have to create the variables before the programs in the variable tab, they should be state variables so they can be used as triggers.
 

Program Daytime

If
Time is Sunrise - 1 Hour
Then
$isDay = 1
$isNight = 0
Else
No Actions

Code:
Program Nighttime

If
  Time is Sunset + 15 minutes
Then
  $isDay = 0
  $isNight = 1
Else
  No Actions
Code:
Program DayNightInit
Run at Startup = On

If
  From Sunrise - 1 hour
  To Sunset + 15 minutes (same day)
Then
  $isNight =0
  $isDay = 1
Else 
  $isNight = 1
  $isDay = 0
 
Now with those you can just check the $isNight Variable and if the lights are off, turn them on:
 
Code:
if
      Elk Zone Patio Physical Status is Open
  And Status 'Balcony lights' is Off
  And $isNight is 1
 
then
 
  Set 'Balcony lights' 100%
  Set 'pool house lights' 100%
  Wait 12 minutes
  Set 'Balcony lights' Off
  Set 'pool house lights' Off
 
I recently created a rule in ISY to turn my back lights on for 5 minutes when my back door is opened at night. The main challenge was that i did not want the lights to keep coming on and going off when I am entertaining in the back yard. Sometimes, I want the lights to stay off (when sitting around the fire) and sometimes i want them to stay on in a dimmed state (while relaxing with friends). I finally got it working right by using a few programs that work together. I am certain there is a more elegant and efficient way to achieve my goals, but it does seem to work.
 
 
First, I want to be sure that if the lights have been turned off with a double-tap, It creates a 2 1/2 hour delay for the P light. (Think Fire pit mode)
 
P Light Long Pause 1
If
        Control 'Patio: Dimmer' is switched Fast Off
 
Then
        Run Program 'P Light Enabled' (Else Path)
        Run Program 'P Light Long Pause 2' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 
P Light Long Pause 2
If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Wait  2 hours and 30 minutes
        Run Program 'P Light Enabled' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 
 
Then I wanted to have a short 30 minute delay created anytime the switch is manually controlled at the switch. Notice that if the control is turned off or fast turned off, there will be a short or long delay. If the control is turned on at all, it disables the P Light Trigger.
 
P Light Short Pause 1
If
        Control 'Patio: Dimmer' is switched On
     Or Control 'Patio: Dimmer' is switched Off
     Or Control 'Patio: Dimmer' is switched Fast On
 
Then
        Run Program 'P Light Enabled' (Else Path)
        Run Program 'P Light Short Pause 2' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

P Light Short Pause 2
If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Wait  30 minutes
        Run Program 'P Light Enabled' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 
 
 
This program basically tells the Trigger if it is ok to initiate or not.
 
P Light Enabled
If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Set Program 'P Light Enabled' To Run At Startup
 
Else
        Set Program 'P Light Enabled' To Not Run At Startup
 
 
 
P Light Trigger
If
        Elk Zone 'BK Slding Door' is Violated
    And Status  'Patio: Dimmer' is Off
    And Program 'Dark Outside' is True
    And Program 'P Light Enabled' is True
 
Then
        Set 'Patio: Dimmer' On
        Set 'Back Yard LV: Link' On
        Run Program 'P Light Off' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 
 
 
P Light Off
If
        Program 'P Light Enabled' is True
 
Then
        Wait  5 minutes and 5 seconds
        Set 'Back Yard LV: Link' Off
        Set 'Patio: Dimmer' Off
 
Else
        Run Program 'P Light Cycle' (If)
 
 
I am still very new to programming my ISY, so I know this is a bit clumsy, but it works.
 
 
Back
Top