slpelts Posted December 29, 2017 Posted December 29, 2017 is there a way to stop all running program? There are situations when I would like to stop all programs that are currently running to kind of 'reset' things to start new program however, in thinking about this as I type, I couldn't stop the program that I use to stop all others. I can create a program that stops programs one by one and that might be only solution thanks
larryllix Posted December 29, 2017 Posted December 29, 2017 Put all programs into one folder you want to stop. Put a logic condition for the folder in place, and make it evaluate to False. 2
paulbates Posted December 29, 2017 Posted December 29, 2017 (edited) To add to Larry's great idea, you can have your programs in various folders, and have a condition like a variable called "stop" (= 1). Add that as a folder condition to each folder, and make sure its prefixed by an "or". Keep your "stop" program at the root level so its not affected. You will want to initialize stop = 1 so your ISY works when rebooted (or check for 0 instead of 1) If (stop condition) Then $Stop = "1" Else $Stop = "0" ( run program A if) ( run program B then) Keep in mind that the ISY is event driven, so turning the "stop" variable to 1 will stop all of the programs... but changing it to 0 not start all of the stopped programs.. when their conditions are met they will start individually, or you might have to manually run the "ifs". Or add statements in the else to run key programs to restart them. I do something similar when my ISY restarts, I kick off certain key programs so values get populated, etc Paul Edited December 29, 2017 by paulbates 1
slpelts Posted December 29, 2017 Author Posted December 29, 2017 thanks and sounds like good idea in general. However, in my case my different programs are already in different folders. for example, I have a folder for Winter, Summer, NightTime and such. but maybe given the suggestion I can change or rethink what I have done thanks again
larryllix Posted December 30, 2017 Posted December 30, 2017 thanks and sounds like good idea in general. However, in my case my different programs are already in different folders. for example, I have a folder for Winter, Summer, NightTime and such. but maybe given the suggestion I can change or rethink what I have done thanks again Folders can be nested. Just drop your folders involved into another folder temporarily with a condition until you are done testing or keep them that way.
apostolakisl Posted December 30, 2017 Posted December 30, 2017 Folders can be nested. Just drop your folders involved into another folder temporarily with a condition until you are done testing or keep them that way. Unless you only want some of the programs in those folders to stop, then there is no need to nest folders. Just add the condition to each of those folders. For example, create a state variable "s.stop.programs" In each of those folders put If s.stop.programs is 0 Then allow programs to run *Note that if you already have other condtions for the folder, use an "or" to connect this condition. Now create a program (that is not in any of those folders) If (whatever conditions you want to cause the programs to stop) Then set s.stop.programs to 1 set s.stop.programs to 0
Recommended Posts