API¶
DroidDeck's server exposes a REST API and a SignalR hub on port 4787. The phone app and the
configurator use them, and you can use them to build your own clients or automations.
Authentication¶
Every endpoint requires the API key, except GET /api/ping and GET /api/pairing/local-key.
Send the key in one of these ways:
- header
X-API-KEY: <key> - header
Authorization: Bearer <key> - query string
?access_token=<key>(used for the SignalR WebSocket)
GET /api/pairing/local-key returns {key} only to requests from the PC itself (loopback), and
rejects cross-site browser requests. The address used must also be localhost, 127.0.0.1 or
[::1]: with any other name in the Host header the answer is 403 (protection against DNS rebinding). CORS only allows origins on loopback and private network ranges.
Integration failures return 502 with {error}.
Privileged actions¶
Keyboard shortcut, open program, activate window and script run code on the PC, and an HTTP request goes out with the PC's network access, so they are protected even from clients that have the key. Requests that don't come from the PC itself (loopback) cannot:
- run them through
execute; usepresswith a button that was saved on the PC; - create a button with one of these actions, or change its parameters, through
POST profiles. Moving, renaming, recolouring and deleting such buttons is allowed.
A multi-action counts as privileged when any of its steps is. Plugin actions (experimental) run third-party code and
follow the same rule. Refused requests return 403 with
{error}.
Connections from a phone over the USB cable arrive on loopback
through adb; the server recognises them and treats them as remote, not as the PC.
Examples¶
# Is the server up?
curl http://192.168.0.10:4787/api/ping
# Toggle Discord mute
curl -X POST http://192.168.0.10:4787/api/StreamDeck/execute \
-H "X-API-KEY: $KEY" -H "Content-Type: application/json" \
-d '{"type":"discord","parameters":{"operation":"toggleMute"}}'
# Mute Spotify
curl -X POST http://192.168.0.10:4787/api/StreamDeck/execute \
-H "X-API-KEY: $KEY" -H "Content-Type: application/json" \
-d '{"type":"mixer","parameters":{"operation":"mute","processName":"Spotify"}}'
Deck: /api/StreamDeck¶
| Method | Route | Description |
|---|---|---|
| GET | profiles |
List profiles. |
| GET | profiles/{id} |
Get a profile. |
| POST | profiles |
Create or update a profile. Broadcasts ReceiveDeckUpdate. |
| DELETE | profiles/{id} |
Delete a profile. Broadcasts ReceiveDeckUpdate. |
| POST | press |
Press a saved button ({profileId, buttonId, gesture}; gesture is tap (default), longPress or doubleTap): the server runs the action stored in the profile for that gesture. This is what the phone uses. |
| POST | execute |
Run an ad-hoc action ({type, parameters}). From outside the PC, privileged actions return 403. |
| GET / POST | layout |
Read / set the grid size ({rows, columns}). |
Action payload¶
{ "type": "hotkey", "parameters": { "keys": "^+m" } }
All parameter values are strings. The table below is a summary; the machine-readable source of
truth is GET /api/actions/schema, which lists every action type with
its parameters (fields[].key), allowed values (options) and when each field applies
(visibleWhen).
type |
Parameters |
|---|---|
hotkey |
keys |
launch_app |
path, arguments? |
activatewindow |
windowName (exact window title) |
media |
command: playpause·play·pause·next·previous·stop; sessionId? |
mixer |
operation: toggleMute·mute·unmute·setVolume·volumeUp·volumeDown; processName or deviceId (default or an endpoint id); deviceKind: output·input; volume (0–100); step (1–50) |
multi |
steps: JSON array string [{"type","parameters","delayMs","if"}]; if is optional: {check, value, negate} with check one of obs_streaming·obs_recording·discord_mute·discord_deaf·toggle_on (value = button id)·app_running·app_focused (value = process)·time_between (value = 08:00-18:00)·weekday (value = 1-5, 0 = Sunday)·tally_program·tally_preview (value = tally target) |
discord |
operation: toggleMute·mute·unmute·toggleDeafen·joinChannel (channelId)·disconnect·inputVolumeUp/Down·outputVolumeUp/Down (delta)·setInputVolume·setOutputVolume (value)·toggleVoiceMode·setVoiceMode (mode: VOICE_ACTIVITY·PUSH_TO_TALK)·userMute (userId)·userVolume (userId, value 0–200) |
obs |
operation: setScene (scene)·toggleRecord·startRecord·stopRecord·toggleStream·toggleVirtualCam·toggleReplayBuffer·saveReplay·toggleInputMute (inputName) |
soundboard |
operation: play·stop; source: myinstants (id, url, title) or discord (soundId, guildId) |
tuya |
deviceId, code, operation: toggle·set; value, valueType |
homeassistant |
operation: toggle·turn_on·turn_off·brightness (step)·scene·script·display·service (service = domain.service, data JSON); entityId |
spotify |
operation: playPause·next·previous·like·shuffle·repeat·volume (step)·playlist (uri, shuffleOn)·nowPlaying |
twitch |
operation: marker (description)·clip·ad (length)·chat (message)·poll (question, choices one per line, duration)·title (title)·status |
youtube |
operation: chat (message)·status |
network |
protocol: osc (path, args: i:1·f:0.5·s:text·T·F, one per line)·udp·tcp (message, encoding: text·hex, ending: none·lf·crlf·cr); host, port. Privileged |
tally |
operation: open·show (target, from the list at GET /api/tally/targets)·manual_toggle·manual_on·manual_off |
vmix |
operation: cut·fade (duration)·preview·program·quickplay·toggle_audio (input)·set_volume (input, volume)·overlay (input, overlay)·overlay_off·master_audio·master_volume (volume)·toggle_record·toggle_stream·toggle_external·toggle_multicorder·fade_to_black·snapshot·custom (function, query) |
companion |
Only the app opens the surface |
mairlist |
operation: on_air_toggle·on_air·off_air·automation_toggle·automation_on·automation_off·next (playlist)·player_toggle·player_start·player_stop·player_fadeout (playlist, player)·cart (cart)·cart_stop_all·custom (command) |
radiodj |
operation: play_track (track, from 1)·stop·pause·resume·restart·play_intro·autodj_toggle·assisted_toggle·input_toggle·events_on·events_off·cart (cart)·load_playlist·load_track (id)·custom (command, arg) |
streamerbot |
action (id or name), args (key=value per line, or JSON) |
vtubestudio |
operation: hotkey (hotkey: id or name)·model (model: model id) |
voicemeeter |
operation: toggle_mute·mute·unmute·set_gain (gain dB)·adjust_gain (step dB) with target: strip·bus and index (1–8)·macro (button)·param_set (parameter, value)·param_toggle (parameter) |
hue |
operation: toggle·on·off·brightness (brightness %)·brightness_step (step %) with target: light·group and id·scene (scene) |
keylight |
host (IP or IP:port); operation: toggle·on·off·brightness (brightness)·brightness_step (step)·temperature (kelvin)·temperature_step (kelvinStep) |
govee |
ip; operation: toggle·on·off·brightness (brightness)·color (color #RRGGBB)·temperature (kelvin) |
mqtt |
topic, payload, qos (0–2), retain (true/false) |
script |
source: inline (language: powershell·python·cmd; code) or file (path); arguments |
http |
method: POST·GET·PUT·PATCH·DELETE; url; headers (one Name: value per line); for POST, PUT and PATCH, contentType (application/json·application/x-www-form-urlencoded·text/plain) and body |
timer |
mode: countdown (durationMin)·stopwatch·pomodoro (workMin, breakMin)·counter (step); operation: toggle·reset·skip·increment·decrement; target: self or the id of another timer button |
windows |
operation: setDefaultAudio (deviceKind: output·input; deviceId; altDeviceId to toggle between two, or none)·lock·sleep·displayOff |
steam |
appId: the numeric Steam app id (from GET /api/steam/games) |
plugin |
Experimental, see plugin buttons: plugin (plugin id), action (action UUID). Privileged |
open_profile and back exist only on the phone.
Audio: /api/v1/Mixer, /api/v1/Media¶
| Method | Route | Description |
|---|---|---|
| GET | Mixer/out, Mixer/in |
Output / input devices with their app sessions. |
| GET | Mixer/out/{id}, Mixer/in/{id} |
One device. |
| PUT | Mixer/out/{id}, Mixer/in/{id} |
{session, volume?, mute?}: session is a process id, or -1 for the whole device. |
| GET | Media/sessions |
Media sessions, with thumbnails. |
| GET | Media/sessions/{id} |
One session. |
| POST | Media/sessions/{id}/command |
{command}. |
A profile is {id, name, rows, columns, isDefault, buttons, autoSwitchApps}; a button has action,
longPressAction and doubleTapAction (each {type, parameters} or null). The privileged-action
rule applies to all three.
Two-state buttons add toggle (bool), activeAction (run on the tap that turns it off),
activeLabel, activeIconName and activeIconBase64. Info buttons use dynamicType (cpu_monitor,
memory_monitor, gpu_monitor, network_monitor, clock, weather, now_playing, command,
url, notifications, volume_slider, ai_usage) with dynamicParameters (city, units, command, url,
path, format, interval, app, target…); command and url follow the privileged-action rule.
Large buttons add columnSpan and rowSpan (default 1; row/column is the top-left cell).
| Method | Path | Description |
|---|---|---|
| GET | /api/slider?target=… |
Slider: current {volume, mute, label, max, text}. target: output, input, app (app), obs (inputName), discord_user (userId), monitor, media, tuya (deviceId), homeassistant (entityId), hue (hueTarget, id), govee (ip), keylight (host). max is 100, except Discord (200) and music (duration in seconds). 404 when the target doesn't exist right now; 503 {error} when the integration doesn't respond. |
| PUT | /api/slider |
{target, app, params, volume} (0 to max). Returns the new state. |
| GET | /api/slider/options?target=tuya\|discord_user |
{value, label} list of Smart Life bulbs with brightness or of people in the call. |
Library: backup, Steam, apps¶
| Method | Path | Description |
|---|---|---|
| GET | /api/backup |
Download every profile and installed theme as a .droiddeck (zip). |
| POST | /api/backup |
Restore a .droiddeck (request body = the file). Same-id profiles and themes are replaced. Returns {imported, themes} (how many profiles and themes came in). From outside the PC, refused with 403 if it would create privileged buttons. |
| GET | /api/steam/games |
Installed Steam games ({value: appId, label: name}). |
| GET | /api/steam/icon/{appId} |
{iconBase64}: a square PNG cut from the game's cover. |
| GET | /api/system/apps |
Programs with a visible window (for automatic profile switching). |
| GET | /api/system/info |
{name, version}: the PC's Windows name, used to label paired PCs. |
| GET | /api/info |
Current values of the info buttons, what's playing and the two-state buttons that are on. |
| GET / POST | /api/macro, /api/macro/start, /api/macro/stop |
Keyboard macro recording. Only from the PC itself (403 otherwise); stop returns {steps} in the multi-action format. |
| POST | /api/import/streamdeck |
Imports a .streamDeckProfile (request body = the file, up to 50 MB) as new profiles. Returns {profiles, buttons, unsupported, stripped, firstProfileId}; from outside the PC, privileged buttons come in without their action and stripped counts them. 400 with {error} if it isn't a Stream Deck profile. |
| GET | /api/share/{profileId} |
{data, url, qr, images}: the profile compressed into a link (url is the site's share page with #data); qr says whether it fits in a QR code; images whether custom images were left out. |
| GET | /api/share/{profileId}/qr |
The share link as a PNG QR code. |
| POST | /api/share/preview |
{data} from a share link, without saving anything. Returns {name, buttons, privileged, canKeep}: privileged lists the profile's privileged actions (label, row, column, gesture, type, detail); canKeep says whether this client may keep them (only the PC itself). |
| POST | /api/share/import |
{data, keepPrivileged} → saved as a new profile. Returns {profileId, name, buttons, stripped}. Privileged actions are removed unless keepPrivileged is true and the request comes from the PC itself. |
Themes: /api/themes¶
| Method | Path | Description |
|---|---|---|
| GET | /api/themes |
Installed themes, each in the theme file format. |
| POST | /api/themes |
Installs a theme (request body = the file, up to 16 KB). A theme with the same id is replaced. Returns the saved theme; 400 with {error} says what is wrong. |
| DELETE | /api/themes/{id} |
Deletes a theme. 404 if it isn't installed. |
Themes are only data, so remote clients can use these too. Which theme to use is each device's own choice.
Icon packs: /api/iconpacks¶
| Method | Path | Description |
|---|---|---|
| GET | /api/iconpacks |
Installed icon packs: {id, name, author, version, description, url, hasLicense, count, skipped: {unsupported, tooLarge, unsafe, invalid}}. |
| POST | /api/iconpacks |
Installs a pack (request body = the file, up to 100 MB). Same name and author = same id, replaced. Returns the pack's summary; 400 with {error} says why it was refused. |
| GET | /api/iconpacks/{id}/icons?q=&offset=&limit= |
A page of icons, {total, offset, items: [{index, name, tags, type}]}. q filters by name and tags (every word must match). limit defaults to 100, at most 200. |
| GET | /api/iconpacks/{id}/icons/{index} |
The image. Sent with nosniff, a sandbox Content-Security-Policy and as an attachment. |
| GET | /api/iconpacks/{id}/license |
The pack's license as plain text (cut at 256 KB). 404 if it has none. |
| DELETE | /api/iconpacks/{id} |
Deletes a pack. Buttons keep their copies of the icons. |
Packs are only data, so remote clients can use these too.
Automations: /api/triggers¶
| Method | Path | Description |
|---|---|---|
| GET | /api/triggers |
The list of automations. |
| PUT | /api/triggers |
Replaces the whole list. Returns the saved list. |
| POST | /api/triggers/{id}/run |
Presses the automation's button now. 404 if the automation or the button doesn't exist. |
An automation is {id, name, enabled, event, time, days, app, profileId, buttonId, if}. event is
schedule (time HH:mm, days like 1-5), app_start / app_exit (app), resume or
startup, or tally_on / tally_off (target, from the list at GET /api/tally/targets); if is an optional condition in the multi-action format. Since automations only press saved
buttons, they follow the rules those buttons were created under.
Plugins (experimental): /api/plugins¶
Experimental
Running Stream Deck plugins is experimental and off by default. The API may change. There is
no promise that a given third-party plugin works, and DroidDeck is not connected to the Elgato
Marketplace: you install a .streamDeckPlugin file you already have. A plugin is a program that
runs on your PC with your Windows account's permissions, so only install plugins you trust.
What's supported: Node.js and .exe plugins with key (Keypad) and dial (Encoder)
actions. Not supported: legacy HTML plugins, deep links and protected (encrypted) packages. Node.js plugins use the
Node.js installed on the PC (20 or newer, or what the manifest asks for if that's newer); DroidDeck
doesn't download one. The host reports itself as Stream Deck 7.1.
Everything that changes something, and the logs, only works from the PC itself (403
otherwise, phones on USB included). While the feature is off, no plugin process or socket is opened.
| Method | Path | PC only | Description |
|---|---|---|---|
| GET | /api/plugins |
no | {experimental: true, enabled, node: {found, version} or null (null while off), plugins: [Plugin]}. |
| PUT | /api/plugins/settings |
yes | {enabled}: turns the feature on or off. Returns the same as GET /api/plugins. |
| POST | /api/plugins |
yes | Installs a .streamDeckPlugin (request body = the file, up to 100 MB; one *.sdPlugin folder inside). The same plugin UUID updates it and keeps its settings. Returns the Plugin; 400 {error} says why it was refused (also while the feature is off). |
| PUT | /api/plugins/{id} |
yes | {enabled}: turns one plugin on or off. Off stops its process before answering. |
| DELETE | /api/plugins/{id} |
yes | Stops and uninstalls it, deleting its stored settings. Its buttons stay in the profiles. |
| POST | /api/plugins/{id}/restart |
yes | Restarts it and clears the failure count. |
| POST | /api/plugins/{id}/profiles |
yes | {name} (the manifest's Profiles[].Name): installs a profile that comes with the plugin and returns {profileId} (its first page). Already installed and complete, returns the same id. 404 without the plugin, 400 {error} if the profile doesn't exist or can't be read. Refuses requests carrying Forwarded or X-Forwarded-For. Sends ReceiveDeckUpdate. |
| GET | /api/plugins/{id}/logs |
yes | {lines, pluginLog}: recent lines from DroidDeck, the process output and the plugin's logMessage; and the end of the newest logs/*.log file the plugin writes (the official SDK reports startup errors only there). |
| POST | /api/plugins/inspector |
yes | {buttonId, slot, plugin, action}: opens the settings screen of a saved button. Returns {id, url}. 404 if the saved button doesn't have that plugin action on that slot, 400 if it can't be opened, 429 with too many open. |
| GET | /api/plugins/inspector/{id} |
yes | 200 while the session is open, 404 after it ended. |
| DELETE | /api/plugins/inspector/{id} |
yes | Closes the session. |
| GET | /api/plugins/options/plugins |
no | [{value, label}] for the button editor. |
| GET | /api/plugins/options/actions?plugin={id} |
no | [{value, label}]: the plugin's actions a button can use. |
A Plugin is {id, name, version, author, description, runtime: "node" or "native", requiredNode,
enabled, status, error, buttons, icon, actions, profiles}. status is disabled, stopped (no button uses
it, or it is waiting to restart), starting, running, failed (gave up; error says why) or
unsupported (it can't be loaded). error follows Accept-Language. Each action is
{id, name, tooltip, icon, controllers, supported, hasPropertyInspector, listed, states,
supportedInMultiActions, stateNames, dial}; supported is about keys (false for dial-only actions)
and dial about dials. Icons are data URIs.
profiles is [{name, installed, requested}] (requested: the plugin asked for the profile while it
wasn't installed).
Plugin buttons¶
A button uses a plugin action like any other type:
{ "type": "plugin", "parameters": { "plugin": "com.example.counter", "action": "com.example.counter.increment" } }
- It is a privileged action: other devices can press, move and copy a saved button, but can't create one or change which plugin or action it runs.
- It only runs from a saved button: through
press(automations included), throughHoldPluginon the hub, or as a step of the multi-action saved on it. It does not run throughexecute. - Every button + gesture is its own plugin instance, with its own settings.
presssendskeyDownimmediately followed bykeyUp, for every gesture; to hold, see below. - In a multi-action step, the parameters are
plugin,action,instance(the step id, up to 40A-Z a-z 0-9 _ -characters: it keeps identical steps' settings apart; without it, the order among identical ones is used) and, for multi-state actions,state. The instance getsisInMultiAction: truewith nocoordinates, andkeyDown/keyUpcarryuserDesiredStatewhen the action has more than one state (0 ifstateis missing). Actions withSupportedInMultiActions: falseare skipped. In theinspectorendpoint, a step'sslotis{gesture}:i-{instance}, for exampletap:i-abc123. - A plugin only runs while some saved button uses it. While it runs, all its saved buttons count
as visible, in every profile, whether or not a phone is showing them.
coordinatesare the button's row and column in its profile, so two profiles can report the same coordinates. There is a single virtual device, with the phone's grid size. - After a crash it is restarted with growing delays (1 to 16 s) and gives up after the sixth failure in a row.
openUrlopens the address on the PC, onlyhttpandhttps, at most one every 2 s, 5 per minute per plugin and 10 per minute in total.
Settings (per button and per plugin) can hold account tokens. They are stored only on the PC,
encrypted, and are never part of a profile: they aren't sent to phones, and backups and share links
don't include them (those only carry the plugin and action ids). Copying a button with
buttons/copy copies its settings on the PC; moving it keeps them. The settings of a deleted button
are kept for 30 days, so restoring a backup on the same PC brings them back. A profile restored on
another PC starts with empty settings.
Holding¶
SignalR hub methods, all taking just the button id (the action is always the one in the saved profile):
| Method | What it does |
|---|---|
HoldPlugin(buttonId) |
keyDown now. On a two-state button it toggles the state and picks the action, like press. |
KeepPlugin(buttonId) |
"Still holding": send it every 3 s. Without it for 10 s, the PC releases. |
ReleasePlugin(buttonId) |
keyUp, once the last client holding it lets go. |
Only use them if ReceivePluginState carries hold: true (an older PC doesn't have these methods: use
press), and only hold a button where everything the tap runs is a plugin action and that has no long
press or double tap. If the saved button doesn't fit the rule, HoldPlugin counts as a regular
press. A dropped connection releases whatever it was holding, and a press lasts at most 10 minutes.
The other rules are in the guide.
Dials¶
A button is a dial when its tap action has "controller": "Encoder" in its parameters (part of
the action, so privileged like the rest of it). longPressAction,
doubleTapAction, toggle and multi-action steps don't apply. press sends dialDown followed by
dialUp. To use it as a dial, only when ReceivePluginState carries dials: true:
| Hub method | What it does |
|---|---|
HoldPlugin(buttonId) / KeepPlugin / ReleasePlugin |
dialDown and dialUp, with the holding rules. |
RotatePlugin(buttonId, ticks) |
dialRotate. Positive is clockwise; clamped to ±24 per call. pressed is decided by the PC. |
TouchPlugin(buttonId, x, y, hold) |
touchTap at tapPos (x 0 to 199, y 0 to 99, clamped). |
Each connection may send about 40 RotatePlugin + TouchPlugin a second (bursts of 60); the rest is
dropped. Add up turns on the client and send about 20 times a second.
In the Look of a dial there is also dial (only while the plugin runs):
{items, background, triggers}. items are drawn bottom to top on a 200 × 100 canvas; each one is
{key, type, x, y, width, height, zOrder, opacity, background} plus, for text:
{text, color, alignment, fontSize, fontWeight, overflow}; for pixmap: {image} (data URI or
null); for bar and gbar: {value, min, max, subtype, borderWidth, barHeight, barBackground,
barFill, barBorder}. Colours are #rrggbb, transparent or a gradient 0:#rrggbb,1:#rrggbb; null
means the default. background is an image behind the items. triggers is
{rotate, push, touch, longTouch} (each may be null) or null. title and image of the Look still
come filled in (the dial's title and icon), for clients that don't draw dials. In actions, dial
says whether an action can be placed on a dial; the field options endpoint only lists key actions.
Property Inspector¶
An action's settings screen (HTML from the plugin: the action's PropertyInspectorPath, or the
plugin's) is untrusted third-party code. It is not served by the API's origin. A second server
listens only on 127.0.0.1, on a port chosen by Windows (never 4787), and only after the first
session is opened. The routes above also refuse requests carrying Forwarded or X-Forwarded-For.
- A session is for one saved button + gesture.
urlcontains its 256-bit secret (http://127.0.0.1:{port}/pi/{secret}/{path}). It ends when its WebSocket closes, if nobody connects within 30 s, onDELETE, and when the plugin is disabled, updated, uninstalled, restarted or stops, the feature is turned off, or the button is removed or changes plugin or action. At most 8 are open; opening the same button again replaces its session. - Files come only from that plugin's folder, only under the secret path, only these extensions:
html htm css js mjs png jpg jpeg gif webp svg ico woff woff2 ttf otf; nothing under alogsfolder, no listings, no links or junctions. TheHostheader must be exactly127.0.0.1:{port}. - Translations are the only
.jsonserved:en de es fr ja ko zh_CN zh_TW+.json, only in the plugin's root, up to 1 MB. The response is not the file: it is{"Localization": {...}}, rebuilt from the file'sLocalizationobject, keeping only strings and nested objects. Without that object,404. - Responses carry
nosniff,Referrer-Policy: no-referrer,Cache-Control: no-store,Access-Control-Allow-Origin: null(modules and fonts need it) and a CSP withsandbox allow-scripts allow-forms, so the page has an opaque origin even when opened directly;default-src 'none'; scripts, styles, images, fonts and media only from the session's own path (plus inline scripts and styles, anddata:);connect-srconly this server's WebSocket and the session's own path (fetch/XMLHttpRequestunder the file rules above);form-action 'none'; andframe-ancestorsonlyhttp://localhostandhttp://127.0.0.1on the configurator's port. - Before any script of the page (right after the doctype), DroidDeck inserts a fixed script,
~droiddeck/shim.js, with no secret in it. It puts in-memory stand-ins forlocalStorageandsessionStorage(nothing is persisted) and an inertdocument.cookie, and turnswindow.openand clicks onhttp/httpslinks into the screen's ownopenUrlmessage, sent on the registered WebSocket (window.openreturnsnull; a click the page cancels withpreventDefaulton the element or document is left alone). It adds no permission to the sandbox and no command to the server. It also rewrites anew WebSocket("ws://localhost:{port}")for this server's port to127.0.0.1: the CSP, the acceptedHostand the listening address don't change (allowinglocalhostwould let the browser try[::1], where DroidDeck doesn't listen). - DroidDeck also appends a small script to the entry page that calls
connectElgatoStreamDeckSocket(port, uuid, "registerPropertyInspector", info, actionInfo)after the page loads.uuidis the session secret. The WebSocket isws://127.0.0.1:{port}withOrigin: null; the first message, within 5 s, must be the registration. One connection per session. Messages over 320 KB close it; above 50 per second (bursts of 200) reading slows down. - Accepted from the screen:
getSettings,setSettings(64 KB),getGlobalSettings,setGlobalSettings(256 KB),sendToPlugin(256 KB),openUrl(same rules as for plugins),logMessage,getResourcesandsetResources(texts stored with the button, within the limits; no file is read). Anything else is ignored, and so arecontextandaction: every message applies to the session's own button and plugin. - The screen receives
didReceiveSettings,didReceiveGlobalSettings,didReceiveResourcesandsendToPropertyInspector. The plugin receivespropertyInspectorDidAppear,propertyInspectorDidDisappear,sendToPlugin, anddidReceiveSettings/didReceiveGlobalSettings(withoutid) for changes made in the screen. - The configurator shows it in an
<iframe sandbox="allow-scripts allow-forms">, doesn't listen topostMessagefrom it, and closes it if the frame loads a second page. What the screen can't do is listed in the guide.
Live look¶
The title, image and state a plugin gives its keys are never saved in the profile. They arrive over
SignalR (and GET /api/actions/state/plugin returns the same as ReceivePluginState):
| Event | Payload |
|---|---|
ReceivePluginState |
{enabled, hold, dials, buttons: {buttonId: {slot: Look}}} (hold: true: the PC accepts holding; dials: true: it has dials): the whole state, on connect and when the feature is turned on or off. |
ReceivePluginLook |
{buttonId, slot, look}: one key changed. look: null removes it. |
ReceivePluginFeedback |
{buttonId, slot, kind}: ok or alert, to flash briefly. Not part of the state. |
slot is tap, longPress, doubleTap or active (the on-state action of a two-state button). A
Look is {plugin, action, title, image, state, showTitle, titleAlignment, titleColor, fontSize,
status, dial} (dial: see dials):
- Show the face of the
tapslot (ofactivewhile a two-state button is on, if it has one). titleis the plugin's title or the manifest's default, ornull. If the user gave the button a label, show the label instead.showTitle: falsehides the plugin's title.imageis a data URI ornull: a PNG of at most 144 × 144, a small WEBP, or a sanitised SVG (up to 128 KB). Treat it as untrusted content.statusisrunning,starting,stopped,failedorunavailable(not installed, turned off, or an action that can't run here). When it isn'trunning, the look is the manifest's default.- Each key is sent at most about 5 times a second; intermediate frames of an animation are dropped.
Action types: /api/actions¶
| Method | Path | Description |
|---|---|---|
| GET | schema |
Every action type with its title, icon, category and fields. The editor builds its form from this. |
| GET | state/{type} |
Current live state of a type (the same payload as its SignalR event). |
| GET | timer/targets |
Timer buttons another button can control. |
| GET | windows/audio-devices?kind=output\|input |
Active audio devices ({value, label}). |
The schema is the source of truth for action parameters: the app's editor builds its forms from it,
so a new action type or field shows up here first. Texts follow Accept-Language. An abridged
response:
[
{
"type": "steam",
"title": "Steam game",
"icon": "sports_esports",
"category": "System",
"privileged": false,
"stateful": false,
"editor": "steam",
"stateEvent": null,
"fields": [
{
"key": "appId",
"label": "Game",
"kind": "select",
"required": true,
"optionsSource": "/api/steam/games",
"visibleWhen": null
}
]
}
]
Integrations¶
| Prefix | Endpoints |
|---|---|
/api/discord |
POST config {clientId, clientSecret} · POST connect · GET state · GET guilds · GET channels/{guildId} · GET voice-channel · POST mute · POST deafen · GET soundboard-sounds · POST play-soundboard |
/api/obs |
POST config {host, port, password} · POST connect · GET state · GET scenes · GET audio-inputs · GET sources · GET scene-items?scene= · GET filters?source= |
/api/Soundboard |
GET search?q= · GET trending · POST play · POST stop · GET state · GET devices · GET/POST config |
/api/tuya |
POST pair/start {userCode} · POST pair/poll (410 when the QR expired) · GET state · POST connect · POST devices/refresh · POST command {deviceId, code, value} |
/api/govee |
GET devices: searches the network for Govee devices with LAN Control (about 2 s); list of {value: ip, label} |
/api/tally |
GET targets: what the tally screen can follow now, as {value, label} |
/api/companion |
GET keys: {connected, columns, rows, keys}, with the surface's current keys |
/api/integrations/{name} |
homeassistant, spotify, twitch, youtube, hue, mqtt, streamerbot, vtubestudio, vmix, companion, mairlist, radiodj. GET status {connected, configured, account, message, loginPending, userCode, verificationUri, redirectUri, fields} · POST the setup fields (connects or starts sign-in in the PC's browser) · DELETE forget the account · GET options/{list} (entities?operation=, playlists, Hue items?target=·scenes, Streamer.bot actions, vMix inputs, VTube Studio hotkeys·models) · GET callback (OAuth return, no API key) |
Responses follow the request's Accept-Language: with en, action types, field labels and error
messages come in English.
SignalR hub: /deckHub¶
Connect with ?access_token=<key>. The hub only pushes events; commands go through REST. The
exception is SetLanguage("en"), which switches the language of texts the PC builds (info button
errors). The starting language comes from ?lang=pt|en|es or, without it, from Accept-Language.
| Event | Payload |
|---|---|
ReceiveSystemStats |
{cpuUsage, ramUsage, ramTotal, ramAvailable, netUpKBps, netDownKBps, gpuUsage, disks}: every second. disks is [{name: "C:", label, totalBytes, freeBytes}], read every 30 s |
ReceiveMediaStatus |
{playing} |
ReceiveMediaState |
{sessionId, command, playing} |
ReceiveVolumeChange |
{deviceId, type, data} |
ReceiveMuteState |
{processName, muted} |
ReceiveDeckUpdate |
{profileId} |
ReceiveThemesUpdate |
{id}: a theme was installed or deleted; id is null after restoring a backup |
ReceiveLayoutUpdate |
{rows, columns} |
ReceiveDiscordState |
Connection, mute/deaf, channel, volumes, voice mode, participants |
ReceiveObsState |
Connection, current scene, recording/streaming/virtual cam/replay, scenes, audio inputs |
ReceiveTuyaState |
Connection, push, devices with status and functions |
ReceiveTuyaDeviceState |
{deviceId, status}: changed values only |
ReceiveHueState, ReceiveMqttState, ReceiveStreamerBotState, ReceiveVTubeStudioState |
{connected} (VTube Studio also sends model) |
ReceiveTimerState |
{buttonId: {mode, running, finished, elapsedMs, durationMs, count, phase, cycles}}: on every change |
ReceiveWindowsState |
{defaultOutput, defaultInput}: default audio device ids |
ReceiveAutoProfile |
{profileId, app}: profile of the focused app; profileId null when the app has none |
ReceivePlaybackState |
{playing, title}: soundboard |
ReceiveButtonToggles |
{buttonId: true}: two-state buttons that are on |
ReceiveInfoState |
{buttonId: {text, sub, code, isDay, error}}: weather, command and URL buttons |
ReceiveNowPlaying |
{title, artist, playing, thumbnailBase64} |
ReceivePluginState, ReceivePluginLook, ReceivePluginFeedback |
Experimental, see plugin live look |
ReceivePluginProfile |
Experimental: {plugin, profileId}. A plugin asked to open one of its profiles; a null profileId = go back to what was open, only if the last switch came from that plugin |
ReceiveHomeAssistantState |
{connected, entities: {id: {state, name, unit, brightness, color}}}: entities used by buttons |
ReceiveSpotifyState |
{connected, account, playing, track, artist, liked, shuffle, repeat, volume, device, coverBase64} |
ReceiveTwitchState, ReceiveYouTubeState |
{connected, account, live, viewers, title} |
On connect, the new client receives the current Discord, layout, OBS and Tuya state.
Discovery: UDP 7573¶
Send the ASCII text DroidDeckDiscoveryRequest as a broadcast to port 7573. The server answers with
{"ip": "...", "name": "<machine name>"}. Discovery never returns the API key.
Pairing URI¶
droiddeck://pair?ip=<ip>&port=4787&key=<key>