Server for discovering and controlling media play back on Lithe Audio Wifi speakers written in Deno
NOTE: This is an unofficial project.
Lithe Audio Wifi Speakers Deno
Following the instructions for installing Deno.
To run the Lithe Audio Command Server run deno run --allow-net --unstable index.ts --port 3333
This will start the server on port 3333.
Port 6811 will also need to be open for uPnP.
- --allow-net TCP connection to the lithe audio speaker and uPnP.
- --unstable Deno.listenDatagram for upd connections is an unstable api at time on of writing (Deno 1.1.0)
You get: A list of speakers with the uuid as key, name and host address of the speaker
Request:
GET /
Successful Response:
HTTP/1.1 200 OK
{
count: number
speakers: [uuid: string]: {
name: string;
host: string;
},
}
You get: Status of the speaker with track name
Request:
GET /{uuid}
Successful Response:
HTTP/1.1 200 OK
{
name: string;
host: string;
uuid: string;
status: {
...
}
}
You get: volume number on success
Request:
GET /{uuid}/volume
Successful Response:
HTTP/1.1 200 OK
{
name: string;
host: string;
uuid: string;
volume: number
}
You get: volume number on success You send: path with volume number 0-100 error if validation fails
Request:
POST /{uuid}/volume/{number}
Successful Response:
HTTP/1.1 200 OK
{
name: string;
host: string;
uuid: string;
volume: number
}
You get: success message
Request:
POST /{uuid}/play
Successful Response:
HTTP/1.1 200 OK
{ response: 'success' }
You get: success message
Request:
POST /{uuid}/pause
Successful Response:
HTTP/1.1 200 OK
{ response: 'success' }
You get: success message
Request:
POST /{uuid}/stop
Successful Response:
HTTP/1.1 200 OK
{ response: 'success' }
You get: success message
Request:
POST /{uuid}/previous
Successful Response:
HTTP/1.1 200 OK
{ response: 'success' }
You get: success message
Request:
POST /{uuid}/next
Successful Response:
HTTP/1.1 200 OK
{ response: 'success' }
You get: success message
Request:
POST /{uuid}/reboot
Successful Response:
HTTP/1.1 200 OK
{ response: 'success' }