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

That’s a cool plan, Arie!

1 Like

Trying to start a stopwatch, then stop it and create a message “Jeroen came home after 1 hour and 20 minutes” but i see that there is no card available that has the stopwatch time is that correct?

1 Like

To be honest, i also cannot find it, or any other way to know how far a stopwatch is: which seems very straigns, because why then would you need one, if you don’t want the result?

You can wrap a device around a stopwatch, and then there is a sensor showing it, but the tag that belongs to hte time has been disabled (not sure why that has been done).

Maybe @Peter_Kawa can shed some light on this? How do you use Stopwatches Peter?
Before i implement something that already exists.

2 Likes

It’s build in @JB2K

  • flow:
    (stopwatch returns only seconds, so I have a small script which converts it into readable timestamps)

  • available vars from stopwatch card:

Screenshot from 2022-10-28 16-32-04

  • timeline:

Screenshot from 2022-10-28 17-09-40


If you like you can import the flow with this exchanger file:

[TEF:FLOWS:H4sIAAAAAAACA6VW2W7bOBT9FY6A1jYSOtS+ZNJB0XkIBshL89CH2AgoLrYwEmWIdJMg9b/PpRZvdTtuEyS2SF6ee+65S/TqcCd7dbiMgsiPOXajgOEgDWJM45RhL/J8P0/SUKbE2iknc+6F0nWDbmnpXDoMNnS74Ww2l45pjcqpFGVZPylhpmzZ1KpeNHS1HAA+7W3BHVZXU2qW8Al/4kWzpliZwfbWbt13W9YBdbKHV6eAE8b9KKGpxFGSChwkLMa5pBFOYuqHcUTChAZAsGVs6tUTNWyJjNAG/SOaWig4E05mmrVoo3h1JPeJiJiLSRSCBjLxcJKDJKmUoEwS5m4UW7tnJwvIpfPSfRkrgKGNATwN5OZAMknckDJg5XOP4oDkKU5JEOHUy12ecGCesAEp6qBci1UDVqtBRler7IcyXrbx6yGox8G9pUKZKWobG20VpJXYN/3YapgL6vrUDTFjVEKySYRBsgDHOXPTVKbMCwd6Q5xvIVevVoL39ExTLBai6bVyQl9wD9yC0DzEARUEpzwC3XzXy0MaydSTzvynwVCXBDJMCCYx5zgII0hYmHLMqStdl8VCCNIHk/Rp85ODcCqqKHDKVG0KWTBqBdR9HKwR1IjH/aOTQhvxbA4K7eGhDzXLzpE7y2x08zmaqYYqJKG/fhlBC1YrrudzPZ2pMdzvKGbZOSrDdXCnFvP5pJXVz8FNznPsujE0AyMuTnyfYI/4NMhJQnkaHpWwF72tSn6hgr3YJ2EuApwnYYJhcjFMJQNpeMCEF0rppeKggo/ai4uvBRPZWVOvo0pL2lSPVW25Pdqhcbqgz+p8OyIEI6GMA4ElYeA6gTlGU5fhyA+IKxPIaH7Yg0fqvjECSUv9gxDOyrwN4azmPSwR//sSOT39O8rNWn2qufhSmOXHZvFZmHWj9H1bp8fF0lI/axYM44QBMiBcXaFPtfoqGoP6BkKmRuPlGsbCBJmiEtfo81qhJyCBaLNYV0IZNC7UYD6ZqVLsLt9YI/1A5tczNZyYj2UJB6TdKiQab41v0GiEvn1DextrxYUslOAT9DpTCH7gSNelmJb1Ao1Hd4XWIMCWy2hy3Zk1rT7jNrV2b4MEPHUgHNz3Plrrr7RBS9i7A+mnsqzrZszRFYL8kMnWoDo2eNcagF20Z6V/YPWut7J2IPL9sn5CVKPR7W12d5fd348GAFbW7F8AGY/ICF2g5WSqS6jtMfYmsJw52cyB7/60+ump3js94foZLet1oy/RM6oKtYaXAfvY6zLqrb8shUIEYfwB8UKvSvqyFezvbg1cl+gD5BP9BQ/gfIn+vEEurIDLet1c2u+sXTRC2dWkXc6cnbQ7qGqAqixUZUugh7Ic12aH1nE+Dah3gHoA1BZQ7wF2kYoBr1+qI7gjDWo1MvtKXF19r8XvStFhHYrxNi06xEM1fl+MrrFsx245/mG1ff9+zwVsbFv1VHZ/FtBROEfBILQ5weDmDAYn0nNxMkH76Tnl3T5sB9gW9WIX4sWWxzW8vLQ3oID6K/AeU1GToa7xTvdda9/NgMF8GBHd0W76jTsz2/Zo3PZ978fuTOAXeHdTEP2/qX3D6Eco/Bv4/bcteCHZbOab/wBhF4IpSQ0AAA==]
2 Likes

Running stopwatches/timers/transitions can be shown when you install the devices for them.
Afaik there is no ‘Start a flow and return duration of Stopwatch A’ possibiity yet.

You can trigger a flow when a stopwatch reached a pre-defined time, which also can be defined in a variable

Indeed by enabling the tags from the installed device, you can ‘ask’ in a flow for a stopwatch duration while it is running. For now these tags aren’t available as you noticed.
Screenshot from 2022-10-28 17-22-54

2 Likes

My stopwatches keep running and I can’t stop them. Anyone else having the same problem?

I already reboot Homey and tried the test version.

1 Like

True, they’ll keep running until someone or something stops them. :upside_down_face:
You can stop it / them here:
https://tools.developer.homey.app/tools/app-settings and select ‘Chronograph’.
Else, you’ll have to add a ‘stop stopwatch X’ card somewhere in your flows.
F.i. at sunrise, when you don’t need any running stopwatches anymore. Or when everyone’s asleep, or when everyone left the house and so forth.

1 Like

When I now try to stop the stopwatch at the configure app screen. The stopwatch is removed but after 2 seconds it’s starting again at the time that I have stopped it.
Normaly it has worked that way.
Restart the app did not help.
Version 1.2.3

I think maybe that is also caused because I am not at Homey 8.0.8.
Will update later.

Did the update today to 8.0.8. Chronograph app is automatic updated to 1.3.1.
I can not stop or pause the stopwatch with the buttons in the app config.

2 Likes

Yes, somehow there’s a new bug so it seems. But I can still stop it using a flow card

Peek 2022-10-31 23-54

Feature request:
Would it be possible to add wildcard to the “Timer … is running”-and-card?

1 Like

Okay, there indeed is an issue, solving it now.
@Mike1233

1 Like

Solved in current Test.

There were multiple App Settings fault, because the API didn’t initialize correctly.
These have all been fixed.

2 Likes

OK, wildcards (*) can do this, I learned through search. Also there’s a script for this, copied from the GH repo

let app = await Homey.apps.getApp({id:'nl.fellownet.chronograph'});
app.apiGet('/timers').then(result => {
	let timers = JSON.parse(result);
	timers.forEach(timer => {
		app.apiDelete('/timers/' + timer.id);
	});
});
1 Like

Indeed, i just checked, and most cards already allow for a wildcard () in it.
When you put an asterix (
) in it, it get’s translated into an regexp:
string.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');

I just tested it, and it works as expected: so, yeah, you can use wildcards.

1 Like

Thanks m8, i didn’t know about it before you said it.

Funny tho, it says it in the Store Description (readme.txt):

Target multiple timers, stopwatches and transitions at once using wildcards in supported cards.

Great, will wait for your update then. :slight_smile:
Yeah, most of the cards are allready using wildcards, but not the “Timer … running”. I think that’s the only one not using it but would have possibility.

1 Like

Unfortunately the AND-card “Timer … is running” does not allow for wildcards, but @Arie_J_Godschalk is on it.

1 Like

Oh, looking forward to the fix. Thanks a lot for providing/maintaining the app

1 Like

@Anders_Gregow and @thobu
The updating is now Live: isRunning condition cards now also allow for wildcards.
If any found items (times/transitions/stopwatches) are running, it will return a true.

2 Likes

Great, will test now.

1 Like