Jump to content

Why is this program triggering on the second condition?


Recommended Posts

Posted
My program is below. I want it to only trigger if the "Alarm-Sensor" goes from on to off. Once that happens, I want the Sensor to be checked, and to run the if or else based on that. The problem I am having is that this program runs every time the sensor changes status. How do you make a program trigger on only one of the conditions?

 

 

If

        'Alarm-Sensor' is switched Off

    And 'Outside / Outside LV-Sensor' Status is Off

 

Then

        Set 'Kitchen / Hot Water' On

 

Else

        Set 'Kitchen / Accent Lights' On

        Set 'Main Stairs / Main Stairs Foot Lights' On

        Set 'Kitchen / Hot Water' On

 

Posted

A  program will re-evaluate any time a condition in the IF statement changes.

 

Add the following to your IF statement

 

    'Alarm-Sensor' is switched Off

    and  'Alarm-Sensor' is not switched ON

Posted

The ISY will extract a list of trigger events from the If statement of your program. For the program in your original post, the list of trigger events will likely look like this:

 

'Alarm-Sensor' issues DOF command

'Outside / Outside LV-Sensor' state value changes

 

If I understand you correctly you only want the program to trigger on "'Alarm-Sensor' issues DOF command" and then have the program evaluate the status of the 'Outside / Outside LV-Sensor' and execute the Then statements or Else statements accordingly. If this is correct, you need two programs:

 

'First Program' (enabled):

If

        'Alarm-Sensor' is switched Off
Then
        Run Program 'Second Program' If
Else
        -- Nothing --
 
'Second Program' (disabled):
If
    'Outside / Outside LV-Sensor' Status is Off
Then
        Set 'Kitchen / Hot Water' On
Else
        Set 'Kitchen / Accent Lights' On
        Set 'Main Stairs / Main Stairs Foot Lights' On
        Set 'Kitchen / Hot Water' On
 
Since the 'Second Program' is disabled, no trigger conditions will be extracted. Thus, the only thing that will trigger the two programs is 'Alarm-Sensor' being switched to Off.
Posted

Thanks everyone. I came from Houselinc which had a very specific trigger case, and then secondary conditionals once that trigger(s) were thrown. Kind of interesting that it isn't more naturally handled in the ISY, but thanks for the hacks.

Posted

Thanks everyone. I came from Houselinc which had a very specific trigger case, and then secondary conditionals once that trigger(s) were thrown. Kind of interesting that it isn't more naturally handled in the ISY, but thanks for the hacks.

 

Let's not reopen that can of worms!   :?

Posted

Let's not reopen that can of worms!   :?

Yes, we have all been begging for ISY to optinally disable items in the if cluase from being triggers.  But it doesn't seem to be happening.

 

So, you need two programs.  Program 1  contains the triggers and does a "run if" on program 2 (which is set to disabled).  Program 2 contains the other conditions as well as the then/else.

Posted

And since some things trigger (state variables) but others don’t (integer variables), and who knows when nodeserver events are triggers or not - I think the admin console *really* needs to gain color coding if the ‘if’ clause (like scene member devices). List the conditions in red if they are triggers. Please?.. :)

Posted

Problem with color coding is that it doesn't specify what triggers flow from what If statements. "If Control Device is switched On" and "If Status Device is On" would both be red, but would mean a different set of trigger conditions.

post-1328-0-98637800-1517405678_thumb.png

Posted

Adding ‘when’ is definitely a better representation - but likely much more work. This can already be achieved with two programs - but the issue of knowing which if clause triggers and which is tested is still present in the first program. Color coding is likely easier for a quick upgrade - just knowing which if conditions are triggers will help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...