StreamDeck-Tools
3.0.0
See the version list below for details.
dotnet add package StreamDeck-Tools --version 3.0.0
NuGet\Install-Package StreamDeck-Tools -Version 3.0.0
<PackageReference Include="StreamDeck-Tools" Version="3.0.0" />
paket add StreamDeck-Tools --version 3.0.0
#r "nuget: StreamDeck-Tools, 3.0.0"
// Install StreamDeck-Tools as a Cake Addin #addin nuget:?package=StreamDeck-Tools&version=3.0.0 // Install StreamDeck-Tools as a Cake Tool #tool nuget:?package=StreamDeck-Tools&version=3.0.0
BarRaider's Stream Deck Tools
C# library that wraps all the communication with the Stream Deck App, allowing you to focus on actually writing the Plugin's logic.
Author's website and contact information: https://barraider.com
** Samples of plugins using this framework: Samples
Version 3.0 is out!
- Updated file handling in
Tools.AutoPopulateSettings
andTools.FilenameFromPayload
methods - Removed obsolete MD5 functions, use SHA512 functions instead
Tools.CenterText
function now has optional outtextFitsImage
value to verify the text does not exceed the image width- New
Tools.FormatBytes
function converts bytes to human-readable value - New
Tools.FormatNumber()
function converts 54265 to 54.27k - New
Graphics.GetFontSizeWhereTextFitsImage
function helps locate the best size for a text to fit an image on 1 line - New ExtensionMethods for
Graphics
object:DrawAndMeasureString
/GetTextCenter
- Updated dependency packages to latest versions
- Bug fix where FileNameProperty attribute
Features
- Sample plugin now included in this project on Github
- Simplified working with filenames from the Stream Deck SDK. See "Working with files" section below
- Built-in integration with NLog. Use
Logger.LogMessage()
for logging. - Just call the
SDWrapper.Run()
and the library will take care of all the overhead - Just have your plugin inherit PluginBase and implement the basic functionality. Use the PluginActionId to specify the UUID from the manifest file. (see samples on github page)
- Simplified receiving Global Settings updates through the new
ReceivedGlobalSettings
method - Simplified receiving updates from the Property Inspector through the new
ReceivedSettings
method along with the newTools.AutoPopulateSettings()
method. See the "Auto-populating plugin settings" section below. - Introduced a new attribute called PluginActionId to indicate the Action's UUID (See below)
- Added support to switching plugin profiles.
- The DeviceId that the plugin is running on is now accessible from the
Connection
object - Added new MD5 functions in the
Tools
helper class - Optimized SetImage to not resubmit an image that was just posted to the device. Can be overridden with new property in Connection.SetImage() function.
- ExtensionMethods for Brush/Color/Graphics objects
- Helper functions in the
Tools
andGraphicTools
classes
How do I use this?
A list of plugins already using this library can be found here
This library wraps all the communication with the Stream Deck App, allowing you to focus on actually writing the Plugin's logic. After creating a C# Console application, using this library requires two steps:
- Create a class that inherits the PluginBase abstract class.
Implement your logic, focusing on the methods provided in the base class.
Follow the samples here for more details
New: In version 2.x - use thePluginActionId
attribute to indicate the action UUID associated with this class (must match the UUID set in the manifest file)
[PluginActionId("plugin.uuid.from.manifest.file")]
public class MyPlugin : PluginBase
{
// Create this constructor in your plugin and pass the objects to the PluginBase class
public MyPlugin(SDConnection connection, InitialPayload payload) : base(connection, payload)
{
....
// TODO: Use the payload.Settings to see the various settings set in the Property Inspector (in my samples, I create a private class that holds the settings)
// Other relevant settings in the payload include the actual position of the plugin on the Stream Deck
// Note: By passing the `connection` object back to the PluginBase (using the `base` in the constructor), you now have access to a property called `Connection`
// throughout your plugin.
}
....
// TODO: Implement all the remaining abstract functions from PluginBase (or just leave them empty if you don't need them)
// An example of how easy it is to populate settings in StreamDeck-Tools v2
public override void ReceivedSettings(ReceivedSettingsPayload payload)
{
Tools.AutoPopulateSettings(settings, payload.Settings); // "settings" is a private class that holds the settings for your plugin's instance.
}
}
- In your program.cs, just pass the args you received to the SDWrapper.Run() function, and you're done!
Note: This process is much easier than the one used in 1.x and is based on using thePluginActionId
attribute, as shown in Step 1 above.
Example:
class Program
{
static void Main(string[] args)
{
SDWrapper.Run(args);
}
}
- There is no step 3 - that's it! The abstract functions from PluginBase that are implemented in MyPlugin hold all the basics needed for a plugin to work. You can always listen to additional events using the
Connection
property.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- CommandLineParser (>= 2.8.0)
- Newtonsoft.Json (>= 12.0.3)
- NLog (>= 4.7.5)
- streamdeck-client-csharp (>= 4.2.0)
-
.NETStandard 2.0
- CommandLineParser (>= 2.8.0)
- Newtonsoft.Json (>= 12.0.3)
- NLog (>= 4.7.5)
- streamdeck-client-csharp (>= 4.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on StreamDeck-Tools:
Repository | Stars |
---|---|
mhwlng/streamdeck-elite
Elgato Stream Deck plugin for Elite Dangerous
|
|
mhwlng/streamdeck-starcitizen
Elgato Stream Deck button plugin for Star Citizen
|
|
BarRaider/streamdeck-voicemeeter
VoiceMeeter integration for Stream Deck
|
Version | Downloads | Last updated |
---|---|---|
6.2.0 | 1,178 | 1/23/2024 |
6.1.1 | 1,755 | 4/26/2023 |
6.1.0 | 693 | 4/25/2023 |
6.0.0 | 1,145 | 2/12/2023 |
5.9.1-Beta1 | 638 | 12/22/2022 |
5.9.0-Beta1 | 622 | 12/8/2022 |
3.2.0 | 3,661 | 1/20/2021 |
3.1.0 | 2,075 | 11/29/2020 |
3.0.0 | 1,133 | 10/1/2020 |
2.9.0 | 1,196 | 6/25/2020 |
2.8.0 | 1,122 | 4/27/2020 |
2.7.0 | 1,579 | 1/2/2020 |
2.6.0 | 1,371 | 9/29/2019 |
2.5.0 | 1,162 | 8/12/2019 |
2.4.2 | 1,084 | 7/15/2019 |
2.3.0 | 1,025 | 7/9/2019 |
2.2.0 | 1,232 | 5/24/2019 |
2.0.1 | 1,238 | 3/8/2019 |
2.0.0 | 1,459 | 3/4/2019 |
1.1.6 | 1,231 | 2/18/2019 |
1.1.5 | 1,160 | 2/15/2019 |
1.1.1 | 1,164 | 2/9/2019 |
3.0 - 1. Updated file handling in `Tools.AutoPopulateSettings` and `Tools.FilenameFromPayload` methods
2. Removed obsolete MD5 functions, use SHA512 functions instead
3. `Tools.CenterText` function now has optional out `textFitsImage` value to verify the text does not exceed the image width
4. New `Tools.FormatBytes` function converts bytes to human-readable value
5. New `Graphics.GetFontSizeWhereTextFitsImage` function helps locate the best size for a text to fit an image on 1 line
6. Updated dependencies