Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Nov 2020
    Posts
    14

    Home Assistant Squeezebox Integration Breaking Change

    The boffins at Home Assistant HQ decided a couple of versions ago to pull their many media player integrations under one roof. Unfortunately for us, we won't be able to perform a call method or query directly from Home Assistant and will have to use their commands directly from the HA interface. But the absolutely worst aspect of this vandalism is that we'll have to use media player join and unjoin instead of LMS sync and unsync commands. The down shot of which is that if you join two squeezeboxes in a Home Assistant Automation for, say, when you leave one room with music playing and enter another with the music following you via an LMS sync, it won't sync them up until the next track starts playing...

    This means that those of us who like nothing better than to have Sasha following us around the apartment spinning his vibes at us on weekends with a three-hour long set, like some invisible sonic wizard, can't do it anymore. The sync capabilities of the Squeezebox simply aren't being matched by the tech that has come after it and we are all the poorer for it.

    Booooo! Why must great things be made sucky? Why? WHY?!?

  2. #2
    Quote Originally Posted by malpeli View Post
    Unfortunately for us, we won't be able to perform a call method or query directly from Home Assistant and will have to use their commands directly from the HA interface.
    I'm not a Home Assistant developer, but I have to say from my understanding that this is simply untrue - the squeezebox.call_method and squeezebox.call_query services are not being deprecated as part of this change. You will still be able to use these services in scripts and automations.

    Quote Originally Posted by malpeli View Post
    we'll have to use media player join and unjoin instead of LMS sync and unsync commands. The down shot of which is that if you join two squeezeboxes in a Home Assistant Automation for, say, when you leave one room with music playing and enter another with the music following you via an LMS sync, it won't sync them up until the next track starts playing...
    I've already changed my sync/unsync commands in my scripts and automations to the new join/unjoin commands, and I have to say that this is not my experience at all - synchronisation of players via Home Assistant seems to be working just as it ever was. I don't know this for sure, but my impression is that these new commands still call the same procedures via the JSON-RPC API under the integration's hood. In any case, you could always test this by sending a sync command via the squeezebox.call_method service if you prefer.

  3. #3
    Senior Member
    Join Date
    Mar 2011
    Posts
    268
    ...as i'm using home assistant but not extensively, can you point out, what to do or link to an how to?

  4. #4
    Quote Originally Posted by mamema View Post
    can you point out, what to do
    Well it really depends what you want to do. At the most basic level, adding the Squeezebox integration to Home Assistant allows you to add any of your players to the HA dashboards, display what's playing, control playback, control playlists (shuffle, repeat), and with the addition of the Mini Media Player custom card, sync and unsync players through the frontend.

    But after that, given that the integration allows you to access the Squeezebox JSON-RPC API through its services, the possibilities are endless. For example, I've added buttons to my dashboards to play favourite radio stations, start a SugarCube or Bliss mix, search for a random album from my Discogs collection and then play it, add all the other tracks on the album for a currently playing song, or as with the OP, have a playlist follow me around the house. I have 2 Squeezebox radios which, depending on whether one or both are on, will switch between playing as a stereo pair (left + right channel), or as single stereo player, via a HA automation which detects each player's state. Finally, with all this set up, it means I can also control it all via voice commands (I use Rhasspy to link with Home Assistant, but it's also possible with Alexa or Google).

    This has taken me a while to set up, but has usually started with me thinking of something specific that I would like to automate derived from regular use patterns or wanting to make something more convenient. I then develop a script or automation to achieve it, and in the process have learned a lot about scripting, templating and so on. The HA forums have been an excellent resource whenever I've (frequently) got stuck.

    I hope this is helpful as a start, but I'd be more than happy to share experiences if there's a specific idea that you'd like to achieve.

  5. #5
    Senior Member
    Join Date
    Mar 2007
    Posts
    422
    I created an automation in Home Assistant to shutdown my receiver when the attached Touch had been inactive for a while so that would be my biggest connection.

    The integration has grown quite a bit. I was glad to see it can now add and remove players dynamically instead of only what it saw when started.

    My biggest gripe is that you can't see favorites or dynamically list them, so I have to call radio stations manually or have them playing when I create a scene.

  6. #6
    Quote Originally Posted by sander View Post
    you can't see favorites or dynamically list them
    You could write a script that would dynamically populate an input_select with all your LMS favorites (or a subset of them), which you could automate to keep the list updated. From there, another script could play a given favorite depending on the value selected in the input_select. I've got working examples of this if you would like pointers.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •