We have moved at community.getvera.com

Author Topic: Sonos Favorites  (Read 8520 times)

Offline bkmar1192

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Re: Sonos Favorites
« Reply #15 on: September 22, 2014, 03:17:25 pm »
Excellent - thank you!

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos Favorites
« Reply #16 on: September 22, 2014, 06:18:35 pm »
If you have version 1.1 installed, get the files I_Sonos1.xml and J_Sonos1.js from the "trunk" and upload them in the Vera; reload and finally clear your WEB browser cache. You should now be able to manage Sonos favorites in UI and scene.

For scene, you have to use SF:title as parameter of action PlayURI, title being the title of your favorite. I will probably handle position later.

Here are tested and working items from Sonos favorites:
- TuneIn radio
- WEB radio
- AUPEO! station
- track from media library
- album from media library
- track from Amazon Cloud Player
- Sonos playlist

Here are tested and not working items from Sonos favorites:
- album from Amazon Cloud Player

So, if you put something in your favorites that is a container for several things, it will not work with my current code, except apparently if it is something from the media library.

I am waiting for your feedback, I am not sure at all what will be the result for items that required to be queued. That's probably the case with several services like Spotify. My current code only queue playlists.

Offline bkmar1192

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Re: Sonos Favorites
« Reply #17 on: September 24, 2014, 01:53:28 am »
Preliminary tests look really good.  I have both radio stations and sirius radio in my favorites and both worked perfectly.

I have only used the device controller and have not played with luup code yet.  I'll try to give that a whirl tomorrow. 

Great work - much appreciated.

BTW - I noticed a couple of days ago that my Sonos app on my iPhone no longer has a Favorite Radio station list anymore.  Not sure if something is goofy on my phone or if Sonos is removing the Favorite Radio Station and replacing it with Sonos Favorites.

Thanks again!  Really great work.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos Favorites
« Reply #18 on: September 24, 2014, 08:27:12 am »
Preliminary tests look really good.  I have both radio stations and sirius radio in my favorites and both worked perfectly.

I have only used the device controller and have not played with luup code yet.  I'll try to give that a whirl tomorrow. 

Great work - much appreciated.

You cannot test with other services like Spotify for example ?

Quote
BTW - I noticed a couple of days ago that my Sonos app on my iPhone no longer has a Favorite Radio station list anymore.  Not sure if something is goofy on my phone or if Sonos is removing the Favorite Radio Station and replacing it with Sonos Favorites.

Thanks again!  Really great work.

I run the last version on Windows and Android and the favorite stations are still present in the application.
« Last Edit: September 24, 2014, 02:49:40 pm by lolodomo »

Offline bkmar1192

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Re: Sonos Favorites
« Reply #19 on: September 25, 2014, 09:14:50 am »
Tested with Pandora, playlist, podcasts from stitcher radio, station from iHeartRadio.  Have not had any problems - the list almost immediately updates as I add new feeds in Sonos Favorites. 

I can do some more testing tonight.

Favorite Radio stations has vanished from my Sonos player on my Mac as well...

-Bert

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos Favorites
« Reply #20 on: September 25, 2014, 12:34:43 pm »
Ok, that looks good.

I still have to handle albums from Amazon Cloud Player and more generally all favorites that are container and not items.

Offline crawfofdc

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Sonos Favorites
« Reply #21 on: October 09, 2014, 12:22:51 pm »
I am new to this forum and am trying to get the sonos plugin to tune to tunein and iheart radio stations.  I can access siriusxm radio no problem. 
I have the new ver 1.1 installed. Any help would be greatly appreciated. 

Offline crawfofdc

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Sonos Favorites
« Reply #22 on: October 10, 2014, 02:41:02 pm »
Can anyone help me with this problem. I can't get Iheart radio stations or TuneIn.

Offline Vreo

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +6/-4
Re: Sonos Favorites
« Reply #23 on: October 12, 2014, 10:50:59 am »
Can you please try the last version of the file J_Sonos1.js I just pushed, it should now work in UI5. Stupid error.

For your Spotify favorite, it is of kind "x-rincon-cpcontainer" and I have not (yet) managed this case. I have myself this case when I put in my favorite a full album coming from Amazon Cloud Player. I don't know yet if I will be able to handle this case.
You have always this case when saving Spotify in Sonos favorites or you just mention one case that did not work (playlist) ? I mean everything is a playlist when using Spotify ?

