Sonos App Update

General Discussion on DemoPad or related products
Post Reply
sailesh26
Posts: 1
Joined: Fri Jul 13, 2018 8:28 am

Sonos App Update

Post by sailesh26 » Fri Jul 13, 2018 9:16 am

I have updated my sonos app and lost basic control on my demopad, has anyone experienced this? any thoughts?
thanks

member_258
Posts: 7
Joined: Mon Jul 16, 2012 3:36 pm

Re: Sonos App Update

Post by member_258 » Tue Jul 17, 2018 7:51 pm

yep something has changed in Sonos 9.0 with regards to the http SOAP commands. affecting jobs we've done and same for my house.

Can still control Sonos through DeviceSpy UPNP commands so 9.0 hasn't locked out all 3rd party access.

Currently trying to capture and analyse commands in wireshark to see what's changed. If I can get a new command set working I will post here

Chris Shead
Posts: 2
Joined: Thu Jul 02, 2015 8:28 am

Re: Sonos App Update

Post by Chris Shead » Thu Jul 19, 2018 10:27 am

I will be interested if you can get DemoPad to talk to Sonos again, have a very upset Client.

member_258
Posts: 7
Joined: Mon Jul 16, 2012 3:36 pm

Re: Sonos App Update

Post by member_258 » Thu Jul 19, 2018 3:25 pm

got it working...new codes on their way shortly.

format of SOAP commands changed slightly (first time that has happened with Sonos update).

member_258
Posts: 7
Joined: Mon Jul 16, 2012 3:36 pm

Re: Sonos App Update

Post by member_258 » Thu Jul 19, 2018 3:45 pm

Updated sonos commands. Still port 1400. Sonos seems to insist on IP address of target ZP now in each command, so make sure you update them per device.

Let me know if questions or if additional commands needed
You do not have the required permissions to view the files attached to this post.

User avatar
DemoPad
Site Admin
Posts: 769
Joined: Thu Jun 14, 2012 10:46 am
Contact:

Re: Sonos App Update

Post by DemoPad » Thu Jul 19, 2018 8:31 pm

