SONOS 1 way IP commands
Emmett@e2automated.com
Posts: 3
I haven't found a great solution for a full sonos AMX interface or module, but wanted to send just basic play pause forward back etc to a sonos connect. From TPC it jumps to the sonos app for full control. Just wanting a way to send favorite recall from a MET7.
-Emmett
-Emmett
0
Comments
Sonos is a UPNP device, so you have to subscribe to it and create a packet with a header and a SOAP message. For the "Remove Track From Queue" command for instance, the packet would be:
POST /MediaRenderer/AVTransport/Control HTTP/1.1
CONNECTION: close
ACCEPT-ENCODING: gzip
HOST: 192.168.1.142:1400
USER-AGENT: Linux UPnP/1.0 Sonos/11.7-19141a
CONTENT-LENGTH: 308
CONTENT-TYPE: text/xml; charset="utf-8"
SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#RemoveTrackFromQueue"
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:RemoveTrackFromQueue xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<ObjectID>Q:0/1</ObjectID>
</u:RemoveTrackFromQueue>
</s:Body>
</s:Envelope>
As you can see its not as simple as just sending a command. Its a POST command that uses an XML SOAP message.
Paul
https://github.com/ok1mpd/Netlinx-UPnP-control-point