Jump to content
C4 Forums | Control4

Sonos Programming - pulling my hair out


Recommended Posts

Just trying to have some simple buttons to switch between different playlists. My setup is:

  • Sonos Connect setup to pull playlists from google play music. 
  • Distributed to ceiling speakers in various rooms throughout house via control4 audio switch.

I have 1 custom button in the master bath (for example), that then has 2 options (his and hers playlists). If I MANUALLY clear the queue, and start fresh with one or the other... works fine. If I run hers, but then turn the room off, then come back and turn mine on... It just mixes some of my music into the queue along w hers? What am I doing wrong? I dont see a way to programmatically clear the queue on the Sonos first. Is that even possible? Seems like when I select a sonos playlist it should overwrite the queue? When you do it in the app though, it does give u a "this will clear the current queue" popup. Is that why it doesn't work?

 

 

Link to comment
Share on other sites


How do I contact Control4 to ask for a feature request in Composer? Either a "replace queue" conditional when selecting a new playlist, OR a "clear cue" stand alone command sent before selecting the new playlist. From other 3rd party control forums... it seems both of these methods are possible. 

I think I have a much better shot of getting C4 to help than I do of getting Sonos to change the default behavior. 

Link to comment
Share on other sites

Looks like there was a HUGE uproar on the Sonos forums 2 years ago when the devs were debating which way to handle this. needless to say, "Mixing in" won. I've reached out to one of the dealers on here to see if he can help me route a feature request to the Composer team. Fingers crossed...

Link to comment
Share on other sites

52 minutes ago, g8rfn2 said:

I've reached out to one of the dealers on here to see if he can help me route a feature request to the Composer team. Fingers crossed.

Just FYI: AFAIK the C4 driver is using any and all features available in the API - there may be nothing C4 can do beyond passing it on to Sonos. Doesn't mean it doesn't hurt to try of course.

Link to comment
Share on other sites

When u control Sonos directly from google play app (or youtube music), it overwrites the queue as you would expect. So, there has to be a way to do it in the API. 

Though... I do agree it's likely going to be an uphill ask either way, just not because it "can't" be done. C4 wants u to buy their hardware, and sonos wants u to use their native controls. It's what makes this whole world so frustrating for us end consumers. We just want the things we have accumulated over the last 10 years to all work decently together. Not perfect mind you... just decent. 🙂 Stuff like this makes me crazy! C4 does a better job than most. That I can give them. 

Link to comment
Share on other sites

2 minutes ago, g8rfn2 said:

So, there has to be a way to do it in the API.

Not at all. At least not based on that - Google is controlling Google - not Sonos in your example. In other words, Google is changing the stream on IT's end, whereas 3rd party needs to tell Sonos to do something as an intermediary.

3 minutes ago, g8rfn2 said:

That looks like an old version, as AFAIK uPnP is the old interface that was blocked off - but other would know better than me.

Link to comment
Share on other sites

3 minutes ago, g8rfn2 said:

Then I should maybe change my argument to ask them to support Google Play / Youtube Music natively instead? I was saving that one for next month. LOL

 

Sigh...

Might be a better route.

I don't see anything related to clearing a queue in here:

https://musicpartners.sonos.com/?q=docs

I see some code to add/delete favorites and remove stuff from a playlist. As well as play all and shuffle all is mentioned, but nothing about replace or clear.

Link to comment
Share on other sites

13 hours ago, g8rfn2 said:

Then I should maybe change my argument to ask them to support Google Play / Youtube Music natively instead? I was saving that one for next month. LOL

 

Sigh...

Please do but reroute that request to google.  C4 isn't the hang up there. 😉

Link to comment
Share on other sites

13 hours ago, Dunamivora said:

Maybe it still is in the API? That Github project looks current. Unless that Github project is using a mix of the old Sonos API and the new Sonos API.

Just looked at source it's using the AVTransport service. I'm not sure which of the UPnP services are still supported, but at first glance it looks like it's still a MediaRenderer.
https://github.com/duncan3dc/sonos/blob/master/src/Queue.php

Also, the SMAPI isn't really locked down to Sonos, at least it wasn't last I checked. They made a general interface that Music Services were to adhere to. It's how I made the Songza driver back in the day integrated into Control4. I would imagine it's still possible to integrate some music services directly into Control4 using the SMAPI even now.

https://musicpartners.sonos.com/node/71#toc0

 

Link to comment
Share on other sites

14 hours ago, g8rfn2 said:

https://duncan3dc.github.io/sonos/controllers/queue/

All these must be old, then? Gotta be honest, it makes me even MORE frustrated that you used to be able to do it... and now u just can't.

smh

Oh lots of people share that thought - Sonos locked down what could be done (officially) and is more or less forcing partners to stick to the 'program', but a LOT was lost when that happened, and little has been regained.

Link to comment
Share on other sites

Well, I genuinely tried to even get to the right people at Google to make this request, but after 52 minutes of tail chasing... I am giving up.

I *DID* however get something posted to Sonos, who generally seem to be pretty good about responding. So, we'll see what they say about bringing back the option from the dead. The thread is here for anyone who wants to pile on: https://en.community.sonos.com/smart-home-integrations-229108/api-feature-request-queue-control-6827158

Link to comment
Share on other sites

Are we talking about a playlist you've made from your own music, ie music on a NAS, or a streaming service playlist? 

If I'm playing my Spotify playlist and switch to my wifes it stops playing mine and starts playing hers, there is no mixing what so ever. 

Link to comment
Share on other sites

  • 4 months later...

Is there any progress on this? - whenever I choose any playlist - I just want to clear the existing queue first because if I have shuffle on for the playlist - it now just keeps adding the contents of each playlist or favorite to the existing queue which makes a huge mess.

 

Is there really no option to clear the queue from the Control4 app or touchscreen???

Link to comment
Share on other sites

8 minutes ago, samsmoothjazz said:

Is there any progress on this? - whenever I choose any playlist - I just want to clear the existing queue first because if I have shuffle on for the playlist - it now just keeps adding the contents of each playlist or favorite to the existing queue which makes a huge mess.

 

Is there really no option to clear the queue from the Control4 app or touchscreen???

Correct, there isn't. I've heard it's Sonos' fault since they did not include it in their API.

Link to comment
Share on other sites

  • 1 year later...

Dragging up this old thread because I discovered this little tidbit in the Sonos API documentation:

Quote

Sonos players support queue actions to determine how to load content into the queue. Set queue actions in the loadFavorite and loadPlaylist commands.Set the queueAction to one of the values below
 

Set the queueAction to REPLACE to replace all the tracks in the shared queue with the new tracks.

This looks like exactly what we are after. Would love to know more details, if this is possible to add to C4 driver? If Control4 is updating their Sonos driver?  Or if anyone has the ability to to write a custom driver using this?

https://developer.sonos.com/reference/types/queueaction/

Link to comment
Share on other sites

  • 4 weeks later...

@g8rfn2 I thought you would have been ecstatic to hear this news, especially after all the work you did in the Sonos forums. Still hoping C4 can integrate this into their driver, or perhaps a 3rd party dev wants to create a button, or driver, or something, to specifically add queue clearing capability.

Link to comment
Share on other sites

  • 2 years 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.