Skip to content

Commit

Permalink
fix: Support for notification queue
Browse files Browse the repository at this point in the history
  • Loading branch information
svrooij committed Jan 19, 2021
1 parent fd5a917 commit 4db74f5
Show file tree
Hide file tree
Showing 5 changed files with 197 additions and 147 deletions.
28 changes: 28 additions & 0 deletions docs/control/5-notifications-and-tts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Notification are automatically managed by the application. It will return playba
## Play a mp3

To play a short music file as a notification send the following payload to command topic.
You can send multiple notifications after each other, and they will be played after each other.

Topic: `sonos/uuid_of_speaker/control`

Expand All @@ -33,6 +34,28 @@ Payload:
}
```

### Experimental notification queue

There is a second implementation of the notification queue, that you can use with the following command.
You should not mix them, but you we are curious to what you [think](https://github.com/svrooij/node-sonos-ts/issues/119)

Topic: `sonos/uuid_of_speaker/control`

Payload:

```json
{
"command": "notifytwo",
"input": {
"trackUri": "https://cdn.smartersoft-group.com/various/pull-bell-short.mp3",
"onlyWhenPlaying": false,
"timeout": 10,
"volume": 8,
"delayMs": 700
}
}
```

### Play notification on all speakers

You can also have a notification play on all groups (all devices that coordinate themself), just send the following message to `sonos/cmd/notify`.
Expand Down Expand Up @@ -90,6 +113,11 @@ Have a speaker speak by sending the following to `sonos/uuid_of_speaker/control`
}
```

### Experimental tts queue

There is a second implementation of the notification queue (used by TTS), just change `speak` to `speaktwo` in the above command.
You should not mix them, but you we are curious to what you [think](https://github.com/svrooij/node-sonos-ts/issues/119)

### Text to speech on all speakers

Send this payload to `sonos/cmd/speak` to play it on all groups. Same parameters as above.
Expand Down
Loading

0 comments on commit 4db74f5

Please sign in to comment.