Skip to content

fix(soloist): apply Spotify-app volume changes to the zone (#344) - #355

Closed
tobsch wants to merge 1 commit into
sonn-audio:devfrom
tobsch:fix/soloist-volume-sync
Closed

tobsch wants to merge 1 commit into
sonn-audio:devfrom
tobsch:fix/soloist-volume-sync

Conversation

@tobsch

@tobsch tobsch commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #344 — root cause found and fix verified against a deterministic repro.

Diagnosis

Confirmed a bug (not by design). With Soloist, soloistPlaybackService.onEvent() never reads the volume:
updateVolume is wired only in the librespot backend (spotifyInputService.ts), and the Soloist path
forwards timing/queue/metadata but not volume.

Instrumenting onEvent and changing the app volume via the Web API shows Soloist does send it, as a
dedicated event targeted at the active device:

type=volume_changed  volume=40  zoneId=5
type=volume_changed  volume=70  zoneId=5
type=volume_changed  volume=20  zoneId=5

(The volume that also appears on every playback_state is the account-level value Connect broadcasts to
every device — zones 4/5/6/8/9 all reported volume=100 at once — so that one must not be applied, or idle
rooms follow the playing room. Only the targeted volume_changed is safe.)

Fix

Handle volume_changed in onEvent and forward to the zone, mirroring the librespot path:

if (event.type === 'volume_changed' && typeof event.volume === 'number') {
  this.controller?.updateVolume(zoneId, event.volume);
  return;
}

Verification

Web-API volume 45 → 75 → 30 on a Soloist zone (patched into the running container's dist):

  • Before: the sendspin output client stays at its default; nothing changes on the speaker.
  • After: the client logs Server set player volume: 45% / 75% / 30% — the app volume now reaches the
    speaker.

…o#344)

With Soloist, changing the volume in the Spotify app did nothing to the speaker.
Soloist emits a dedicated `volume_changed` event for the device the app targets,
but onEvent never read it — only the librespot backend wired `updateVolume`. Handle
`volume_changed` by forwarding event.volume to the zone via the controller, mirroring
the librespot path.

Only the targeted `volume_changed` is applied, not the account-level `volume` that
rides along on every `playback_state` (Connect broadcasts that to every device, so
applying it would pull idle rooms to the playing room's level).

Fixes sonn-audio#344. Verified against the deterministic repro (Web-API volume 45/75/30 on a
Soloist zone): before, the sendspin client stayed at its default; after, it logs
`Server set player volume: 45%/75%/30%`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants