Skip to main content
Master T
Prodigy I
September 17, 2018

Sonos/Smartthings Integration

Glad to see the new sub-forum. My Sonos speakers are an integral part of my Smart Home, which has been built around SmartThings (and webCore) but also utilizes IFTTT, Alexa, and Google Assistant. Just for those considering the possibilities, I'll share a few examples of things I've done. It would be interesting to see ideas and suggestions from other community members on the things they are doing with theirs.

Automated Controls
Scheduled Volume Adjustments for Day and Nighttime (if speakers are inactive)
Auto Adjust Volume to Default When Speakers are Inactive for Preset Period
Play Music at Bedtime & Slowly Fade before Stopping (Sleep Mode)
Music Plays upon Arrival & Pauses on Departure
Music Pauses on Receiving Phone Call
Lower music volume when Doorbell Rings

Voice Control (Alexa / Google)
Adjust Volume of Individual Speaker in Group
Adjust Volume of All Speakers in Group
Play Random Station, Favorite Station or Playlist

Security/Announcements
Security - Home/Away Door Intrusion Alerts (Alarms Sounds & Announcements)
Security - Lights & Music Operate Randomly when on Vacation
Security - If doorbell Rings with No One Home, Plays Sound of Mean Dog Barking (mostly for laughs 😃 )
Misc. Spoken Announcements (i.e., "The Garage Door has been left open")
Announce Estimated Commute Time (uses Google API) Upon Request

Of course, this list doesn't include all the standard tasks available to an Alexa-enabled devices.
This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

20 replies

Contributor I
April 5, 2019
Sorry if this a duplicate response. I have done the same alerts with the Classic version of SmartThings, but have not figured out how to do with the latest Version of SmartThings. The Marketplace does not exist on the new version SmartThings, neither does the SmartThings lab. Any help is greatly appreciated.
Lyricist I
April 23, 2019
Glad to see the new sub-forum. My Sonos speakers are an integral part of my Smart Home, which has been built around SmartThings (and webCore) but also utilizes IFTTT, Alexa, and Google Assistant. Just for those considering the possibilities, I'll share a few examples of things I've done. It would be interesting to see ideas and suggestions from other community members on the things they are doing with theirs.

Automated Controls
Scheduled Volume Adjustments for Day and Nighttime (if speakers are inactive)
Auto Adjust Volume to Default When Speakers are Inactive for Preset Period
Play Music at Bedtime & Slowly Fade before Stopping (Sleep Mode)
Music Plays upon Arrival & Pauses on Departure
Music Pauses on Receiving Phone Call
Lower music volume when Doorbell Rings

Voice Control (Alexa / Google)
Adjust Volume of Individual Speaker in Group
Adjust Volume of All Speakers in Group
Play Random Station, Favorite Station or Playlist

Security/Announcements
Security - Home/Away Door Intrusion Alerts (Alarms Sounds & Announcements)
Security - Lights & Music Operate Randomly when on Vacation
Security - If doorbell Rings with No One Home, Plays Sound of Mean Dog Barking (mostly for laughs 😃 )
Misc. Spoken Announcements (i.e., "The Garage Door has been left open")
Announce Estimated Commute Time (uses Google API) Upon Request

Of course, this list doesn't include all the standard tasks available to an Alexa-enabled devices.



Hey Master T this is fantastic! Would you consider sharing your Pistons for those of us new to Sonos and WebCoRE?
Master T
Master TAuthor
Prodigy I
April 26, 2019
@DavidBQ I've shared a couple of my pistons previously and would be willing to share more, but unfortunately Sonos's integration with SmartThings was broken with the 10.1 update. It still works to a point, but several of my pistons are no longer working reliably. I've been told it's an XML parsing issue, which ST should be able to fix, but I can't get anyone over at ST to pay attention and Sonos (somewhat understandably) doesn't view this as their problem—even though they would be best qualified to write a proper custom Device-Type Handler.
Lyricist I
May 12, 2019
Hi everyone,

