Jump to content

Scene Program


jkraus

Recommended Posts

Posted

sorry for the basic question, but do I need the Else command in this program? Also, do I need to enable "run at start up"? on all of these type of programs?

 

Goal is to have the fountain on for 2 1/2 hours

 

If

From 4:00:00PM

To 6:30:00PM (same day)

 

Then

Set 'Fountain - Backyard' On

 

Else

Set 'Fountain - Backyard' Off

Posted

Yes - the ELSE is required to turn fountain OFF when the IF statement is no longer true (after 6:30pm).

 

I'll let Michel confirm the RUN AT STARTUP question, but I believe if your ISY went down for some reason at, say, 3pm and did not boot back up until 5pm your Fountain would stay off UNLESS you enabled RUN AT STARTUP since it missed it's 4pm startup time.

Posted

From/To on a schedule is actually most useful when you want to maintain a state regardless of other events that alter it.

 

If a Condition to check the Status of the device is included the program will overrun any changes made to the status by a button press. If you want to ensure that the fountain is on or off in the specified hours then you have to add a Condition.

 

If
       From     4:00:00PM
       To       6:30:00PM (same day)
   And Status  '01.2B.1C - Living Room' is Off

Then
       Set Scene 'Living Room - Sleep' On

Else
       Set Scene 'Living Room - Sleep' Off

 

Using the Else in this case will result in the scene being turned Off anytime between 6:30PM and 4PM (next day). If you switch the device during those hours the program will be evaluated and run the Else. This will prevent you from overriding the program by using a switch.

 

Using the Else can wind up in a loop if you have another program trying to turn the device On and this program is being sure it is Off.

 

If that isn't your intention and you want to be able to override the Off of the program by using a switch or another program you don't want to use the Else.

 

Instead you would assemble two programs, one to turn the scene On at 4:00 and another to turn it Off at 6:30. Then if you use a switch you can override it. That is my preference.

 

The program you have written will function as I believe you desire, a switch or other program will not affect this program. This program will not keep the fountain On or Off depending on the Schedule. It will only evaluate at 4 or 6:30 but it seems clearer to me to use separate programs.

 

Rand

Posted

Thanks Rand

 

That is exactly what I needed! Now I see I really need two programs, much more like my "Ocelot Programming". Yes, I just want to run on then off at set times, but still controlled by other switches

Posted

Just to be clear, if you still want control by other switches, and simply an ON/OFF at different times, you don't NEED two separate programs - but as Rand stated, it might be your preference to have two programs.

 

I have the following program control my front door lights:

 

If
       From    Sunset  + 20 minutes
       To      10:00:00PM (same day)

Then
       Set Scene 'FrontDoor' On

Else
       Set Scene 'FrontDoor' Off

 

This simply turns ON my front door lights at 20 minutes after sunset, then turns them back off at 10pm.

 

You can certainly split that up into two programs if you'd like, but I personally chose to do it in 1 program.

 

As Rand stated, if you wanted your front door lights to stay ON - even if someone turned them off by a switch - you could do that as well. To do that, I could change my program to this:

 

If
       From    Sunset  + 20 minutes
       To      10:00:00PM (same day)
 And Status 'FrontDoorLight' is not On

Then
       Set Scene 'FrontDoor' On

Else
       Set Scene 'FrontDoor' Off

 

In this case, if someone turned my front door lights off, and it was between my FROM/TO times, the ISY would turn them back on.

 

Again, 1 program or 2 is up to you - but your program is fine as-is.

Posted

michael,

 

Still a little confused. If your program works great to have just one program, but to Rand's point is your program still controllable from another switch that can shut off the scene? If it is shut off wont it go right back on?

 

Thx

 

Joe

Posted

My 1st example is still controllable by another switch. It simply turns ON 20 minutes after sunset and OFF at 10pm. It doesn't care what happens in between.

 

In my 2nd example, if my front door lights are turned OFF between those times, the ISY will turn them back ON.

Posted

Mike, got it!

 

You know each "machine" has it's programing preferences (language), if not for you and the rest of the help here I would need "Rosetta Stone for ISY", so thanks!

 

Joe

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
      37k
    • Total Posts
      371.4k
×
×
  • Create New...