Skip to content

WebSocket Plugin API

Fresh

Overview

The WebSocket API enables native console applications (C++, C#, etc.) to communicate with Stream Deck via dedicated WebSocket connections.

Registration

Plugins receive command-line parameters on launch:

ParameterDescription
-portWebSocket server port
-infoSerialized JSON with SD and plugin info
-pluginUUIDUnique plugin identifier
-registerEventRegistration event name

Registration Info Structure

The RegistrationInfo object contains:

  • Application: font, language, platform (Mac/Windows), version
  • Color preferences: button states, highlight colors
  • Device pixel ratio: for high-DPI detection
  • Connected devices: array with IDs, names, dimensions, types
  • Plugin metadata: UUID and version

Events (Received by Plugin)

Device Events

EventDescription
DeviceDidConnectHardware connected
DeviceDidDisconnectHardware disconnected
DeviceDidChangeDevice changed (SD 7.0+)

User Input Events

EventDescription
KeyDownKey pressed
KeyUpKey released
DialDownDial pressed
DialUpDial released
DialRotateDial rotated
TouchTapTouch strip tapped

Lifecycle Events

EventDescription
WillAppearAction visible on canvas
WillDisappearAction removed from canvas
PropertyInspectorDidAppearPI opened
PropertyInspectorDidDisappearPI closed

Data Events

EventDescription
DidReceiveSettingsAction settings received
DidReceiveGlobalSettingsGlobal settings received
DidReceiveResourcesResources updated
DidReceiveSecretsSecrets available
DidReceivePropertyInspectorMessageMessage from PI

System Events

EventDescription
ApplicationDidLaunchMonitored app started
ApplicationDidTerminateMonitored app stopped
SystemDidWakeUpSystem woke from sleep
TitleParametersDidChangeTitle settings changed
DidReceiveDeepLinkDeep link received

Commands (Sent by Plugin)

CommandDescription
GetSettingsRequest action settings
SetSettingsPersist action settings
GetGlobalSettingsRequest global settings
SetGlobalSettingsPersist global settings
SetImageUpdate action image
SetTitleUpdate action title
SetStateToggle action state
SetFeedbackUpdate dial layout values
SetFeedbackLayoutAssign dial layout
LogMessageWrite to log
OpenUrlOpen URL in browser
SendToPropertyInspectorMessage to PI
ShowAlertShow warning indicator
ShowOkShow success indicator
SwitchToProfileSwitch device profile

Each command requires a context identifier and appropriate payload.