This commit is contained in:
@@ -12,6 +12,8 @@ Everything fits on one screen:
|
||||
- **Ungroup** either room again, or all of them at once
|
||||
- **Change the AVR's input**, listed under the names you gave them, minus the sources you deleted in the AVR's setup menu
|
||||
- **Resume Spotify** on a room from either account (the reverse of connecting to it from the Spotify app) — labeled with the familiar names you gave them, e.g. Fifou's or Clarita's. Optional, see [Spotify](#configure-spotify-optional) below
|
||||
- **Disconnect Spotify** again by tapping the bordered button — the account playing there: it pauses that account and signs the speaker out of it, so the music stops and the room belongs to nobody until someone claims it
|
||||
- **Hand a room over** by tapping the other account: a speaker belongs to one Spotify account at a time, so the panel signs it in to the other one over the LAN — the same thing picking the room in the Spotify app does — and resumes there
|
||||
|
||||
## The kit it assumes
|
||||
|
||||
@@ -108,7 +110,7 @@ Spotify dropped native, browsable HEOS integration years ago — it is Connect-o
|
||||
This needs Spotify Premium and a one-time login, since Spotify has no way to grant that without a human approving it once.
|
||||
|
||||
1. Create an app at the [Spotify Developer dashboard](https://developer.spotify.com/dashboard) (any name), and add this Redirect URI in its settings: `http://127.0.0.1:8899/callback`. Spotify allows plain `http` for a `127.0.0.1` redirect specifically, which is why the login below needs no HTTPS setup.
|
||||
2. While the app is in development mode, Spotify only lets accounts you have listed log in to it: add both accounts' email addresses under the app's **User Management**.
|
||||
2. While the app is in development mode, Spotify only serves accounts you have listed: add both accounts' email addresses under the app's **User Management**.
|
||||
3. Run the one-time login once per account, from a machine with a browser (your laptop is fine — it doesn't have to be the Pi):
|
||||
|
||||
```bash
|
||||
@@ -146,7 +148,8 @@ Used by the interface:
|
||||
| `GET /api/avr/inputs` | your renamed sources, over HEOS |
|
||||
| `POST /api/avr/input` | `{"code": "inputs/aux_in_1"}` |
|
||||
| `GET /api/spotify/devices?account=account1` | every Spotify Connect receiver that account currently sees (needs [Spotify](#configure-spotify-optional) configured) |
|
||||
| `POST /api/spotify/resume` | `{"target": "lego_room", "account": "account1"}` — transfers that account's current playback there and resumes it |
|
||||
| `POST /api/spotify/resume` | `{"target": "lego_room", "account": "account1"}` — transfers that account's current playback there and resumes it, signing the speaker in to that account first if another one has it |
|
||||
| `POST /api/spotify/disconnect` | `{"target": "lego_room", "account": "account1"}` — pauses that account and signs the speaker out of it over the LAN, which stops the music too |
|
||||
|
||||
## Demo/Tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user