Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Sonos - PlayFovorite command
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I was just about to play around with it. Sonos clearly believes that they know you better than you know yourself, so they push unwanted updates to your boxes because they know you want it, even if you only know that deep down inside your secrete self.
Is this a hard coded name? If so, just to be sure, use the text value query to get the favorites list as CQC would see it, and make sure that the name hasn't changed in some subtle way.

Maybe make up a little test template with a button that does the favorites list query, and then just turns around and invokes the first favorite in the list and see if that fails.
Nevermind about the above, that doesn't use the id it uses the name, though the name might have changed in some way, so query the favorites list via the driver and make sure the name you have is still good.

I just went through some really annoying hours getting spun back up on the Sonos. I got it upgraded and added a couple songs and a radio station to the favorites list. I can play the radio station using the PlayFavorites command without any problem. Of course that's not a pay station, so there may be differences there in some way. When you invoke it via PlayFavorites it gets the associated metadata for the station from the Sonos which should include the info required, but I guess it's always possible they changed something.

Anyway, first re-check the favorites name as CQC sees it and make sure you are using that if you currently have a hard coded favorites name.
BTW, as I was reading around, apparently this update broke a lot of integrations.
I am using a prebuilt list for my trigger favorite list commands. I'm not using ListQuery to build the list. That being said I went back to the docs looking to dig up what Sonos was providing CQC using a ListQuery and remembered why I did pre defined list. The doc's say to use ID=ListQuery, Value=PLList but "PLList" is what I am using to get my Sonos playlist list not my Favorite list. What am I missing. My problem must be my predefined list.

Triggering playlists work fine.
You can also do ListQuery/FavsList to get the favorites list.
I was using a pre-built Favorites list also, but somewhere between when I built that, and now, Dean added the ability to get the PlayFavorites list, which simplified my interfaces a ton.  In the PreLoad tab, I do this:

Code:
LocalVars::CreateVariable
   P1=LVar:PLLists
   P2=String
   P3=
   P4=""

Devices::QueryDrvText
   P1=ZonePlayer
   P2=ListQuery
   P3=FavsList
   P4=LVar:PLLists

List::SetBrowserList
   P1=%(LVar:PLLists)

And then load a static list browser in the template.  I renamed all of the Favorites within the Sonos app to 01. Radio Station 1, 02. Radio Station 2, etc. so that I could put them in the order that I wanted with the numbers in front of the station.
FavsList .. I tried FLList, FavList, FList.. didn't try FavsList.

When I run ListQuery/FavsList I get (see below) what am I missing?

01/01 00:00:00-CORE, CQCServer, CQCDrv_SonosThread8
{
CIDXML, CIDXML_SimpleTree.cpp.1090, Failed/Bad Parms, Error: 6204/0/0
Got an attribute index of 0 but only 0 exist
<CQCServer> CQCDriver_DriverBase.cpp - 8624
<CQCServer> CQCServer_ThisFacility.cpp - 514
<CQCServer> CIDOrb_ThisFacility.cpp - 554
<CQCIntfView> CQCKit_CQCSrvAdminClientProxy.cpp - 411
<CQCIntfView> CQCIntfEng_Template.cpp - 1221

}
That's a goober, which I fixed yesterday, for the next drop. It basically means either nothing came back, or what did come back didn't have some of the associated data it's supposed to have, which that code wasn't dealing correctly with. In my case it was the resource identifier for that favorite which is required in order to invoke it. It was like maybe for an empty list it returned one bogus item or something. Either way, you are probably ending up with an empty list as I initially did.

There may be one or more in the list that are either messed up or missing. They did make a lot of changes and created this new 'My Sonos' thing which is the I guess phone version of Favorites. Maybe that changed something. It might be worth removing them all and adding them back to the list to pick up any new info. Maybe just add one to start and see if that works.

In the meantime I'll get the fix for the above up before long which will make it tolerant of missing data, so that the ones in the list that are still good will at least still get into the list.
You're a rock star Dean!

I wish they would stop messing with it. Or at least give us LTS versions of the firmware. So we can stay out of the constant changes and stay reliable. I emailed Sonos and asked them why they gotta be dicks all the time.. See if they respond.
Pages: 1 2 3