Jump to content

Program condition needed or not


EricK

Recommended Posts

Posted

We have a night scene in the great room, cabinet lights on (left) and kitchen lights on, everything else is off. I had this program to turn off the night scene kpl if the scene was not active, meaning a device not in the scene was turned on or one of the devices in the scene is turned off:

If
       Status  'Great Room / Great Room Devices / GR Kitchen Lights' is Off
    Or Status  'Great Room / Great Room Devices / GR Sink KPL - A Cabinet' is Off
    Or Status  'Great Room / Great Room Devices / GR Island Lights' is On
    Or Status  'Great Room / Great Room Devices / GR Breakfast Lights (DB)' is not Off
    Or Status  'Great Room / Great Room Devices / GR Pantry Lights' is On
    Or Status  'Great Room / Great Room Devices / GR Cabinets R (DB)' is not Off
    Or Status  'Great Room / Great Room Devices / GR Family Room Lights' is On
    Or Status  'Great Room / Great Room Devices / GR Spots KPL (DB) - A Spots' is not Off

Then
       Wait  4 seconds
       Set Scene 'Great Room / GR Night KPL' Off

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


However, I was reading thru this tutorial again:

http://www.adamsj.com/isy/basementA.htm

and thought I should add to my program as was describe in the link:

If
       Status  'Great Room / Great Room Devices / GR Spots KPL (DB) - A Spots / GR Spots KPL (DB) - F Night' is not Off
   And (
            Status  'Great Room / Great Room Devices / GR Kitchen Lights' is Off
         Or Status  'Great Room / Great Room Devices / GR Sink KPL - A Cabinet' is Off
         Or Status  'Great Room / Great Room Devices / GR Island Lights' is On
         Or Status  'Great Room / Great Room Devices / GR Breakfast Lights (DB)' is not Off
         Or Status  'Great Room / Great Room Devices / GR Pantry Lights' is On
         Or Status  'Great Room / Great Room Devices / GR Cabinets R (DB)' is not Off
         Or Status  'Great Room / Great Room Devices / GR Family Room Lights' is On
         Or Status  'Great Room / Great Room Devices / GR Spots KPL (DB) - A Spots' is not Off
       )

Then
       Wait  4 seconds
       Set Scene 'Great Room / GR Night KPL' Off

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


Can you help me understand what the ISY does in each instance. In the new program if the Night KPL is not lit, the program is false and stops. For the first program does the ISY continuosly check the status of each device, or only if one device in the program changes status. Good education.

Thanks,

Eric

Posted

The "Status" of one of the devices has to change for either Program to be triggered.

 

Checking for the KPL button being On is a logical check as the Program does not have to function if the button is already Off. Both Programs are going to be triggered when any of the devices change state regardless of the KPL button Status check. The KPL button check means the Then clause will not run when the button is already Off.

Posted

Stop for a second and think about 2 concepts

 

1) Triggers

2) True/False

 

Realize that (as Lee said) anytime you list the status of a device in the "if" section, that a change in the status of any one of those devices is a trigger. In other words, the program will run. It doesn't matter what the change is, any change is a trigger. Also realize that if no change occurs, the program will sit idle.

 

Once the program is triggered, then it will go through each line and determine the true/false status of each line and logically connect everything per your "and"/"or"/"()" and determine if the entire statement is true or false.

Posted

I will stick with the updated program. I just want to keep the ISY operating as efficiently as possible. However, i also want to keep my programs as simple as they need to be.

Thanks,

Eric

Posted

You second program will work the same with one exception, it requires that 'Great Room / Great Room Devices / GR Spots KPL (DB) - A Spots / GR Spots KPL (DB) - F Night' is not off to run the "then". Otherwise both require that at least one of the other conditions be true.

 

You basically have made that single kpl of equal importance to the sum of all the other conditions.

Guest
This topic is now closed to further replies.

×
×
  • Create New...