mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
feat: improve Bose SoundTouch parity, Spotify integration, and data
reliability
- Update XML marshaling for ServicePreset and ServiceRecent to match
Bose parity requirements.
- Add support for adding music sources via
`/streaming/account/{account}/source`.
- Implement HandleBoseAccountToken for Spotify OAuth code exchange and
token persistence.
- Implement atomic file writes in the datastore to prevent data
corruption.
- Add startup logic to initialize default sources for existing devices.
- Expand test coverage with new parity regression and Spotify
integration tests.
---------
Co-authored-by: Junie <junie@jetbrains.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
46 lines
3.8 KiB
Markdown
46 lines
3.8 KiB
Markdown
# Parity Analysis: Bose-SoundTouch (Go) vs. OpenCloudTouch (Python)
|
|
|
|
This document provides a comparative analysis of the current Go implementation and the `scheilch/opencloudtouch` project, identifying functional gaps and potential improvements.
|
|
|
|
## 1. Core Architecture and Language
|
|
- **Bose-SoundTouch (Go)**: A high-performance, strongly typed backend with a CLI and background service. Focuses on full API coverage, parity testing, and robust hardware control (DSP, zones).
|
|
- **OpenCloudTouch (OCT)**: A modern full-stack application (FastAPI + React/TypeScript). Prioritizes user experience with a web-based setup wizard and a clean abstraction for internet radio.
|
|
|
|
## 2. Functional Comparison
|
|
|
|
| Feature | Bose-SoundTouch (Go) | OpenCloudTouch (Python) |
|
|
|:------------------------|:-----------------------------------------------------------|:------------------------------------------------------------------------|
|
|
| **Setup Experience** | CLI-driven or manual API calls for migration (SSH, XML). | Web-based **Setup Wizard** guides through SSH, backup, and redirection. |
|
|
| **Radio Support** | Static integration of **RadioBrowser** and TuneIn. | Dynamic **RadioBrowserAdapter** with automatic **API Failover**. |
|
|
| **Commercial Services** | Deep integration (Spotify priming, Pandora, Deezer, etc.). | Basic support, focus is on local content and radio. |
|
|
| **Hardware Control** | Extensive (Bass, Treble, Soundbar levels, Clock display). | Basic playback and zone controls. |
|
|
| **Cloud Emulation** | High-fidelity parity (mirroring, discrepancy logging). | Functional emulation for local preset/recent persistence. |
|
|
| **Notifications** | Built-in **TTS** and custom URL audio alerts. | Not a primary focus. |
|
|
|
|
## 3. Key Strengths of OpenCloudTouch
|
|
- **Guided Onboarding**: The setup wizard reduces the entry barrier for non-technical users significantly.
|
|
- **Resilient Radio**: The API failover for RadioBrowser ensures continuous service even if specific community-hosted API instances go offline.
|
|
- **Modern API Stack**: Uses OpenAPI and generated TypeScript types for a seamless frontend integration.
|
|
- **Provider Abstraction**: A cleaner internal separation between the "Bose World" (XML/BMX) and external content providers (RadioBrowser).
|
|
|
|
## 4. Suggested Improvements for Bose-SoundTouch
|
|
|
|
### A. Web-based Setup Wizard (High Priority)
|
|
- Implement a state-driven wizard in the `soundtouch-service` to handle:
|
|
- SSH activation (checking `/remote_services` via USB).
|
|
- Automated backup of speaker configuration.
|
|
- Verification of DNS/Hosts redirection.
|
|
- Expose this via a simple embedded Web UI (using Go's `embed` package).
|
|
|
|
### B. RadioBrowser Failover (Medium Priority)
|
|
- Adapt the failover logic from OCT:
|
|
- Periodically refresh the list of available RadioBrowser API servers.
|
|
- Implement a retry mechanism that switches servers on 5xx errors or timeouts.
|
|
|
|
### C. External Service Abstraction (Medium Priority)
|
|
- Refactor the hardcoded BMX logic into a more modular **Provider System** (see `EXTERNAL-SERVICES-ABSTRACTION.md`).
|
|
- This will allow easier addition of new sources (e.g., local DLNA, generic M3U playlists) without touching the core BMX handlers.
|
|
|
|
## 5. Summary
|
|
While our Go project provides the most complete technical coverage of SoundTouch hardware and commercial services, OpenCloudTouch sets a higher standard for **user onboarding** and **service resilience** for community-driven content. Integrating a setup wizard and a more robust radio backend would make our project significantly more accessible and reliable.
|