Jump to content

Cumulative timer for light "On Time" per month ?


telljcl

Recommended Posts

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

Link to comment
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?

Link to comment

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

Link to comment
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

Link to comment

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!!!

Link to comment

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.

Link to comment

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.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.3k
×
×
  • Create New...