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

Coming soon: Chronographs can be directly reflected on Advanced Virtual Devices from the Device Capabilities app:

So, no more flows needed to set the field of an AVD based on a Chronograph timer/transition/stopwatch.

The reflection also supports the new time method in BLL coding and expressions from the Better Logic Library app:

2 Likes

All in test now:

2 Likes

Home 2023, if I add a timer device, the device is created, but does not show any activity, while looking in Chronograph app settings the timer is running

df5bbc32-08e7-4dc9-b317-6351110c191b

1 Like

This should be resolved in the latest test version from last night.

Iā€™m suddenly having massive issues with this app. Constantly crashing, and I cannot load the settings at all. Have tried restarting the app and restarting the Homey Pro, but nothing helps.

1 Like

Are there any messages being displayed anywhere?

Timeout error on the settings page. Other than that, no. Iā€™ve made a diagnostics report. ID: 77c715c7-b283-40b3-8db6-54d13e1dfdf8

1 Like

Please use the new version:
Chronograph App voor Homey | Homey

If it doesnā€™t work, send me another diag (i have placed loggings in the changed places).

I like cleaning up. :sweat_smile: How do I remove a homey script tag?

I am also interested to know how (where) I can verify the current value of a homey script tag.

1 Like

Go to the Homeyscript tab in the web app, and look for the example scripts :wink:
Screenshot from 2023-03-21 18-10-04

You can do that f.i. in the tag ā€˜pickerā€™, enter ā€œHomeyscriptā€ in the searchfield

2 Likes

Amazing work. Small request: would be very nice to see when a chronograph was last used, similar to the countdown view.

image

1 Like

Update: Issues on older HPs with an extrem amount of running Chronograps, seems to be resolved in the latest version.

Multiple reporters have stated this morning that it is working again as before.

Meaning: The few extra properties made it just to much every second.
Currently, the properties are still there, but instead of before, where each updated chronograph was send through realtime each second, i now collect the updated chronographs and send them in one realtime message.

This seems to stop it from overloading when having such amounts of running chronographs.

If someone still has crash-issues (on older HPs) let me know!

1 Like

Hey @gibstorm, please let me know if itā€™s also resolved for you.

What info is updated every second on running timers/stopwatches and what is it used for?
Some time ago you explained to me that Chronograph only did some (too much) work when the timer/stopwatch was ended/started/reached transition?

Updating every second sound waist of resources? Or am I missing something?
I am a sw developer but has no knowledge about implementing in Homey.
Please enlighten me. :slight_smile:

1 Like

Indeed, thatā€™s what i thought.
And it still does very little internally, but i later found that it did send realtime messages over the API, ofcourse, for the App Settings.

This remained, and is still in use.
I just added 2 properties, elapsed and remaining, so it can be used by AVDs.
Altho this caused an issue (with users on hp2019 running a couple of dozens to a hunderd chronographs at once. Those now work fine again btw!) and i now changed how this realtime message is send.

Nothing is updated every second, only a message is send over connected APIs (like appsettings or the AVDs) with an array containing running Chronograph with a few properties.
Only difference is now, i made the specific realtime message send one array, instead of a realtime message per running chronograph.

When the App Settings are not opened and you donā€™t have DC installed or the realtime-updates disabled in the DC Settings, then this update only reduces resources (as ā€œcan be seenā€ by the fact that the issues that appeared a few days back, seem to have disappeared with the last update).

But iā€™m sure i can implement a toggle in the Chronograph to completly disable this realtime message, saving (i think in many cases not much) resources, but that would mean that the running Chronographs in the App Settings are not really showing the real Chronographs, but calculated versions of them, like before.

Thanks for the explanation. Always nice to understand how things work under the hood.
So sending realtime messages when not used will not decrease performance of the Homey, only resources?

Is it possible to only send them if someone is subscribing, e.g when the setting is opened?

1 Like

Technicly, that is already the case, the message is send, but stops because no-one is listening.

However, the array is still build about every second when timers are running.
This is very little work, but itā€™s still only used for updating Chronograph devices and keeping the settingspage up2date.
Because i cannot know if there are API listeners, and it would be very hard to know if the settings are opened, creating the array (and message) could be placed behind a toggle, for users with a older HP model and many running active. But right now, i am not getting any more reported issues, only that itā€™s fixed.

1 Like

Okay, Chronographs were not correctly updated in other apps, since my last performance change.
This issue is now resolved.
Update (Chronograph App for Homey | Homey) to resolve the values not updating correctly in other apps like the Device Capabilities App and itā€™s Advanced Virtual Devices.

Hey @DirkG, @Peter_Kawa (and other people),

In test now:

Just like i build for Countdown, Advanced Triggers and Better Logic Library (for variables):
You can now select any chronograph (timers/stopwatches/transitions) in each flowcard from a dropdownlist.
In that dropdownlist, you can also create a new chronograph and select it: It will be created when you press save or run.

I also keept the old name field in flowcards, firstly to keep all flows working, and also because you can than still use tags in the name.
So a name can be picked, created in the pick list or can be created in the ā€œfreeā€ textfield.
image

Just start typing a name, and select it as new or select from the existing ones.
image

4 Likes

Nice!
Good that you kept the old field too, as I use wildcards and tags. :slight_smile:

1 Like