streamdeck_client 0.5.0
streamdeck_client: ^0.5.0 copied to clipboard
Pure Dart client for the Elgato Stream Deck WebSocket protocol. Handles connection, reconnection, and event parsing.
0.5.0 #
Breaking #
- Per-action commands move to the new
ActionClient, fromclient.forAction(context).Clientkeeps the connection and the plugin-wide commands. This replacesclient.scoped(context)and everycontextparameter on send methods. - Renamed to match Elgato's SDK:
ConnectionInfotoRegistrationParameters(uuidtopluginUuid),DeviceInfotoRegistrationInfo,DeviceDatatoDeviceInfo,DeviceApplicationtoApplicationInfo,DeviceColorstoThemeColors,DevicePlugintoPluginInfo,ActionTypetoController,ContextPayloadtoActionPayload. SdEventis now the sealedStreamDeckEventandCommonReceivedEventis now the sealedActionEvent, so aswitchover events is checked for exhaustiveness.ActionEventno longer hasdevice, andSendToPluginEventis now anActionEvent.ActionInfois no longer an event.willAppeararrives as the newWillAppearEvent, andActionInfois the state inclient.actions.Connectionis nowClientStateandclient.connectionis nowclient.state.Client.infois nowClient.registration.setSettingsandsetGlobalSettingstakeMap<String, Object?>instead ofdynamic. CalltoJson()yourself.- Removed automatic reconnection,
maxReconnectAttemptsandClientState'sreconnectingandfailedvalues. A plugin should exit when the socket closes; the Stream Deck app relaunches it with a fresh port. - Removed
connectionValue,actionsValueanddevicesValue(use.valueon the streams), the port-keyed client cache and theClient(info, context:)constructor option.
Fixed #
- Decode unknown
DeviceInfo.typevalues toDeviceType.unknowninstead of throwing. The Stream Deck app reports device types this enum predates (e.g. "MCP Actions", type 14), and one such device in the-infoargument crashedRegistrationParameters.fromArgsat plugin startup. getGlobalSettings,getSecretsandswitchToProfilesent the action's context from a scoped client. They now always send the plugin UUID.getSecretsnever completed, because it waited on a per-action stream that plugin-level replies never reach.- A connection failure other than
SocketExceptionleft the client stuck inconnecting, andconnect()then refused to run again.
0.4.0 #
Breaking #
- Remove the manifest models (
Manifest,ManifestAction,ManifestState,ManifestEncoder,ControllerType, etc.). They moved tostreamdeck_flutter, where the plugin layer is their only consumer. - Remove
Layout(andLayout.forDevice/fromDevice/sdPlus). Device render geometry is a rendering concern and moved tostreamdeck_flutter; device grid size is available fromDeviceData.size. - Remove
grid/gridValue(the device grid with empty-slot placeholders). It moved tostreamdeck_flutterasbuildGrid(actions, devices). The client now exposes only rawactionsanddevices.
The client is now strictly the Stream Deck protocol — connection, events, commands, and raw action/device state — with no Flutter dependency.
Added #
setImage/setFeedbacktake amimeTypeparameter (defaultimage/png) so callers can send JPEG (image/jpeg) or other formats.
0.3.1 #
Changed #
setSettingsandsetGlobalSettingsaccept any object withtoJson()in addition toMap<String, dynamic>.
0.3.0 #
Breaking #
- Remove
builderfield fromManifestActionandManifestState. - Remove
DialPressEvent— useDialDownEvent/DialUpEventinstead. getGlobalSettingsno longer takes a context parameter.
Added #
- Client factory caches instances by port — same
ConnectionInforeturns the same client. grid/gridValuestream with full device grid including empty slot placeholders.getResourcesandgetSecretsrequest/response commands.deviceDidChangeevent handling to update device info live.Layoutequality (==/hashCode).ContextPayload.resourcesfield.
Fixed #
_ScopedClient.eventsFor()falls back to scoped context._handleDisconnectno longer writes to closed subjects after dispose.setGlobalSettings/getGlobalSettingsuse plugin UUID as context.- Client cache cleanup on
dispose().
0.2.0 #
- Remove
DialPressEvent, addDialDownEvent/DialUpEvent. - Client factory caches instances by port.
getGlobalSettingsno longer requires context.- Add grid stream,
getResources,getSecrets.
0.1.1 #
- Flatten directory structure and regenerate freezed outputs.
- Format all code to 120-char line width.
0.1.0 #
- Initial release.
- WebSocket client with auto-reconnection (exponential backoff).
- Full Stream Deck protocol: all received events and sent commands.
- Freezed models for events, payloads, manifest, and device info.
- Scoped client for action-level context auto-fill.
- Device layout constants for all Stream Deck models.