Création d'un plugin Stream Deck
Création d'un plugin pour Stream Deck, avec .Net et C#
![Elgato Stream Deck](/img/2022/elgatostreamdeck.jpg)
Here’s a tutorial for creating a plugin for Elgato Stream Deck.
Required Materials
- Elgato Stream Deck: No matter which version you use, they all use the same software.
Creating the Plugin for the Stream Deck
To assist us with our Stream Deck plugin, we use tools developed by BarRaider that allow us to quickly start our plugin and also deploy it locally on our Stream Deck. I freely follow the BarRaider documentation as well as Elgato’s, but I will still try to give you a bit more information.
Generating the Project for Visual Studio
To quickly start the project, I use the template provided by BarRaider which allows generating a C# project with the necessary files to develop the plugin for Stream Deck, but you still need to configure some files (read the !!README!!.txt file carefully).
Attention: BarRaider’s template uses the old csproj format (unless it has been updated). So I recommend migrating to the new SDK-style csproj format.
Modifications to the manifest.config File
I list below the main options that you should change to configure your plugins. These values will appear in the Elgato store and also on the Stream Deck itself.
- “Actions": Lists all the available actions in the plugins
- “Name": Name of the action
- “Tooltip": Popup appearing in the Elgato software
- “UUID": A unique name to identify the action to execute, to be reused in the action class. An example from my project: com.mongeon.MyRGBLamp.togglepower
- “Author": The name appearing in the Elgato store
- “Name": Name of the plugin
- “Description": Description of the plugin
- “URL": Your website
- “CodePath": For example: com.mongeon.MyRGBLamp
- “Category": Allows grouping actions/plugins into categories in the Elgato store and also in the Stream Deck software
Modifications to the PluginAction.cs File
This file contains an example of an action, you can generate different actions in the same project and you can rename the file as you see fit, however, your action class must derive from the PluginBase
class and you must add the following attribute with the same UUID that you specified in the manifest.json file:
[PluginActionId("com.mongeon.MyRGBLamp.togglepower")]
For now, we will not immediately modify the file and we will test our new plugin.
Generating the Plugin and Deploying on Your Stream Deck
Now that you have a minimum of code, you can compile your project to generate an executable that will be packaged to distribute to your Stream Deck, as well as to the Elgato store. To do this, copy the install.bat file provided by BarRaider into the BIN directory of your project. You will need to modify certain values to ensure that your plugin functions correctly.
Distributing Your Plugin
Via the Elgato Store
To submit your plugin to the Elgato store, you must send an email to streamdeck.elgato@corsair.com and include the following information:
- Company/Developer: Who created the plugin, either the company name or your own name.
- User: A unique name or an email address
- Description: A short description that will appear in the store.
- Release note: The changes (features and/or bugs) that you have made to the plugin.
- Support-Link: A link to your website or your support page. This allows users to contact you in case of issues. Personally, I used a link to a GitHub page.
- Operating System: Whether your plugin is compatible with Windows and/or MacOS?
- Category: Under which category of plugins do you wish to place it? Only one is allowed.
You can attach the file of your plugin to the email or simply provide a link to download the plugin. In my case, I pointed the link to a Github release file directly.
Hoping that Elgato will improve the plugin submission process in the future. However, communication with the Elgato team is very friendly and they also ensure that your plugin works well before making it available in their store.
Via Your Web Hosting
A simpler solution is to make the .sdplugin file accessible via a website! The disadvantage of this solution is that your plugin will not be easily found by Stream Deck users.