Lyrion Media Server "[pysqueezebox.server] Query run on unknown player"

I am trying to create a script to play a Dynamic Playlist from my Lyrion Media Server on my Google Nest Hub Max (I am using the LMS Dynamic Playlists plug-in). The Nest Hub Max is connected to my LMS server using the Castbridge plug-in. The name of my dynamic playlist is random1.

I have been advised (at the LMS forum) that the LMS CLI command to play a Dynamic Playlist Should be:
CLIENT_ID dynamicplaylist playlist play dplcustom_random1

This is my script:

alias: Kitchen Music
sequence:
  - action: squeezebox.call_method
    metadata: {}
    data:
      parameters: playlist play dplcustom_random1
      command: dynamicplaylist
    target:
      entity_id: media_player.kitchen_display_2

When I run the script I get this error in the HA log:

[pysqueezebox.server] Query run on unknown player cc:cc:fe:1b:e0:e1

…but I have verified the ID of the player in the LMS interface:
lms_player

Any idea (a) why the player might be “unknown”, and (b) whether the syntax for my script is correct?

You’ve actually come across a slightly misleading error message. LMS tends to react to an unknown query by dropping the connection, which is similar to what it does if you specify an unknown player. So, what it’s actually likely saying here is that the command you’re sending is wrong. Try testing it via telnet perhaps?

Thanks for that - worth knowing for the future. I’ve was eventually directed to the correct syntax for my script:

alias: Kitchen Music
mode: single
icon: mdi:music
sequence:
  - data:
      command: dynamicplaylist
      parameters:
        - playlist
        - play
        - dplccustom_random1
    target:
      entity_id: media_player.kitchen_display_2
    action: squeezebox.call_method

The above works well for me.

Glad you got it sorted. I’ll put in a PR to make the error message a bit more descriptive.