Skip to main content
Version: 3.0.6

Property Inspector (UI)

The property inspector (UI) connects to Stream Deck using a WebSocket, allowing it to directly receive a subset of events, and send commands. The WebSocket connection also allows the property inspector to communicate with the application-layer (i.e. the plugin).

Registration​

A connection with Stream Deck is established within the property inspector by defining a function on the window, named connectElgatoStreamDeckSocket. Once the DOM has loaded, Stream Deck will invoke this function and provide registration information, including the port to connect on.

Below is an example of implementing the connectElgatoStreamDeckSocket function to establish a connection with Stream Deck:

Connecting to Stream Deck in the property inspector
window.connectElgatoStreamDeckSocket = (port, uuid, event, info, actionInfo) => {
	const infoObj = JSON.parse(info); // Information about Stream Deck and the plugin.
	const actionInfoObj = JSON.parse(actionInfo); // Information about the action the UI is for.

	// Establish a connection with Stream Deck
	const connection = new WebSocket(`ws://127.0.0.1:${port}`);
	connection.onopen = () => {
		connection.send(JSON.stringify({ event, uuid }));
	};
};

connectElgatoStreamDeckSocket​

Connects to the Stream Deck, enabling the UI to interact with the plugin, and access the Stream Deck API.

window.connectElgatoStreamDeckSocket = (port: string, uuid: string, event: string, info: string, actionInfo: string) => void | Promise<void>

Parameters

NameDescription
portPort to be used when connecting to Stream Deck.
uuidIdentifies the UI; this must be provided when establishing the connection with Stream Deck.
eventName of the event that identifies the registration procedure; this must be provided when establishing the connection with Stream Deck.
infoInformation about the Stream Deck application and operating system.
actionInfoInformation about the action the UI is associated with.

RegistrationInfo​

Information about the Stream Deck application, the plugin, the user's operating system, user's Stream Deck devices, etc.

type RegistrationInfo = {
	application: {
		font: string;
		language: "de" | "en" | "es" | "fr" | "ja" | "ko" | "zh_CN" | "zh_TW";
		platform: "mac" | "windows";
		platformVersion: string;
		version: string;
	};
	colors: {
		buttonMouseOverBackgroundColor: string;
		buttonPressedBackgroundColor: string;
		buttonPressedBorderColor: string;
		buttonPressedTextColor: string;
		highlightColor: string;
	};
	devicePixelRatio: number;
	devices: {
		id: string;
		name: string;
		size: {
			columns: number;
			rows: number;
		};
		type: DeviceType;
	}[];
	plugin: {
		uuid: string;
		version: string;
	};
};
application: objectRequired

Stream Deck application specific information.

font: Required

string Font being used by the Stream Deck application.

language: Required

"de" | "en" | "es" | "fr" | "ja" | "ko" | "zh_CN" | "zh_TW" Users preferred language; this is used by the Stream Deck application for localization.

platform: Required

"mac" | "windows" Operating system.

platformVersion: Required

string Operating system version, e.g. "10" for Windows 10.

version: Required

string Stream Deck application version.

colors: objectRequired

Collection of preferred colors used by the Stream Deck.

buttonMouseOverBackgroundColor: Required

string Color that denotes the background of a button that is being moused over.

buttonPressedBackgroundColor: Required

string Color that denotes the background of a pressed button.

buttonPressedBorderColor: Required

string Color that denotes the border of a press button.

buttonPressedTextColor: Required

string Color that denotes the text of a pressed button.

highlightColor: Required

string Color of highlighted text.

devicePixelRatio: Required

number Pixel ratio, used to identify if the Stream Deck application is running on a high DPI screen.

devices: Required

object[] Devices associated with the Stream Deck application; this may include devices that are not currently connected. Use "deviceDidConnect" event to determine which devices are active.

plugin: objectRequired

Information about the plugin.

uuid: Required

string Unique identifier of the plugin, as defined by the plugin.

version: Required

string Version of the plugin.

Events​

DidReceiveGlobalSettings​

Occurs when the settings associated with the plugin are requested, or when the the plugin's settings were updated by the plugin.

type DidReceiveGlobalSettings = {
	event: "didReceiveGlobalSettings";
	payload: {
		settings: JsonObject;
	};
};
event: Required

"didReceiveGlobalSettings" Name of the event.

payload: objectRequired

Additional information about the event.

settings: Required

JsonObject Global settings associated with this plugin.

DidReceiveResources​

Occurs when the resources associated with an action instance are requested, or when the the resources are updated in the property inspector.

