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

Spent a while today trying to figure out how to play a specific album…took a bit of testing to figure out how to specify the parameters. The documentation for the CLI under “Playlist Commands and Queries” says

<playerid> playlist loadalbum <genre> <artist> <album>

The "playlist loadalbum" command puts songs matching the specified genre artist and album criteria on the playlist. Songs previously in the playlist are discarded.

Examples:

Request: "04:20:00:12:23:45 playlist loadalbum Rock Abba *<LF>"
Response: "04:20:00:12:23:45 playlist loadalbum Rock Abba *<LF>"

This is the format of the automation action that works for me:

action:
  - service: squeezebox.call_method
    data:
      entity_id: media_player.picoreplayer
      command: playlist
      parameters:
        - loadalbum
        - Rock # genre
        - Eagles # artist
        - 'The Very Best Of' # album
  - service: squeezebox.call_method
    data:
      entity_id: media_player.picoreplayer
      command: playlist
      parameters:
        - play
mode: single

The loadalbum command clears the queue and adds the album specified; there is also an addalbum command to append to the bottom of the queue without changing what is already there.

Hope that’s helpful to someone :slight_smile:

2 Likes