telljcl Posted January 18, 2012 Posted January 18, 2012 Wanting to do a little analysis on multi-fixture "On Time" to see if LED prices are low enough to consider. Is there a (relatively simple) way to start / stop a timer, with the "On" or "Off" of an Insteon device or Scene? Thanks for any help.
TJF1960 Posted January 18, 2012 Posted January 18, 2012 Hello telljcl, This may do what you are looking for. Set up a variable and include it in the program below. Every 1 minute the device is On the variable will increase by 1. If Status 'Your Device' is On Then Repeat Every 0 seconds Wait 1 minute $Your var. name += 1 Else - No Actions - (To add one, press 'Action') Tim
andyf0 Posted January 18, 2012 Posted January 18, 2012 Hello telljcl, This may do what you are looking for. Set up a variable and include it in the program below. Every 1 minute the device is On the variable will increase by 1. If Status 'Your Device' is On Then Repeat Every 0 seconds Wait 1 minute $Your var. name += 1 Else - No Actions - (To add one, press 'Action') Tim Can't you Repeat Every 1 Minute and get rid of the Wait?
TJF1960 Posted January 18, 2012 Posted January 18, 2012 Hi Andy, Yes you could. But I found the variable increments +1 immediately each time the program turns true, then it starts the 1 minute repeat routine. Since the OP is trying to track operation time I thought the premature increment by 1 might throw his stats off. However if there are times when the status of his device will be turned on for less than 1 minute at a time then the program I listed will not track those moments in which case the OP might prefer to delete the wait as you suggested. Tim
LeeG Posted January 18, 2012 Posted January 18, 2012 Text removed as it does not apply to this topic.
TJF1960 Posted January 18, 2012 Posted January 18, 2012 Hi Lee, Sorry, I do not follow. The program is not being reevaluated when the value of the variable changes. The program will only turn true when the status of the device is On and turn false when the status of the device is Off. Tim
apostolakisl Posted January 18, 2012 Posted January 18, 2012 Hello telljcl, This may do what you are looking for. Set up a variable and include it in the program below. Every 1 minute the device is On the variable will increase by 1. If Status 'Your Device' is On Then Repeat Every 0 seconds Wait 1 minute $Your var. name += 1 Else - No Actions - (To add one, press 'Action') Tim Can't you Repeat Every 1 Minute and get rid of the Wait? This program will underestimate your light usage by a fair amount depending on your typical length of leaving the light on. If you have a low time on, you will miss most of your minutes. For example, if you only turn it on for 50 seconds at a time, your variable will never count anything. Have the counter click up one in the middle of the time slot and make your time slot shorter, so on average you will undercount the same number of times you overcount. If status light is not off then repeat every 30 sec wait 15 sec variable =+1
telljcl Posted January 18, 2012 Author Posted January 18, 2012 Thanks for the sample programs - I'm never sure how exactly the logic works (great points here about the differences in each of these examples). It appears to me that the most recent post above would give the most accurate time count, but then again I am no ISY genius. I'll change the programs as I had just started running them written like the first example posted. Thanks!!!
telljcl Posted January 18, 2012 Author Posted January 18, 2012 Nope - The last program above advances the "minute" clock about every 45 seconds (seems maybe even like about 40, but don't see how...) So I've gone back to the original, as most of the lights I want to track are long-term "on" times. Thanks - this is interesting.
apostolakisl Posted January 19, 2012 Posted January 19, 2012 My program is not counting minutes, it is counting 30 second intervals. Divide your final answer by 2 to get minutes. However, it is possible that ISY counts the extra 15 second wait before doing the repeat. So it would be counting 45 sec intervals. I wouldn't think it would, but maybe it does. If you skip the wait 15 seconds it will for sure be counting 30 sec intervals. You could also make it repeat every 15 seconds, then divide the final by 4. The smaller you make your count interval, the more accurate your final answer will be.
telljcl Posted January 19, 2012 Author Posted January 19, 2012 I see... I guess its counting the 15 seconds also. Good to know how to make a more accurate timer for situations that require it. Thanks!
MstrD Posted January 26, 2012 Posted January 26, 2012 Thanks for this little program. I used this with a Synchrolinc attached to our family room TV. It tracks the minutes for each day, then sends a notification with the minutes. Then resets each day. Helps keep track of the kids TV watching after school.
Recommended Posts