Skip to main content

streamdeck_client 0.5.0 copy "streamdeck_client: ^0.5.0" to clipboard
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, from client.forAction(context). Client keeps the connection and the plugin-wide commands. This replaces client.scoped(context) and every context parameter on send methods.
  • Renamed to match Elgato's SDK: ConnectionInfo to RegistrationParameters (uuid to pluginUuid), DeviceInfo to RegistrationInfo, DeviceData to DeviceInfo, DeviceApplication to ApplicationInfo, DeviceColors to ThemeColors, DevicePlugin to PluginInfo, ActionType to Controller, ContextPayload to ActionPayload.
  • SdEvent is now the sealed StreamDeckEvent and CommonReceivedEvent is now the sealed ActionEvent, so a switch over events is checked for exhaustiveness. ActionEvent no longer has device, and SendToPluginEvent is now an ActionEvent.
  • ActionInfo is no longer an event. willAppear arrives as the new WillAppearEvent, and ActionInfo is the state in client.actions.
  • Connection is now ClientState and client.connection is now client.state. Client.info is now Client.registration.
  • setSettings and setGlobalSettings take Map<String, Object?> instead of dynamic. Call toJson() yourself.
  • Removed automatic reconnection, maxReconnectAttempts and ClientState's reconnecting and failed values. A plugin should exit when the socket closes; the Stream Deck app relaunches it with a fresh port.
  • Removed connectionValue, actionsValue and devicesValue (use .value on the streams), the port-keyed client cache and the Client(info, context:) constructor option.

Fixed #

  • Decode unknown DeviceInfo.type values to DeviceType.unknown instead of throwing. The Stream Deck app reports device types this enum predates (e.g. "MCP Actions", type 14), and one such device in the -info argument crashed RegistrationParameters.fromArgs at plugin startup.
  • getGlobalSettings, getSecrets and switchToProfile sent the action's context from a scoped client. They now always send the plugin UUID.
  • getSecrets never completed, because it waited on a per-action stream that plugin-level replies never reach.
  • A connection failure other than SocketException left the client stuck in connecting, and connect() then refused to run again.

0.4.0 #

Breaking #

  • Remove the manifest models (Manifest, ManifestAction, ManifestState, ManifestEncoder, ControllerType, etc.). They moved to streamdeck_flutter, where the plugin layer is their only consumer.
  • Remove Layout (and Layout.forDevice/fromDevice/sdPlus). Device render geometry is a rendering concern and moved to streamdeck_flutter; device grid size is available from DeviceData.size.
  • Remove grid / gridValue (the device grid with empty-slot placeholders). It moved to streamdeck_flutter as buildGrid(actions, devices). The client now exposes only raw actions and devices.

The client is now strictly the Stream Deck protocol — connection, events, commands, and raw action/device state — with no Flutter dependency.

Added #

  • setImage / setFeedback take a mimeType parameter (default image/png) so callers can send JPEG (image/jpeg) or other formats.

0.3.1 #

Changed #

  • setSettings and setGlobalSettings accept any object with toJson() in addition to Map<String, dynamic>.

0.3.0 #

Breaking #

  • Remove builder field from ManifestAction and ManifestState.
  • Remove DialPressEvent — use DialDownEvent / DialUpEvent instead.
  • getGlobalSettings no longer takes a context parameter.

Added #

  • Client factory caches instances by port — same ConnectionInfo returns the same client.
  • grid / gridValue stream with full device grid including empty slot placeholders.
  • getResources and getSecrets request/response commands.
  • deviceDidChange event handling to update device info live.
  • Layout equality (== / hashCode).
  • ContextPayload.resources field.

Fixed #

  • _ScopedClient.eventsFor() falls back to scoped context.
  • _handleDisconnect no longer writes to closed subjects after dispose.
  • setGlobalSettings / getGlobalSettings use plugin UUID as context.
  • Client cache cleanup on dispose().

0.2.0 #

  • Remove DialPressEvent, add DialDownEvent / DialUpEvent.
  • Client factory caches instances by port.
  • getGlobalSettings no 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.
0
likes
130
points
46
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Pure Dart client for the Elgato Stream Deck WebSocket protocol. Handles connection, reconnection, and event parsing.

Repository (GitHub)
View/report issues

Topics

#streamdeck #elgato #websocket

License

BSD-3-Clause (license)

Dependencies

freezed_annotation, json_annotation, logging, rxdart

More

Packages that depend on streamdeck_client