# \[APP\]\[Pro\] Chronograph - Adds precise timer, stopwatch and transition functionality to Homey

**URL:** <https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214>\
**Category:** Apps\
**Tags:** app, official, tools, homey-pro\
**Created:** [September 17, 2019, 5:55am UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214 "2019-09-17T05:55:42Z")\
**Posts on this page:** 20\
**Page:** 21

<div class="post-metadata">

**Author:** ![iBosvelt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ibosvelt/32/47824_2.png) [@iBosvelt](https://community.homey.app/u/iBosvelt)\
**Post date:** [February 6, 2023, 4:28pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/415 "2023-02-06T16:28:13Z")

</div>

@Arie_J_Godschalk: I searched the forum but couldn’t find the answer. is it possible to use random timers? if so, how?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 6, 2023, 5:11pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/416 "2023-02-06T17:11:03Z")

</div>

You can use this. The example sets the duration to a random number from 1 to 6:

 ![Screenshot_20230206-180540_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/c/2c052e8468a00ad066f93f6be5c2804339bb4910.jpeg)

Timer duration value:

```auto
{{round(random(1,6))}}

```

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [February 11, 2023, 3:41pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/417 "2023-02-11T15:41:56Z")

</div>

@Jux2k2 Do you have a stopwatch PSMaster running after PS\_Step\_0?

I see inconsistencies when using Start or replace stopwatch. In one flow it works, but when I create a new flow with a new stopwatch, it does not work: when testing I try to run “Start or replace stopwatch Test stopwatch” the flow shows a red failure, but the stopwatch is created with value 00:00 and not running (visible in Settings/Chronograph).

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/a/ca3d45663834211fa482fd87baf5e96d320b6511.png)

Error: Invalid time

Is it normal?

Update 1: I think I found the culprit. It works well when the name of the stopwatch is without spaces. Weird thing is that it does work for me in another flow.  
Update 2: Found it. When the name contains a single space it does not work. When the name contains 0 or more than one spaces then it works fine. 🥲

---

<div class="post-metadata">

