Jump to content

Folder Conditions and running Then or Else of a program in a folder


Recommended Posts

You can call a "run-then" or "run-else" from a program at any time, whether in a folder or not, whether the folder is active or not, whether the program is disabled or not.  The only affect of being in an inactive folder is that contained programs will not trigger themselves.  It is as if the included programs are disabled.

Link to comment
1 hour ago, oberkc said:

You can call a "run-then" or "run-else" from a program at any time, whether in a folder or not, whether the folder is active or not, whether the program is disabled or not.  The only affect of being in an inactive folder is that contained programs will not trigger themselves.  It is as if the included programs are disabled.

Not quite correct.
While  the folder is disabled, running Then or Else manually does nothing. Program calls to The/Else always work.
I have requested this  be changed for testing purposes. It's a PITA and a Gotcha'.

Link to comment
1 hour ago, larryllix said:

While  the folder is disabled, running Then or Else manually does nothing.

Interesting.  Not sure that I knew that or ever needed to do so.  I also find it interesting that the program log shows that the program actually ran as commanded manually, despite not seeing the actual results.

Link to comment
20 minutes ago, oberkc said:

Interesting.  Not sure that I knew that or ever needed to do so.  I also find it interesting that the program log shows that the program actually ran as commanded manually, despite not seeing the actual results.

Whoa!
I don't remember it appearing like the program ran. I must recheck that one. A little scary (if that) but that would make it even worse for troubleshooting. I know it set me back quite a few hours wondering why my troubleshooting was so confused once, or twice ( US = 'two times' :) )

 

Maybe a V5.0.14 thing?

Link to comment

@oberkc   @Dave-N1DCH

I just tested this using the program below.


Inside a disabled folder (If $cTRUE is not $cTRUE),

  •  manually running Then or Else does not run any program sections. However the program icons do change to "previously ran True/False' icon pictures.
  •  automatically running a trigger attempt does not run any programs sections, and the program icon does not change from it's existing icon picture.

Tested with an enabled folder for proof of evaluation

Flash Rec Lamp test - [ID 0183][Parent 0184]

If
        'Rec Room / Motion.RecRm' is switched On
 
Then
        Wait  4 seconds
        Repeat 2 times
           Set 'Rec Room / RecRm Cabinet Light' Fast On
           Set 'Rec Room / RecRm Cabinet Light' Fast Off
           Wait  1 second
        Repeat 1 times
 
Else
   - No Actions - (To add one, press 'Action')
 

 

Link to comment

What I was trying to do did not work.  I have two folders Day and night.  each folder has the obvious schedule. From the program in the night I tried to do a run then on a program in the day folder and that did not work.  The resolution was to move the program out of the folder, since it didn't really need to be there and them both day & night programs could use it.

Link to comment
27 minutes ago, Dave-N1DCH said:

What I was trying to do did not work.  I have two folders Day and night.  each folder has the obvious schedule. From the program in the night I tried to do a run then on a program in the day folder and that did not work.  The resolution was to move the program out of the folder, since it didn't really need to be there and them both day & night programs could use it.

I have found an inherent problem using folder conditions and think they should never  be used or even exist. I have been dumping that technique from several folders where I used them, and moving them to each program If section instead.

If a program is in the middle of being processed, and the folder conditions change the running program can stall in the middle of processing and things don't get finished up, lights left on, fans running etc... The program Else doesn't run when a folder condition stops it dead.  
Folder conditions are also very obscure and hidden when problem troubleshooting. It can be quite repetitive but I find it better to just place the conditions in each program If section, even if they are duplicated many times. This makes them visible for troubleshooting.

Having said all that folder conditions can be useful for isolating blocks of code while troubleshooting problems.

Link to comment

Archived

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


×
×
  • Create New...