Simple timer device with time left exposed

Hi guys!

I'm looking for a simple 'timer' or 'countdown' device that would expose its timer as an attribute that can be displayed on Dashboard/Sharptools. The idea is to be able to 'start' the timer based on a rule or button push, say for 15 minutes, being able to re-start the timer if the rule is re-triggered or the button is pushed again. Once active, I'd like to be able to display the time left before it expires.

Any ideas?

I didn't write it for exactly this purpose, but I think you could use this? Or modifiy it anyways, I was thinking of making a 1s version....

It's in ms...which is a bit fine. But if you give it a 15 mins (900s, or 900000ms) then set a tick interval to 1000ms then it'll count up to 15mins.

Thank you!!! I'll take a look...

You should look at @bptworld apps. I think I saw a countdown app that might fit your needs.

John

Thank you, JohnRob!... I actually had already tried that option and it lets your control devices based on timers. I'm looking for a simple device that you can set to start an internal timer and simply display (expose) its internal value. The idea is to 'start' the timer based on some event and have it display its countdown on a tile/dashboard so we always know how much longer it has to go before it expires.

While I was on VeraPlus, I had several 'devices' that were simple timers. When the 'timer' was started based on a push button or a rule, an action was accomplished (say a TV was turned on) and upon expiration of the timer, the TV would turn off. We could always see how much longer before the TV would turn off and decide whether to leave the timer alone, push a button to re-start it (timer would start over) or force-complete the timer allowing it to carry on with the actions configured to be done upon timer expiration. I realize this may be too much to ask, so I'm just looking for something that on my dashboards would show me the current state of the timer...
Not sure if this makes any sense?

I understand exactly. And while I don't know how to do it myself, I'm sure a simple app can be written to accomplish what you need. If you are adventuresome you might try to take BPTWorld or the ASJ code and tweak it yourself.
Goodluck

John

P.S. I too passed through VeraPlus on my way from X-10 to Hubitat.

Lol, been down the same road my friend with x10, wink, staples connect, smartthings, veraplus and finally Hubitat!!! Thanks for the suggestions, I'll see what I can do.

Hi Z.

Did you get any further with the timer-device.

I just unboxed my Hubitat and am getting to know it. I too had a veraplus and seem to be stuck in that kind of logic... :slight_smile:

+1 for a simple countdown tile linked in to RM!

1 Like

if not already done, I am going to give a try:

  • Use capability "Timed Session"
  • Has preferences including Elapsed and for Countdown. timer
  • Can be triggered by rule machine
  • Can trigger rule machine using custom attribute "timeTrigger".

If successful (day or so for code and unit test), I will announce here.

Dave

Below are for my note:

  • Use now() function called called by update method to always get exact elapsed time, regardless or other delays.
  • Use "schedule" vice runIn to assure accuracy of run.
  • User preference time format with associated displayTime attribute. Will be HH:MM for minute sensitivity and HH:MM:SS for second sensitivity.
  • Reduce hub impact by using variable time refresh algorithm that increases measurement frequency with lower time value.
    • greater than 5 minutes: Every Minute
    • greater than: Every 10 Seconds
    • less than 1 minute: Every second

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.