"Each track in the cloud queue has all the standard metadata that is needed to fetch the audio for the track. This may include either a mediaUrl (the URL to the actual audio) or a MusicObjectId. If an item contains both of these objects, Sonos ignores the mediaUrl. This is because the MusicObjectId resolves to a URL using SMAPI."
If you just provide an url it can avoid the smapi call.
Thanks - apologies for missing that part.
I've now solved my original problem after getting an email back from the Sonos developers. The players support FLAC streams framed in fragmented MP4 and sent via HLS. Once I provided a stream in that format (doable with the latest version of Liquidsoap) the player was happy.
Hello, thanks for the reply (and apologies for the follow-up, I know this is a bit off-topic!). The Sonos docs suggest that even when using Cloud Queue, SMAPI still needs to implement `getMediaURI`, the call I was surprised to see wasn't implemented - see item 11 under 'Cloud queue workflow' in https://developer.sonos.com/bu... and the diagram above.
"Each track in the cloud queue has all the standard metadata that is needed to fetch the audio for the track. This may include either a mediaUrl (the URL to the actual audio) or a MusicObjectId. If an item contains both of these objects, Sonos ignores the mediaUrl. This is because the MusicObjectId resolves to a URL using SMAPI."
If you just provide an url it can avoid the smapi call.
This is a bit fuzzy as implementation was quite awhile ago. There is some overlap between smapi and cloud queue. So you don't need to fully implement smapi for a service.
If just for personal use, it might be easier to create your own web app and just work with the cloud queue.
The docs and sample apps for that seem to be more up to date. https://developer.sonos.com/to...
Hello, thanks for the reply (and apologies for the follow-up, I know this is a bit off-topic!). The Sonos docs suggest that even when using Cloud Queue, SMAPI still needs to implement `getMediaURI`, the call I was surprised to see wasn't implemented - see item 11 under 'Cloud queue workflow' in https://developer.sonos.com/bu... and the diagram above.
I've got a project to feed the output of my vinyl record player into a Raspberry Pi and stream it across my local network so I can listen anywhere in the house, and I'm trying to get my Sonos system to accept a (lossless) live stream. Radio Paradise seems to be one of few services which achieves this.
I was having a poke around the Radio Paradise Sonos SOAP API with the help of Sonos' developer documentation, and noticed several API calls aren't implemented, including `getMediaURI` (which sounds crucial, if you believe the docs!). Sonos devices are also quite good at sending traffic over HTTPS, so unfortunately I can't sniff the traffic to figure it out on my own.
I wonder if anyone knows about the Sonos API, and if so - please could they provide some information about the API calls implemented to make FLAC streaming work? Thanks!
This is a bit fuzzy as implementation was quite awhile ago. There is some overlap between smapi and cloud queue. So you don't need to fully implement smapi for a service.
If just for personal use, it might be easier to create your own web app and just work with the cloud queue.
The docs and sample apps for that seem to be more up to date. https://developer.sonos.com/to...
Thanks for the reply. To clarify, I'm specifically interested in the Sonos Music API, which enables you to write your own music service (i.e. appear in the app as a music provider). This is extensively documented by Sonos here: https://developer.sonos.com/re... and seems to be only partially implemented by Radio Paradise (which prompted my question).
The library you linked wraps the Sonos Control API, which is what most people on GitHub and elsewhere are interested in. This allows you to send events to change volume, pause, play a stream etc., but not to add an entry to the app.
Ok. Thanks for the clarification. I'm sure you perused the Sonos community forum and all publicly available documentation.
Good luck with your endeavor! - And let us know when and how you succeed.
Not sure, how far you got digging around, but... this link might provide some answers, along with a thorough web-search for the terms: sonos api github (with the list of keywords potentially extended by the term flac after a serious first round of digging to learn and educate yourself on the topic).
*Cheers*
Thanks for the reply. To clarify, I'm specifically interested in the Sonos Music API, which enables you to write your own music service (i.e. appear in the app as a music provider). This is extensively documented by Sonos here: https://developer.sonos.com/re... and seems to be only partially implemented by Radio Paradise (which prompted my question).
The library you linked wraps the Sonos Control API, which is what most people on GitHub and elsewhere are interested in. This allows you to send events to change volume, pause, play a stream etc., but not to add an entry to the app.
I've got a project to feed the output of my vinyl record player into a Raspberry Pi and stream it across my local network so I can listen anywhere in the house, and I'm trying to get my Sonos system to accept a (lossless) live stream. Radio Paradise seems to be one of few services which achieves this.
I was having a poke around the Radio Paradise Sonos SOAP API with the help of Sonos' developer documentation, and noticed several API calls aren't implemented, including `getMediaURI` (which sounds crucial, if you believe the docs!). Sonos devices are also quite good at sending traffic over HTTPS, so unfortunately I can't sniff the traffic to figure it out on my own.
I wonder if anyone knows about the Sonos API, and if so - please could they provide some information about the API calls implemented to make FLAC streaming work? Thanks!
Not sure, how far you got digging around, but... this link might provide some answers, along with a thorough web-search for the terms: sonos api github (with the list of keywords potentially extended by the term flac after a serious first round of digging to learn and educate yourself on the topic).
I've got a project to feed the output of my vinyl record player into a Raspberry Pi and stream it across my local network so I can listen anywhere in the house, and I'm trying to get my Sonos system to accept a (lossless) live stream. Radio Paradise seems to be one of few services which achieves this.
I was having a poke around the Radio Paradise Sonos SOAP API with the help of Sonos' developer documentation, and noticed several API calls aren't implemented, including `getMediaURI` (which sounds crucial, if you believe the docs!). Sonos devices are also quite good at sending traffic over HTTPS, so unfortunately I can't sniff the traffic to figure it out on my own.
I wonder if anyone knows about the Sonos API, and if so - please could they provide some information about the API calls implemented to make FLAC streaming work? Thanks!