Release v1.1.0: Spotify Soloist als Empfänger, librespot als Rückfall
- soloist_api_key gesetzt (amd64/aarch64) → Spotify Soloist, sonst librespot - Soloist wird zur Laufzeit von Spotify geladen und alle 12 h aktualisiert (Builds laufen nach 90 Tagen ab) - Audio über PipeWire-Senke busch_radio → pw-record → bestehende Icecast-Pipeline - amd64/aarch64 auf Debian-Basis (glibc für Soloist), 32-Bit bleibt Alpine - Build-Fix: librespot auf Commit 99b6088 gepinnt, Browse-to-Patch an neuen Code angepasst - README, DOCS und CHANGELOG überarbeitet Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CGNdWh2jLNNb3tb9v1WEuK
This commit is contained in:
1 parent
95aac1d809
commit
99c910f488
10 files changed
+402
-114
No files matched your search
@@ -16,12 +16,20 @@ Das **Busch-Jäger Unterputz-Internetradio** kann nur Internetradio-Streams absp
|
||||
|
||||
## Lösung
|
||||
|
||||
Dieses Home Assistant Add-on erstellt ein virtuelles Spotify Connect-Gerät ([librespot](https://github.com/librespot-org/librespot)) und stellt das Audio als MP3- oder AAC-Stream über Icecast bereit.
|
||||
Dieses Home Assistant Add-on erstellt ein virtuelles Spotify Connect-Gerät und stellt das Audio als MP3- oder AAC-Stream über Icecast bereit.
|
||||
|
||||
Als Spotify-Empfänger dient ab Version 1.1.0 **[Spotify Soloist](https://developer.spotify.com)**, Spotifys offizieller Client für Linux.
|
||||
Ohne Soloist-API-Key (und auf 32-Bit-Geräten) läuft weiterhin **[librespot](https://github.com/librespot-org/librespot)** als Rückfall.
|
||||
|
||||
> **Warum Soloist?** Spotify verweigert librespot seit 2025/26 bei vielen Konten die Audio-Schlüssel.
|
||||
> Im Log erscheint dann bei jedem Titel `error audio key 0 1` und es bleibt still
|
||||
> ([librespot #1649](https://github.com/librespot-org/librespot/issues/1649)). Mit Soloist tritt das nicht auf.
|
||||
|
||||
### Funktionsweise
|
||||
|
||||
```
|
||||
Spotify-App → [Spotify Connect] → librespot → PCM → ffmpeg → Icecast2 → HTTP-Stream → Busch-Jäger Radio
|
||||
Spotify-App → [Spotify Connect] → Soloist → PipeWire → pw-record ─┐
|
||||
librespot (Rückfall) ───────────┴→ PCM → ffmpeg → Icecast → Busch-Jäger Radio
|
||||
```
|
||||
|
||||
---
|
||||
@@ -31,7 +39,9 @@ Spotify-App → [Spotify Connect] → librespot → PCM → ffmpeg → Icecast2
|
||||
| Anforderung | Details |
|
||||
|---|---|
|
||||
| Home Assistant | OS, Supervised oder Container |
|
||||
| Spotify Premium | Pflicht für Spotify Connect |
|
||||
| Spotify Premium | Pflicht für Spotify Connect und für den Soloist-API-Key |
|
||||
| Architektur | Soloist: amd64 oder aarch64 (z. B. Raspberry Pi 4/5 mit 64-Bit-OS); 32-Bit nur librespot |
|
||||
| Internet | Soloist wird beim Start von Spotify geladen und alle 12 h aktualisiert |
|
||||
| Busch-Jäger Radio | Muss benutzerdefinierte Stream-URLs unterstützen |
|
||||
|
||||
---
|
||||
@@ -55,9 +65,23 @@ stream_format: "mp3" # mp3 oder aac
|
||||
stream_port: 8000 # HTTP-Port des Streams
|
||||
stream_mount: "/stream" # URL-Pfad
|
||||
icecast_password: "geheim" # Icecast-Passwort (bitte ändern)
|
||||
soloist_api_key: "" # Soloist-API-Key (leer = librespot)
|
||||
```
|
||||
|
||||
### 3. Add-on starten & Spotify autorisieren
|
||||
### 3a. Mit Soloist (empfohlen)
|
||||
|
||||
1. Im [Spotify-for-Developers-Dashboard](https://developer.spotify.com/dashboard) mit dem **Premium-Konto** anmelden
|
||||
2. Im Bereich **Soloist API Key** einen Schlüssel erzeugen
|
||||
3. Schlüssel in `soloist_api_key` eintragen, speichern, Add-on (neu) starten
|
||||
4. Im Log steht `Empfänger : soloist`
|
||||
5. Spotify-App öffnen (Handy **im selben Netz** wie Home Assistant) und **„Busch-Radio"** als Gerät wählen.
|
||||
Beim ersten Mal meldet sich Soloist dabei mit deinem Konto an, danach bleibt die Anmeldung gespeichert.
|
||||
|
||||
Der Schlüssel ist persönlich: nicht weitergeben, nicht in Logs oder Issues posten.
|
||||
Mit der Nutzung von Soloist gelten die Nutzungsbedingungen von Spotify. Soloist ist **nicht** im Add-on enthalten
|
||||
(Spotify erlaubt keine Weitergabe), sondern wird beim Start direkt von Spotify geladen.
|
||||
|
||||
### 3b. Mit librespot (Rückfall, ohne API-Key)
|
||||
|
||||
Beim **ersten Start** erscheint im Log:
|
||||
|
||||
@@ -120,7 +144,7 @@ Dann unter **Einstellungen → Integrationen → Busch-Radio Spotify Bridge** ei
|
||||
|
||||
| URL | Funktion |
|
||||
|---|---|
|
||||
| `http://<ha-ip>:5589` | Einrichtungs-Assistent (OAuth) |
|
||||
| `http://<ha-ip>:5589` | Einrichtungs-Assistent (OAuth, nur librespot) |
|
||||
| `http://<ha-ip>:8000/stream` | Stream-URL für das Radio |
|
||||
| `http://<ha-ip>:8000` | Icecast-Statusseite |
|
||||
|
||||
@@ -132,23 +156,29 @@ Dann unter **Einstellungen → Integrationen → Busch-Radio Spotify Bridge** ei
|
||||
|
||||
| Komponente | Funktion |
|
||||
|---|---|
|
||||
| [librespot](https://github.com/librespot-org/librespot) main | Spotify Connect Client (PCM-Ausgabe via Pipe) |
|
||||
| Spotify Soloist | Offizieller Spotify Connect Client, spielt in eine PipeWire-Senke (amd64/aarch64) |
|
||||
| [PipeWire](https://pipewire.org) + WirePlumber | Virtuelle Senke `busch_radio`, `pw-record` greift sie als PCM ab |
|
||||
| [librespot](https://github.com/librespot-org/librespot) main | Rückfall: Spotify Connect Client (PCM-Ausgabe via Pipe) |
|
||||
| [ffmpeg](https://ffmpeg.org) | PCM → MP3/AAC Transkodierung |
|
||||
| [Icecast](https://icecast.org) | HTTP-Stream-Server |
|
||||
|
||||
### Signalfluss
|
||||
|
||||
```
|
||||
Spotify CDN → librespot (dekodiert, PCM auf stdout)
|
||||
Soloist: Spotify → Soloist → PipeWire-Senke "busch_radio" → pw-record (PCM auf stdout)
|
||||
librespot: Spotify → librespot (dekodiert, PCM auf stdout)
|
||||
→ silence-injector (hält Stream bei Pause aufrecht)
|
||||
→ ffmpeg -re (Echtzeit-Encoding → MP3/AAC)
|
||||
→ ffmpeg (Encoding → MP3/AAC; bei librespot mit -re für Echtzeit)
|
||||
→ Icecast (HTTP-Stream)
|
||||
→ Busch-Jäger Radio
|
||||
```
|
||||
|
||||
### Hinweise zum Build
|
||||
|
||||
- librespot wird aus dem Quellcode kompiliert (Rust, ~10–15 Min.)
|
||||
- amd64/aarch64 nutzen ein Debian-Basisimage (Soloist braucht glibc ≥ 2.38), 32-Bit bleibt Alpine
|
||||
- librespot wird aus dem Quellcode kompiliert (Rust, ~10–15 Min.), statisch gelinkt – läuft auf beiden Basisimages
|
||||
- Soloist liegt in `/data/soloist/bin`; Builds laufen nach 90 Tagen ab, das Add-on lädt rechtzeitig neue
|
||||
und wechselt, sobald gerade nichts spielt
|
||||
- Der OAuth-Callback-Server bindet an `0.0.0.0` statt `127.0.0.1`, damit der Browser-Login aus dem Heimnetz funktioniert
|
||||
- Credentials werden in `/data/librespot-cache/` persistent gespeichert
|
||||
|
||||
@@ -158,7 +188,10 @@ Spotify CDN → librespot (dekodiert, PCM auf stdout)
|
||||
|
||||
| Problem | Lösung |
|
||||
|---|---|
|
||||
| „Busch-Radio" erscheint nicht in Spotify | Einrichtungs-Seite öffnen: `http://<ha-ip>:5589` |
|
||||
| Jeder Titel wird übersprungen, Log zeigt `error audio key 0 1` | Spotify verweigert librespot für dieses Konto → Soloist-API-Key eintragen (ab 1.1.0) |
|
||||
| „Busch-Radio" erscheint nicht in Spotify (Soloist) | Handy im selben Netz wie HA? Im Log `Empfänger : soloist` und `Soloist wird gestartet` prüfen |
|
||||
| `Soloist konnte nicht geladen werden` | Internetzugang von HA prüfen; das Add-on fällt solange auf librespot zurück |
|
||||
| „Busch-Radio" erscheint nicht in Spotify (librespot) | Einrichtungs-Seite öffnen: `http://<ha-ip>:5589` |
|
||||
| Stream nicht erreichbar | Icecast-Status prüfen: `http://<ha-ip>:8000` |
|
||||
| Stream bricht bei Pause ab | Auf Version 1.0.11+ aktualisieren |
|
||||
| Songs wechseln zu schnell | Auf Version 1.0.10+ aktualisieren |
|
||||
@@ -172,12 +205,15 @@ Spotify CDN → librespot (dekodiert, PCM auf stdout)
|
||||
```
|
||||
busch-radio-spotify/
|
||||
├── busch_radio_spotify/ # Home Assistant Add-on
|
||||
│ ├── Dockerfile # Multi-Stage Build (Rust + Alpine)
|
||||
│ ├── Dockerfile # Multi-Stage Build (Rust → Debian bzw. Alpine)
|
||||
│ ├── config.yaml # Add-on Manifest & Optionen
|
||||
│ ├── build.yaml # Multi-Arch Konfiguration
|
||||
│ ├── DOCS.md # Add-on Dokumentation (in HA angezeigt)
|
||||
│ ├── run.sh # Startup-Script
|
||||
│ ├── oauth_helper.py # OAuth-Einrichtungs-Assistent (Port 5589)
|
||||
│ ├── oauth_helper.py # OAuth-Einrichtungs-Assistent (Port 5589, librespot)
|
||||
│ ├── soloist-fetch.sh # Lädt/aktualisiert Spotify Soloist
|
||||
│ ├── pipewire/ # PipeWire-Senke für Soloist
|
||||
│ ├── wireplumber/ # WirePlumber ohne Hardware/D-Bus
|
||||
│ ├── icon.png # Add-on Icon (Store)
|
||||
│ └── logo.png # Add-on Logo (Detailseite)
|
||||
├── custom_components/ # Optionale HA Integration
|
||||
@@ -195,7 +231,9 @@ busch-radio-spotify/
|
||||
|
||||
## Rechtliche Hinweise
|
||||
|
||||
- Dieses Projekt nutzt **librespot**, eine Open-Source-Reimplementierung des Spotify-Clients
|
||||
- **Spotify Soloist** ist Software von Spotify; sie wird nicht mit diesem Projekt verteilt, sondern direkt von Spotify geladen.
|
||||
Dieses Projekt ist nicht mit Spotify verbunden.
|
||||
- Als Rückfall nutzt das Projekt **librespot**, eine Open-Source-Reimplementierung des Spotify-Clients
|
||||
- Audio wird **nicht gespeichert** – ausschließlich live gestreamt
|
||||
- Ausschließlich für den **privaten Heimgebrauch** gedacht
|
||||
- **Spotify Premium** ist für Spotify Connect erforderlich
|
||||
|
||||
Reference in new issue
Block a user