Is there a way to play a Spotify playlist? What about loop a Spotify track?

Here's what I've been able to do (using WebCore with SmartThings):

Play a single Spotify track:
Set track to x-sonos-spotify:spotify%3atrack%3a3YqknScYcFrRQR23VZG8RB?sid=12&flags=8224;

Play a Spotify station:
Set track to x-sonosapi-radio:spotify%3aartistRadio%3a3Kt34aALAZu5GUd3WRqsrZ?sid=12&flags=8300

I can't play a Spotify playlist, e.g.

Set track to x-sonos-spotify:10062a6cspotify%3auser%3aericbogs%3aplaylist%3a3HsH3hBIXg47gD814dhj6L?sid=12&flags=10860

or

Set track to x-rincon-cpcontainer:10062a6cspotify%3auser%3aericbogs%3aplaylist%3a3HsH3hBIXg47gD814dhj6L?sid=12&flags=10860

Any ideas?
Lyricist I
January 11, 2020

Is it possible ti trigger a Sonos playlist or favorite station directly thru webCoRE or do I have to set up a trigger in IFTTT and a Virtual Device in Smartthings.  This is what I have done but it is clunky with IFTTT.  I have also had to write my own piston to turn off all the other switches when I turn on a particular station (I am using ActionTiles for my dashboard on an old Samsung tablet).  So my piston works but it is growing in size with all the IF logic and I would rather communicate from webCoRE to Sonos directly. 

I seem to be able to play a specific track but not a station. I am trying to find the correct station info in ST IDE when the station is actively playing on my Sonos but nothing has worked so far. Play Track seems be be just that...only 1 track/song.

Thanks all.

Master T
Master TAuthor
Prodigy I
January 25, 2020

@loboent 

I use the node-server developed by @jishi on a raspberry pi for my integration with webCoRE.  It provides a lot of useful capabilities, and can easily play your favorites (playlists or stations). 

Lyricist I
January 25, 2020

I ended up connecting all my Sonos Favorites via IFTTT and a Virtual Switch in Smartthings.  Then I had to write a piston to manage all the switches so only 1 Switch shows on at any 1 time and I can pause by tapping the Switch/Station that is currently playing. I control everything thru ActionTiles.

Would have been a lot easier if I could play a Sonos Station/Favorite directly from webCoRE.  I am not a big fan of IFTTT.

 

https://community.webcore.co/t/controlling-multiple-sonos-stations-via-ifttt-and-actiontiles/15563

 

in case anyone is looking for something similar.

User694694
Enthusiast II
February 12, 2020

I like the idea that the OP described of having his speakers return to a preset volume after a period of inactivity. I think this is a great idea. I need to figure out how to do that.

I recent added Hubitat Elevation to my many hubs to allow local control of Lutron switches and Picos. I noticed that it was dead simple and baked in to HE to control Sonos text to speech. I use it along with a doorbell sensor (Sage) to alert me when someone rings my doorbell and I’m in the yard (Sonance and patio speakers hooked up to a connect and connect Amp) or in my detached casita that doesn’t have a doorbell chime. Anyway, I’m sure there are lots of things that can be done with the text to speech that I haven’t thought about.

Master T
Master TAuthor
Prodigy I
February 13, 2020

I like the idea that the OP described of having his speakers return to a preset volume after a period of inactivity. I think this is a great idea. I need to figure out how to do that.

Initially, I was using webCoRE with an ST Hub alone to accomplish this. Since my initial post, I’ve incorporated jishi’s node-server on a raspberryPi.  So now in addition to returning to a preset volume, my groups are also reset and/or modified on schedule (or on command as I move about the house). 

Lyricist I
June 18, 2020

Has anyone had any issues with the Playbase? I’ve integrated Sonos via the Echo and SmartThings. When someone opens the front door via my Yale smart lock, the Sonos announces “Front door was opened by so-and-so” - which is great, but after the announcement the volume of the Playbase is zero