mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
The set_clock quick-fix pushed the time via POST /clockTime and reported success unconditionally. On real hardware (ST10, observed live) the firmware dispatches POST /clockTime to its read handler (HandleClockGetTime) and ignores the value: it returns 200 but the clock never moves, so the fix was a silent no-op that still claimed success. Now setSpeakerClock: - tries HTTP POST /clockTime (works on firmware that honours it), then - verifies by re-reading /clockTime; if the clock did not move, it - sets the clock over SSH (`date -u -s …`, with a BusyBox positional fallback) on an SSH-reachable speaker (root, empty password), and - verifies again. It only reports success when the clock actually changed; otherwise it returns an honest error pointing at the real root cause (the speaker can't resolve/reach NTP, so the clock is stuck — restore DNS/NTP reachability; a wrong clock breaks HTTPS/TLS). The HTTP request format itself was already correct (the device's own GET uses `utcTime`); the problem was never the payload, only that some firmware has no HTTP setter at all. Durable NTP-side fix (AfterTouch resolving/serving NTP) is tracked separately. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>