New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easy Fix for a bug related to TIDAL library playback in the Roon Integration #50599
Comments
@Divadeer Thanks for the bug report. As you thought that error is produced when the browsing code reaches a point where it doesn't find anything that roon describes as an What the code should do is pick the first action if one isn't specified, so the default in your case should be `Play Now'. What I suspect is happening is it isn't quite reaching the end of the path correctly. Could you experiment with removing 'Play Now' but leaving the training If that works I should improve the error message in that case (and fix the documentation). |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->Doesn’t appear to fix it. Throws the error Playback request for music / TIDAL/Your Favorites/Tracks/Lights/ / ['TIDAL', 'Your Favorites', 'Tracks', 'Lights', ''] was unsuccessfulI tried adding the ‘/’ to both the left hand side, before TIDAL, and the right hand side, after Lights, both with and without quotations, and it failed to play. That is:Paths that don’t work: media_content_id: /TIDAL/Your Favorites/Tracks/Lights media_content_id: TIDAL/Your Favorites/Tracks/Lights/ media_content_id: “/TIDAL/Your Favorites/Tracks/Lights” media_content_id: “TIDAL/Your Favorites/Tracks/Lights/” media_content_id: TIDAL/“Your Favorites”/Tracks/Lights media_content_id: TIDAL/“Your Favorites”/Tracks/Lights/Paths that work: media_content_id: TIDAL/Your Favorites/Tracks/Lights/Play Now media_content_id: “TIDAL/Your Favorites/Tracks/Lights/Play Now” Sent from Mail for Windows 10 From: Greg DowlingSent: Thursday, May 13, 2021 5:11 PMTo: home-assistant/home-assistant.ioCc: Divadeer; MentionSubject: Re: [home-assistant/home-assistant.io] Easy Fix for a bug related to TIDAL library playback in the Roon Integration (#17828) @Divadeer Thanks for the bug report.As you thought that error is produced when the browsing code reaches a point where it doesn't find anything that roon describes as an action.What the code should do is pick the first action if one isn't specified, so the default in your case should be `Play Now'.What I suspect is happening is it isn't quite reaching the end of the path correctly.Could you experiment with removing 'Play Now' but leaving the training \.If that works I should improve the error message in that case (and fix the documentation).—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Your post is difficult to read - but I think I managed. I may have to see if I can get a Tidal login. The following works fine on Qobuz In the mean time - could you post the exact error message. It might give me a clue - but probably not! |
Hey Sry, I did a direct reply via email. Didn't realize it would format it like that. Here is what I actually wrote, it included the error message: Doesn’t appear to fix it. Throws the error Playback request for music / TIDAL/Your Favorites/Tracks/Lights/ / ['TIDAL', 'Your Favorites', 'Tracks', 'Lights', ''] was unsuccessful I tried adding the ‘/’ to both the left hand side, before TIDAL, and the right hand side, after Lights, both with and without quotations, and it failed to play. That is: Paths that don’t work: media_content_id: /TIDAL/Your Favorites/Tracks/Lights media_content_id: TIDAL/Your Favorites/Tracks/Lights/ media_content_id: “/TIDAL/Your Favorites/Tracks/Lights” media_content_id: “TIDAL/Your Favorites/Tracks/Lights/” media_content_id: TIDAL/“Your Favorites”/Tracks/Lights media_content_id: TIDAL/“Your Favorites”/Tracks/Lights/ Paths that work: media_content_id: TIDAL/Your Favorites/Tracks/Lights/Play Now media_content_id: “TIDAL/Your Favorites/Tracks/Lights/Play Now” Btw. I am running roon server on a windows 10 64-bit machine, and home assistant OS on a pi4. I know I was able to play some of my mp3 tracks from my actual library without adding the play now bit...it may be TIDAL specific. I have a Qobuz subscription as well I'll try it out and let you know. Also, one more bit that may be relevant, I don't have TIDAL set to download songs from my TIDAL library locally for offline playback. |
Negative on Qobuz as well. Doesn't Work --- media_content_id: Qobuz/My Qobuz/Favorite Tracks/Paranoid Android (as well as ending with Android/) Works --- media_content_id: Qobuz/My Qobuz/Favorite Tracks/Paranoid Android/Play Now Error: Found media does not have playable action list'['Play Now', 'Add Next', 'Queue', 'Start Radio']' |
Also, on reviewing the example you gave for Qobuz, I want to reiterate that I don't have this issue when the target is an album or artist, only when its a track. So when I use use something along the lines of your example: Qobuz/New Releases/Still Trending/Random Access Memories (Hi-Res Version) It works. You may want to try playing a specific track instead of an album, artist, radio station, or playlist. |
Thanks for the extra info. I wonder what the difference between our setups are. Roon allows you to customise those actions, but I think yours are the same as mine. I’m also running HA on a 64bit Pi, although my roon core is running on a Mac. I’m running the latest 1.8. I suspect I’m going to need some extra debugging info. Do you have the ability to run python code easily? We can test with the underlying library directly. https://github.com/pavoni/pyroon Otherwise I can add something to the next HA release, although that will take a while to get released. If you’re a developer I’d like to know the value of |
Guys, this issue is misplaced. This is the issue tracker for the documentation, but is seems like this is not related to documentation at all... |
It’s not documentation! @Divadeer Would you mind re-raising as a bug in the main HA Repo? |
roon documentation |
Transferred the issue |
Didn’t know that was possible - thanks @frenck |
If you are able to make python work - I've added some api traces - and an example which should be easy to customise to allow you to reproduce. https://github.com/pavoni/pyroon/blob/master/examples/play_error.py You will need to enable the roon api extension for the library when you run (it doesn't use the same permissions as the HA roon integrations). If you aren't able to install python etc - I'll release a library version with the traces - and then add to the next HA version - which will give me the info I need to fix in a future version. |
@frenck @pavoni Sorry about that. I had actually initially clicked on "leave feedback for this integrations documentation" as I was just going to recommend you mention in the documentation that if someone was having trouble that adding "/Play Now" to the path would likely fix the issue. I just started using HA about a month ago and am not super familiar with the protocols for the forums.To be clear, I'm not asking you to change anything, It was generous of you to take the time to share this with the community and I am grateful that I am able to use it at all. That being said, if you are desiring to undertake diagnostics and attempt to patch it up I am happy to help in whatever way I can. Its been nearly a decade since the last time I did any coding, and even then I tended to focus on low-level languages and logic design. Not super familiar with python but will give it a shot. |
@Divadeer It's great you took the time to report and help analyse this. I have no doubt that others will bump into this bug - so am keen to track down and fix if I can. My suspicion is that I'll just need to check for an extra string value - so the fix will be very much easier than tracking down the problem! It's probably a slight inconsistency in the roon API (there have been a few) - but not one I can reproduce here. If you're comfortable installing python, and pulling a library from github, I'm sure you'll find this pretty straightforward. https://github.com/pavoni/pyroon Obviously let me know if I can help you get this going. |
Ok. Im all setup and registered with the server. I'm not certain how to get the value of "items[0]("hint")" because it is local to the class and out of scope. How should I proceed? |
I added some better debug to the library, so I think if your playback fails, it should trace the variable. Otherwise just change your local copy of my library. |
'hint' = 'action' |
@Divadeer thanks very much. If you're willing could you check this fixes the issue? |
Works. The only issue is it still throws the error. That is, instead of returning true it throws the playable action list error, but the song still plays. Each of these worked, despite the error being thrown: s = roonapi.play_media(output_id, ["TIDAL", "Your Favorites", "Tracks", "Lights"])
s = roonapi.play_media(output_id, ["TIDAL", "Your Favorites", "Tracks", "Africa"])
s = roonapi.play_media(output_id, ["TIDAL", "Your Favorites", "Artists", "Bruce Springsteen"])
|
Happens w/o assignment as well. Not sure if that bothers you: session.play_media(output_id, ["TIDAL", "Your Favorites", "Tracks", "Lights"]) |
@Divadeer Thanks for the detailed report. I've had a go at simulating what is happening - and come up with a possible fix. Would you mind pulling and trying again? I'm hoping this one will play without errors - and report the play method like your final example! |
Works! (and without screwing up the functionality of the parts that had worked correctly (e.g. artists). Well done. session.play_media(output_id, ["TIDAL", "Your Favorites", "Tracks", "Lights", "Play Now"]) |
Feedback
There is a bug that pops up when trying to play tracks in the Roon integration. It doesn't appear to be an issue when attempting to play an artist or album. The error that is thrown is "Found media does not have playable action list'['Play Now', 'Add Next', 'Queue', 'Start Radio']'".
I went into the roonapi and noticed the problem. It can be fixed by simply adding "/Play Now" to the end of the requested path. (e.g. the media_content_id would be something like:
"TIDAL/Your Favorites/Tracks/Africa/Play Now". You may want to add that to the documentation, or alternatively fix the integration by having that concatenation happen automatically in the background.
The reason it works is the play media command in the roon api accepts arguments of the form:
apiObject.play_media(speaker_id, [ "Parent Directory", "SubDirectory_1", ..., "fileName", "action_type"]). Clearly it defaults to "play now" for the action type in some situations (e.g. albums, artists, radio) but not in others.
URL
https://www.home-assistant.io/integrations/roon/
Version
2021.5.3
Additional information
No response
The text was updated successfully, but these errors were encountered: