mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 09:06:14 +00:00
Prompted by writing a #614 self-test guide (on-device install walkthrough) and by helping fully revert a real speaker a factory reset didn't fully clean up. New soundtouch-cli commands (cmd/soundtouch-cli/cmd_setup.go): - `setup sync` — wraps POST /api/setup/sync/{deviceId}, the same operation as the web UI's Devices -> Sync Data button. Read-only towards the speaker (presets/recents/sources into the datastore); never writes back. - `setup revert` — wraps setup.Manager.RevertMigration, the same operation as the web UI's "Revert to Defaults" button. Restores SoundTouchSdkPrivateCfg.xml/hosts/resolv.conf from their .original backups and strips the AfterTouch CA cert from the trust bundle. No --service-url needed; pure SSH against the speaker. Deliberately leaves SSH persistence and account pairing untouched, matching the web UI button (use `setup remote-services --remove` / `account unpair` for those). Both are thin wrappers with no new business logic, matching the existing migrate/pair/reboot pattern. Tests added for setup sync's HTTP plumbing (auth-retry, device-scoped URL, error propagation); no CLI-level test for setup revert, consistent with reboot/migrate/pair also having none -- RevertMigration itself is already tested in pkg/service/setup/setup_test.go. Documentation gaps closed: - ON-DEVICE-INSTALL-WALKTHROUGH.md never showed the Migrate step at all -- jumped from install/reboot straight to the pairing QuickFix as if the speaker were already pointed at itself. Added an explicit Migrate step (web-UI and CLI paths), a CLI alternative for the pairing QuickFix, a no-USB-stick `enable-ssh` (#471) alternative to the physical stick procedure, and a "testing a pre-release build" section for cross- compiling and manually swapping an unreleased binary (soundtouch-cli deploy step included, mirroring the already-covered soundtouch-service swap). - MIGRATION-GUIDE.md's "never use localhost" Target Domain warning had no on-device exception, even though loopback is exactly correct there since the speaker and the service are the same machine. Added the callout, and the same enable-ssh alternative to its SSH-enablement step. - DEVICE-INITIAL-SETUP.md's AP-mode Wi-Fi provisioning commands were macOS-only (networksetup, dns-sd) with no Linux/Windows equivalents, unlike the rest of the docs. Added nmcli/netsh wlan alongside. - CLI-REFERENCE.md's entire `setup <subcommand>` group was undocumented (--help was the only reference) -- wrote a full "Setup & Migration" section covering all 16 subcommands, and added the also-undocumented `account unpair` to the existing Music Service Account Management section.