Streaming Service/Radio Station play not working in 2.0

Hi All,
after the Sonos Plugin Updated, I have a problem with the “luup call action”.
Currently I have three Sonos devices. All of them run correctly by the Vera Device Properties Interfaces and the SONOS APP. Unfortunately, They don’t work with the “luup.call_action” command. Before the Plugin updated I always used this string:

luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “PlayURI”, {URIToPlay=" FR:WBAA Jazz", Volume=50}, XX)
Where XX can be: 72, 75 and 103 (the three Device IDs)

Can you help me?
Thanks

OK. When first installed/updated, the plugin doesn’t know anything about the services you have configured, and since there doesn’t appear to be a way to ask for some of the details it needs, it needs to “learn” the details. It learns by collecting the data when you play a resource using the service from the Sonos mobile app. So, you need to play a resource from each of the services you use (TuneIn, Pandora, Sirius, etc.) so it can learn that service’s metadata. Once it has it, it should be able to play your favorites directly from then on.

That said, I did find a bug in 2.0 where it saves the metadata correctly, but does not retrieve it correctly (so after a Luup reload, it thinks it knows nothing about any services even though it has seen them before and has their data). I will post a hotfix release later today to fix this issue.

Also, as a general approach and for the benefit of all readers, if an action doesn’t work, the first response should be to go to the LuaUPnP.log file, look for your action invocations, and then look for error or warning messages following. That often produces some kind of message. You may not understand what it means and be able to translate it into a solution, but you could post it here and that will put you several steps ahead in the remote debugging game.

1 Like

OK. I’ve posted the hotfix here: Hotfixes for Sonos 2.0 - Sonos - Ezlo Community

Also, you seem to have a space between the quote and the URI (URIToPlay=" FR:WBAA Jazz" — it’s after the quote and before the FR)… you should remove that.

1 Like

Hello rigpapa,
thank you for your support.
I have followed your suggestions:

  1. I have launched the TuneIn Radio Station by the SONOS APP (WBAA Jazz in particular)
  2. Waited for few minutes
  3. Reloaded the luup interfaces
  4. Launched the luup code like this:
    luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “PlayURI”,{URIToPlay=“FR:WBAA Jazz”, Volume=14},72)
  5. But nothing happened

Note: I have uploaded your new files (Hotfixes for Sonos 2.0).

It appears strangely because I have three Sonos devices (Id: 72, 75, 103) and for all of them the same situation. I have changed the Favorite station and it works correctly in all of them.
The command string is the same,for example:

luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "PlayURI",{URIToPlay="FR:The World Of Blues", Volume=14},72)
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "PlayURI",{URIToPlay="FR:The Soul", Volume=14},72)

In the future I’ll not use the “WBAA Jazz” but I would like to solve the issue.

This is the LOG for “The Soul Station”:

|06|05/27/20 17:10:42.311|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: NumberOfTracks was: 2 now: 1 #hooks: 0 upnp: 0 skip: 0 v:0x10d7680/NONE duplicate:0 <0x722a8520>|
|---|---|---|
|06|05/27/20 17:10:42.312|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: AVTransportURI was: x-sonosapi-stream:s141941?sid=254&flags=8224&sn=0 now: x-sonosapi-stream:s276448?sid=254&flags=8224&sn=0 #hooks: 0 upnp: 0 skip: 0 v:0x10d4a00/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.313|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: AVTransportURIMetaData was: <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>WBAA Jazz</dc:title><upnp:class>object.item.audioItem.audioBroadcast</upnp:class><desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON65031_</desc></item></DIDL-Lite> now: <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>The Soul</dc:title><upnp:class>object.item.audioItem.audioBroadcast</upnp:class><desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON65031_</desc></item></DIDL-Lite> #hooks: 0 upnp: 0 skip: 0 v:0x10d4da0/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.340|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentTrackURI was: aac://http://purdue.streamguys1.com/wbaa-jazz-aac now: x-rincon-mp3radio://http://65.60.5.207/proxy/wosrdb?mp=/stream #hooks: 0 upnp: 0 skip: 0 v:0x10d75e8/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.341|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentTrackMetaData was: <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="aac:*:application/octet-stream:*">aac://http://purdue.streamguys1.com/wbaa-jazz-aac</res><r:streamContent></r:streamContent><dc:title>wbaa-jazz-aac</dc:title><upnp:class>object.item</upnp:class></item></DIDL-Lite> now: <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="x-rincon-mp3radio:*:*:*">x-rincon-mp3radio://http://65.60.5.207/proxy/wosrdb?mp=/stream</res><r:streamContent>ZPSTR_CONNECTING</r:streamContent><dc:title>stream</dc:title><upnp:class>object.item</upnp:class></item></DIDL-Lite> #hooks: 0 upnp: 0 skip: 0 v:0x10d83b8/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.344|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentRadio was: WBAA Jazz now: The Soul #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.345|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentStatus was: TuneIn: WBAA Jazz: wbaa-jazz-aac now: TuneIn: The Soul: stream: : ZPSTR_CONNECTING #hooks: 0 upnp: 0 skip: 0 v:0x10d6ef0/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.345|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentTitle was: wbaa-jazz-aac now: stream #hooks: 0 upnp: 0 skip: 0 v:0x10d7430/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.346|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentDetails was:  now: ZPSTR_CONNECTING #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.347|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentAlbumArt was: http://192.168.1.6:1400/getaa?s=1&u=x%2dsonosapi%2dstream%3as141941%3fsid%3d254%26flags%3d8224%26sn%3d0 now: http://192.168.1.6:1400/getaa?s=1&u=x%2dsonosapi%2dstream%3as276448%3fsid%3d254%26amp%3bflags%3d8224%26amp%3bsn%3d0 #hooks: 0 upnp: 0 skip: 0 v:0x10d81c0/NONE duplicate:0 <0x722a8520>|
|06|05/27/20 17:10:42.422|Device_Variable::m_szValue_set device: 75 service: urn:micasaverde-com:serviceId:HaDevice1 variable: LastUpdate was: 1590592162 now: 1590592242 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x722a8520>|
|04|05/27/20 17:10:43.462|<Job ID="108" Name="pollnode #20 3 cmds" Device="47" Created="2020-05-27 17:10:39" Started="2020-05-27 17:10:39" Completed="2020-05-27 17:10:43" Duration="4.360308000" Runtime="4.358860000" Status="Successful" LastNote="" Node="20" NodeType="ZWaveMultiEmbedded" NodeDescription="Luce Trave"/> <0x770a8520>|
|02|05/27/20 17:10:43.462|Device_Basic::AddPoll 47 poll list full, deleting old one <0x770a8520>|

