mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
Closes the AfterTouch-side half of issue #234. After a factory reset the speaker's /sources only lists the always-on local entries (AUX, BLUETOOTH, AIRPLAY, NOTIFICATION, QPLAY, plus a SpotifyConnectUserName placeholder); TUNEIN, LOCAL_INTERNET_RADIO, DEEZER, and linked Spotify accounts are absent until the device receives the <sourcesUpdated/> notification the reporter ran by hand. SyncDeviceData now POSTs that notification as the final step, so users get the visible-source-list recovery for free when they click Data Sync. The other half — re-creating Marge.xml so playback resumes — is already handled by the wizard's pair-account flow: it detects an empty <margeAccountUUID/> in /info and prompts the user to pick a known account or generate a new one. The wizard's pairing UI is deliberately user-driven (the user picks the ID); the notification nudge is purely automatic because there's no choice to make. Implementation routes through the existing client surface rather than reinventing it. setup.notifySpeakerSourcesUpdated delegates to pkg/client.Client.NotifySourcesUpdated — the same path handlers_mgmt.go already uses after music-service account changes (handlers_mgmt.go:304, :637). The wire shape lives in one place (pkg/models.NewSourcesUpdatedNotification). Fire-and-forget: a notification failure logs but doesn't fail the sync. Adjacent UX changes: - docs/guides/TROUBLESHOOTING.md: new section "Presets flash then revert to 'Select a preset' after a factory reset". Names the symptom, the Marge.xml + reduced-/sources cause, and walks the user through re-opening the Migration tab + Data Sync. - pkg/service/handlers/web/js/script.js: devices list now renders a "⚠ Not paired — re-pair" badge in the account-ID column for speakers whose live /info reports an empty margeAccountUUID. Clicking it opens the Migration tab pre-filled with that device, surfacing the wizard's existing "Not paired (factory-reset or never paired)" flow without making users discover it cold. - pkg/service/testing/fakespeaker/testdata/info.xml: demo speaker now reports margeAccountUUID=1234567 instead of the misleading 0000000 (which AfterTouch happens to accept as syntactically valid but is not a documented sentinel anywhere — the convention is empty for factory-reset, a real 7-digit number otherwise, matching pkg/client/testdata/info_response_st{10,20}.xml). Screenshots regenerated accordingly. Test scaffolding: - fakespeaker grows a POST /notification recorder that captures body + Content-Type; tests assert on s.Notifications(). - TestIssue234_FactoryResetSpeakerSyncsReducedSources now drives SyncDeviceData end-to-end (exercises the wiring) and asserts the notification fires with the right deviceID and shape. - TestFakeSpeakerNotificationRecorder pins the recorder contract and the POST-only method gate. Refs #234. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bose SoundTouch Toolkit Documentation
Welcome to the documentation for the Bose SoundTouch Toolkit. This comprehensive toolkit helps you keep your Bose SoundTouch speakers functional even after the Bose Cloud shutdown in May 2026, with enhanced local management and monitoring capabilities.
🚀 Start Here
For New Users
- Complete Migration Guide - Step-by-step guide from Bose Cloud to local control
- Getting Started - Quick introduction to the toolkit
For Existing Users
- Cloud Shutdown Survival Guide - Prepare for the May 2026 shutdown
- Backup Tool - Back up your cloud account and speaker data before shutdown
- SoundTouch Service Guide - Advanced service configuration
📋 Essential Documentation
The documentation is organized into three main categories:
1. User Guides - For everyday users migrating and managing devices
2. Technical Reference - For developers and advanced configuration
3. Concept Documentation - For contributors and system architects
🗂 Documentation Structure
🗂 User Guides
Migration & Setup
- Complete Migration Guide - 📖 Main guide for migrating from Bose Cloud
- Cloud Shutdown Survival Guide - Prepare for service shutdown
- Migration & Safety Guide - Advanced migration strategies
- Initial Device Setup - First-time device configuration
- Raspberry Pi Setup - Installing on Raspberry Pi
Daily Management
- SoundTouch Service Guide - Service operation and maintenance
- Troubleshooting - Common issues and solutions
- HTTPS Setup - Secure connections
- Deployment Guide - Production deployments
Advanced Features
- MAC Address Mapping - Device identification
- CLI Reference - Command-line tools
- Backup Tool - Cloud account and speaker data backup
- IoT Implementation Guide - IoT integrations
- MQTT Integration Design - MQTT setup
📚 Technical Reference
API Documentation
- API Endpoints - REST API reference
- Spotify Account Addition - Technical requests for Spotify
- WebSocket Events - Real-time events
- Zone Management - Multi-room control
- Preset Management - Preset operations
Analysis & Research
- Upstream URLs - Bose service endpoints
- Device Redirect Methods - Migration techniques
- IoT Configuration Analysis - Device configurations
- IoT Config Summary - Configuration summaries
Device Lifecycle & Network Independence
- Device Lifecycle and /power_on Enhancement - Complete analysis of device registration and network independence improvements
- /power_on Implementation Guide - Technical implementation details for enhanced device management
🏗 Concept Documentation
Enhanced Service Architecture
- Concept Overview - High-level architecture vision
- Upstream Service Simulation - Complete concept design
- Implementation Plan - Development roadmap
- Technical Specification - Detailed specifications
Development Planning
- Implementation Roadmap - Project phases and milestones
💡 Quick Reference
Common Tasks
- Migrate first device: Follow Migration Guide Step 5
- Check device health: Dashboard → Devices → [Device Name] → Health Status
- Backup configuration: Dashboard → Settings → Backup → Create Backup
- Add new device: Dashboard → Devices → Discover Devices → Register
Getting Help
- Issues & Bugs: GitHub Issues
- Questions & Discussion: GitHub Discussions
- Documentation: Check troubleshooting guides first
- Community: Share experiences and help others
For a complete list of all documents, see the Summary.