AmpliPi icon indicating copy to clipboard operation
AmpliPi copied to clipboard

Add volume sync between Spotify and AmpliPi

Open SteveMicroNova opened this issue 1 month ago • 6 comments

What does this change intend to accomplish?

Make it so that Spotify side volume changes are reflected in AmpliPi and vice-versa

Checklist

  • [x] Have you tested your changes and ensured they work?
  • [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [x] If applicable, have you updated the CHANGELOG?
  • [x] Does your submission pass linting & tests? You can test on localhost using ./scripts/test
  • [x] Have you written new tests for your core features/changes, as applicable?

SteveMicroNova avatar Oct 31 '25 19:10 SteveMicroNova

This branch depends on #1064 to function in the field

SteveMicroNova avatar Nov 06 '25 20:11 SteveMicroNova

I'd like to take note that we stress tested this earlier with multiple people playing tug of war with the volume slider using a Spotify jam and the underlying Spotify stream failed before the script did, according to the logs

It's unclear how the underlying stream failed, and perhaps this is solved with the bump from go-librespot 0.5.0 to 0.5.2, but it's hard to say until we put it through another office-wide stress test (I simply am not able to input enough changes myself even though I am able to create a multi account jam session)

SteveMicroNova avatar Nov 07 '25 20:11 SteveMicroNova

One thing that we should do is test what the update speed is by logging all of the requests. Realistically we may want to limit the response to 10Hz or something just to avoid overwhelming the Spotify and amplipi APIs.

On Fri, Nov 7, 2025, 15:32 Steven Engelbert @.***> wrote:

SteveMicroNova left a comment (micro-nova/AmpliPi#1063) https://github.com/micro-nova/AmpliPi/pull/1063#issuecomment-3504803329

I'd like to take note that we stress tested this earlier with multiple people playing tug of war with the volume slider using a Spotify jam and the underlying Spotify stream failed before the script did, according to the logs

It's unclear how the underlying stream failed, and perhaps this is solved with the bump from go-librespot 0.5.0 to 0.5.2, but it's hard to say until we put it through another office-wide stress test (I simply am not able to input enough changes myself even though I am able to create a multi account jam session)

— Reply to this email directly, view it on GitHub https://github.com/micro-nova/AmpliPi/pull/1063#issuecomment-3504803329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEZPO5DKNURRH5V2T2M4B333T6W5AVCNFSM6AAAAACKZX53CCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMBUHAYDGMZSHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

linknum23 avatar Nov 08 '25 19:11 linknum23

Note that the vol sync will not work on systems that are effected by #1067, which are all systems that reboot while playing a persistent stream

SteveMicroNova avatar Dec 05 '25 17:12 SteveMicroNova

Volume is out of sync and stopped changing from spotify. I think this needs a little more testing.

Screenshot_20251207-191104.png

Screenshot_20251207-190720.png

linknum23 avatar Dec 08 '25 00:12 linknum23

Changing volume via amplipis app still works when it goes out of sync

linknum23 avatar Dec 08 '25 00:12 linknum23