And This one for WBAA Jazz:

|06|05/27/20 17:07:37.310|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: NumberOfTracks was: 1 now: 2 #hooks: 0 upnp: 0 skip: 0 v:0x10d7680/NONE duplicate:0 <0x722a8520>|
    |---|---|---|
    |06|05/27/20 17:07:37.311|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: AVTransportURI was: x-sonosapi-stream:s276448?sid=254&flags=8224&sn=0 now: x-sonosapi-stream:s141941?sid=254&flags=8224&sn=0 #hooks: 0 upnp: 0 skip: 0 v:0x10d4a00/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.313|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: AVTransportURIMetaData was: <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>The Soul</dc:title><upnp:class>object.item.audioItem.audioBroadcast</upnp:class><desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON65031_</desc></item></DIDL-Lite> now: <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>WBAA Jazz</dc:title><upnp:class>object.item.audioItem.audioBroadcast</upnp:class><desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON65031_</desc></item></DIDL-Lite> #hooks: 0 upnp: 0 skip: 0 v:0x10d4da0/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.332|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentTrackURI was: x-rincon-mp3radio://http://65.60.5.207/proxy/wosrdb?mp=/stream now: aac://http://purdue.streamguys1.com/wbaa-jazz-aac #hooks: 0 upnp: 0 skip: 0 v:0x10d75e8/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.364|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentTrackMetaData was: <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="x-rincon-mp3radio:*:*:*">x-rincon-mp3radio://http://65.60.5.207/proxy/wosrdb?mp=/stream</res><r:streamContent></r:streamContent><dc:title>stream</dc:title><upnp:class>object.item</upnp:class></item></DIDL-Lite> now: <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="aac:*:application/octet-stream:*">aac://http://purdue.streamguys1.com/wbaa-jazz-aac</res><r:streamContent></r:streamContent><dc:title>wbaa-jazz-aac</dc:title><upnp:class>object.item</upnp:class></item></DIDL-Lite> #hooks: 0 upnp: 0 skip: 0 v:0x10d83b8/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.365|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: RelativeTimePosition was: 0:00:00 now: 0:00:14 #hooks: 0 upnp: 0 skip: 0 v:0x10d6998/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.367|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentRadio was: The Soul now: WBAA Jazz #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.368|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentStatus was: TuneIn: The Soul: stream now: TuneIn: WBAA Jazz: wbaa-jazz-aac #hooks: 0 upnp: 0 skip: 0 v:0x10d6ef0/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.369|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentTitle was: stream now: wbaa-jazz-aac #hooks: 0 upnp: 0 skip: 0 v:0x10d7430/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.370|Device_Variable::m_szValue_set device: 75 service: urn:upnp-org:serviceId:AVTransport variable: CurrentAlbumArt was: http://192.168.1.6:1400/getaa?s=1&u=x%2dsonosapi%2dstream%3as276448%3fsid%3d254%26amp%3bflags%3d8224%26amp%3bsn%3d0 now: http://192.168.1.6:1400/getaa?s=1&u=x%2dsonosapi%2dstream%3as141941%3fsid%3d254%26flags%3d8224%26sn%3d0 #hooks: 0 upnp: 0 skip: 0 v:0x10d81c0/NONE duplicate:0 <0x722a8520>|
    |06|05/27/20 17:07:37.432|Device_Variable::m_szValue_set device: 75 service: urn:micasaverde-com:serviceId:HaDevice1 variable: LastUpdate was: 1590591097 now: 1590592057 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x722a8520>|
    |01|05/27/20 17:07:37.451|LuaInterface::CallFunction_Timer device 73 refreshCache took 10 seconds <0x750a8520>|

Thank you in advance,

If you go to the Settings tab of your Sonos master device, what version numbers are listed in the footer beneath the “Save Changes” button?

Which is the Sonos Master Device?
I think that it is the new device created after the update:

Sonos System (Running 3 zones, no proxy)

The number is:

Sonos Plugin version 2.0-hotfix20147; JSUI 2.0-20136

By chance, if you go to the “Player” tab on one of the zone player Vera devices, is it listed under “Favorite Radios”?

I’m taking a bit of a leap here, but I think I found some other bugs that would give you the now-inconsistent result (as opposed to the previous outright denial).

Please go to the Hotfix post and post the latest 20149 hotfix updates to your system, reload Luup, and hard-refresh your browser. Then give it a go. I too saw some issues, but now it seems to working great for me, so I hope this does it for you as well. And I love the station, by the way (WBAA).

Good news, now it works right!! Thanks to the last patch I can listen WBBA Jazz station!!
Thank you for the support Rigpapa.

1 Like

Thank you for your help and your reports. Little details in what you said really helped isolate the problem, even without having to go to logs. You have good taste in music, too.