- Property inspector methods have been simplified.
PropertyInspectorMethodAttribute
now supports a singleeventName
.- Parameters are now sent via the
payload.parameters
object. - Parameters are more intrinsic, see example below.
IHostedLifetime
is now used for plugin lifetime management.- Consider changing any
IHostLifetime
toIHostedService
orBackgroundService
.
- Consider changing any
- Removed
IServiceCollection.AddStreamDeck
in favour ofIHostBuilder.RunStreamDeckPlugin
andIHostBuilder.RunStreamDeckPluginAsync
.
- Support for easily running plugins via a
IHostBuilder
.IHostBuilder.RunStreamDeckPlugin()
.IHostBuilder.RunStreamDeckPluginAsync(CancellationToken)
.
- The static helper class
StreamDeckPlugin
now usesMicrosoft.Extensions.Hosting.HostBuilder
.
- Connecting to the Stream Deck no longer blocks other registered
IHostedService
. SetSettingsAsync(object, CancellationToken)
correctly persists the__sharpDeckUUID
property (hopefully one day Elgato adds better lifetime management, but until then, we do our best!) 🤞
Stream Deck actions can expose methods that are accessible from the property inspector. With the following method in our action...
[PropertyInspectorMethod("customLog")]
public void LogMessage(string message, int times)
=> ...
we can invoke the method from the property inspector by calling sendToPlugin
with the payload:
{
"event": "customLog",
"parameters": {
"customLog": "Hello world",
"times": 13
}
}
- Updated third-party library dependencies.
- Majority of
StreamDeckPlugin
deprecated in favour of host builders.- Provides basic run functionality;
Run()
orRun(CancellationToken)
.
- Provides basic run functionality;
StreamDeckAction
.- Removed property
EnablePropertyInspectorMethods
; always consideredtrue
.
- Removed property
- Removed
InvalidStreamDeckActionTypeException
in favour ofNotSupportedException
. - Moved
IStreamDeckConnection
toSharpDeck.Connectivity
namespace.
- Added support for host builders via
UseStreamDeck(Action<PluginContext> configurePlugin)
.- Namespace
SharpDeck.Extensions.Hosting
. - Example usage;
new HostBuilder() .ConfigureServices(services => { services.AddSingleton<MyService>(); }) .UseStreamDeck(pluginContext => { /* * PluginContext allows access to the action registry, connection, and registration parameters. * e.g. the following can be used to register actions outside of the entry assembly. */ pluginContext.Actions.AddAssembly(typeof(MyPlugin).Assembly); }) .Start();
- Namespace
- Added support for
IServiceCollection
registration viaAddStreamDeckPlugin(Action<IStreamDeckPlugin>)
.- Namespace
SharpDeck.Extensions.DependencyInjection
.
- Namespace
- Added support for long key presses.
- Configurable via
StreamDeckAction.LongKeyPressInterval
- Default 500ms.
- Disabled when
TimeSpan.Zero
.
- Configurable via
StreamDeckAction.OnKeyPress(ActionEventArgs<KeyPayload>)
invoked on:- Short-press.
- -or- when key disappears (if not long-press).
StreamDeckAction.OnKeyLongPress(ActionEventArgs<KeyPayload>)
invoked on:- Long-press.
- Added logging support to all property inspector method invocations.
- Added Stream Deck alert for actions when an exception is thrown whilst invoking a property inspector method.
- Removed manifest generation.
- Removed
McMaster.Extensions.CommandLineUtils
dependency. - Updated third-party library dependencies.
profile
is now optional when callingIStreamDeckConnection.SwitchToProfileAsync
.- Fixed missing payload information for
deviceDidConnect
. - Fixed missing payload information for
titleParametersDidChange
.
- New
IStreamDeckConnection.GetGlobalSettingsAsync<T>()
now returns the global settings! - New
StreamDeckPlugin.OnRegistered(Func<IStreamDeckConnection>)
delegate; called after the plugin is registered. - New
StreamDeckPlugin.Run()
method; used when usingStreamDeckPlugin.Create
. StreamDeckActionAttribute
now has a simplified constructor that acceptsUUID
.- Support for SDK 4.8
- Added
state
parameter tosetImage
. - Added
state
parameter tosetTitle
.
- Added
- Support for SDK 4.7
- Added
kESDSDKDeviceType_CorsairGKeys
device type.
- Added
- All new sample plugins.
- Fixed an issue with
StreamDeckClient.Run()
not blocking the main thread.
- Removed
StreamDeckClient
; replaced withIStreamDeckConnection
. - Updated
StreamDeckAction.StreamDeck
to beIStreamDeckConnection
.
- Greatly simplfied starting a plugin.
StreamDeckPlugin.Run()
StreamDeckPlugin.RunAsync()
- Added basic unit tests.
- Added GitHub workflows.
- Added
StreamDeckAction.OnInit
virtual.
- Actions with
StreamDeckAttribute
are automatically registered. - Complete re-write of action caching.
- Complete re-write of event routing.
- Fixed an issue with incorrect actions being invoked.
- Updated deployment to NuGet.
- Removed
StreamDeckAction.Initialized
event, please useStreamDeckAction.WillAppear
- Removed
StreamDeckAction<TSettings>.Settings
to prevent misuse.
- Added automatic manifest generation!
- Added support for initializing actions with their
AppearancePayload
. - Added action context when raising
StreamDeckClient.Error
(where possible). - Added support for
FontFamilyType
andFontStyleType
. - Improved deadlock prevention for all WebSocket requests.
- Fixed
DeviceType
,PlatformType
, andTitleAlignmentType
.
- Relocated to
SharpDeck.Events.StreamDeckAction
to top levelSharpDeck.StreamDeckAction
. - Re-aligned namespaces of events (received) / messages (sent) to match Elgato SDK terminology.
- Support for SDK 4.1
- Support for SDK 4.3
- systemDidWakeUp
- Added device name to registration info.
StreamDeckAction{TSettings}
base class.RequestId
to property inspector methods, allowing for responses to be identified more easily (e.g. with promises).StreamDeckXL
andStreamDeckMobile
toDeviceType
.
- Fixed JSON serialization casing inconsistencies when using JObject (specifically action settings).
- Fixed
openUrl
event.
PropertyInspectorMethodAttribute
decorator for interacting with Property Inspector.- Added unit testing, including AppVeyor integration.
- Updated
StreamDeckAction
overrides to require a task. - Streamlined publishing to NuGet with npm package scripts.
- Fixed potential async/await issue within
StreamDeckClient
.
- Removed unnecessary parameters when calling
SendToPropertyInspectorAsync
.
- Fixed an issue with
sendToPlugin
event not triggering.
- Added missing event:
sendToPlugin
.
StreamDeckClient.RegisterAction
now supports a value factory.- Centralised all event related models to the
SharpDeck.Events
namespace. - Improved dependency injection capabilities.
StreamDeckClient
, allowing for connections to an Elgato Stream Deck.- Event listeners (ref: "Events Received").
- Messaging (ref: "Events Sent").
- Support for registering
StreamDeckAction
.