-
Notifications
You must be signed in to change notification settings - Fork 101
Server
Robert Stanley Judka edited this page Mar 3, 2021
·
17 revisions
Accepts WebSocket connections on port 54545 (thats 0xD511
[DSH] in decimal)
This service is disabled by default. It can be toggled on the Settings Page under the Main tab
allows you to read and modify the current state
- mode : string => string
- "Light"
- "Dark"
- color : string => string
- RGB (e.g "#112233")
- ARGB (e.g "#ff112233")
- color name (e.g "blue")
- page : int => int
- index of active page
- brightness : int => int
- plz only set between 76 and 255 🙂
- volume : int => int
- plz only set between 0 and 100 🙂
- pageX [
X
is the page's index] : bool => object(bool, string)- page availability and name
- only availability is settable
- pages : array of bool => array of object(bool, string, string)
- availability, key, and name of all pages
- only availability is settable
allows you to perform an action (most likely modifying the current state in the process)
- cycle_page : => int
- decrease_brightness : => int
- increase_brightness : => int
- decrease_volume : => int
- increase_volume : => int
send an array of keys, get an object of each key:value
action keys will perform the designated action, then return the modified state
keys can be a mix of state/action
let dash = new WebSocket("ws://localhost:54545");
dash.onmessage = function (event){ console.log(event.data); };
dash.send(JSON.stringify(["mode", "cycle_page", "color"]));
{
"color": "#8bcc9f",
"cycle_page": 1,
"mode": "Dark"
}
send an object of each key:value to update, get each updated key:value
only supported for state keys
let dash = new WebSocket("ws://localhost:54545");
dash.send(JSON.stringify({"mode": "Light"}));
{
"mode": "Light"
}