Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cumulative timer for light "On Time" per month ?

Featured Replies

Posted

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.

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

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?

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

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

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

  • Author

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

  • Author

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.

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.

  • Author

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!

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.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.