I have a Marantz M-CR610 which is recognised as a media_player by HA, courtesy of the DLNA/UPnP LMS plugin.
I have a Favourite set up in LMS to play Radio 2 Live - this is the URL that gets used if I click on this Favourite to play Radio 2 on the Marantz:
I have previously used this type of script to play a favourite, but when I try this (with a Favourite called “Radio 2 LIVE”) the syntax is not accepted
sequence:
- data:
entity_id: media_player.marantz_m_cr610
command: favorites
parameters:
- playlist
- play
- Radio 2 LIVE
action: squeezebox.call_method
to search for a particular one. The item id returned will be something like id: aa134ee3.0. You can use the whole thing, or just the bit after the . item_id:aa134ee3.0 and item_id:0 are the same.
Thanks for the code. When I try to run it I get a message telling me that I need to have a target defined. I’ve tried adding my media_player as a target (see below) but got this error:
This action requires a target, please define a target 'entity_id', 'device_id', or 'area_id' under 'target:' or 'data:'
Nothing gets played on the selected media player (or any other media player that I try).
I’m guessing that favourites should be numbered from 0 upwards, so I don’t understand why this command doesn’t work
???
What’s the result of the query? Have tried doing this from developer tools/actions. Does that list the marantz as available for call_method - I assume it must be else you’d be getting an error
Anything in the log? If not, turn on the debug log, run the command turn it off again - the log is very chatty so just look at the time you’re running the command and see if there’s anything there.
OK - as before, what’s in the query response. Also, when you say nothing in the HA log, there is surely lots of stuff in there - the integration is very chatty. Maybe no errors, but you should be seeing lots of messages
Sorry - where can I find the query response? I can’t see this anywhere in the Actions section of the Developer UI.
There is literally nothing in the HA log relating to the squeezebox command that I’m executing. Thousands of ZHA log entries, but nothing for squeezebox.
EDIT: Ooops sorry there was a single line:
WARNING (MainThread) [homeassistant.helpers.service] Referenced entities media_player.marantz_m_cr610 are missing or not currently available
I get the same message whichever media player I try
Aahh…I think I’ve stumbled upon the solution. I reloaded the LMS integration and that command now works on my media player. Must’ve been a glitch with the integration.
Many thanks for your help with this.