Create Your plugin
Setup
To get started on creating your own Stream Deck plugin, you will need:
-
Stream Deck hardware or Stream Deck Mobile for iOS or Stream Deck Mobile for Android
-
Download and install the latest release of Stream Deck (Version 4.1 or later).
Creating your plugin
The simplest solution to get started and create your own plugin is to:
- Install one of the sample plugins in the Stream Deck application.
- Quit the Stream Deck application
-
Locate the installed plugin in the Finder/Explorer. You should find a folder with the extension
.sdPlugin
in thePlugins
folder.On macOS, you will find it here:
path ~/Library/Application Support/com.elgato.StreamDeck/Plugins/
On Windows, you will find it here:
path %appdata%\Elgato\StreamDeck\Plugins\
-
Rename the folder
com.elgato.counter.sdPlugin
to use a unique URI, for examplecom.example.myplugin.sdPlugin
- Edit the
manifest.json
file to change the actions UUID, name, plugin name, author, …
If you now launch the Stream Deck application, your plugin should appear in the Custom
category in the Actions list.
You can use JavaScript ES2015, ES6, or ES7.
Debugging
Debugging your JavaScript plugin
You can debug your JavaScript plugin and/or Property Inspector using Google Chrome's web developer tools. You first need to enable the HTML remote debugger in Stream Deck.
- On macOS, you will need to run the following command line in the Terminal:
defaults write com.elgato.StreamDeck html_remote_debugging_enabled -bool YES
- On Windows, you will need to add a DWORD
html_remote_debugging_enabled
with value1
in the registry@ HKEY_CURRENT_USER\Software\Elgato Systems GmbH\StreamDeck
.
After you relaunch the Stream Deck app, you can open http://localhost:23654/ in Chrome, where you will find a list of 'Inspectable pages' (plugins). To inspect your plugin, click the reverse DNS name of your plugin and open Chrome developer tools, where you can further inspect used components and log messages.
Debugging your compiled plugin (C++, Objective-C, …)
After the Stream Deck application launches the plugin, you can attach the debugger to it in Xcode or Visual Studio. When implementing your own plugin, you should create and debug your plugin in the folder ~/Library/Application Support/com.elgato.StreamDeck/Plugins/
(macOS) and in the folder %appdata%\Elgato\StreamDeck\Plugins
(Windows).
With Xcode, you can even start and debug the plugin by using the Wait for executable to be launched
in the Run
settings of the Scheme.
Debugging the Property Inspector
To debug the Property Inspector, it must be active in the Stream Deck application. Please note that the Property Inspector is instantiated every time it is shown, so it will only appear in the list of inspectable pages if it is visible in Stream Deck software.
While plugins have no visible DOM elements, you can inspect Property Inspector's elements using the element-inspector from developer tools. Activate the element-inspector and click the element in question inside Stream Deck's property inspector.
Logging
The plugin and Property Inspector can use the logMessage
event to write messages to a log file.
Logs are saved to disk per plugin in the folder ~/Library/Logs/StreamDeck/
on macOS and %appdata%\Elgato\StreamDeck\logs\
on Windows. Note that the log files are rotated each time the Stream Deck application is relaunched.
Crash and exit codes
If your compiled plugin unexpectedly crashes, the Stream Deck application will try to restart it. In this case, you will see in the Stream Deck logs a line like:
The plugin 'CPU' crashed with code 12345
The code is an error code depending on the platform. Here are some good references to learn more about these error codes: