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

I have a number in a tag (a flow started with a number), and want to adjust a running timer by adding N hours to it.

I must have a negative number to add to the timer?

I tries this but cannot get it to work

If you want to add a number and you have -2 you maybe can multiply it with -1. The outcome is then 2. If you want to add a negative number and you have a positive number also multiply by -1

Thanks- but unfortunately that does not work either, maybe you cannot use tags with calculations at all in the Adjustment field.

If I try to use a Voltage card for this flow the timer will get set to 227 minutes.
3:47:00.
Only when the tag get changed it will not update, you first have to stop te timer.
Think that will work.
Maybe @Arie_J_Godschalk has an idea to replace the timer with a tag.

I figured out now why it does not work for me - I missed the constraint “One can’t extend the duration, when the new duration will be longer than the timer’s original duration

Is this limitation technical in nature, or a decision by the developer to enforce this rule? For my use case, I would like to start a countdown for say 1 hour. The a flow can choose to extend this countdown 15 minutes each time it is run (for example a button press on a remote), to postpone the time when the timer will reach zero. But that is not possible due to this constraint.

Any idea on how to implement what I want using Chronograph?
If it was possible to retreive the current count of the timer using a tag/variable, I could do math and restart the timer using + 15 minutes, but I cant se that the timer value is exposed as a tag either.

@clindh I believe there is a Recieve Duration flowcard.

Excellent, found it - in Advanced only, but that’s OK - I’ll switch to Advanced Flow for this flow.

1 Like

Afaik you can adjust a timer’s duration towards zero, or towards the defined duration, when you want a longer time than the defined duration, you can use the card “Start or replace timer X”, and just enter a duration of your likings. Disadvantage, the new duration will be the default timer’s duration…

I see you just found it, but I just finished my example flow, so I’ll share it anyways :stuck_out_tongue:

LOG output

1 Like

Great app!
This app is overwhelming for a newbie…

The countdown app has this function:
“Examples: When motion is detected, turn on light and start a timer for 90 seconds
After 11 seconds, when motion is detected again, restart the timer for 90 seconds
When the timer reaches 0, there was no motion for 90 seconds, turn off the light”.

I guess this app(Chronological) also has the same function?

Thanks, from a newbie with Homey :slight_smile:

Here’s some example flows


1 Like

Hi,

I noticed that timers don’t finish and just ‘stalls’ like below picture. This of course results (in my case) lights not being turned off. It’s never the same amount of remaining seconds and it happens with multiple timers in different flows. It happens quite often. I use the Chronograph app. Anyone know what could cause this?

Screenshot 2023-12-11 at 19.19.59

Regads,
Peter

When it stalls, please send me a diagnostic.

Hi, I am running the Chronograph app (version 2.1.2) on Homey Pro 2019. Since Homey has been upgraded to version 10.0.4 the Stop Timer cards give an error “Timer xxx loopt niet” and stop the flow (or follow the red error line in advanced flows if connected) when they are called while the selected timer is not running. These used to just continue the flow normally when the timer was not running.
Is this an intended change? If so, then I would have to add a check to see if the timer is running before calling the Stop Timer card in all my flows (which are a lot of them).

1 Like

Not afaik.

Well, im not sure about that.
I just checked the sourcode to be curtain, and afaik, this has always been the case.
At least, from the moment i took this app over, about a year ago, it has always been the case that an error will be thrown whenever you try to stop a timer that is not running:

Here is the sourcecode from 17-10-2022, version 1.1.2, when i took over. It already shows the Error when a timer is not running.

let id = Utils.generateId(ChronographType.TIMER, args.name);
let timer = Chronograph.get(id);
if (!!timer) {
	timer.stop();
	return Promise.resolve(true);
}
return Promise.reject(new Error(Homey.__("timer_not_running", { "name": args.name })));
1 Like

Thanks for your quick and elaborate reply :slight_smile:
All my flows containing this card stopped running with the mentioned error since the last firmware update (when called while the specified timer was not running). Before the firmware update these flows kept running. Note that the timers do exist, they are only not running. Maybe the firmware update has caused some things to work differently than beforen.
Anyway, I will work around this by adding a check if a timer is running before calling this card. And once more, thanks for your quick reply and keep up the good work with all the apps you are maintaining!

Maybe easier to connect the error connection also to where you want to continue?
I am quit sure that stopping a non-running timer gave an error in previous verion.
Which version did you come from?

Can you show such a flow pls?

You could also just not use the outgoing connection of the timer-stop card, connect the following card(s) to the same startpoint as the timer-stop card.

Gents, I found the source of my own confusion… The basic flows kept running fine and they still do… If I run them using the test button I see that the card gives an error but all the other cards are still executed. That is how basic flows work (I should have known, I just overlooked that).
For the two advanced flows which are not working as expected anymore, I now think that the timers were always running when these flows executed. I am not sure what happened last week why these timers were not running and causing the flows to break on the stop timer card. I have now changed those as adviced by Anders_Gregow (place them in parallell flow instead of the serial flow).
Thanks gents, for thinking along with me. It’s greatly appreciated.

1 Like

Hi Arie, sorry for late reply. I was still doing some testing trying to find out where my issue is coming from. The timer not completing would match the behaviour i saw, however after testing some more i noticed that the timer ‘stalls’ in the browser, but not in the app. So i guess there is not a real issue what i states above.