**Author:** ![Mark1541](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mark1541](https://community.homey.app/u/Mark1541)\
**Post date:** [February 13, 2023, 6:53pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/418 "2023-02-13T18:53:15Z")

</div>

Is there a way to see Al the timers I’ve set ?

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [February 13, 2023, 7:12pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/419 "2023-02-13T19:12:43Z")

</div>

No, not yet, it’s on the feature list.  
But currently, all time goes first to getting all apps 100% working with the the Black Puck (a.k.a. HP2023) 🙂

---

<div class="post-metadata">

**Author:** ![Mark1541](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mark1541](https://community.homey.app/u/Mark1541)\
**Post date:** [February 13, 2023, 7:21pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/420 "2023-02-13T19:21:40Z")

</div>

I understand

I was using countdown timers from Jeroen bos but don’t know he will update it to sdk3

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [February 13, 2023, 7:42pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/421 "2023-02-13T19:42:26Z")

</div>

> [@Mark1541](#):
>
> I was using countdown timers from Jeroen bos but don’t know he will update it to sdk3

The [Countdown App](https://homey.app/nl-nl/app/nl.bevlogenheid.countdown/CountDown/) from @ralfvd is also very excellent i think.

It’s already updated to SDK3, based on the BLL app and has had some updates recently.

And, in the App Settings, you can edit or view all countdowns that are created through app settings or through flows.

---

<div class="post-metadata">

**Author:** ![Mark1541](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mark1541](https://community.homey.app/u/Mark1541)\
**Post date:** [February 13, 2023, 7:48pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/422 "2023-02-13T19:48:46Z")

</div>

Okay

When you add the function to see all the timers I love yours !

I’ve always used the countdown timer app but I think that one will not supported anymore

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [February 13, 2023, 7:51pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/423 "2023-02-13T19:51:30Z")

</div>

> [@Mark1541](#):
>
> When you add the function to see all the timers I love yours !

Thanks, i’ll let you know. Fortuantly, it’s about the second ticket for chronograph, so shouldn’t take to long.

---

<div class="post-metadata">

**Author:** ![Mark1541](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mark1541](https://community.homey.app/u/Mark1541)\
**Post date:** [February 13, 2023, 7:58pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/424 "2023-02-13T19:58:18Z")

</div>

you have not yet received a request to view the timers in the settings I understand and is therefore a bit more at the top of your list?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 13, 2023, 9:11pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/425 "2023-02-13T21:11:56Z")

</div>

For the time being you can use this Homeyscript:

```auto
const flowsDic = await Homey.flow.getFlows();

const flows = Object.values(flowsDic)

const actions = flows.map(f => f.actions.filter(a => a.uri === 'homey:app:nl.fellownet.chronograph')).flat()

log(actions.reduce((a,x,y,z) => ({...a, [x.args.name]:x.id.split('_')[0] }), {}))

```

> ![Screenshot_20230213-221135_Firefox](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/b/6b797ee0241aad81515de137e96a42671afeb590.jpeg)

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [February 25, 2023, 9:41pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/426 "2023-02-25T21:41:55Z")

</div>

Love [this](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/414)! Using it heavily, but I need to convert to text hh:mm or hh:mm:ss which requires me to make more calculations/cards. Is it too much to ask if you could provide in text tags?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 25, 2023, 10:37pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/427 "2023-02-25T22:37:25Z")

</div>

You mean to have the duration/elapsed time in hh:mm:ss format, made available as a string tag/token?  
I’d like that as well as a feature request.  
(I created bitbucket issue [#12](https://bitbucket.org/QlusterIT/nl.qluster-it.chronograph/issues/12/feature-request-to-have-the-duration) for this).

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [February 25, 2023, 10:39pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/428 "2023-02-25T22:39:50Z")

</div>

Yes. However, I just found a template in the flow exchanger for time-calculator. It could replace the flow I have for the conversion. Studying it now…am just getting into TEF etc, amazing stuff! Very impressed!

I also found your homeyscript for it ([here](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/398)).

I am not sure which is better/more efficient. So far I managed to stay out of homeyscript in my drive to simplify 🙂

I think I would still prefer a text tag directly from Chronograph.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 25, 2023, 10:42pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/429 "2023-02-25T22:42:58Z")

</div>

Check.  
Now I use a little script to convert elapsed/duration time (in ms) to hh:mm:ss and pass it as text tag (Which you just found 😉 )

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [February 25, 2023, 11:17pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/430 "2023-02-25T23:17:32Z")

</div>

Trying, but a real first timer with this Homeyscript/TEF.

1. I have the script cv\_monitor.js in homeyscript.
2. I revised the Chronograph flow to test with a stopwatch.
3. I created in the same flow a script card with cv\_monitor  
But I get an error from the DC card: Flow Card not registered (type: action, id: hs\_runCodeWithArgReturnsNumber)?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/a/1a040d919247b9adc3e010c9c44d6f579af9deec.png)

Update: I just found out: replace the fake DC card wiht the HomeyScript card…Apologies

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 25, 2023, 11:22pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/431 "2023-02-25T23:22:11Z")

</div>

You have to replace the DC card with te HS card.  
And the example HS card you show, uses the timer name as argument, this was before Arie made the duration/elapsed time tags available. So with the situation on your screenshot, you don’t need the two Chronograph cards.

Does this make sense as example, now the HS card only converts the [Elapsed] tag to hh:mm:ss in a returned text-tag

 ![Screenshot from 2023-02-25 23-42-03](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/8/987ab554e72550197c1a4920664a79ac026176c6.png)  
This is the used script:

```auto
// Convert milliSeconds to HH:MM:SS
// -> argument: input in milliseconds
let milliseconds = args[0]
let seconds = milliseconds / 1000;

if (seconds == '' || seconds == undefined) {
    console.log ('Missing argument');
    return(false);
} else {
  d = seconds;
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
}
  // Show as 'HH:MM:SS'
  var clock = ('0' + h).slice(-2) + ":" + ('0' + m).slice(-2) + ":" + ('0' + s).slice(-2);

console.log(clock);

return(clock);

```

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [February 25, 2023, 11:42pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/432 "2023-02-25T23:42:59Z")

</div>

Got it, thanks so much!

> [@Peter\_Kawa](#):
>
> This is the used script:
> 
> ```auto
> // Convert milliSeconds to HH:MM:SS
> // -> argument: input in milliseconds
> let milliseconds = args[0]
> let seconds = milliseconds / 1000;
> 
> if (seconds == '' || seconds == undefined) {
> console.log ('Missing argument');
> return(false);
> } else {
> d = seconds;
> var h = Math.floor(d / 3600);
> var m = Math.floor(d % 3600 / 60);
> var s = Math.floor(d % 3600 % 60);
> }
> // Show as 'HH:MM:SS'
> var clock = ('0' + h).slice(-2) + ":" + ('0' + m).slice(-2) + ":" + ('0' + s).slice(-2);
> 
> console.log(clock);
> 
> return(clock);
> 
> ```

(I am not sure my comment should be in this thread or elsewhere, apologies)

@Peter_Kawa How can your script be modified to have two (or more) results (tags), for example:  
// Convert milliSeconds to HH:MM:SS and HH:MM  
// → argument: input in milliseconds  
let milliseconds = args[0]  
let seconds = milliseconds / 1000;

if (seconds == ‘’ || seconds == undefined) {  
console.log (‘Missing argument’);  
return(false);  
} else {  
d = seconds;  
var h = Math.floor(d / 3600);  
var m = Math.floor(d % 3600 / 60);  
var s = Math.floor(d % 3600 % 60);  
}  
// Show as ‘HH:MM:SS’  
var clockHHMMSS = (‘0’ + h).slice(-2) + “:” + (‘0’ + m).slice(-2) + “:” + (‘0’ + s).slice(-2);  
// Show as ‘HH:MM’  
var clockHHMM = (‘0’ + h).slice(-2) + “:” + (‘0’ + m).slice(-2);

console.log(clockHHMMSS); // HOW TO ADD clockHHMM ?

return(clockHHMMSS); // HOW TO ADD clockHHMM ?

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [February 26, 2023, 12:30am UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/433 "2023-02-26T00:30:50Z")

</div>

> [@Rrrr](#):
>
> a template in the flow exchanger for time-calculator. It could replace the flow I have for the conversion. Studying it now

Does not seem to accept time (ms) as input and uses the Better Logic function [Execute BLL Expression (as Tag)] to execute date() to get a start time.

Maybe it is possible to input the milliseconds but @Peter_Kawa 's homeyscript seems sufficient till we can get a text tag from the stopwatch card.

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/9/491371219d0908bd86fbbc329d7a77863c5fc226.png)

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [February 26, 2023, 12:24pm UTC](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214/434 "2023-02-26T12:24:31Z")

</div>

> [@Peter\_Kawa](#):
>
> You mean to have the duration/elapsed time in hh:mm:ss format, made available as a string tag/token?  
> I’d like that as well as a feature request.  
> (I created bitbucket issue [#12](https://bitbucket.org/QlusterIT/nl.qluster-it.chronograph/issues/12/feature-request-to-have-the-duration) for this).

@Peter_Kawa Peter, when you specify the extra tags for hh:mm and hh:mm:ss, please add the name tag of the stopwatch/timer as a request.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/2/524c767fffe24445d3081d2ae7b6e12efccc4080.png)

[Previous page](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214.md?page=20)

[Next page](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214.md?page=22)
