We have moved at community.getvera.com

Author Topic: Playing Sirius Stations  (Read 12307 times)

Offline djmarcox

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Playing Sirius Stations
« on: February 09, 2013, 03:20:04 pm »
Im using the code below to play sirius stations on my Sonos but it shows the whole link as the sirius channel on my computer or ipad in the controller software.  How can I make it show the name of the station e.g.: 51 - Bpm like it does when I select that station through my controller.  Any ideas.  Thank you.

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "PlayURI",
                 {URIToPlay="sirradio:svc%3a%2f%2fRadio%2fChannelInfo%2fv1%3fsid%3d0001-thebeat%26channel%3d51%26logo%3dBlackWithSIRIUSLogo?a=http%3a%2f%2fdownload.zing.siriusxm.com%2fContentServer%2fStatic%2fApps%2fSIR%2fimages%2fthebeat-300-BlackWithSIRIUSLogo-v4.png"},
                 86)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Playing Sirius Stations
« Reply #1 on: February 10, 2013, 03:07:50 am »
Ok, after TuneIn and Pandora, I can try to make things easy for Sirius too.

Please select a Sirius radio using the Sonos control application.

Then in the vera UI, reload lua engine (Reload button) and then when reload is finished, go to the Advanced tab of the Sonos device and tell me what is the value of the variable AVTransportURI.
I need the value of the variable AVTransportURIMetaData too. Unfortunatelly, the value is truncated in the advanced tab. So please run this code in the test luup box:
Code: [Select]
luup.log(luup.variable_get("urn:upnp-org:serviceId:AVTransport", "AVTransportURIMetaData",  xx))replacing xx by the id of your Sonos device. Then check the logs and copy and paste in the forum the XML file that was logged.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Playing Sirius Stations
« Reply #2 on: February 10, 2013, 03:18:05 am »
Then with these first information, I will determine if I can handle that properly. In this case, I will produce an updated specific version for you with additional logs.
« Last Edit: February 10, 2013, 03:25:17 am by lolodomo »

Offline djmarcox

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Playing Sirius Stations
« Reply #3 on: February 12, 2013, 12:29:18 pm »
Thank you.. I will check later today.. I appreciate your help...

Offline djmarcox

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Playing Sirius Stations
« Reply #4 on: June 22, 2013, 11:30:38 am »
Sorry Never got back but I stopped working on this function till now.  Any headway come about playing sirius thru sonos with vera.  Thank you..

Offline djmarcox

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Playing Sirius Stations
« Reply #5 on: September 17, 2013, 09:13:01 pm »
Cant get Sirius to work... Anyone else have any luck????

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Playing Sirius Stations
« Reply #6 on: September 18, 2013, 10:08:04 am »
As I told you 6 months agoi, to help you I need to know what is the value of two variables when you play a Sirius radio.
Please run this following code and copy/paste the result from the logs:
Code: [Select]
luup.log(luup.variable_get("urn:upnp-org:serviceId:AVTransport", "AVTransportURI",  xx))
luup.log(luup.variable_get("urn:upnp-org:serviceId:AVTransport", "AVTransportURIMetaData",  xx))
Is Sirius a free service ? Do you need to specify an account to use it ?

Offline djmarcox

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Playing Sirius Stations
« Reply #7 on: October 19, 2013, 01:17:22 pm »
I have tried to get the logs and I just cant figure it out.  Its a pay service.  Sorry for being a pest...

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Playing Sirius Stations
« Reply #8 on: October 26, 2013, 07:23:00 am »
I will add these informations in the Help tab in the next version.

Offline djmarcox

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Playing Sirius Stations
« Reply #9 on: November 02, 2013, 03:16:15 pm »
Thank you... your work is great and I appreciate all ur help...

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Playing Sirius Stations
« Reply #10 on: November 18, 2013, 11:58:28 am »
Ok, so what are the 4 values displayed in the new table at the bottom of the the Help tab when you play a Sirius radio station ?

Offline djmarcox

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Playing Sirius Stations
« Reply #11 on: November 18, 2013, 06:05:45 pm »

These are the values from the boxes.... Thank you for your assistance...

Marco




AVTransportURI     x-sonosapi-hls:r%3athebeat?sid=37&flags=288

AVTransportURIMetaData       <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="-1" parentID="-1" restricted="true"><dc:title>51 - BPM</dc:title><upnp:class>object.item.audioItem.audioBroadcast</upnp:class><desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON9479_marcodegennaro</desc></item></DIDL-Lite>

CurrentTrackURI    x-sonosapi-hls:r%3athebeat?sid=37&flags=288

CurrentTrackMetaData   <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="-1" parentID="-1" restricted="true"><res protocolInfo="sonos.com-http:*:application/x-mpegURL:*">x-sonosapi-hls:r%3athebeat?sid=37&amp;flags=288</res><r:streamContent>BR P|TYPE=SNG|TITLE Angel On My Shoulder|ARTIST Kaskade+EDX+Tamra</r:streamContent><r:radioShowMd>Dance Hits,</r:radioShowMd><upnp:albumArtURI>http://www.siriusxm.com/albumart/Live/2230/kaskadeedxta_51859DEA_m.jpg</upnp:albumArtURI><dc:title>x-sonosapi-hls:r:thebeat?sid=37&amp;flags=288</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class></item></DIDL-Lite>

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Playing Sirius Stations
« Reply #12 on: November 19, 2013, 06:23:04 am »
AVTransportURI     x-sonosapi-hls:r%3athebeat?sid=37&flags=288
CurrentTrackURI    x-sonosapi-hls:r%3athebeat?sid=37&flags=288

Could you check if only the sid value changes when you select another radio ?
If "r%3athebeat" is a changing part of the URL, it will be difficult.

Offline djmarcox

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Playing Sirius Stations
« Reply #13 on: November 19, 2013, 06:47:25 am »
So sirius has different types of stations for different types of music... The station the beat when I play it on any of my radios has the exact same values for all of them...


AVTransportURI     x-sonosapi-hls:r%3athebeat?sid=37&flags=288
CurrentTrackURI    x-sonosapi-hls:r%3athebeat?sid=37&flags=288

when I change the station to a different sirius station called area it changes to

AVTransportURI     x-sonosapi-hls:r%3aarea33?sid=37&flags=288
CurrentTrackURI       x-sonosapi-hls:r%3aarea33?sid=37&flags=288

Seems like the part that changes is after the first a and before the 33.... but is constant amongst different radios, just per station... Thanks for help and Ill get any more info that u may need..

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Playing Sirius Stations
« Reply #14 on: November 19, 2013, 07:24:17 am »
So, you think that the general URL mode for Sirius is: x-sonosapi-hls:r%3a<station>?sid=37&flags=288 with <station> being the id/name of the radio station.
sid is always 37 ?

If you are sure about this model, I could add "SR:<station>" as possible value for PlayURI action (SR for Sirius Radio). Examples: SR:thebeat or SR:area33

Last difficulty is to provide your account information (login) when setting a station, but I can retrieve it from the metadata, like for other service. So it should be doable, we can try.