Excellent work - note in place of the IP address, you can use [#HOST] if using the CentroControl app to directly control it, equally you can use [#CONTENTLENGTH] instead of the actual value, example command for play:

POST /MediaRenderer/AVTransport/Control HTTP/1.1\x0D\x0AHOST: [#HOST]:1400\x0D\x0ASOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Play"\x0D\x0ACONTENT-TYPE: text/xml; charset="utf-8"\x0D\x0AContent-Length: [#CONTENTLENGTH]\x0D\x0A\x0D\x0A<?xml version="1.0" encoding="utf-8"?>\x0D\x0A<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">\x0D\x0A <s:Body>\x0D\x0A <u:Play xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">\x0D\x0A <InstanceID>0</InstanceID>\x0D\x0A <Speed>1</Speed>\x0D\x0A </u:Play>\x0D\x0A </s:Body>\x0D\x0A</s:Envelope>

Chris Shead
Posts: 2
Joined: Thu Jul 02, 2015 8:28 am

Re: Sonos App Update

Post by Chris Shead » Thu Sep 20, 2018 8:19 am

member_258 wrote:
Thu Jul 19, 2018 3:45 pm
Updated sonos commands. Still port 1400. Sonos seems to insist on IP address of target ZP now in each command, so make sure you update them per device.

Let me know if questions or if additional commands needed
Hi, Great job. Please could you add the "GetVolume" command, below is the normal command that we had, but my brain is not sure what changes are needed to be made, and i do not have a Sonos in the office to check.

Old Command:


POST /MediaRenderer/RenderingControl/Control HTTP/1.1\x0D\x0ACONNECTION: close HOST:1400\x0D\x0ACONTENT-LENGTH: [#CONTENTLENGTH]\x0D\x0ACONTENT-TYPE: text/xml; charset="utf-8"\x0D\x0ASOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#GetVolume"\x0D\x0A\x0D\x0A<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encodin ... :GetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel></u:GetVolume></s:Body></s:Envelope>


Thanks in Advance

Chris

member_258
Posts: 7
Joined: Mon Jul 16, 2012 3:36 pm

Re: Sonos App Update

Post by member_258 » Tue Oct 16, 2018 9:25 am

Sorry for delay Chris. New GetVolume command is (change your IP after HOST):

POST /MediaRenderer/RenderingControl/Control HTTP/1.1\x0D\x0AHOST: 192.168.4.62:1400\x0D\x0ASOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#GetVolume"\x0D\x0ACONTENT-TYPE: text/xml; charset="utf-8"\x0D\x0AContent-Length: 380\x0D\x0A\x0D\x0A<?xml version="1.0" encoding="utf-8"?>\x0D\x0A<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">\x0D\x0A <s:Body>\x0D\x0A <u:GetVolume xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">\x0D\x0A <InstanceID>0</InstanceID>\x0D\x0A <Channel>Master</Channel>\x0D\x0A </u:GetVolume>\x0D\x0A </s:Body>\x0D\x0A</s:Envelope>

hengenl
Posts: 26
Joined: Sun Jul 22, 2012 10:52 am

Re: Sonos App Update

Post by hengenl » Wed Oct 17, 2018 8:49 am

That's great news as I was using the feedback for my Sonos device before :)

tvlicini
Posts: 2
Joined: Mon Aug 01, 2016 3:21 pm

Re: Sonos App Update

Post by tvlicini » Fri Dec 21, 2018 12:24 am

Hello,

Do you hvae a list with all the SONOS command for demopad ?

My Play or STOP command work fine but what is the command for set the volume at 50% or 30%... ?

Regards

tvlicini
Posts: 2
Joined: Mon Aug 01, 2016 3:21 pm

Re: Sonos App Update

Post by tvlicini » Fri Jan 04, 2019 8:59 pm

Hi,

How can we load a radio ?

The old command was :

Code: Select all

POST /MediaRenderer/AVTransport/Control HTTP/1.1\x0D\x0ASOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"\x0D\x0ACONTENT-TYPE: text/xml ; charset="utf-8"\x0D\x0AHOST: 1400\x0D\x0AContent-Length: 464\x0D\x0A\x0D\x0A<?xml version="1.0" encoding="utf-8"?>\x0D\x0A<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">\x0D\x0A   <s:Body>\x0D\x0A      <u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">\x0D\x0A         <InstanceID>0</InstanceID>\x0D\x0A         <CurrentURI>x-rincon-mp3radio://rougefm.ice.infomaniak.ch/rougefm-high.mp3</CurrentURI>\x0D\x0A         <CurrentURIMetaData />\x0D\x0A      </u:SetAVTransportURI>\x0D\x0A   </s:Body>\x0D\x0A</s:Envelope>  \x0D\x0A
RESOLVED : I found out alone, for information the new command is :

Code: Select all

POST /MediaRenderer/AVTransport/Control HTTP/1.1\x0D\x0AHOST: [#HOST]:1400\x0D\x0ASOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"\x0D\x0ACONTENT-TYPE: text/xml; charset="utf-8"\x0D\x0AContent-Length: 464\x0D\x0A\x0D\x0A<?xml version="1.0" encoding="utf-8"?>\x0D\x0A<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">\x0D\x0A   <s:Body>\x0D\x0A      <u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">\x0D\x0A         <InstanceID>0</InstanceID>\x0D\x0A         <CurrentURI>x-rincon-mp3radio://http://rougefm.ice.infomaniak.ch/rougefm-high.mp3</CurrentURI>\x0D\x0A         <CurrentURIMetaData />\x0D\x0A      </u:SetAVTransportURI>\x0D\x0A   </s:Body>\x0D\x0A</s:Envelope>
You need just to change the URL : rougefm.ice.infomaniak.ch/rougefm-high.mp3 with other radio

mvppsu
Posts: 4
Joined: Thu Aug 22, 2019 2:31 am

Re: Sonos App Update

Post by mvppsu » Sat Sep 07, 2019 11:05 pm

Can someone help with this one. I can't seem to get it to work.

Get Info:

OLD COMMAND

POST /MediaRenderer/AVTransport/Control HTTP/1.1\x0D\x0ACONNECTION: close HOST:1400\x0D\x0ACONTENT-LENGTH: 272\x0D\x0ACONTENT-TYPE: text/xml; charset="utf-8"\x0D\x0ASOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#GetPositionInfo"\x0D\x0A\x0D\x0A<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encodin ... sitionInfo xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:GetPositionInfo></s:Body></s:Envelope>\x0D\x0A

mvppsu
Posts: 4
Joined: Thu Aug 22, 2019 2:31 am

Re: Sonos App Update

Post by mvppsu » Fri Sep 13, 2019 6:24 am

Never mind. I decided to switch over to the SONOS HTTP API as provided here https://github.com/jishi/node-sonos-http-api This makes interfacing with SONOS much easier.

Post Reply