Skip to content

Commit d0f1479

Browse files
committed
docs: Modified some links
1 parent 6e2b934 commit d0f1479

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

.github/ISSUE_TEMPLATE/config.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions
4+
url: https://github.com/svrooij/sonos-api-docs/discussions/categories/q-a
5+
about: Please ask and answer questions here.
6+
- name: All discussions
7+
url: https://github.com/svrooij/sonos-api-docs/discussions
8+
about: General discussions about the Sonos API.

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ You can use the generator to generate your own discovery files, but we also have
4545

4646
These files together with the documentation file, are combined to a extensive JSON file, that is used as an input for the generator.
4747

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+
4852
## Contributors ✨
4953

5054
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

docs/developers.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For example [this part](https://github.com/svrooij/sonos-api-docs/blob/25aad3a3a
5555

5656
We build a custom [generator](https://github.com/svrooij/sonos-api-docs/tree/main/generator/sonos-docs) to do several things.
5757

58-
### Discover services from sonos speaker
58+
### Discover services from Sonos speaker
5959

6060
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.
6161

@@ -74,9 +74,11 @@ npm install
7474
./bin/run services {sonos-ip}
7575
```
7676

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+
7779
### Combine discovery files and documentation
7880

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.
8082

8183
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.
8284
Being able to inspect this json file should really help in debugging the generator.
@@ -101,7 +103,7 @@ npx @svrooij/sonos-docs combine --docsFile=./docs/documentation.json --folder=./
101103

102104
### Regenerate documentation
103105

104-
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.
105107

106108
The resulting files, are **not to be changed manually**, since changes will get lost upon the next generation.
107109

@@ -135,7 +137,7 @@ The template.json file gives some basic information about the template, the auth
135137
1. File usage `index`, will use the data from intermediate.json as input to produce **one file**.
136138
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**.
137139

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/).
139141

140142

141143
```bash

docs/index.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This file has a [documentation json schema](https://sonos.svrooij.io/schema/docu
3838

3939
### Update documentation
4040

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:
4242

4343
```shell
4444
# Go to generation folder
@@ -55,7 +55,7 @@ npm run docs
5555

5656
## Generator
5757

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.
5959

6060
### Device discovery files
6161

@@ -84,9 +84,7 @@ The template.json also has a [json schema](https://svrooij.io/sonos-api-docs/sch
8484

8585
## Community
8686

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.
9088

9189
## Contributors ✨
9290

docs/sonos-communication.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Each sonos speaker has [several soap services]({{'services/' | relative_url }})
2121
## Sonos SOAP remarks
2222

2323
- 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.
2525

2626
## SOAP call
2727

@@ -33,7 +33,7 @@ In this sample we described the [SetMute]({{ '/services/rendering-control.html#s
3333
| ---- | ------ |
3434
| IP of speaker | `192.168.0.31` |
3535
| [Control endpoint]({{'/services/rendering-control.html#service-data' | relative_url }}) | `/MediaRenderer/RenderingControl/Control` |
36-
| Service type | `urn:schemas-upnp-org:service:RenderingControl:1`
36+
| Service type | `urn:schemas-upnp-org:service:RenderingControl:1` |
3737

3838
You can find this information on the page describing one of [many sonos services]({{'/services/' | relative_url }}).
3939

@@ -50,7 +50,7 @@ soapaction: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
5050
Content-Type: text/xml; charset="utf-8"
5151
```
5252

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.
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.
5454

5555
```xml
5656
<?xml version="1.0" encoding="utf-8"?>
@@ -82,15 +82,13 @@ Success message (without output parameters) to above command:
8282
Generic error (when deleting an alarm that doesn't exists) body (HTTP status code 500):
8383

8484
```xml
85-
<s:Envelope
86-
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
85+
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
8786
<s:Body>
8887
<s:Fault>
8988
<faultcode>s:Client</faultcode>
9089
<faultstring>UPnPError</faultstring>
9190
<detail>
92-
<UPnPError
93-
xmlns="urn:schemas-upnp-org:control-1-0">
91+
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
9492
<errorCode>800</errorCode>
9593
</UPnPError>
9694
</detail>
@@ -117,7 +115,7 @@ Apart from the soap services, sonos also has some http endpoints available where
117115
## Auto discovery
118116

119117
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.
121119

122120
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:
123121

0 commit comments

Comments
 (0)