Jump to content

More on triggers, conditions IF's.


sanders2222

Recommended Posts

Posted

On the subject of ISY program logic, over the years I've built up quite a library of programs to automate my home. Unfortunately, I think that is taking a toll on my ISY's performance.

 

I think my ISY is BUZY! Sometimes too buzy. Things sometime work with a delay or seem to partially execute.

 

One thing I've heard, you have to be very careful about the use of the 'Status' test. I'd like to know which is better:

1. Have a program that combines conditions, OR

2. Split the program to simplify the logic, and separate out the use of 'Status'.

 

In this example, I have a program that turns on hall lights if motion is detected in the garage. Additional logic checks that other lights are not on and it's not daylight outside.

Program:'Garage Motion'

If
       Control '_Garage / _Detectors / _Garage 11.A3.B8-Sensor' is switched On
   And Status  'Utility Room / Util Hall Load 12.6A.EE.1' is Off
   And Module 'Climate' Light < 3 
Then
       Set Scene 'Hallways / Hall Utility' On <= Turns light on
       Run Program 'Utility Hall' (Else Path) <= Runs a timer, then turns them off.
Else
  - No Actions - (To add one, press 'Action')

Would it be better to split out the logic of that program into this:

 

Program:'Garage Motion'

If
       Control '_Garage / _Detectors / _Garage 11.A3.B8-Sensor' is switched 
Then
      Run Program 'Utility Hall On' (If Path)
Else
  - No Actions - (To add one, press 'Action')

Program:'Utility Hall On' Disabled

If
       Status  'Utility Room / Util Hall Load 12.6A.EE.1' is Off
   And Module 'Climate' Light < 3 
Then
       Set Scene 'Hallways / Hall Utility' On
       Run Program 'Utility Hall' (Else Path)
Else
  - No Actions - (To add one, press 'Action')

As I understand it, the first sample is always testing any time motion is detected in garage, or the light variable changes in value or anytime the Utility room light is switched on or off. In the split sample, the only test executes when motion is detected. If this is true, then the other conditions are tested in a disabled program.

 

It's probably a small difference in execution but if mutiplied by a hundred, that could be the source of my ISY delays. Any programming experts with opinions on which approach may be best?

Posted

I doubt the ISY is too busy. However, it is true that the first example is triggered when the Status of 'Utility Room / Util Hall Load 12.6A.EE.1' changes and 'Climate' Light changes. Since these values are important only if motion is sensed putting them in a second Program that is Disabled will stop the Program from triggering on these changes.

Posted

Thanks for the post LeeG. I have been trying to track down a delay sometimes experienced when I try to exit my house. I have a KPL button I push to exit. This is suppose to arm my ELK & house in the away mode.

Sometimes I push the button and get an arming announcement right away. And sometimes there may be a 10-20 second delay before the announcement occurs.

 

This is somewhat problematic as the entry into the garage cannot happen until the announcement, otherwise the arm up state is not ready and the whole thing gets cancelled/out of wack. Any ideas why the announcement is not always instant upon the buton push?

 

I also occassionally find a noticable delay with other programming triggers.

Posted

sanders2222

 

Can you add something to the Program that is Logged but has no affect. I put an X10 statement at the beginning of the Then clause to show how quickly statements in the Program were executed following the KPL button press.

 

KPL Relay DB v40 / KPL Relay DB v40 - B Status 100% Sun 2012/12/30 07:05:04 PM System Log

X10 A15 Sun 2012/12/30 07:05:04 PM Program Log

X10 A15 Off (11) Sun 2012/12/30 07:05:04 PM Program Log

 

With something like this it can be determined objectively how quickly the Program started after the button press. Kind of divide and conquer. If the Program executes immediately then look forward to what else the Program is doing. If there is a significant delay in Program execution following the button press than the general environment has to be looked at.

Guest
This topic is now closed to further replies.

×
×
  • Create New...