type DidReceiveResources = {
	action: string;
	context: string;
	device: string;
	event: "didReceiveResources";
	id?: string;
	payload:
		| {
				controller: "Keypad";
				isInMultiAction: true;
				resources: {
					[key: string]: string;
				};
				settings: JsonObject;
				state?: number;
		  }
		| {
				controller: "Encoder" | "Keypad" | "Neo";
				coordinates: {
					column: number;
					row: number;
				};
				isInMultiAction: false;
				resources: {
					[key: string]: string;
				};
				settings: JsonObject;
				state?: number;
		  };
};
action: Required

string Unique identifier of the action as defined within the plugin's manifest (Actions[].UUID) e.g. "com.elgato.wavelink.mute".

context: Required

string Identifies the instance of an action that caused the event, i.e. the specific key or dial. This identifier can be used to provide feedback to the Stream Deck, persist and request settings associated with the action instance, etc.

device: Required

string Unique identifier of the Stream Deck device that this event is associated with.

event: Required

"didReceiveResources" Name of the event used to identify what occurred.

id: string

Identifier provided when requesting the resources, used to identify the source of the request.

This is always undefined if the event is received because the resources were changed in the property inspector.

payload: MultiActionPayload | SingleActionPayloadRequired

Contextualized information for this event.

One of:

MultiActionPayload
controller: "Keypad"Required

Defines the controller type the action is applicable to. Keypad refers to a standard action on a Stream Deck device, e.g. 1 of the 15 buttons on the Stream Deck MK.2, or a pedal on the Stream Deck Pedal, etc., whereas an Encoder refers to a dial / touchscreen on the Stream Deck +.

NB: Requires Stream Deck 6.5 for WillAppear and WillDisappear events.

isInMultiAction: trueRequired

Determines whether the action is part of a multi-action.

NB. Requires Stream Deck 6.7 when accessed from the property inspector.

resources: ResourcesRequired

Resources (files) associated with the action.

Available from Stream Deck 7.1.

settings: Required

JsonObject Settings associated with the action instance.

state:

number Current state of the action; only applicable to actions that have multiple states defined within the manifest.json file.

SingleActionPayload
controller: Required

Controller Defines the controller type the action is applicable to. Keypad refers to a standard action on a Stream Deck device, e.g. 1 of the 15 buttons on the Stream Deck MK.2, or a pedal on the Stream Deck Pedal, etc., whereas an Encoder refers to a dial / touchscreen on the Stream Deck +.

coordinates: CoordinatesRequired

Coordinates that identify the location of an action.

column: Required

number Column the action instance is located in, indexed from 0.

row: numberRequired

Row the action instance is located on, indexed from 0.

Note: When the device is Stream Deck +, the row can be 0 for keys (Keypad), and will always be 0 for dials (Encoder); to differentiate between actions types, cross-check the controller.

isInMultiAction: falseRequired

Determines whether the action is part of a multi-action.

NB. Requires Stream Deck 6.7 when accessed from the property inspector.

resources: ResourcesRequired

Resources (files) associated with the action.

Available from Stream Deck 7.1.

settings: Required

JsonObject Settings associated with the action instance.

state:

number Current state of the action; only applicable to actions that have multiple states defined within the manifest.json file.

DidReceiveSettings​

Occurs when the settings associated with an action instance are requested, or when the the settings were updated by the plugin.

type DidReceiveSettings = {
	action: string;
	context: string;
	device: string;
	event: "didReceiveSettings";
	payload:
		| {
				controller: "Keypad";
				isInMultiAction: true;
				settings: JsonObject;
				state?: number;
		  }
		| {
				controller: "Keypad" | "Encoder" | "Neo";
				coordinates: {
					column: number;
					row: number;
				};
				isInMultiAction: false;
				settings: JsonObject;
				state?: number;
		  };
};
action: Required

string Identifies the action type, as specified by the UUID within the manifest.

context: Required

string Identifier for the instance of the action the event is for.

device: Required

string Identifier for the Stream Deck device the action is on.

event: Required

"didReceiveSettings" Name of the event.

payload: ActionPayloadRequired

Additional information about the action.

One of:

MultiActionPayload
controller: "Keypad"Required

Defines the controller type of the action.

  • Keypad refers to a standard key action on a Stream Deck device.
  • Encoder refers to a dial / touchscreen on the Stream Deck +
isInMultiAction: trueRequired

Determines whether the action is part of a multi-action.

Note: Requires Stream Deck 6.7.

settings: Required

JsonObject Settings associated with the action instance.

state:

number Current state of the action; only applicable to actions that support multiple states.

SingleActionPayload
controller: ControllerRequired

Defines the controller type of the action.

  • Keypad refers to a standard key action on a Stream Deck device.
  • Encoder refers to a dial / touchscreen on the Stream Deck +
coordinates: CoordinatesRequired

