Logitech Squeezebox - examples of how to use the API in HA

Thank you… it worked…

I ran into a related problem and wrote a long read about it with examples of how to use the LMS API in HA. Maybe it can help you.

How to play random mix from a specific folder using Home Assistant

1 Like

Hello everyone,

Plz guide how to sort a playlist by title using homeassistant service call?

Hi @python, i just implemented the HA Squeezebox integration and connected it to my LMS. This seems to be working fine.
But currently i’m missing “Favorites” and “My Apps”. I see in your screenshot that you were able to add “Favourites”. Can you help me how to achieve this.
I’m new to HA so only
experience via the web console so far.

I have no idea why would you miss favourites, i have not done anything special to see it.

What you see in the screenshot is not the Home-Assistant gui but the LMS material desktop gui.

1 Like

OK, i got confused, it’s clear now.

In HA i see this when i let the LMS plugin add the different players and i select one:

And in here, if i select “Browse Media (Blader door Media)” i cannot see my LMS “favorites” or “my apps” like i have on the players or via SqueezePlay.

Anyone using the HA LMS integration knows if this is possible?

No at the moment lms favorites are not supported.
There is a featurerequest and here to do so.

Would you mind sharing your code for playing from Favorites? I’m failing to get this to work.

alias: BBC Radio 6 Music
sequence:
  - action: squeezebox.call_method
    target:
      entity_id: media_player.office
    data:
      command: favorites
      parameters:
        - play
        - BBC Radio 6 Music
description: ""

For anyone interested and using the BBC Sounds App in LMS. I achieved the desired result by creating a script and then using a button to call the script

alias: BBC Radio 6 Music
sequence:
  - action: squeezebox.call_method
    target:
      entity_id: media_player.office
    data:
      command: playlist
      parameters:
        - play
        - >-
          sounds://_LIVE_bbc_6music
description: ""
2 Likes

Hey. To use favorites, I do this in my automation:

action:
  - data:
      command: favorites
      parameters:
        - playlist
        - play
        - item_id:0

Item 0 being the first in the list. Works perfectly.

3 Likes

FYI - I added favorites support to the media browser in HA last month

1 Like

I’ve seen it and using it. A big thanks!

We’ll have a new Search action soon as well that allows you to search various items - e.g. Albums, Artists etc., including favorites as well.

1 Like

We have a PR in now to add search and play actions. Subject to approval, but fingers crossed for 2024.12

1 Like

Any news on that?
Is it possible to combine: search via Alexa (voice) => HA => LMS-Addon => Squeezebox?

Sadly, not much. PR Add simplified actions for searching and playing to Squeezebox by peteS-UK · Pull Request #129858 · home-assistant/core is still waiting… Once it’s done, it’ll give you an action (aka service) to search, so there’s no reason you shouldn’t be able to call the action from whatever.

This is fantastic. Is it possible to search the Spotty plugin for artists and albums?

No, it’s just searching the database so just what you already have. Of course, if you’ve included content from spotify already into your db (your albums etc.), they’ll be searched, but not actually searching spotify.

What we need for that is for the media browser to have a search UI. I’ve got another PR Add support for Apps and Radios to Squeezebox Media Browser by peteS-UK · Pull Request #135009 · home-assistant/core to add Apps and Radios to the media browser. So, you’ll be able to browse spotify, but not search because the media browser currently doesn’t have any searching UI.

Awesome, thanks for the response!!!