mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 17:16:16 +00:00
A speaker with a wrong clock fails TLS to any HTTPS host because the certificate appears not-yet-valid or expired (the CURL ErrorCode 60 seen in #345, where the failing speaker had a wrong clock, the only one of several speakers that was off, with a failing NTP sync; these speakers default to the year 2000 at boot until NTP succeeds). Nothing surfaced this before. The check reads each speaker's /clockTime and compares its UTC epoch to the service's epoch. Using the epoch (ClockTime.GetUTC, not GetTime) keeps the comparison timezone-independent. Tiers: under 60s no finding; 60s-5m info; 5m-24h warning; 24h-or-more, or a time outside the year 2000..2100 plausibility window, error. Findings note a stale or missing NTP sync. A set_clock quick-fix on the warning and error findings pushes the current time to the speaker via POST /clockTime (client.SetClockTime). That call is plain HTTP on :8090, so it works regardless of the speaker's wrong clock or TLS state. It is a band-aid: if NTP is still failing the clock drifts again and resets on reboot, so the confirm dialog and success message point at restoring time sync as the durable fix. An SSH set-clock fallback is left for later since the HTTP path is confirmed on firmware 27. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>