Coordinates that identify the location of the action.

column: numberRequired

Column the action instance is located on; indexed from 0.

Note: For devices that support multiple controllers, for example Stream Deck +, each controller is treated separately, therefore there may be instances of Keypad and Encoder that have the same coordinates.

row: numberRequired

Row the action instance is located on; indexed from 0.

Note: For devices that support multiple controllers, for example Stream Deck +, each controller is treated separately, therefore there may be instances of Keypad and Encoder that have the same coordinates.

isInMultiAction: falseRequired

Determines whether the action is part of a multi-action.

NB. Requires Stream Deck 6.7 when accessed from the property inspector.

settings: Required

JsonObject Settings associated with the action instance.

state:

number Current state of the action; only applicable to actions that support multiple states.

SendToPropertyInspector​

Occurs when a payload was sent to the property inspector from the plugin.

type SendToPropertyInspector = {
	action: string;
	context: string;
	event: "sendToPropertyInspector";
	payload: JsonValue;
};
action: Required

string Identifies the action type, as specified by the UUID within the manifest.

context: Required

string Identifier for the instance of the action the event is for.

event: Required

"sendToPropertyInspector" Name of the event.

payload: Required

JsonValue The payload sent to the property inspector.

Commands​

GetGlobalSettings​

Gets the global settings associated with the plugin. Causes didReceiveGlobalSettings to be emitted.

type GetGlobalSettings = {
	context: string;
	event: "getGlobalSettings";
	id?: string;
};
context: Required

string The plugin's identifier, as provided by Stream Deck.

event: Required

"getGlobalSettings" Name of the command.

id:

string Optional identifier that can be used to identify the response to this request.

GetResources​

Gets the resources (files) associated with the action; these resources are embedded into the action when it is exported, either individually, or as part of a profile.

Available from Stream Deck 7.1.

type GetResources = {
	action: string;
	context: string;
	event: "getResources";
	id?: string;
};
action: Required

string Identifies the action type, as specified by the UUID within the manifest.

context: Required

string Defines the context of the command, e.g. which action instance the command is intended for.

event: Required

"getResources" Name of the command, used to identify the request.

id:

string Optional identifier that can be used to identify the response to this request.

GetSettings​

Gets the settings associated with an instance of an action. Causes didReceiveSettings to be emitted.

type GetSettings = {
	action: string;
	context: string;
	event: "getSettings";
	id?: string;
};
action: Required

string Identifies the action type, as specified by the UUID within the manifest.

context: Required

string The action instance identifier.

event: Required

"getSettings" Name of the command.

id:

string Optional identifier that can be used to identify the response to this request.

OpenUrl​

Opens the URL in the user's default browser.

type OpenUrl = {
	event: "openUrl";
	payload: {
		url: string;
	};
};
event: Required

"openUrl" Name of the command.

payload: objectRequired

Additional information supplied as part of the command.

url: Required

string URL to open.

SendToPlugin​

Sends a message to the plugin.

type SendToPlugin = {
	action: string;
	context: string;
	event: "sendToPlugin";
	payload: JsonValue;
};
action: Required

string Identifies the action type, as specified by the UUID within the manifest.

context: Required

string The action instance identifier.

event: Required

"sendToPlugin" Name of the command.

payload: Required

JsonValue Payload to send.

SetGlobalSettings​

Sets the global settings associated with the plugin, and notifies the plugin by emitting didReceiveGlobalSettings.

type SetGlobalSettings = {
	context: string;
	event: "setGlobalSettings";
	payload: JsonObject;
};
context: Required

string The plugin's identifier, as provided by Stream Deck.

event: Required

"setGlobalSettings" Name of the command.

payload: Required

JsonObject Global settings to save.

SetResources​

Sets the resources (files) associated with the action; these resources are embedded into the action when it is exported, either individually, or as part of a profile.

Available from Stream Deck 7.1.

type SetResources = {
	action: string;
	context: string;
	event: "setResources";
	payload: {
		[key: string]: string;
	};
};
action: Required

string Identifies the action type, as specified by the UUID within the manifest.

context: Required

string Defines the context of the command, e.g. which action instance the command is intended for.

event: Required

"setResources" Name of the command, used to identify the request.

payload: ResourcesRequired

Resources (files) associated with the action.

SetSettings​

Sets the settings associated with an action instance, and notifies the plugin by emitting didReceiveSettings.

type SetSettings = {
	action: string;
	context: string;
	event: "setSettings";
	payload: JsonObject;
};
action: Required

string Identifies the action type, as specified by the UUID within the manifest.

context: Required

string The action instance identifier.

event: Required

"setSettings" Name of the command.

payload: Required

JsonObject Action settings to save.