mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-28 17:57:05 +02:00
Update v2_0_0.md
This commit is contained in:
parent
3ce22da8f4
commit
85151a5a5d
1 changed files with 7 additions and 3 deletions
|
@ -1,8 +1,9 @@
|
|||
Snapcast JSON RPC Control API
|
||||
=============================
|
||||
Snapcast can be controlled with a [JSON-RPC 2.0](http://www.jsonrpc.org/specification) API over a raw TCP-Socket interface on port 1705.
|
||||
|
||||
Single JSON Messages are new line delimited ([ndjson](http://ndjson.org/)).
|
||||
For simple tests you can fire JSON commands on a telnet connection and watch Notifications:
|
||||
For simple tests you can fire JSON commands on a telnet connection and watch Notifications coming in:
|
||||
|
||||
```json
|
||||
$ telnet localhost 1705
|
||||
|
@ -17,8 +18,11 @@ Escape character is '^]'.
|
|||
{"jsonrpc":"2.0","method":"Client.OnConnect","params":{"client":{"config":{"instance":1,"latency":0,"name":"","volume":{"muted":false,"percent":74}},"connected":true,"host":{"arch":"x86_64","ip":"127.0.0.1","mac":"00:21:6a:7d:74:fc","name":"T400","os":"Linux Mint 17.3 Rosa"},"id":"00:21:6a:7d:74:fc","lastSeen":{"sec":1488065507,"usec":820050},"snapclient":{"name":"Snapclient","protocolVersion":2,"version":"0.11.0-beta-1"}},"id":"00:21:6a:7d:74:fc"}}
|
||||
```
|
||||
|
||||
In the following the supported Requests and Notifications are described. The client that sends a "Set" command, will receive a Response while others will receive a Notification "On" event.
|
||||
Clients should call `Server.GetStatus` to get the complete picture.
|
||||
In the following the supported Requests and Notifications are described.
|
||||
|
||||
The client that sends a "Set" command, will receive a Response while others will receive a Notification "On" event.
|
||||
Clients should call `Server.GetStatus` to get the complete picture.
|
||||
|
||||
The Server JSON object contains a list of Groups and Streams. Every Group holds a list of Clients and a reference to a Stream. Clients, Groups and Streams are referenced in the "Set" commands by their `id`.
|
||||
|
||||
### Example JSON objects
|
||||
|
|
Loading…
Add table
Reference in a new issue