-
Notifications
You must be signed in to change notification settings - Fork 102
Server
Robert Stanley Judka edited this page Feb 17, 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
- mode : string
- "Light"
- "Dark"
- color : string
- RGB (e.g "#112233")
- ARGB (e.g "#ff112233")
- color name (e.g "blue")
- curr_page : int
- index of current page
- brightness : int
- plz only send values between 76 and 255 🙂
- volume : int
- plz only send values between 0 and 100 🙂
- pageX [
X
is the page's index] : bool- page availability
- pages : array of strings
- all pages (e.g. page0, page1, page2, ...))
- not settable
send an array of keys, get an object of each key:value
let dash = new WebSocket("ws://localhost:54545");
dash.onmessage = function (event){ console.log(event.data); };
dash.send(JSON.stringify(["mode", "color"]));
{
"color": "#8bcc9f",
"mode": "Dark"
}
send an object of each key:value to update
let dash = new WebSocket("ws://localhost:54545");
dash.send(JSON.stringify({"mode": "Dark"}));