Jump to content

Run, Run Then, Run Else


jeff-lines

Recommended Posts

I was reading another post that got into a sideline discussion related to the Run action and the desire to see a Run If action added. I would also like to see this, but feel Run program implies the whole program is going to run, not just the Then section. That assumption cost me a few hours of frustration trying to figure out why my If conditions weren't evaluating properly when I would apply the Run action to a program from the Program Summary.

 

Here are the actions I would like to see for the Program Summary and Action within a program:


  • Enable - not currently an action within a program
    Disable - not currently an action within a program
    Run - Runs all of a program to include If conditions
    Run Then
    Run Else
    Stop
    Run at Reboot
    Run Then at Reboot - for compatibility and consistency
    Run Else at Reboot - just for consistency
    Not Run at Reboot

 

There is also another thread that discusses Case, ThenIf, and ElseIf statements that would throw a monkey wrench into all of this. At that point, might want to eliminate the Run Then and Run Else actions.

 

I'm still really excited about the ISY. I'm having so much fun with it. Thanks again for a great product.

Link to comment

Run - Runs all of a program to include If conditions

Whenever an event occurs, the conditions in all programs are tested, therefore "Run If" is not needed because it is automatic.

 

I'm still really excited about the ISY. I'm having so much fun with it. Thanks again for a great product.

Thanks! Its also been a lot of fun developing it!

Link to comment

One instance I can see using it is in debugging where you have a number of status conditions you are testing for in the condition. I can help where you have a combination of Or and And statements that might not evaluate True when you exect it to. A thread I read last night was were a problem was curred by changing the And statements to Or.

 

It appears that within a program, you can perform the Run and Run Else on programs that are disabled and they will execute once. A RunIf would allow nesting of programs and associated additional conditions and actions. Here is an example of a garage door monitoring program that automatically closes the door 10 minutes after it has been opened. It then gives time for the door to be closed and tests to be sure it is closed and tries again if it is not:

Program Content for 'Garage Door One Opened'
If
       Status 'Garage Door Closed Sensor' is Off
Then
       Wait 10 minutes
       RunIf Program 'Close Garage Door One'
       Wait 1 minutes
       RunIf Program 'Close Garage Door One' (2nd attempt)
       Wait 1 minutes
       RunIf Program 'Notify Garage Door Open'
Else
     - No Actions - (To add one, press 'Action')

Program Content for 'Close Garage Door One' (disabled)
If
       Status 'Garage Door Closed Sensor' is Off
Then 
       Set 'Close Garage Door One' is On
       Wait 2 seconds
       Set 'Close Garage Door One' is Off
Else
    - No Actions - (To add one, press 'Action')

Program Content for 'Notify Garage Door Open'
If
       Status 'Garage Door Closed Sensor' is Off
Then 
       Notify All
Else
   - No Actions - (To add one, press 'Action')

Basically, it always tests to make sure the garage door is open before it executes the close sequence and makes two attempts to close the door; like maybe something ran through the beam and reversed the door. If the door is still open after two attempts, then it sends us text message on our cell phones letting us know the door is still open.

 

Hopefully this will help with explaining where I would find it useful.

Link to comment

Archived

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


×
×
  • Create New...