bmercier Posted December 9, 2011 Posted December 9, 2011 Hi, Is this a bad practice to play with the program enable/disable? Sometime, I would like the status event to be ignored. Instead of using variable, I was wondering if I can simply disable/re-enable programs like in the example below. Or if I should avoid it for some reason. Example: PROGRAM-1 If Control 'RC / Cuisine' is switched Fast On Then Wait 5 minutes Disable Program 'PROGRAM-2' Set 'RC / Cuisine' Off Enable Program 'PROGRAM-2' PROGRAM-2 If Status 'RC / Cuisine' is Off Then ... ... Actually, my concern is that if this setting gets written to nvram, then I probably want to avoid it as I don't want to keep writing to it. Thanks, Benoit.
Chris Jahn Posted December 9, 2011 Posted December 9, 2011 Generally its more efficient to use a variable because its all done in memory (RAM), unlike enable/disable of a program which writes a file to the SD card each time.
bmercier Posted December 9, 2011 Author Posted December 9, 2011 That's what I though. Thanks for the quick response! Benoit.
Illusion Posted December 11, 2011 Posted December 11, 2011 Damn you guys! This is not something I have ever even thought about. Now there goes my Sunday, changing all my enable/disable operations to looking a variables or flag programs. Thanks for the topic. Always learning.
Recommended Posts