mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
Closes #195 and #269. Both issues reported the same symptom on freshly-paired speakers: AUX selection and preset playback failed post-pair, while /sources at :8090 still reported the sources as READY. The bug was upstream in AfterTouch's cloud-side responses. Real Bose's /streaming/account/{a}/full never emitted AUX as a cloud <source>. Verified across 61 captured upstream /full bodies covering 4669 source elements: zero match sourceproviderid=9 (AUX), zero match the literal string "AUX". Captures sample at scripts/android/captures/var/lib/soundtouch-service/parity_mismatches/. The captured speakers are SoundTouch 20s which do have physical AUX inputs — Bose deliberately kept AUX out of /full and let the speaker enumerate it locally via isLocal=true. AfterTouch's getAccountSources unconditionally included AUX (id=10001) with the wrong shape: a displayName="AUX IN" attribute (real Bose: never), <name>AUX</name> (real Bose: empty), an empty <credential> (real Bose: empty for INTERNET_RADIO providerid=2 only, never present for AUX since AUX wasn't there). The speaker's source- reconciliation logic treated AfterTouch's malformed AUX entry as a cloud-side inconsistency and refused dispatch to AUX — even though the local availability check kept reporting it READY. This was the actual cause behind a long red-herring trail (TPDA :30034 storm, IoT.xml/AVS bootstrap, userAuthToken shape, SETUP state machine bracket). All of those are universal across the firmware family; spotty has the same TPDA storm in logread and AUX still works there. Only the cloud-source-list shape diverged between working and broken speakers. The filter applies in getAccountSources because both AccountFullToXML and AccountSourcesToXML go through it. AUX stays in GetDefaultSources for non-cloud consumers (web UI source picker, default-sources init). Three handler tests updated to assert AUX is intentionally excluded from cloud responses. Verified by gesellix on rhino 2026-05-16 via full factory-reset → wifi-push → setup pair → AUX press → audio plays. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>