You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+4
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,10 @@ You can use the generator to generate your own discovery files, but we also have
45
45
46
46
These files together with the documentation file, are combined to a extensive JSON file, that is used as an input for the generator.
47
47
48
+
## Community
49
+
50
+
If you have any [questions](https://github.com/svrooij/sonos-api-docs/discussions/categories/q-a) or you want to [show](https://github.com/svrooij/sonos-api-docs/discussions/categories/show-and-tell) your Sonos integration. Please join us in the [discussions](https://github.com/svrooij/sonos-api-docs/discussions) tab on this repository.
51
+
48
52
## Contributors ✨
49
53
50
54
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
Copy file name to clipboardexpand all lines: docs/developers.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ For example [this part](https://github.com/svrooij/sonos-api-docs/blob/25aad3a3a
55
55
56
56
We build a custom [generator](https://github.com/svrooij/sonos-api-docs/tree/main/generator/sonos-docs) to do several things.
57
57
58
-
### Discover services from sonos speaker
58
+
### Discover services from Sonos speaker
59
59
60
60
You can use the generator to generate [device discovery files]({{ '/#device-discovery-files' | relative_url }}). For each model we generated a discovery json, as available on main page. We generate this file by parsing the device discovery document available at `http://{sonos_ip}:1400/xml/device_description.xml`. Not every model has the same services, but it seems that if a service is available it's the same as all other models that have that service.
61
61
@@ -74,9 +74,11 @@ npm install
74
74
./bin/run services {sonos-ip}
75
75
```
76
76
77
+
Please help us out occasionally by running this command on your own Sonos speaker and send us the resulting file. This way we can keep the discovery files up to date. This command will automatically update the discovery files in the `data` folder. These files are used as an input for the generator. Having up to date discovery files will help us to keep the documentation up to date. All personal identifiable information is removed from the discovery files.
78
+
77
79
### Combine discovery files and documentation
78
80
79
-
If you changed the [documentation.json](#documentation.json) file or if you added/updated discovery files, you need to combine the two into one file, the **.cache/combined.json** file.
81
+
If you changed the [documentation.json](./documentation.json) file or if you added/updated discovery files, you need to combine the two into one file, the **.cache/combined.json** file.
80
82
81
83
This file is the result of the the manual documentation and the device discovery files. This file is almost 8000 lines of json at the moment, which is why it is ignored in git.
82
84
Being able to inspect this json file should really help in debugging the generator.
Once you generated the **combined.json** file, you can use the generator to (re)generate the [service documentation]({{ '/services' | relative_url }}). This step is mandatory if you changed either the **documentation.json** or if you added/updated one of the discovery files.
106
+
Once you generated the **combined.json** file, you can use the generator to (re)generate the [service documentation]({{ '/services' | relative_url }}). This step is mandatory if you changed either the **documentation.json** or if you added/updated one of the discovery files.
105
107
106
108
The resulting files, are **not to be changed manually**, since changes will get lost upon the next generation.
107
109
@@ -135,7 +137,7 @@ The template.json file gives some basic information about the template, the auth
135
137
1. File usage `index`, will use the data from intermediate.json as input to produce **one file**.
136
138
2. File usage `service`, will use the data from each service to produce **one file per service**, be sure to use `{snService}` or `{service}` in the **outputFile**.
137
139
138
-
Be sure to check out the [docs template](https://github.com/svrooij/sonos-api-docs/tree/main/generator/sonos-docs/templates/docs) to get started. Or the [ts template](https://github.com/svrooij/sonos-api-docs/tree/main/generator/sonos-docs/templates/ts), which is used to generate [sonos-ts](https://svrooij.io/node-sonos-ts/).
140
+
Be sure to check out the [docs template](https://github.com/svrooij/sonos-api-docs/tree/main/generator/sonos-docs/templates/docs) to get started. Or the [ts template](https://github.com/svrooij/node-sonos-ts/tree/master/.generator/ts), which is used to generate [Sonos typescript](https://sonos-ts.svrooij.io/).
Copy file name to clipboardexpand all lines: docs/index.md
+3-5
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ This file has a [documentation json schema](https://sonos.svrooij.io/schema/docu
38
38
39
39
### Update documentation
40
40
41
-
If you change the [documentation](#manual-documentation-file) file or if you did service discovery for a new device. You can update the documentation files with the following commands:
41
+
If you change the [documentation](#manually-documented) file or if you did service discovery for a new device. You can update the documentation files with the following commands:
42
42
43
43
```shell
44
44
# Go to generation folder
@@ -55,7 +55,7 @@ npm run docs
55
55
56
56
## Generator
57
57
58
-
You can find the generator [here](https://github.com/svrooij/sonos-api-docs/tree/main/generator/sonos-docs) and use it to generate your own sonos client in your preferred language.
58
+
You can find the generator [here](https://github.com/svrooij/sonos-api-docs/tree/main/generator/sonos-docs) and use it to generate your own Sonos client in your preferred language.
59
59
60
60
### Device discovery files
61
61
@@ -84,9 +84,7 @@ The template.json also has a [json schema](https://svrooij.io/sonos-api-docs/sch
84
84
85
85
## Community
86
86
87
-
[![Join us on Discord][badge_discord]][link_discord]
88
-
89
-
If you need help building an app that talks to your sonos speakers, or you want to share some of your findings. [Join us on Discord][link_discord].
87
+
If you have any [questions](https://github.com/svrooij/sonos-api-docs/discussions/categories/q-a) or you want to [show](https://github.com/svrooij/sonos-api-docs/discussions/categories/show-and-tell) your Sonos integration. Please join us in the [discussions](https://github.com/svrooij/sonos-api-docs/discussions) tab on this repository.
Copy file name to clipboardexpand all lines: docs/sonos-communication.md
+6-8
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Each sonos speaker has [several soap services]({{'services/' | relative_url }})
21
21
## Sonos SOAP remarks
22
22
23
23
- Sonos communicates booleans as `1` for true and `0` for false. This is something to keep in mind if you see **boolean** somewhere.
24
-
- Some actions (like [ListAlarms]({{'services/alarm-clock.html#listalarms' | relative_url }})) return encoded xml as string. Before you can read these, you'll have to decode them and then parse them as XML. Libraries like [node-sonos-ts](https://svrooij.io/node-sonos-ts/sonos-device/services/alarm-clock-service.html#listalarms) provide a way that already parses the the output so you don't have to.
24
+
- Some actions (like [ListAlarms]({{'services/alarm-clock.html#listalarms' | relative_url }})) return encoded xml as string. Before you can read these, you'll have to decode them and then parse them as XML. Libraries like [node-sonos-ts](https://sonos-ts.svrooij.io/sonos-device/services/alarm-clock-service.html#listalarms) provide a way that already parses the the output so you don't have to.
25
25
26
26
## SOAP call
27
27
@@ -33,7 +33,7 @@ In this sample we described the [SetMute]({{ '/services/rendering-control.html#s
The body of the request has to be specified as XML. We also added the correct action body for the `SetMute` action. As you see below, booleans are converted to `1` for true and `0` for false. This is just how sonos works.
53
+
The body of the request has to be specified as XML. We also added the correct action body for the `SetMute` action. As you see below, booleans are converted to `1` for true and `0` for false. This is just how Sonos works.
@@ -117,7 +115,7 @@ Apart from the soap services, sonos also has some http endpoints available where
117
115
## Auto discovery
118
116
119
117
Each sonos speaker can be discovered by the [SSDP](https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol) or **Simple Service Discovery Protocol**.
120
-
In short each speaker listens for a `ssdp:discovery` command.
118
+
In short each speaker listens for a `ssdp:discovery` command.
121
119
122
120
Which is actually just a simple UDP packet send to port `1900` on multicast address `239.255.255.250` and `255.255.255.255` with the following body:
0 commit comments