This plugin is designed to work with my own, very-much-a-work-in-progress, local back-end API for Lifx controls. So it's not much use to anyone else yet, but if it helps you with a similar project, have at it!
git clone https://github.com/doubleedesign/streamdeck-plugin-lifx
Using Command Prompt with admin privileges, from your project folder:
mklink /D C:\Users\%USERNAME%\AppData\Roaming\Elgato\StreamDeck\Plugins\com.doubleedesign.lifx.sdPlugin %cd%\src\com.doubleedesign.lifx.sdPlugin
Note: When symlinking a plugin, the folder name must end with .sdPlugin
.
Each action has its own directory within actions
, and inside that its event handlers are located within index.js
. Those files are concatenated from app.js
to app-bundle.js
using Rollup.
- Install dependencies with
npm install
- To run in development mode, i.e., with Rollup watching for changes, run
npm run dev
- When you're done and just want to update the bundle file, run
npm run build
.
Stream Deck SDK is included as a Git submodule.
- Add a new object to the
Actions
array inmanifest.json
with the relevant values (the existing actions can be used for guidance re naming and file structure) - Create the folder and files within
actions
- Restart the Stream Deck app (necessary after any change to the manifest)
- Modify the UI as per your needs in
property-inspector/inspector.html
and the handlers for it inproperty-inspector/inspector.js
- Add your event handling code to your new action's
index.js
.
While Rollup will take care of any name clashes, I recommend giving each action constant its own name to make your app-bundle.js
more readable for debugging purposes. e.g., const toggleAction =
instead of const action =
.
Note to self: Automate this at some point with template files etc.
Please see the SDK instructions for debugging information.