jimbones Posted January 4, 2022 Share Posted January 4, 2022 Can we nag the C4 devs that worked on the Sonos driver (making an assumption that is was developed in-house) to add the ability to select a queueAction when adding new tracks/playlists/favourites to a Sonos queue? https://developer.sonos.com/reference/types/queueaction/ Our household requires the queue to be cleared almost every time we select a playlist as we don’t want old playlists in the currently playing shuffle. But some people may want the option to choose. On a side note, does anyone want to help write a script that could do this in the meantime, that would be greatly apprecaited! It’s a little beyond my current skill set Quote Link to comment Share on other sites More sharing options...
-defunct- Posted January 4, 2022 Share Posted January 4, 2022 Is that the cloud api? If so, it won't be added to the C4 driver. Quote Link to comment Share on other sites More sharing options...
jimbones Posted January 4, 2022 Author Share Posted January 4, 2022 Oh interesting. What API does the C4 driver use? And what’s the reasoning/logic behind that choice? Quote Link to comment Share on other sites More sharing options...
-defunct- Posted January 4, 2022 Share Posted January 4, 2022 The C4 driver uses the device's local API, not the cloud one. Reasoning being, volume and such should be controllable regardless of if your internet works. Quote Link to comment Share on other sites More sharing options...
jimbones Posted January 4, 2022 Author Share Posted January 4, 2022 Interesting. Does the Sonos driver use the undocumented UPNP API then? If that’s the case, then maybe there is still hope. The node.js Sonos HTTP API, which is based on the UPNP API, has a clear queue action. The local UPNP API must support that then? https://github.com/jishi/node-sonos-http-api Quote Link to comment Share on other sites More sharing options...
jimbones Posted January 4, 2022 Author Share Posted January 4, 2022 And actually, Savant’s Sonos integrations use the UPNP API and also supports clearing the queue. So maybe there is hope. Quote Link to comment Share on other sites More sharing options...
-defunct- Posted January 4, 2022 Share Posted January 4, 2022 4 minutes ago, jimbones said: Interesting. Does the Sonos driver use the undocumented UPNP API then? If that’s the case, then maybe there is still hope. The node.js Sonos HTTP API, which is based on the UPNP API, has a clear queue action. The local UPNP API must support that then? https://github.com/jishi/node-sonos-http-api No. Their certified works with sonos local API. Quote Link to comment Share on other sites More sharing options...
-defunct- Posted January 4, 2022 Share Posted January 4, 2022 Sonos has a few things in their cloud API that they haven't ported to their local API. Once they do, I'm sure the feature will be added. jimbones 1 Quote Link to comment Share on other sites More sharing options...
jimbones Posted January 4, 2022 Author Share Posted January 4, 2022 Well not sure how you tell if their documented API is local or cloud. But the information is there, and I can only hope that it could be added to the driver. https://developer.sonos.com/reference/types/queueaction/ Does anyone have any workarounds in the meantime? I’ve looked into IFTTT, some iOS apps, etc. but having a hard time solving this problem. Quote Link to comment Share on other sites More sharing options...
-defunct- Posted January 4, 2022 Share Posted January 4, 2022 Our recommended methods are to use the Sonos app to clear the queue, or reboot the Sonos device. Quote Link to comment Share on other sites More sharing options...
jimbones Posted January 4, 2022 Author Share Posted January 4, 2022 Oh reboot’s interesting. Can’t believe I’m about to say this, but I wonder if I could programs these playlists on UI buttons, trigger a power cycle and then start the playlist. Feels so heavy handed, but asking our family to open up another app and navigate the UI to hit a single button is almost a bigger ask. Lol. Quote Link to comment Share on other sites More sharing options...
-defunct- Posted January 4, 2022 Share Posted January 4, 2022 To avoid delay on starting the audio, I would put the power cycle on the room off. jimbones 1 Quote Link to comment Share on other sites More sharing options...
jimbones Posted January 4, 2022 Author Share Posted January 4, 2022 YES! @DunamivoraI love it! This is perfect. Thank you. Quote Link to comment Share on other sites More sharing options...
DanITman Posted January 7, 2022 Share Posted January 7, 2022 On 1/4/2022 at 1:27 PM, Dunamivora said: Sonos has a few things in their cloud API that they haven't ported to their local API. Once they do, I'm sure the feature will be added. In this case, queueaction is supported locally and through the cloud. When selecting a favorite or playlist you need to add a parameter that determines the queueaction. I'm not sure who is in charge of this driver (assuming C4) this could be added to the driver. Clearing the queue is not supported in the web api or local api and will require a custom driver to implement. jimbones 1 Quote Link to comment Share on other sites More sharing options...
dansyring Posted May 4, 2023 Share Posted May 4, 2023 How did you trigger a power cycle on the devices? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.