glacier991 Posted February 28 Posted February 28 I am working on a program with, as for now, several programs, the earlier of which call the next. In at least one instance, the follow on program "could" just be added to the one before as an a ELSE path. What are the considerations here?
Goose66 Posted February 28 Posted February 28 Consistency of approach is one consideration. Else branch may work with state conditions, but rarely works as intended with events. i usually have one, enabled program for events (commands received, times, etc.) and another, disabled program to check states (variables, light status, time or date ranges, etc.) and perform actions.
glacier991 Posted February 28 Author Posted February 28 Thanks Goose. That is helpful. Part of what drove me to separate them was a debugging ability to disable the follow on. I do not mind more programs, appropriately linked.
larryllix Posted February 28 Posted February 28 Naming the programs with meaningful names is usually the key. For programs I use for Alexa, mine are all named xxxxx.initiate. When I go to the ISY Portal and do a search, they are easily sorted from the rest and unlinked ones are easy to spot. For the case of programs, as above, I usually suffix the sensing program with xxxx.trigger, or xxxx.sense. Of course there are always exceptions and combination programs and it is a work of art trying to keep the names meaningful, but it usually pays in less confusion down the road when additions are wanted.
glacier991 Posted February 28 Author Posted February 28 Really smart idea. I think I will follow your suggestion ! Thanks.
Recommended Posts