General Opinion Needed - One PLEG or Many

Just before I get into setting things up with PLEG…

Is it better to have on PLEG and add every input and condition to that for all scenarios or one per scenario or one per room of scenarios?

They use up memory, so i think maybe limit to 2 or 3 PLEGs. All depending of how many conditions you will have in each. I have i think about 40 conditions in each of my 2 PLEGs, and that works fine. The problem is it is getting pretty difficult to keep track of what is where… so i am considering splitting into 3 PLEGs now. So if you do not expect a lof of conditions, maybe keep it in 1, if you are expecting to have a lot maybe split into different ones. For example i have one for HVAC, the other one for lighting and iphonelocator (the last one using a lot of conditions), so i might split that one into another PLEG
I dont think there is a definete limit of how many conditions you can have

[quote=“mikee123, post:2, topic:178581”]They use up memory, so i think maybe limit to 2 or 3 PLEGs. All depending of how many conditions you will have in each. I have i think about 40 conditions in each of my 2 PLEGs, and that works fine. The problem is it is getting pretty difficult to keep track of what is where… so i am considering splitting into 3 PLEGs now. So if you do not expect a lof of conditions, maybe keep it in 1, if you are expecting to have a lot maybe split into different ones. For example i have one for HVAC, the other one for lighting and iphonelocator (the last one using a lot of conditions), so i might split that one into another PLEG
I dont think there is a definete limit of how many conditions you can have[/quote]
Thanks

I have got only one :slight_smile: … tons of conditions.

Triggers are not global, so the advantage of keeping everything in one is that you can combine tons of triggers/conditions etc.

/Martin

When I was in the code writing business, best practice was to modularize as much as possible so that related functions were grouped together. The alternative is some massive subroutine that gets more and more complex over time and becomes a maintenance/modification/troubleshooting nightmare.

So, accepting that I guess each separate PLEG does consume some unknown amount of memory and CPU, I still think its better from a longer term perspective to keep them individually simple. So I have one per “room”; when I need some sort of program/logical control or schedule. Yesterday I eliminated the last of the VERA schedules in favor of schedules in PLEGs. At this point I’m guessing I have just about all the PLEGs (9 as of today) I will need with the possible exception of an additional one when I complete integrating the DSC alarm system and the Blue Iris camera system, still unknowns.

My current system utilization shows 22MB available and a nominal 15 minute CPU load of .41

Pardon my ignorance but how do you install multiple instances of PLEG?

Go to apps, pick PLEG, hit Create Another

I creates another device, but uses the same plugin