home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.74k stars 30.46k forks source link

Problem playing media with ROON #128874

Open Punisa1 opened 2 days ago

Punisa1 commented 2 days ago

The problem

Hello, I have a problem playing media with integrated Roon.

This simple script throw "Unknown error" when I run it:

action: media_player.play_media target: entity_id: media_player.roon data: media_content_id: "mysong.mp3" media_content_type: "music"

Same script works great if I use a different player, for example Kodi. Also, I can control pause, next track etc. in Roon from HA, just not load the media... Tried many things, nothing helped (install, deinstall, different versions, local media, direct url media...) Both Roon and HA are on my Synology NAS. I checked logs, didn't find anything useful.

What version of Home Assistant Core has the issue?

core-2024.10.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Roon

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 days ago

Hey there @pavoni, mind taking a look at this issue as it has been labeled with an integration (roon) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `roon` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign roon` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


roon documentation roon source (message by IssueLinks)

pavoni commented 2 days ago

Roon doesn't produce or usemedia_ids like many other players - so you can't use either a file name or a media id. What you want to play needs to be in the roon library - and you need to specify a roon path to it. This is described here https://www.home-assistant.io/integrations/roon/

For example to play the album Harvest by Neil Young you should set media_content_id to Library/Artists/Neil Young/Harvest and to play BBC Radio 4 you would set media_content_id to My Live Radio/BBC Radio 4

I'm surprised you're not seeing a useful error in the HA logs, I'd expect the roon component to be telling you your media path is invalid.

If needed you can turn up the log level for the roon component and library as described here:

https://www.home-assistant.io/integrations/logger/

You will need.

    homeassistant.components.roon: debug
    roonapi: debug