Sonos Party Switch

So I’m trying to do something that I thing is pretty simple but maybe it’s not. I want to make a box with an open/close sensor that when opened cues a playlist in Sonos then stops it when it closes.

I made a virtual switch and was able to use the speaker controller app to turn on a Sonos speaker but I can’t seem to have any control over the playlist and I can’t stop it by turning off the switch. I saw that there was a Sonos mood music app but I don’t see that anywhere in the Smartapps.

Any help would be great. Even if the help was simply saying that’s not possible.

Thanks.

Short answer is yes…somewhat. When you get this configured, you will have to deal with the eccentricities of the Sonos integration. These steps assume you are familiar with Core and the IDE.

  1. Open the sonos app and begin playback of the playlist you want.
  2. Log into IDE and open My Devices page and click on the speaker you want to control.
  3. scroll down to the data section and copy the queueUri info listed
  4. Use core to Play Track when contact opened. Paste copied URI into Track URI in Core.

Fantastic. Thanks. I will check that out and let you know if I have any questions. Thanks so much for your help!
Ryan

Ok, so it looks like I do have one more question. I was able to find the queueUri info and copied that. I guess I’m not sure where I should paste that info. I’ve created both Speaker Control and Speaker Mood Music apps from the templates in the IDE but I can’t seem to find where to paste that info. Is there is another app that I should be using or a different place to paste this in?

Thanks again for your help, Stephan.

You will need the CORE smartApp installed and it will require a little investment of time on your part if you are not familiar with it. Luckily, there is a lot of help available on the forum. Keep in mind, there may be a simpler solution or smartapp available but this is what I would use since I already have it configured for any custom automations I need. I well worth the time to learn because the possibilities are endless when you understand its potential. See links below.

For a quick tutorial see:

And for help if you get stumped:

This is great. Happy to put the time in and learn the right way. Thanks again for all of your help, Stephan!