Available SIDs
Folowing your form contents from https://michaeldick.me/sonos-nprone/ I used the SID 255 as given. I get a resonse Error 400 Bad Request. I double checked by entry of your data in the form and tried it 3 times. I did find the hint in one of your open issues that both Overcast and your NPR One service CAN be used. The issue is both can’t use the SID 255. You suggest 252. I tried 252 and my form submission succeeds. I couldn’t figure out how to get a list of SIDs in use or available. Now, this isn't so much an issue for your code, but the Sonos service configuration. The remove service process on your page needs us to remember this SID. Is there a place in the Sonos Settings dialogs to recover the SID?
Unfortunately I haven't found a way to see which SID are in use/were used when setting up the service.
The Sonos documentation recommends "Valid values are 240-253, and 255 inclusive."
You can use my new library to list the current services.
ID: 284 => YouTube Music
ID: 277 => NRK Radio
ID: 275 => ARTRADIO - RadioArt.com
ID: 272 => Worldwide FM
ID: 271 => IDAGIO
ID: 256 => CBC Radio & Music
ID: 260 => Minidisco
ID: 262 => My Cloud Home
ID: 268 => myTuner Radio
ID: 265 => PowerApp
ID: 264 => radio.net
ID: 270 => Relisten
ID: 301 => Primephonic
ID: 300 => JUKE
ID: 295 => Soundtrack Player
ID: 285 => Soundry
ID: 294 => Radio Javan
ID: 283 => Calm
ID: 279 => Global Player
ID: 212 => Plex
ID: 38 => 7digital
ID: 254 => TuneIn
ID: 239 => Audible
ID: 233 => Pocket Casts
ID: 230 => NTS Radio
ID: 226 => Storytel
ID: 231 => Wolfgang's Music
ID: 235 => Sveriges Radio
ID: 234 => deliver.media
ID: 224 => HitsNL
ID: 217 => FIT Radio Workout Music
ID: 218 => Soundsuit.fm
ID: 219 => Audiobooks.com
ID: 222 => nugs.net
ID: 223 => RauteMusik.FM
ID: 221 => LivePhish+
ID: 237 => storePlay
ID: 9 => Spotify
ID: 203 => Napster
ID: 2 => Deezer
ID: 144 => Calm Radio
ID: 45 => hotelradio.fm
ID: 13 => Stitcher
ID: 24 => DAR.fm Record Radio
ID: 150 => RUSC
ID: 151 => Google Play Music
ID: 157 => Bandcamp
ID: 154 => Radionomy
ID: 160 => SoundCloud
ID: 174 => TIDAL
ID: 192 => focus@will
ID: 193 => Tunify for Business
ID: 198 => Anghami
ID: 184 => Stingray Music
ID: 189 => SOUNDMACHINE
ID: 191 => Classical Archives
ID: 181 => Mixcloud
ID: 182 => FamilyStream
ID: 164 => Saavn
ID: 169 => Tribe of Noise
ID: 167 => Gaana
ID: 171 => Mood Mix
ID: 162 => radioPup
ID: 163 => Spreaker
ID: 31 => Qobuz
ID: 36 => Hearts of Space
ID: 204 => Apple Music
ID: 211 => The Music Manager
Got this list with the following code.
const SonosDevice = require('@svrooij/sonos').SonosDevice
const XmlHelper = require('@svrooij/sonos').XmlHelper
const sonos = new SonosDevice(process.env.SONOS_HOST || '192.168.x.x')
sonos.MusicServicesService.ListAvailableServices().then(resp => {
var musicServiceList = XmlHelper.DecodeAndParseXml(resp.AvailableServiceDescriptorList)
musicServiceList.Services.Service.forEach(s => {
console.log('ID: %d => %s', s['_Id'], s['_Name'])
})
console.log(JSON.stringify(musicServiceList.Services.Service, null, 2))
})