Jump to content
C4 Forums | Control4

Clear Queue Sonos Driver/API


jimbones

Recommended Posts

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 ;)

Link to comment
Share on other sites


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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

  • 1 year later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.