Releases: eXpl0it3r/streamdeck-clockify
Deadlock Be Gone
There's a reason that one should try to avoid multi-threading if possible, since it adds more complexity and a lot more failure cases.
With V1.14 I accidentally added a deadlock on the timer toggling step. The Stream Deck would still correctly show the running timers, but if you pressed a button, it would just freeze as it deadlocked itself.
Hope this finally makes Clockify work again with all the improvements that V1.13 introduced!
Fixing the Broken
Looks like I was a bit too eager with releasing the new version and didn't spend enough time testing it. 🙈
Turns out V1.13 introduced a few issues and revealed a major flaw, where I didn't account for parallel calls of the UpdateSettings function, which could cause nasty race conditions and crashes on reading and writing cached variables.
This release fixes the following things:
- Tags are properly matched
- Client Name is properly taken into account
- Multi-threading crashes are prevented
- Title Format is now case insensitive for the placeholders (e.g.
{projectName}or{ProjectName}or{projectname}) - ClockifyService is properly synchronizing cache value access
Everything Everywhere All at Once - Stability
I went over the whole code base, made it more consistent & readable, and introduced caching! 🎉
This should no longer be a problem:
I don't have a Stream Deck XL to test even a larger grid, but it should still work. 🥳
Technobabble
Clockify has a rate limit of 50 API calls per second. Previously the plugin would make multiple API calls every 10s to synchronize the timer. If you have 10+ buttons, this quickly added up and you'd run into the rate limit. Now, the plugin caches the workspace, project, task, tags, and client information, so that during a timer synchronization there's a single API call. This means if you have 15 buttons that all update the timer at the same time, you still only end up with 15 API calls and remain below the rate limit.However, you can still run into rate limits, if you quickly switch between pages with many timers on it or spam press the buttons. Given the limitations of plugin integration, there isn't too much that can be done about this, however in most normal use cases, the buttons should eventually be able to fetch the necessary data and synchronize.
Additional good news is, that I reduced the synchronize rate to 5s by default, with a drop-down box to change rate, which could be useful for large Stream Decks.
The default refresh rate, i.e. how frequently the Clockify API is called, is lowered to 5s and a new advanced option, allows you to decrease or increase it.

Updates & Null Tag Fix
First two months on the Marketplace has been pretty good! 🥳
While Elgato doesn't provide any statistics, there's a way to see the download count, which currently sits at 568! 🤯
Thank you to everyone who reached out with questions or issues!
This update uses .NET 8, given that .NET 6 is no longer supported, but I struggled a bit to get it working with the StreamDeck-Tools SDK.
It also ships with an up-to-date Clockify API client. ✨
The current plan is to focus on API rate limits / caching / etc.
If you saturate your entire Stream Deck with timers, especially when using the Stream Deck XL, will quickly run into the API rate limits and then every button stops working. Hopefully, I can find a solution to reduce the number of required calls and provide options to fine tune the experience for those with different needs.
Fixes
In some odd cases it seems like tags can return null from the API, which then led the plugin to crash. Now such null tags are simply removed and ignored.
Next Stop: Elgato Marketplace
tl;dr the plugin is now available in the Elgato Marketplace! 🥳🎉🎉🎉🎉🥳
https://marketplace.elgato.com/product/clockify-64a23b82-7806-4c4a-85a5-162a03e51544
Prompted by #35 I took another look on what it takes to publish the plugin in the Elgato Marketplace and they have streamlined the publication process.
My first submission was declined, due to colored category and action icons, which this release changed to monochrome white ones, as required by the guidelines.
Fixes
This release additionally fixes issue #33 where only the first page of tags could be selected in the plugin.
This fix required the replacing of the underlying API client with ClockifyClient, a new project I started to generate a client from the official OpenAPI specification.
Billable Tags or Tagging as Non-Billable
With two new features, one could say that this release is feature-packed! 😄
Billable 💰
You can now decide whether your timers run as billable or non-billable, by checking or or unchecking the "Billable" checkbox.
Tags 🏷️
Clockify allows you to define tags on a per workspace basis and provide an arbitrary amount of tags for your timer.
Unlike task or timer names, tags are not automatically created, as to prevent a flood of non-matching and typo-ed tags. This means you first need to create the wanted tags in the Clockify (web) app for your workspace.
Note: If for whatever reason you're crazy enough to include commas in your tag name, you need to escape them with a backslash, like this: tag 1,tag\, 2,tag 3
Fixes
The annoying warning triangle finally doesn't show anymore, whenever you stop a timer!
Thanks to @mar8ion for pushing me to re-investigate this. 🎉
Still alive!
This release contains a fix while using multiple timers for the same client, but with different tasks and updates for internally used dependencies.
Fixes
- Multiple timers on the same project with different tasks show the same timer
- Multiple timers on the same client with different tasks show the same timer
Known Issues
More than three?
This is (hopefully) a quality of life update, that many have been waiting for.
The project has long since outgrown my own need and thus people were running into scaling issues, that I didn't experience or originally consider. The Clockify API is rate limiting after just a few calls, which will cause unpredictable failures, such as having buttons not update anymore, if you add too many on one screen.
If your whole page is filled with buttons, it can still be a bit of a struggle to have the buttons be responsive, but the plugin should be able to work with more than three buttons on one page now. 🥳
Supporting Clients
Thanks to reports from the various plugin users, I get to learn about new features in Clockify.
Turns out, that you can assign Clients to specific Projects, and as such, I've added a new advanced option, allowing you to provide the client name assigned to the specified project.
This change also brought some technically difficulties along, as until now the assumption was that each project had to be unique in its name. With clients however, you could have the same project name, but with different multiple clients. This broke a few things and thus provided the opportunity to rewrite quite a lot, making some things more resilient.
The rewrite was also done in hopes to fix some known issues, when having Clockify assigned to 3-4 buttons on the same Stream Deck page.
Unfortunately, this couldn't fixed and might require a switch in technology altogether.
Known Limitations
Using more than two or three Clockify button instances on the same Stream Deck page, can lead to odd behavior in clock updates and sometimes refuses to activate a clicked button. See issue #11
Potential Workaround: By distributing buttons to different pages (2-3 buttons per page), it might not cause as much interference between the buttons.
Customize Your Buttons
@HughMacdonald had the great idea, and directly implemented it!, to allow for customizing the output on the button. The default behavior of showing what's filled in, with a pre-defined order remains, you get the option to define your own formatting in the advanced section:
You can have any text in that box, if you use any of following string, they will be replaced in the ouput:
{projectName}: The project name{taskName}: The task name{timerName}: The timer name{timer}: The current timer value when running. Blank when not running
In addition to this new feature, I've updated all the underlying dependencies. 🙂
Examples
Bonus Tips
You can additionally pimp your button text, by clicking on the text formatting icon on the right side of the inspector view. Note that the style is applied per button state, so you can have a different look for the active and inactive button.
If you don't like the Clockify logo, you can also replace the icons on the buttons with any other image of your choosing













