expl0it3r / streamdeck-clockify Goto Github PK
View Code? Open in Web Editor NEWClockify Action for the Elgato Stream Deck
License: MIT License
Clockify Action for the Elgato Stream Deck
License: MIT License
Not sure what causes it. I have 14 buttons defined, all in same workspace with same API Key, with unique Titles
(only on stopped state), some have same Project Name
, but have unique Task Name
and Timer Name
and all in default server.
To get a button working when it happens, I have to modify the API Key field in some way. Just selectiing all, copy, paste, enter and the button works again until something causes it to stop working.
Hello! When I copy the API key from my profile into the plugin, I get the following error
"Please match the format requested" - how can I fix this?
Also, I get the same error if in any of the other fields there are upper case characters?
I've just started using this plugin, and it's awesome.
One feature that I think would be really useful would be to have the option to have the title text on the button only be the current time being logged.
As far as I can tell, there are currently 4 options:
I've got my buttons set up with an icon to show what it is for, but it would be great to be able to also show the current time on this view, without also showing the Project Name and Task Name.
Thanks
Hey Lukas,
thank's for your work! I hope you will continue to work on this plugin :)
Sadly, the plugin won't work on MacOS. Stream Deck Software reports, that "This custom action can't be installed on this operating system"
I'm happy to help developing an maintaining this plugin, if you need and want help :)
I just learned about clients category and how you can have the same project name assigned to different clients.
This also applies to projects/clients that have been archived.
This violates the current assumptions that project names are unique and will cause a crash in the plugin:
2022-12-31 11:42:40.6582|FATAL|dev.duerrenberger.clockify|13|Unhandled Exception: System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 , Func`2 , Boolean& )
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 , Func`2 )
at Clockify.ClockifyContext.GetRunningTimerAsync(String workspaceName, String projectName, String timeName) in D:\a\streamdeck-clockify\streamdeck-clockify\Clockify\ClockifyContext.cs:line 127
at Clockify.ToggleAction.OnTick() in D:\a\streamdeck-clockify\streamdeck-clockify\Clockify\ToggleAction.cs:line 82
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object )
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
When you have more than 50 projects in Clockify, the API call from the plugin won't find your project, due to the default paging being set to 50.
https://clockify.me/developers-api#tag-Project
A field to set for the tag would be nice
Please add a checkbox for the billable/non-bilalble setting.
New to Clockify, generated an API key. Log says:
2023-04-24 16:52:18.0585|INFO|dev.duerrenberg|32|API key successfully set
Set up a Workspace Name ("Axis"), but no matter what I'm trying:
2023-04-24 16:52:18.8601|WARN|dev.duerrenberg|1|Invalid settings for running timer Axis
Not sure how to troubleshoot. Ideas?
Perhaps the URL? Don't see where in Clockify there's a unique URL.
Hi, firstly let me say what a great plug in this is. Thank you. It's been running mostly fine to track 4 client projects I have set up on it. Sometime they haven't been triggering when the button is pressed, but most of the time it does. Today I added a 5th client, and it all stopped working. The log screen shot attached is saying that AS01, the latest project can't be found, but I've checked and double checked it exists, and is identically named on clockify. Any idea how I fix this, other than deleting it and limiting myself to 4 clients?
We need a way to specify to baseUrl if the user is not using the clockify cloud.
My suggestions:
\\In PluginSettings.cs - add a new property to hold base url/default to standard
[JsonProperty(PropertyName = "baseApiUrl")]
public string BaseApiUrl { get; set; } = "https://api.clockify.me/api/v1";
\\ClockifyContext.cs
\\change line 130: \\allow for new setting to be passed in
public async Task<bool> SetApiKeyAsync(string apiKey, string baseApiUrl)
\\line 141: - use it when creating the client
_clockifyClient = new ClockifyClient(_apiKey, apiUrl: baseApiUrl);
\\ToggleAction.cs
\\lines 80 & 89 - pass the settings to the setup method
await _clockifyContext.SetApiKeyAsync(_settings.ApiKey, _settings.BaseApiUrl);
I may have missed something important, but that seems like it should work
Hi Lukas,
thanks for your work and sharing it. Was able to add it to Streamdeck right away.
However I´m missing a very important feature for timetracking in our company. For all projects you have to name a task to be able to stop the timer but tasks are not taken into account here. Are there any plans to integrate that feature?
Sadly I can´t use it for now, looking forward to your answer.
Cheers, Frederic
I think I configured it correctly but it seems like the _workspaces field is NULL after confirming the API Key.
Log:
2023-05-04 15:49:56.8758|INFO|dev.duerrenberg|1|Plugin version: 1.6
2023-05-04 15:49:56.8758|INFO|dev.duerrenberg|1|Connecting to Stream Deck...
2023-05-04 15:49:56.9686|INFO|dev.duerrenberg|1|Connected to Stream Deck
2023-05-04 15:49:56.9712|INFO|dev.duerrenberg|1|GlobalSettingsManager initialized
2023-05-04 15:49:58.4024|INFO|dev.duerrenberg|8|API key successfully set
2023-05-04 15:49:58.4024|INFO|dev.duerrenberg|13|API key successfully set
2023-05-04 15:49:58.5353|FATAL|dev.duerrenberg|4|Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Clockify.ClockifyContext.SetApiKeyAsync(String serverUrl, String apiKey) in /Users/runner/work/streamdeck-clockify/streamdeck-clockify/Clockify/ClockifyContext.cs:line 157
at Clockify.ToggleAction.OnTick() in /Users/runner/work/streamdeck-clockify/streamdeck-clockify/Clockify/ToggleAction.cs:line 79
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object )
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
2023-05-04 15:49:58.5353|FATAL|dev.duerrenberg|6|Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Clockify.ClockifyContext.SetApiKeyAsync(String serverUrl, String apiKey) in /Users/runner/work/streamdeck-clockify/streamdeck-clockify/Clockify/ClockifyContext.cs:line 157
at Clockify.ToggleAction.OnTick() in /Users/runner/work/streamdeck-clockify/streamdeck-clockify/Clockify/ToggleAction.cs:line 79
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object )
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
@eXpl0it3r
I startet at home with a mac mini and it worked perfectly fine with my stream deck mini. On the road i work on a m2 mac book (just got it some days ago) with the same stream deck but the timer wont start. (yellow triangle)
tried it with my hotspot and an other network
is there a setting problem i might not know about on my new device or could it be a network problem?
I'm not that experienced with such plug ins and the twerks they might have so i might oversee some dumb error.
Thanks
after upgrading StreamDeck to 6.5.0 and the plugin to 1.7 it keeps warning that it is unable to retrieve project and workspces. See:
2024-02-08 16:12:38.7054|WARN|dev.duerrenberg|31|Unable to retrieve project TechDD on workspace Beratung für vernetztes Leben
2024-02-08 16:12:38.7085|WARN|dev.duerrenberg|4|Unable to retrieve project KMU Basic on workspace Beratung für vernetztes Leben
2024-02-08 16:12:38.7093|WARN|dev.duerrenberg|4|Unable to retrieve project Pleen on workspace Beratung für vernetztes Leben
2024-02-08 16:12:39.7243|WARN|dev.duerrenberg|17|Unable to retrieve project digi.reporter on workspace Beratung für vernetztes Leben
2024-02-08 16:12:39.7334|WARN|dev.duerrenberg|17|Unable to retrieve project HL Dev on workspace Beratung für vernetztes Leben
2024-02-08 16:12:39.7380|WARN|dev.duerrenberg|30|Unable to retrieve project TechDD on workspace Beratung für vernetztes Leben
2024-02-08 16:12:40.3831|DEBUG|dev.duerrenberg|10|Key Pressed
2024-02-08 16:12:40.5380|DEBUG|dev.duerrenberg|10|Key Released
2024-02-08 16:12:40.5551|WARN|dev.duerrenberg|10|Unable to retrieve available workspaces
2024-02-08 16:12:40.5777|WARN|dev.duerrenberg|10|Unable to retrieve available workspaces
2024-02-08 16:12:40.6011|WARN|dev.duerrenberg|21|Unable to retrieve available workspaces
2024-02-08 16:12:40.7249|WARN|dev.duerrenberg|28|Unable to retrieve project KMU Expert on workspace Beratung für vernetztes Leben
2024-02-08 16:12:40.7313|WARN|dev.duerrenberg|21|Unable to retrieve project TechDD on workspace Beratung für vernetztes Leben
2024-02-08 16:12:40.7318|WARN|dev.duerrenberg|28|Unable to retrieve project HL Dev on workspace Beratung für vernetztes Leben
2024-02-08 16:12:41.7365|WARN|dev.duerrenberg|27|Unable to retrieve project KMU Basic on workspace Beratung für vernetztes Leben
2024-02-08 16:12:41.7418|WARN|dev.duerrenberg|27|Unable to retrieve project Birkmayer on workspace Beratung für vernetztes Leben
2024-02-08 16:12:41.7418|WARN|dev.duerrenberg|27|Unable to retrieve project SWK LoRa on workspace Beratung für vernetztes Leben
2024-02-08 16:12:42.7418|WARN|dev.duerrenberg|26|Unable to retrieve project KMU Basic on workspace Beratung für vernetztes Leben
202
The action button keeps "flickering". It shows the current running timecaption and then shows the button without the actual time.
Any idea what i could test or change?
The title formatting option doesn't work. Any information will be ignored.
I ran the content {timer}
on Windows 10 with Stream Deck version 6.6.0
Sorry, new to Clockify and trying to get this setup. I keep getting the yellow exclamation mark so I regenerated my API key and carefully repasted (as I understand that's often the issue!) but no change.
Looking at the Stream Deck logs it looks like it keeps exiting - do you have any logging I can switch on to help you debug this, or is it something you've seen before?
22:08:21.770 StreamDeck dbgcommand(): using log file 'C:\Users\EDIflyer\AppData\Roaming\Elgato\StreamDeck\logs\StreamDeck0.log'
22:08:21.774 StreamDeck ESDSentryWrapper inf ESDSentryWrapper::start(): Sentry use environment 'production'
22:08:21.794 StreamDeck main(): Using preferences from \HKEY_CURRENT_USER\Software\Elgato Systems GmbH\StreamDeck
22:08:22.007 StreamDeck main(): Compiled with Qt 6.4.2 ; SSL: OpenSSL 1.1.1m 14 Dec 2021
22:08:22.017 StreamDeck main(): Runtime SSL Supported: 1
22:08:22.017 StreamDeck main(): Runtime SSL version used: OpenSSL 1.1.1q 5 Jul 2022
22:08:22.017 StreamDeck main(): Deployed Qt Webengine version: 6.4.2
22:08:22.017 StreamDeck main(): Deployed Chromium version: 102.0.5005.177
22:08:22.017 StreamDeck main(): Deployed Chromium security patch version: 108.0.5359.94
22:08:22.017 StreamDeck main(): Start Stream Deck App -> Version: 6.3.0.18948
22:08:22.218 StreamDeck EGQTCredentialStore::GetPasswordWithServerAndUserName(): CredRead() - GetLastError() 1168
22:08:22.218 StreamDeck ESDVSD2Server::init(): ### [VSD2 Server] init with workstationID=AQRWbVBhggc-_h1E71jK4w
22:08:22.218 StreamDeck ESDVSDServer::init(): ### [SERVER] init
22:08:22.218 StreamDeck ESDCUEHub::init(): ### [CUESDK] init
22:08:22.234 StreamDeck ESDCustomPluginCommunication::start(): Using port 28196 to communicate with plugins
22:08:22.234 StreamDeck ESDPluginManager::LoadPluginsFromCore(): Load plugins from core...
22:08:22.501 StreamDeck AccountMgr::InitializeAccountMgr(): AccountMgr initialized
22:08:22.501 StreamDeck AccountMgr::ReloadAllAccountsFromPreferences(): Reload all accounts
22:08:22.501 StreamDeck AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for Twitter
22:08:22.501 StreamDeck AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for YouTube
22:08:22.501 StreamDeck AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for Streamlabs
22:08:22.501 StreamDeck AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for Twitch
22:08:22.501 StreamDeck AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for Facebook
22:08:22.598 StreamDeck MainWindow::MainWindow(): Running in high dpi mode: 1.00
22:08:22.886 StreamDeck ESDVSD2Server::resume(): ### [VSD2 Server] resuming
22:08:22.887 StreamDeck ESDVSD2Server::resume(): ### [VSD2 Server] port 28198 is available; starting Bonjour
22:08:34.033 StreamDeck ESDVSD2Server::resume(): ### [VSD2 Server] resumed
22:08:34.282 StreamDeck ESDAppController::bootstrap(): All object init done!
22:08:34.560 StreamDeck ESDSharedFileServer::ESDSharedFileServer(): mapfile location C:\ProgramData\Elgato\StreamDeck\STREAMDECKINTERNALSHM
22:08:34.649 ### DeviceManager: ping check for pending attached devices
22:08:34.649 ### DeviceManager: ping opening device @(1)[4057/128/DL19L2A84572]
22:08:34.650 StreamDeck MainWindow::event(): Wake up keypad(s).
22:08:34.650 ### DeviceComm [DL19L2A84572] warming up unit: @(1)[4057/128/XXXX]
22:08:34.652 ### DeviceManager device status changed @(1)[4057/128/XXXX]: connected
22:08:34.673 StreamDeck ESDAppStoreManager::UpdateAppStorePlugins(): Check for Plugin Store updates
22:08:34.673 StreamDeck ESDAppStoreManager::UpdateAppStoreIconPacks(): Check for icon pack Store updates
22:08:34.673 StreamDeck ESDAppController::onDeviceStatusChanged(): Device connected, id: @(1)[4057/128/XXXX], serial number: XXXX, firmware version: 1.01.000
22:08:34.689 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin F34B467C68A2F0A5C18F78C6FAE73BF3 is now connected
22:08:34.707 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin B7178B68138D35EB8CAA2A0AF2D97D3C is now connected
22:08:34.707 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 59B1EE56B9F780CBC4F25DBB8EFEC993 is now connected
22:08:36.287 StreamDeck ESDElgatoDiscoveryService::onRequestFinished(): ### [ELGATO DISCOVERY] discovery posted successfully
22:08:36.365 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin BDE4F680652817B9E99BCB917C088BCA is now connected
22:08:36.474 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 4A7A048A0C5A7C782522FF385ADFC3E0 is now connected
22:08:36.774 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 6145B21C1DBA4FED9EC7B6E32F8F33A2 is now connected
22:08:36.804 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin CF0C1424BF68FDABEFE356D6E0156BD3 is now connected
22:08:36.815 StreamDeck EGQTCredentialStore::GetPasswordWithServerAndUserName(): CredRead() - GetLastError() 1168
22:08:36.993 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 4B4D654C81B5FDB49C960CC2AA1688FA is now connected
22:08:37.104 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin B4542D6562B730763772F8D7963D79C6 is now connected
22:08:37.359 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 25D2964EC3FF8A73F557B554F89E67BC is now connected
22:08:38.095 StreamDeck ESDObsConnectionManager::CreateSocket::<lambda_7ea60fb2e90cf27a563bb09880d6e501>::operator ()(): SLOBS returned error Connection refused
22:08:39.052 StreamDeck EGQTSWUpdateDialog::checkForUpdate(): Check for update 2: https://gc-updates.elgato.com/windows/sd-update/final/app-version-check.json
22:08:39.052 StreamDeck EGQTSWUpdateDownloader::startDownload(): Download task name: Update File, file URL: https://gc-updates.elgato.com/windows/sd-update/final/app-version-check.json
22:08:39.510 StreamDeck EGQTSWUpdateDialog::shouldUpdate(): current SW Ver: 6.3.0.18948, remote SW Ver: 6.3.0.18948
22:08:39.510 StreamDeck EGQTSWUpdateDialog::handleUpdateFileDownloaded(): No update available
22:08:47.161 StreamDeck ESDObsConnectionManager::CreateSocket::<lambda_7ea60fb2e90cf27a563bb09880d6e501>::operator ()(): SLOBS returned error Connection refused
22:08:56.180 StreamDeck ESDObsConnectionManager::CreateSocket::<lambda_7ea60fb2e90cf27a563bb09880d6e501>::operator ()(): SLOBS returned error Connection refused
22:09:05.243 StreamDeck KA_Execute::execute(): execute C:/Windows/explorer.exe
22:09:05.243 StreamDeck ESDObsConnectionManager::CreateSocket::<lambda_7ea60fb2e90cf27a563bb09880d6e501>::operator ()(): SLOBS returned error Connection refused
22:09:46.842 StreamDeck ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Clockify' exited normally with code -532462766
22:09:46.842 StreamDeck ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Clockify' in 0 seconds(s)
22:09:49.075 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin E6BFA993F867D2B69B749AB297CF99B2 is now connected
22:09:53.879 StreamDeck ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Clockify' exited normally with code -532462766
22:09:53.880 StreamDeck ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Clockify' in 60 seconds(s)
22:10:23.531 StreamDeck KA_Execute::execute(): execute C:/Windows/explorer.exe
22:10:56.166 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 176CF4AE260C11708BD1C39DF40B5211 is now connected
22:11:01.233 StreamDeck ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Clockify' exited normally with code -532462766
22:11:01.233 StreamDeck ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Clockify' in 0 seconds(s)
22:11:03.467 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 6C127D80214C801ED17A1894FDBF035B is now connected
22:11:08.506 StreamDeck ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Clockify' exited normally with code -532462766
22:11:08.506 StreamDeck ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Clockify' in 60 seconds(s)
22:12:10.813 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 68351F952474A9DBE447EDE1957A9B85 is now connected
22:12:15.828 StreamDeck ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Clockify' exited normally with code -532462766
22:12:15.828 StreamDeck ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Clockify' in 0 seconds(s)
22:12:18.061 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin 29C632A3036DAED71CCB7C216A08BF8A is now connected
22:12:23.032 StreamDeck ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Clockify' exited normally with code -532462766
22:12:23.032 StreamDeck ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Clockify' in 60 seconds(s)
22:13:25.291 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin F86B31624FB83EFDEEE0C3E95D388829 is now connected
22:13:30.069 StreamDeck ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Clockify' exited normally with code -532462766
22:13:30.069 StreamDeck ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Clockify' in 0 seconds(s)
22:13:32.355 StreamDeck ESDCustomPluginCommunication::onMessageReceived(): Plugin D14778FE43B2ED8DD7E39D250B0EA4F0 is now connected
22:13:37.322 StreamDeck ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Clockify' exited normally with code -532462766
22:13:37.322 StreamDeck ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Clockify' in 60 seconds(s)
Can you add a client field? My company uses the same project name over and over, but the thing that changes things is the client name. If I have a unique project name, it works well, but if my project name is the same across multiple clients, it fails.
Originally posted by @ARegalbuto in #6 (comment)
I'm struggling to work out how, and if it's even possible to install this plugin under streamdeck OS 6.5.0
Have I missed something obvious? Thanks in advance!
Hi,
Great plugin. It works great as a regular button but I can't seem to search and add it with Stream Deck Multi Actions. Would be great if you can add that functionality. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.