Sonos Play Track - Stopped State

I have Sonos Integration set up and working, to some degree.

I have a URI that I got from the device page:
x-sonos-http:XXXXXXXXXXXfhknNbhHIfo7CrDai9Q7IjtTnGYbKaMuRt1oNDa8TVEKGrnQFGU7IAMBQ3uU_5xY96wl6e-S4ovg%3a%3aST%3a36601058461575458%3a%3aRINCON_000E58304D8601400%3a47.mp3?sid=236&flags=0&sn=6

When I do "Play Track" and paste the URI in:

  • One time it worked perfectly - set the track and started the sonos
  • Every other time it sets the track (from the log) but stays in the stopped state.

Here is a sample log:

Time Level Type ID Name Message
2019-01-31 08:40:10.584 info dev 164 Sonos - Office Sonos - Office is stopped
2019-01-31 08:40:10.582 debug dev 164 Sonos - Office enqueuedUri: x-sonos-http:XXXXXXXXXXXfhknNbhHIfo7CrDai9Q7IjtTnGYbKaMuRt1oNDa8TVEKGrnQFGU7IAMBQ3uU_5xY96wl6e-S4ovg%3a%3aST%3a36601058461575458%3a%3aRINCON_000E58304D8601400%3a47.mp3?sid=236&flags=0&sn=6
2019-01-31 08:40:10.580 debug dev 164 Sonos - Office trackUri: x-sonos-http:XXXXXXXXXXXfhknNbhHIfo7CrDai9Q7IjtTnGYbKaMuRt1oNDa8TVEKGrnQFGU7IAMBQ3uU_5xY96wl6e-S4ovg%3a%3aST%3a36601058461575458%3a%3aRINCON_000E58304D8601400%3a47.mp3?sid=236&flags=0&sn=6
2019-01-31 08:40:10.577 debug dev 164 Sonos - Office trackNumber: 1
2019-01-31 08:40:09.851 info dev 164 Sonos - Office Sonos - Office is transitioning
2019-01-31 08:40:09.848 debug dev 164 Sonos - Office enqueuedUri: x-sonos-http:XXXXXXXXXXXfhknNbhHIfo7CrDai9Q7IjtTnGYbKaMuRt1oNDa8TVEKGrnQFGU7IAMBQ3uU_5xY96wl6e-S4ovg%3a%3aST%3a36601058461575458%3a%3aRINCON_000E58304D8601400%3a47.mp3?sid=236&flags=0&sn=6
2019-01-31 08:40:09.845 debug dev 164 Sonos - Office trackUri: x-sonos-http:XXXXXXXXXXXfhknNbhHIfo7CrDai9Q7IjtTnGYbKaMuRt1oNDa8TVEKGrnQFGU7IAMBQ3uU_5xY96wl6e-S4ovg%3a%3aST%3a36601058461575458%3a%3aRINCON_000E58304D8601400%3a47.mp3?sid=236&flags=0&sn=6
2019-01-31 08:40:09.843 debug dev 164 Sonos - Office trackNumber: 1
2019-01-31 08:40:09.814 debug dev 164 Sonos - Office not parsed: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:PlayResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"></u:PlayResponse></s:Body></s:Envelope>

I have found uri's very tricky to deal with. It was tricky in ST and a lot trickier in HE. There is a good chance you are using an invalid URI. I have seen it where using a bad uri simply resumes playback of the previously loaded track/album/whatever...so it "appears" to be valid. Then when tested again, you realize that it never really worked.

What I have done is to verify each uri before saving it as valid. Depending on the type of uri being played (single track/album/playlist/Amazon playlist/google playlist/radio station/etc) they may require a different uri to get going. I would try all of the following when testing...uri, trackUri, enqueuedUri and transportUri till I find one that worked.
The only way to know for sure that it's the right one is to load another playlist, stop it and then test your saved uri.

Good luck.

That worked! The trackUri did not work. The transportUri did work! Thanks @stephack.

(Note - oddly one time the transportUri did work. No idea why it worked one time as opposed to never.)

1 Like