mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
Commit history from `7204e619decc48df5dee91d18470934b50e389ac` to `f9b5ad3129831086b02bdf20a197ff4e2d098e2d`: https://github.com/gesellix/Bose-SoundTouch-API/compare/7204e619decc48df5dee91d18470934b50e389ac...f9b5ad3129831086b02bdf20a197ff4e2d098e2d * f9b5ad3 - Tobias Gesellchen, 2026-02-07 : Rename module to gesellix/bose-soundtouch-api and update related files * 5b3dbbb - Tobias Gesellchen, 2026-02-07 : docs: translate PLAN.md to English and fix preferredLanguage typo in marge.go * 696b9c9 - Tobias Gesellchen, 2026-02-07 : feat(discovery): fetch serial number from speaker info if missing in discovery and update datastore tests * 8ed78f0 - Tobias Gesellchen, 2026-02-07 : Consolidate proxy and main service on port 8000 and update related tests and UI * 0e3abbb - Tobias Gesellchen, 2026-02-07 : feat(go): lowercase guessed hostnames for URL consistency * ca1091f - Tobias Gesellchen, 2026-02-07 : feat(health): add health endpoint with VCS build information * a432d53 - Tobias Gesellchen, 2026-02-07 : Rename mock token to soundcork-local-token and add documentation * 3b5ee2f - Tobias Gesellchen, 2026-02-07 : Implement Phase 10: Stats API, Device Event Log, and advanced Marge functions * bc96033 - Tobias Gesellchen, 2026-02-06 : chore * c77864b - Tobias Gesellchen, 2026-02-06 : Document Golang header normalization behavior and ensure generic header casing preservation in proxy * a54e7e7 - Tobias Gesellchen, 2026-02-06 : Ensure ETag header preserves casing (uppercase 'T') for case-sensitive devices * 6265fbe - Tobias Gesellchen, 2026-02-06 : update dockerfile to be in sync with go.mod * 5290bad - Tobias Gesellchen, 2026-02-06 : Implement proxy logging settings UI and complete Phase 8 quick wins (ETags, DataStore initialization) * d7aa7f7 - Tobias Gesellchen, 2026-02-06 : Update PLAN.md with recent features and Phase 8 Upstream Parity tasks * c8ae5e2 - Tobias Gesellchen, 2026-02-06 : Enhance Bose SoundTouch migration with proxying, remote services persistence, and improved diagnostics * c53fa00 - Tobias Gesellchen, 2026-02-06 : Implement remote services persistence check and UI improvements for Bose SoundTouch migration * ea5c348 - Tobias Gesellchen, 2026-02-02 : Ignore soundcork-go/data directory and include recent datastore fixes * d162892 - Tobias Gesellchen, 2026-02-02 : Complete Phase 7: Automated Setup & UI refactoring. Implemented programmatic SSH/migration logic, added device discovery endpoints, created Web UI for speaker management, and refactored UI to use external HTML with Go embed. * b528016 - Tobias Gesellchen, 2026-02-01 : Add GitHub workflow to publish Docker image to GHCR and update Dockerfile * 2ee03da - Tobias Gesellchen, 2026-02-01 : Add GitHub Actions workflow for Go CI and update PLAN.md * 439e2a9 - Tobias Gesellchen, 2026-02-01 : Refactor Go implementation: extract handlers and tests into dedicated files, add comprehensive unit and HTTP tests * c0698fb - Tobias Gesellchen, 2026-02-01 : Add Docker telnet example and update IP consistency in documentation * 028a02e - Tobias Gesellchen, 2026-02-01 : Fix older port number in README * 264829d - Tobias Gesellchen, 2026-02-01 : Add setup-speaker.sh and update documentation to match issue #59 * 64306f9 - Tobias Gesellchen, 2026-02-01 : Implement device presets endpoint in Go * b98a602 - Tobias Gesellchen, 2026-02-01 : Implement Phase 4: Datastore and Marge logic in Go * b6e1bc9 - Tobias Gesellchen, 2026-02-01 : Implement Phase 3: BMX Streaming and Service Registry in Go * f1b3dcf - Tobias Gesellchen, 2026-02-01 : Port core models and constants to Go * 9eae655 - Tobias Gesellchen, 2026-02-01 : Implement static file serving for /media in Go * cc73e50 - Tobias Gesellchen, 2026-02-01 : Fix Go service accessibility and improve Docker configuration * e356bdd - Tobias Gesellchen, 2026-02-01 : Initialize Go migration: Phase 1 infrastructure, proxy-first routing, and root endpoint
2.4 KiB
2.4 KiB
SoundTouch Service
The soundtouch-service is a companion service for Bose SoundTouch devices. It provides:
- A REST API for device management and discovery.
- Emulation of Bose backend services (BMX and Marge), allowing devices to work without an active internet connection to Bose servers.
- A logging proxy for inspecting device communication.
- A web interface for management.
Installation
go install github.com/gesellix/bose-soundtouch/cmd/soundtouch-service@latest
Running the Service
Simply run the binary:
soundtouch-service
Configuration
The service can be configured via environment variables:
| Variable | Description | Default |
|---|---|---|
PORT |
Port to bind the service to | 8000 |
BIND_ADDR |
Network interface to bind to | all (ip4 and ip6) |
DATA_DIR |
Directory for persistent data (devices, stats) | ./data |
SERVER_URL |
External URL of this service | http://<hostname>:8000 |
REDACT_PROXY_LOGS |
Set to false to show sensitive data in proxy logs |
true |
LOG_PROXY_BODY |
Set to true to log full request/reponse bodies |
false |
API Endpoints
Discovery & Setup
GET /setup/devices: List all discovered Bose devices.POST /setup/discover: Trigger a new network scan.GET /setup/info/{deviceIP}: Get detailed info for a specific device.POST /setup/migrate/{deviceIP}: Configure a device to use this service as its backend.
BMX (Bose Music eXperience)
GET /bmx/registry/v1/services: Service registry for the device.GET /bmx/tunein/v1/playback/station/{stationID}: TuneIn playback bridge.
Marge (Account & Device Management)
GET /marge/streaming/sourceproviders: List of available music services.GET /marge/accounts/{account}/full: Mock account information.GET /marge/updates/soundtouch: Mock software update endpoint.
Proxy
GET /proxy/{targetURL}: Proxy requests through the service with logging.
Web Interface
Access the management interface at http://localhost:8000/. The interface allows you to view discovered devices and manage their settings.
Persistent Data
By default, the service creates a data/ directory in the current working directory. This directory contains:
default/devices/: Configuration and state for each discovered device.usage_stats.json: Logged device usage statistics.error_stats.json: Logged device errors.