Home AMX General Discussion

SONOS 1 way IP commands

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

Comments

  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    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

    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/&quot; s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
    <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
  • ok1mpdok1mpd Junior Member Posts: 4
Sign In or Register to comment.