Never would have thought of that
. Brilliant. I think I’ve been stuck in a mindset where the queue only lives on the ‘master’ player.
Edit: worked perfectly, thanks for the hint.
Hi again. I’m playing around with trying to create a ui for displaying and interacting with the current playlist.
I can get it using call_query (and status), but I don’t think I’m going to get around having to call query multiple times in order to populate the amount of info I need.
The loop is a bit hard to manage though, as I stead of awaiting the data, I have to look at the attributes of the player, and it feels a bit fragile. Especially because users might themselves use call_query and if the timing is just right, clear the query, or populate it with something unexpected.
Is there some way to call_query and get the data back, like you can with search_media for example?
Hi @minutnudler Anton. Just so I understand your question, are you bumping up against a limit in the amount of data that call_query is returning? Off the top of my head, I don’t recall a limit, but I can take a look if that’s the problem. I added a “browse_limit” to the configuration a while back, but that would just apply I think to the media_browser and wouldn’t affect call_query. If you want to give me an example of what call_query you’re having problems with, I’ll take a look.
@psketch If I understand this correctly, wouldn’t this situation (wanting to avoid potential overwrites of the player’s attributes) be a good use for your Lyrion CLI Integration?
@minutnudler Peter’s integration returns the query data in a response variable, rather than adding it to the player’s attributes. It’s great - I use it as a full replacement now.
I did hit a timeout issue with larger queries (in this case to the Mixcloud plugin) which took longer than 10 seconds, but that would also affect the squeezebox.call_query action in any case. In that sole specific case, I use a HA shell command as a workaround which uses CURL to access the Lyrion API and return a similarly structured response.
If the lyrion cli integration returns a response variable that’s perfect!
My issue was with getting the response from attributes, as I might have to do concurrent queries, and even if I can get around that the attributes might get overridden by some automation.
Edit: to your question Peter, my only issue was with getting the response. Not hitting any limit ![]()
@reste_narquois , yes the lyrion_cli may help (and would certainly make the return easier to process), but I’m not sure where the limitation is from what @minutnudler describes. If the problem is actually in the underlying library, then it would be the same for both the core integration and lyrion_cli. I’ve had a quick look and I can’t see anything in the integration or the library which limits the result set though.
BTW @reste_narquois I’ve updated the library to take a timeout parameter, but haven’t had a chance to add it to the integrations yet - I’ll take a look at adding that to lyrion_cli for you - I’m not sure if the core team will let us add it to the integration as they don’t like the call_query call in general.
Ah - looks like our responses crossed. take a look at peteS-UK/lyrion_cli: Lyrion CLI Home Assistant Integration The core team don’t want us to update call_query and call_method as they don’t like the “call anything you want from the api” approach, so I added a seperate integration which allows me to do things they’re uncomfortable with. This is an addon to the squeezebox integration really - it uses the players etc. setup by the core integration and just sits ontop of them.
@reste_narquois Chris, I added the timeout parameter to the query action and posted a pre-release version 0.2.3b - please give it a try and if it works I’ll release it.
Apologies for the delay in getting back to this: just found a moment to test version 0.2.3b and the timeout parameter: can confirm it works perfectly on all the Mixcloud plugin queries I’d been using the workaround for.
Many thanks for your work, much appreciated as always!
Thanks Chris. I’ll push it out as a new release.
Thanks for the idea. That iframe thing only works if the iframe forms ALL of the dashboard, right?
You can do both. I just checked to remind myself. I have both. But I use full page for LMS because I presumed you need the space. Try webpage card