We should continue the discussion relative to Sonos favorites in the other topic: http://forum.micasaverde.com/index.php/topic,27115.0.html
I downloaded the js and xml that you just modified and the result is the same, here is the log:
Code: [Select]
08 10/12/14 9:49:45.686 JobHandler_LuaUPnP::HandleActionRequest device: 82 service: urn:micasaverde-com:serviceId:Sonos1 action: PlayURI <0x314d5680>
08 10/12/14 9:49:45.686 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=82 <0x314d5680>
08 10/12/14 9:49:45.687 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x314d5680>
08 10/12/14 9:49:45.687 JobHandler_LuaUPnP::HandleActionRequest argument action=PlayURI <0x314d5680>
08 10/12/14 9:49:45.687 JobHandler_LuaUPnP::HandleActionRequest argument URIToPlay=ID:FV:2/6 <0x314d5680>
50 10/12/14 9:49:45.717 luup_log:82: Sonos: data from server: Nuevas 2014object.itemobject.item.sonos-favorite2x-rincon-cpcontainer:10060a6cspotify%3auser%3a12121499174%3aplaylist%3a5kJiljhUL6DIgg7fmPSRyWhttp://spotify-static-resources.s3.amazonaws.com/img/playlist_legacy.pnginstantPlaySpotify Lista de reproducción<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="10060a6cspotify%3auser%3a12121499174%3aplaylist%3a5kJiljhUL6DIgg7fmPSRyW" parentID="100a0664playlists" restricted="true"><dc:title>Nuevas 2014</dc:title><upnp:class>object.container.playlistContainer</upnp:class><desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON2311_X_#Svc2311-0-Token</desc></item></DIDL-Lite> <0x314d5680>
50 10/12/14 9:49:45.722 luup_log:82: Sonos: uri: x-rincon-cpcontainer:10060a6cspotify%3auser%3a12121499174%3aplaylist%3a5kJiljhUL6DIgg7fmPSRyW <0x314d5680>
50 10/12/14 9:49:45.722 luup_log:82: Sonos: uriMetaData: Nuevas 2014object.container.playlistContainerSA_RINCON2311_X_#Svc2311-0-Token <0x314d5680>
01 10/12/14 9:49:45.733 luup_log:82: Sonos: error: UPnP_request (SetAVTransportURI, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[s:ClientUPnPError714] <0x314d5680>
01 10/12/14 9:49:45.791 luup_log:82: Sonos: error: UPnP_request (Play, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[s:ClientUPnPError701] <0x314d5680>
08 10/12/14 9:49:45.956 JobHandler_LuaUPnP::HandleActionRequest device: 82 service: urn:micasaverde-com:serviceId:Sonos1 action: NotifyAVTransportChange <0x318d5680>

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos Favorites
« Reply #24 on: October 13, 2014, 04:05:47 pm »
The last change was just to avoid the JavaScript exception you discovered.
No change for Spotify playlist yet.

Offline Vreo

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +6/-4
Re: Sonos Favorites
« Reply #25 on: October 13, 2014, 07:39:42 pm »
My bad! Thx. Tell my if I can help you test anything. Regards.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos Favorites
« Reply #26 on: October 17, 2014, 06:54:33 am »
Yes, I got it 8)
Please try the last version in trunk, it should work with all kind of Sonos favorites, including Spotify playlists I assume.
I use now queue for everything that is a kind of playlist.
Remains to discuss if it is a good choice to replace the queue content. I keeped the choice done for Sonos playlists.

Offline Vreo

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +6/-4
Re: Sonos Favorites
« Reply #27 on: October 17, 2014, 08:32:08 am »
Yes, I got it 8)
Please try the last version in trunk, it should work with all kind of Sonos favorites, including Spotify playlists I assume.
I use now queue for everything that is a kind of playlist.
Remains to discuss if it is a good choice to replace the queue content. I keeped the choice done for Sonos playlists.
I make some tests and it is working, it replaces the queue. It works through the UI and with the SF: Uri, at least with spotify (the only service I use). It works great, thanx for the effort. Let me know if you need any other testing.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Sonos Favorites
« Reply #28 on: October 17, 2014, 08:40:17 am »
Thank you for your quick feedback.

I think this new feature is completed now 8)