### Stream Deck Plugin Creation Wizard Output Source: https://docs.elgato.com/streamdeck/cli/commands/create This is an example of the terminal output during the plugin creation process. It shows the prompts for plugin details and the subsequent steps of scaffolding, installation, and building. ```bash .___ _ ___ _ / __| |_ _ _ ___ __ _ _ __ | \ ___ __| |__ \__ \ _| '_/ -_) _` | ' \ | |) / -_) _| / / |___/\__|_| \___\__,_|_|_|_| |___/\___\__|_\_\ Welcome to the Stream Deck Plugin creation wizard. This utility will guide you through creating a local development environment for a plugin. For more information on building plugins see https://docs.elgato.com. Press ^C at any time to quit. ? Author: Elgato ? Plugin Name: Counter ? Plugin UUID: com.elgato.counter ? Description: A simple counter that increments on each press ? Create Stream Deck plugin from information above? Yes Creating Counter... ✔ Enabling developer mode ✔ Generating plugin ✔ Installing dependencies ✔ Building plugin ✔ Finalizing setup Successfully created plugin! ? Would you like to open the plugin in VS Code? (Y/n) ``` -------------------------------- ### List All Installed Plugins Source: https://docs.elgato.com/streamdeck/cli/commands/list Shows all installed plugins, including system or bundled plugins, by using the --all flag. ```bash streamdeck list --all ``` -------------------------------- ### Install ESLint and Prettier Configurations Source: https://docs.elgato.com/streamdeck/sdk/style-guide/linting Install the necessary Elgato configurations as development dependencies using npm. ```bash npm install @elgato/eslint-config @elgato/prettier-config --save-dev ``` -------------------------------- ### Install Prettier Configuration Source: https://docs.elgato.com/streamdeck/sdk/style-guide/linting Install the Prettier configuration package as a dev dependency. ```bash npm install @elgato/prettier-config --save-dev ``` -------------------------------- ### Get Global Settings Source: https://docs.elgato.com/streamdeck/sdk/references/websocket/ui Example of how to retrieve global settings using the `sdpi-components` library. ```APIDOC ## Get Global Settings ### Description Retrieves the global settings for the plugin. ### Method ```javascript SDPIComponents.streamDeckClient.getGlobalSettings() ``` ### Response #### Success Response - **settings** (object) - An object containing the global settings. ### Response Example ```json { "example": "{\"settings\": {}}" } ``` ``` -------------------------------- ### List Installed Plugins Source: https://docs.elgato.com/streamdeck/cli/commands/list Displays a list of installed plugins and their source paths. This is the default behavior when no options are provided. ```bash streamdeck list ``` ```bash streamdeck -l ``` -------------------------------- ### Install ESLint Configuration Source: https://docs.elgato.com/streamdeck/sdk/style-guide/linting Install the Elgato ESLint configuration package as a dev dependency. ```bash npm install @elgato/eslint-config --save-dev ``` -------------------------------- ### Install Latest Stream Deck SDK Source: https://docs.elgato.com/streamdeck/sdk/releases/upgrading/v2 Install the latest version of the @elgato/streamdeck package using npm. ```bash npm i @elgato/streamdeck@latest ``` -------------------------------- ### Manifest JSON Example Source: https://docs.elgato.com/streamdeck/sdk/references/manifest An example of a manifest JSON file, demonstrating the use of the '$schema' property. ```json { "$schema": "https://schemas.elgato.com/streamdeck/plugins/manifest.json", "Author": "Elgato", "Name": "Test Plugin" // ... } ``` -------------------------------- ### Install Node.js Version Source: https://docs.elgato.com/streamdeck/cli/intro Installs a specific version of Node.js using nvm. Ensure Node.js version 24 or higher is installed. ```bash nvm install 24 ``` -------------------------------- ### Example Stream Deck Plugin Restart Source: https://docs.elgato.com/streamdeck/sdk/introduction/your-first-changes This is an example of how to restart a Stream Deck plugin using its specific UUID. Ensure you replace 'com.elgato.hello-world' with your actual plugin UUID. ```bash streamdeck restart com.elgato.hello-world ``` -------------------------------- ### Verify Stream Deck CLI Installation Source: https://docs.elgato.com/streamdeck/cli/intro Verifies the Stream Deck CLI installation by checking its version. A successful installation will print the CLI version to the terminal. ```bash streamdeck -v ``` -------------------------------- ### Example Layout JSON File Source: https://docs.elgato.com/streamdeck/sdk/references/touch-strip-layout An example of a layout JSON file structure, including the $schema property for validation and an 'items' array for layout elements. ```json { "$schema": "https://schemas.elgato.com/streamdeck/plugins/layout.json", "id": "CustomLayout", "items": [ // ... ] } ``` -------------------------------- ### Install Stream Deck CLI with pnpm Source: https://docs.elgato.com/streamdeck/sdk/introduction/getting-started Install the Stream Deck Command Line Interface (CLI) globally using pnpm. This tool helps scaffold new plugins. ```bash pnpm add -g @elgato/cli ``` -------------------------------- ### Switch Node.js Version Source: https://docs.elgato.com/streamdeck/cli/intro Switches to the installed version of Node.js using nvm. This command is necessary after installing a new Node.js version. ```bash nvm use 24 ``` -------------------------------- ### Install Stream Deck CLI Source: https://docs.elgato.com/streamdeck/cli/intro Installs the Stream Deck CLI globally from npm. This command makes the `streamdeck` command available in your terminal. ```bash npm install -g @elgato/cli@latest ``` -------------------------------- ### Install Stream Deck CLI with yarn Source: https://docs.elgato.com/streamdeck/sdk/introduction/getting-started Install the Stream Deck Command Line Interface (CLI) globally using yarn. This tool helps scaffold new plugins. ```bash yarn global add @elgato/cli ``` -------------------------------- ### getSettings Source: https://docs.elgato.com/streamdeck/sdk/guides/actions Gets the settings associated with this action instance. ```APIDOC ## getSettings ### Description Gets the settings associated this action instance. ### Signature ```typescript function getSettings(): Promise ``` ``` -------------------------------- ### Pack a Plugin for Distribution Source: https://docs.elgato.com/streamdeck/sdk/introduction/distribution Package your plugin's .sdPlugin directory into a .streamDeckPlugin installer file using the Stream Deck CLI's 'pack' command. This command validates and bundles your plugin's contents. ```bash streamdeck pack com.elgato.hello-world.sdPlugin ``` -------------------------------- ### Create an INFO Log Entry Source: https://docs.elgato.com/streamdeck/sdk/guides/logging Use the `info` method on the logger to create an informational log entry. This is a basic example of logging a message. ```javascript streamDeck.logger.info("Hello world"); ``` -------------------------------- ### Active Deep-Link Example Source: https://docs.elgato.com/streamdeck/sdk/guides/deep-linking An example of an active deep-link, which by default brings the Stream Deck application window to the foreground. ```text streamdeck://plugins/message/com.elgato.hello-world/hello ``` -------------------------------- ### Logged Output for Deep-Link Example Source: https://docs.elgato.com/streamdeck/sdk/guides/deep-linking The expected log output when the example deep-link message is received and processed, showing the extracted path and fragment. ```text Path = /Hello%20world Fragment = Testing ``` -------------------------------- ### Layout Validation Output Example Source: https://docs.elgato.com/streamdeck/sdk/guides/dials Example output from the Stream Deck CLI when validating a custom layout that contains errors, indicating specific issues with item positioning. ```text 8:13 error items[0].rect[0] must not be outside of the canvas 8:13 error └ Width and height, relative to the x and y, must be within the 200x100 px canvas ``` -------------------------------- ### Example Deep-Link URL Structure Source: https://docs.elgato.com/streamdeck/sdk/guides/deep-linking Illustrates how a deep-link URL is parsed into its path, query, and fragment components. ```text streamdeck://plugins/message/com.elgato.hello-world/hello?name=Elgato#waving ``` -------------------------------- ### Example Manifest for Volume Controller Plugin Source: https://docs.elgato.com/streamdeck/sdk/guides/i18n This JSON defines the default manifest strings for a volume controller plugin, including action names, tooltips, and encoder trigger descriptions. ```json { // Some properties omitted for brevity... "Name": "Volume Controller", "Description": "Take control of your audio volume", "Actions": [ { "UUID": "com.example.volume.adjust", "Name": "Volume control", "Tooltip": "Control your volume", "States": [ { "Name": "Unmute" }, { "Name": "Mute" } ], "Encoder": { "TriggerDescription": { "LongTouch": "Mute", "Push": "Toggle mute", "Rotate": "Adjust", "Touch": "Stummschaltung umschalten" } } } ] } ``` -------------------------------- ### Listen for Application Launch Events Source: https://docs.elgato.com/streamdeck/sdk/guides/app-monitoring Subscribe to the `onApplicationDidLaunch` event to receive notifications when a registered application starts. The event provides the application's name. ```typescript import streamDeck, { ApplicationDidLaunchEvent } from "@elgato/streamdeck"; streamDeck.system.onApplicationDidLaunch((ev: ApplicationDidLaunchEvent) => { // Handle a registered application launching streamDeck.logger.info(ev.application); // e.g. "Elgato Wave Link.exe" }); ``` -------------------------------- ### Connecting to Stream Deck in the Property Inspector Source: https://docs.elgato.com/streamdeck/sdk/references/websocket/ui Example of implementing the `connectElgatoStreamDeckSocket` function to establish a WebSocket connection with Stream Deck. ```APIDOC ## connectElgatoStreamDeckSocket ### Description Connects to the Stream Deck, enabling the UI to interact with the plugin, and access the Stream Deck API. ### Method Signature ```javascript window.connectElgatoStreamDeckSocket = (port: string, uuid: string, event: string, info: string, actionInfo: string) => void | Promise ``` ### Parameters #### Path Parameters * **port** (string) - Required - Port to be used when connecting to Stream Deck. * **uuid** (string) - Required - Identifies the UI; this must be provided when establishing the connection with Stream Deck. * **event** (string) - Required - Name of the event that identifies the registration procedure; this must be provided when establishing the connection with Stream Deck. * **info** (string) - Required - Information about the Stream Deck application and operating system. * **actionInfo** (string) - Required - Information about the action the UI is associated with. ### Request Example ```javascript window.connectElgatoStreamDeckSocket = (port, uuid, event, info, actionInfo) => { const infoObj = JSON.parse(info); const actionInfo = JSON.parse(actionInfo); const connection = new WebSocket(`ws://127.0.0.1:${port}`); connection.onopen = () => { connection.send(JSON.stringify({ event, uuid })); }; }; ``` ``` -------------------------------- ### Configure Prettier in package.json Source: https://docs.elgato.com/streamdeck/sdk/style-guide/linting Set the 'prettier' field in your package.json to use the installed configuration. ```json "prettier": "@elgato/prettier-config" ``` -------------------------------- ### Log Levels and Console Mapping Source: https://docs.elgato.com/streamdeck/sdk/guides/logging This example shows how to use various log levels (error, warn, info, debug, trace) with the Stream Deck logger, mapping them to their corresponding native console methods. This is useful for debugging during development. ```javascript import streamDeck from "@elgato/streamdeck"; // console.error(...) streamDeck.logger.error("Failures or exceptions"); // console.warn(...) streamDeck.logger.warn("Recoverable errors"); // console.log(...); streamDeck.logger.info("Hello world"); streamDeck.logger.debug("Debugging information"); streamDeck.logger.trace("Detailed messages"); streamDeck.connect(); ``` -------------------------------- ### Accessing User Desired State in Multi-Action Source: https://docs.elgato.com/streamdeck/sdk/guides/keys This example demonstrates how to access the user's desired state when a key action is part of a multi-action. Ensure your action supports multiple states and has them named in the manifest. ```typescript import { action, KeyDownEvent, SingletonAction } from "@elgato/streamdeck"; /** * Example Discord Mute action. */ @action({ UUID: "com.discord.mute" }) export class Mute extends SingletonAction { /** * Occurs when the user presses the key action. */ override onKeyDown(ev: KeyDownEvent) { if (ev.payload.isInMultiAction) { // We can access the user's desired state via... ev.payload.userDesiredState; } } } ``` -------------------------------- ### Passive Deep-Link Example Source: https://docs.elgato.com/streamdeck/sdk/guides/deep-linking Demonstrates how to send a passive deep-link message by including the `streamdeck=hidden` query parameter. This prevents Stream Deck's window from coming to the foreground. ```text streamdeck://plugins/message/com.elgato.hello-world/hello?streamdeck=hidden ``` -------------------------------- ### Get Global Settings using sdpi-components Source: https://docs.elgato.com/streamdeck/sdk/references/websocket/ui Utilize the `sdpi-components` library to easily retrieve global settings within the property inspector. This simplifies communication with Stream Deck. ```javascript SDPIComponents .streamDeckClient .getGlobalSettings() .then((settings) => { console.log(settings); }); ``` -------------------------------- ### Set Configuration Key-Value Pair Source: https://docs.elgato.com/streamdeck/cli/commands/config Use this command to set a specific configuration key to a desired value. For example, to change the package manager to yarn. ```bash streamdeck config set packageManager=yarn ``` -------------------------------- ### Create a Stream Deck Plugin Source: https://docs.elgato.com/streamdeck/cli/commands/create Run this command to initiate the interactive wizard for creating a new Stream Deck plugin. Follow the prompts to provide necessary details. ```bash streamdeck create ``` -------------------------------- ### Reference UI Library Locally Source: https://docs.elgato.com/streamdeck/sdk/guides/ui Include sdpi-components.js locally for consistent and offline functionality. This is the recommended approach for distributing your plugin. ```html ``` -------------------------------- ### List Defined Configuration Source: https://docs.elgato.com/streamdeck/cli/commands/config Displays all currently defined configuration settings, including those set via `config set`. ```bash streamdeck config list ``` -------------------------------- ### Basic ESLint Configuration Source: https://docs.elgato.com/streamdeck/sdk/style-guide/linting Set up a basic ESLint configuration file using Elgato's recommended settings. ```javascript import { config } from "@elgato/eslint-config"; export default config.recommended; ``` -------------------------------- ### Invalid Custom Layout Example Source: https://docs.elgato.com/streamdeck/sdk/guides/dials An example of a custom layout JSON where an item's rectangle extends beyond the allowed canvas dimensions, which will cause validation errors. ```json { "$schema": "https://schemas.elgato.com/streamdeck/plugins/layout.json", "id": "hello-world", "items": [ { "key": "title", "type": "text", "rect": [100, 0, 136, 50], // x (100) + width (136) exceeds 200 "font": { "size": 32, "weight": 600 }, "alignment": "left" } ] } ``` -------------------------------- ### Pack Plugin with Output Directory Source: https://docs.elgato.com/streamdeck/cli/commands/pack Creates a .streamDeckPlugin file for the plugin located in a specified directory and writes the packaged file to a designated output folder. ```bash streamdeck pack com.elgato.test.sdPlugin/ --output dist/ ``` -------------------------------- ### Configure package.json and Prettier Source: https://docs.elgato.com/streamdeck/sdk/style-guide/linting Add a lint script to your package.json and specify the Prettier configuration. ```json { "scripts": { "lint": "eslint --max-warnings 0" }, "prettier": "@elgato/prettier-config" } ``` -------------------------------- ### Get Unit Information Source: https://docs.elgato.com/streamdeck/hid/stream-deck-classic Retrieves general information about the Stream Deck unit. ```APIDOC ## Get Unit Information ### Description Gets the unit information. ### Feature Report Details - **Report ID**: `0x08` - **Command**: (empty) ``` -------------------------------- ### getResources Source: https://docs.elgato.com/streamdeck/sdk/guides/actions Gets the resources (files) associated with this action. These resources are embedded into the action when it is exported. ```APIDOC ## getResources ### Description Gets the resources (files) associated with this 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. ### Signature ```typescript function getResources(): Promise ``` ``` -------------------------------- ### Get Action Settings Source: https://docs.elgato.com/streamdeck/sdk/guides/actions Retrieves the settings for a specific action instance. Use with `Action.getSettings`. ```typescript function getSettings(): Promise ``` -------------------------------- ### Pack Plugin with Version Source: https://docs.elgato.com/streamdeck/cli/commands/pack Creates a .streamDeckPlugin file for the current working directory, specifying a new version for the plugin. The version is written to the plugin's manifest. ```bash streamdeck pack --version "0.8.2.12" ``` -------------------------------- ### Feature Report: Get Firmware Version Source: https://docs.elgato.com/streamdeck/hid/mini Requests the firmware version string of the device. ```APIDOC ## Feature Report: Get Firmware Version ### Description Requests the firmware version string of the device. ### Request Structure - **Report ID**: Varies based on firmware type (e.g., `0xA0` for LD, `0xA1` for AP2, `0xA2` for AP1). ### Response Structure - **Report ID**: Same as request. - **Reserved** (BYTE[4]): N/A. - **Version String** (UINT8[12]): ASCII representation of the firmware version. ``` -------------------------------- ### Registering Apps to Monitor in Manifest Source: https://docs.elgato.com/streamdeck/sdk/guides/app-monitoring Specify applications to monitor for launch and termination events within the plugin's manifest JSON file. This configuration is OS-specific. ```json { "$schema": "https://schemas.elgato.com/streamdeck/plugins/manifest.json", "UUID": "com.elgato.hello-world", "Name": "Hello World", "Version": "0.1.0.0", "Author": "Elgato", "Actions": [ { "Name": "Counter", "UUID": "com.elgato.hello-world.increment", "Icon": "static/imgs/actions/counter/icon", "Tooltip": "Displays a count, which increments by one on press.", "Controllers": ["Keypad"], "States": [ { "Image": "static/imgs/actions/counter/key", "TitleAlignment": "middle" } ] } ], "Category": "Hello World", "CategoryIcon": "static/imgs/plugin/category-icon", "CodePath": "bin/plugin.js", "Description": ".", "Icon": "static/imgs/plugin/marketplace", "SDKVersion": 2, "Software": { "MinimumVersion": "6.6" }, "OS": [ { "Platform": "mac", "MinimumVersion": "10.15" }, { "Platform": "windows", "MinimumVersion": "10" } ], "Nodejs": { "Version": "20", "Debug": "enabled" }, "ApplicationsToMonitor": { "mac": ["com.elgato.WaveLink"], "windows": ["Elgato Wave Link.exe"] }, "Profiles": [ { "Name": "My Cool Profile", "DeviceType": 0, "Readonly": false, "DontAutoSwitchWhenInstalled": false, "AutoInstall": true } ] } ``` -------------------------------- ### Get Action Resources Source: https://docs.elgato.com/streamdeck/sdk/guides/actions Retrieves the resources associated with an action. Available from Stream Deck 7.1. ```typescript function getResources(): Promise ``` -------------------------------- ### GetSettings Source: https://docs.elgato.com/streamdeck/sdk/references/websocket/ui Retrieves the settings for a specific instance of an action. This command triggers the `didReceiveSettings` event. ```APIDOC ## GetSettings ### Description Gets the settings associated with an instance of an action. Causes `didReceiveSettings` to be emitted. ### Method Not applicable (WebSocket command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body ```json { "action": "string", "context": "string", "event": "getSettings" } ``` - **action** (string) - Required - Identifies the action type, as specified by the UUID within the manifest. - **context** (string) - Required - The action instance identifier. - **event** (string) - Required - Name of the command. Must be "getSettings". ### Request Example ```json { "action": "com.elgato.example.action", "context": "exampleContextId", "event": "getSettings" } ``` ### Response #### Success Response (Emits `didReceiveSettings` event with settings payload) #### Response Example (See `didReceiveSettings` event documentation) ``` -------------------------------- ### Get Unit Serial Number Source: https://docs.elgato.com/streamdeck/hid/stream-deck-classic Retrieves the unique serial number of the Stream Deck unit. ```APIDOC ## Get Unit Serial Number ### Description Gets the unit serial number. ### Feature Report Details - **Report ID**: `0x06` - **Command**: (empty) ``` -------------------------------- ### Build Plugin with npm Source: https://docs.elgato.com/streamdeck/sdk/introduction/your-first-changes Use this command to build your Stream Deck plugin using npm. This command should be run in your project's terminal. ```bash npm run build ``` -------------------------------- ### Feature Report: Get Unit Serial Number Source: https://docs.elgato.com/streamdeck/hid/mini Requests the unit's serial number string. ```APIDOC ## Feature Report: Get Unit Serial Number ### Description Requests the unit's serial number string. ### Request Structure - **Report ID**: `0x03` (Feature Report) ### Response Structure - **Report ID**: `0x03`. - **Reserved** (BYTE[4]): N/A. - **Serial Number String** (UINT8[DataLength]): ASCII representation of the serial number. ``` -------------------------------- ### Stream Deck CLI Overview Source: https://docs.elgato.com/streamdeck/cli/intro Displays the available commands and options for the Stream Deck CLI. This command provides a summary of the CLI's functionality. ```bash Usage: streamdeck [options] [command] Options: -v display CLI version -h, --help display help for command Commands: create Stream Deck plugin creation wizard. link [path] Links the plugin to Stream Deck. restart|r Starts the plugin in Stream Deck; if the plugin is already running, it is stopped first. stop|s Stops the plugin in Stream Deck. dev [options] Enables developer mode. validate [options] [path] Validates the Stream Deck plugin. pack|bundle [options] [path] Creates a .streamDeckPlugin file from the plugin. config Manage the local configuration. help [command] display help for command Alias: streamdeck sd ``` -------------------------------- ### Get Sleep Mode Duration Source: https://docs.elgato.com/streamdeck/hid/stream-deck-classic Retrieves the configured duration after which the Stream Deck enters sleep mode. ```APIDOC ## Get Sleep Mode Duration ### Description Gets the sleep mode duration. ### Feature Report Details - **Report ID**: `0x0A` - **Command**: (empty) ``` -------------------------------- ### Get Firmware Version (LD) Source: https://docs.elgato.com/streamdeck/hid/stream-deck-classic Retrieves the firmware version for the Loadable Data (LD) component of the Stream Deck. ```APIDOC ## Get Firmware Version (LD) ### Description Gets the firmware version for the Loadable Data (LD). ### Feature Report Details - **Report ID**: `0x04` - **Command**: (empty) ``` -------------------------------- ### npm Scripts for Building and Watching Source: https://docs.elgato.com/streamdeck/sdk/introduction/getting-started These scripts in package.json automate the build process and enable live reloading during development. ```json { "scripts": { "build": "rollup -c", "watch": "rollup -c -w --watch.onEnd=\"streamdeck restart {{YOUR_PLUGIN_UUID}}\" }, // ... } ``` -------------------------------- ### GetGlobalSettings Source: https://docs.elgato.com/streamdeck/sdk/references/websocket/ui Gets the global settings associated with the plugin. This command causes the `didReceiveGlobalSettings` event to be emitted by the Stream Deck application. ```APIDOC ## GetGlobalSettings ### Description Gets the global settings associated with the plugin. Causes `didReceiveGlobalSettings` to be emitted. ### Method Not applicable (WebSocket command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body ```json { "context": "string", "event": "getGlobalSettings" } ``` - **context** (string) - Required - The plugin's identifier, as provided by Stream Deck. - **event** (string) - Required - Name of the command. Must be "getGlobalSettings". ### Request Example ```json { "context": "com.elgato.example.plugin", "event": "getGlobalSettings" } ``` ### Response #### Success Response (Emits `didReceiveGlobalSettings` event with settings payload) #### Response Example (See `didReceiveGlobalSettings` event documentation) ``` -------------------------------- ### Link Specific Plugin Directory Source: https://docs.elgato.com/streamdeck/cli/commands/link Use this command to link a specific plugin directory to Stream Deck. Replace 'com.elgato.hello-world.sdPlugin' with the actual name of your plugin directory. ```bash streamdeck link com.elgato.hello-world.sdPlugin ``` -------------------------------- ### Build Plugin with pnpm Source: https://docs.elgato.com/streamdeck/sdk/introduction/your-first-changes Use this command to build your Stream Deck plugin using pnpm. This command should be run in your project's terminal. ```bash pnpm build ``` -------------------------------- ### getResources Source: https://docs.elgato.com/streamdeck/sdk/guides/keys Gets the resources (files) associated with this action. These resources are embedded into the action when it is exported. Available from Stream Deck 7.1. ```APIDOC ## getResources ### Description Gets the resources (files) associated with this 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. ### Method ```javascript function getResources(): Promise ``` ``` -------------------------------- ### Feature Report: Get Sleep Mode Duration Source: https://docs.elgato.com/streamdeck/hid/mini Requests the configured idle duration before the device enters Sleep Mode. ```APIDOC ## Feature Report: Get Sleep Mode Duration ### Description Requests the configured idle duration before the device enters Sleep Mode. ### Request Structure - **Report ID**: `0xA3` (Feature Report) ### Response Structure - **Report ID**: `0xA3`. - **Data Length** (UINT8): Length of the duration data. - **Duration** (INT32): The configured idle duration in seconds. ``` -------------------------------- ### Build Plugin with yarn Source: https://docs.elgato.com/streamdeck/sdk/introduction/your-first-changes Use this command to build your Stream Deck plugin using yarn. This command should be run in your project's terminal. ```bash yarn build ``` -------------------------------- ### Get Firmware Version (AP1) Source: https://docs.elgato.com/streamdeck/hid/stream-deck-classic Retrieves the firmware version for the Application Processor 1 (AP1) component of the Stream Deck. ```APIDOC ## Get Firmware Version (AP1) ### Description Gets the firmware version for the Application Processor 1 (AP1). ### Feature Report Details - **Report ID**: `0x07` - **Command**: (empty) ``` -------------------------------- ### Get Firmware Version (AP2) Source: https://docs.elgato.com/streamdeck/hid/stream-deck-classic Retrieves the firmware version for the Application Processor 2 (AP2) component of the Stream Deck. ```APIDOC ## Get Firmware Version (AP2) ### Description Gets the firmware version for the Application Processor 2 (AP2). ### Feature Report Details - **Report ID**: `0x05` - **Command**: (empty) ``` -------------------------------- ### Icon Layout Configuration Source: https://docs.elgato.com/streamdeck/sdk/guides/dials JSON configuration for the '$X1' icon layout. Use this for displaying an icon and title. ```json { "$schema": "https://schemas.elgato.com/streamdeck/plugins/layout.json", "id": "$X1", "items": [ { "key": "title", "type": "text", "rect": [16, 10, 136, 24], "font": { "size": 16, "weight": 600 }, "alignment": "left" }, { "key": "icon", "type": "pixmap", "rect": [76, 40, 48, 48] } ] } ``` -------------------------------- ### Get macOS Application Bundle Identifier Source: https://docs.elgato.com/streamdeck/sdk/guides/app-monitoring Use this terminal command to find the `CFBundleIdentifier` for macOS applications, which is required for monitoring. ```bash osascript -e 'id of app "Application Name"' ``` -------------------------------- ### Dry Run for Packaging Source: https://docs.elgato.com/streamdeck/cli/commands/pack Generates a report of the packaging process for the plugin in the current working directory without creating the actual .streamDeckPlugin file. This is useful for previewing the package contents. ```bash streamdeck pack --dry-run ``` -------------------------------- ### Example Deep-Link Message Submission Source: https://docs.elgato.com/streamdeck/sdk/guides/deep-linking The URL to submit to send a deep-link message to a plugin with the UUID `com.elgato.hello-world`, including a path and fragment. ```text streamdeck://plugins/message/com.elgato.hello-world/Hello%20world#Testing ``` -------------------------------- ### Iterate Over All Visible Actions Source: https://docs.elgato.com/streamdeck/sdk/guides/actions Use this to iterate over all visible actions belonging to your plugin and modify them, for example, to update their titles asynchronously after a background task. ```typescript import streamDeck from "@elgato/streamdeck"; // Iterate over all of your plugin's visible actions. streamDeck.actions.forEach((action) => { action.setTitle("Hello world"); }); ``` -------------------------------- ### Link Current Working Directory Source: https://docs.elgato.com/streamdeck/cli/commands/link Use this command to link the plugin located in the current directory to Stream Deck. Ensure the directory name follows the '.sdPlugin' naming convention. ```bash streamdeck link ```