New Sonos integration


I’m not sure how much revision to the existing actions would be required to get Sonos working again with the new ST websockets integration, or whether it’s a total rewrite is required. I’m sure @ady624 could have figured it out in a flash, but in his absence, one of the @webCoRE_Minions would have to jump in to provide some guidance.


Do you think this needs a complete rewrite? I wish I could be of any assistance :frowning:


Sorry, but I am unfamiliar both with the current code in webCoRE related to Sonos and with the new Sonos requirements.


No worries. Thanks. Hopefully someone on here will be able to update the code required to access the new Smartthings APIs for Sonos


hey bud, do you have any example pistons that use sonos http api. I set it up finally but trying to now modify a few flows to use it but a bit lost. I am assuming I need to use my public IP and possibly open up the port to my node server?


I spent much of yesterday revising all my Sonos-related pistons, including the ones I’ve previously posted here, to work with the new DTH. I’m still testing, so I don’t have any examples to post just yet, but might be able to answer some specific questions.


I got the http sonos to work but still readjusting pistons. Thanks for the help…Good luck with the new DTH.


Okay, I wasn’t clear with your first post yesterday whether you were asking for help with pistons using jishi’s node.js server code or those employing the new Sonos websocket DTH from SmartThings. I mainly rely on jishi’s code, but use the ST DTH for things like dashboard tiles, etc.

My pistons are in a constant state of readjustment. I can never stop tinkering. :rofl:


lol, I hear ya. Sorry for the confusion. I was looking for a few examples of folks using jishi’s node.js server in pistons and was able to find a few posts which guided me to adjusting my pistons correctly.

How are you updating your pistons to use the new Sonos websocket DTH if webcore doesnt yet see all the new functionality?


I’m using the functionality that is available, which in addition to the existing commands—some of which have a new syntax—includes new commands and states related to such things as groups and presets (favorites), etc. As has been noted, TTS and some related functions are as yet missing, but I prefer Jishi’s code for those anyway because it is more flexible (allowing me to use different voices, etc), and in some ways more powerful because of the group presets.


Got it. thanks. I was just looking at your Sonos tiles piston…looks awesome. I agree on Jishi’s code - So fare so good. Are you using any particular TTS service like Polly or the default Google TTS?


I have an updated Dashboard Tiles piston using the new websocket DTH that I’m testing now and will be posting shortly.

And yes, I use AWS polly for all TTS.


Polly is awesome. Freaks my wife out when she comes home to an empty house and a Rene welcomes her home in French.


Excuse me if this has been answered, but have we had confirmation from the @webCoRE_Minions that this has been added to their backlog to update whatever is needed? Don’t expect an immediate fix (although who wouldn’t like that?), but knowing it’s logged and will be considered is the first step.


Just the opposite; happy to roll out a release if anyone can contribute a fix on GitHub but it is not something I am planning to work on.


I see that Rboy recently added support for playTrack, TTS, etc. in the new Sonos integration in one of his SmartApps via—according to the release notes—“auto detect.” The related code looks pretty insignificant, but then so is my understanding of it. :smirk:

I’m not going to violate any copyrights by posting any part of his code, but perhaps someone more knowledgeable with access to Rboy’s apps can take a peek and get some direction on this?


I assume someone has done something because one of my Pistons has started playing an audio track on an event again, but the volume setting hasn’t worked.


Is there a guide how to make ad test changes or is this really an option for some who already knows this?


Interesting. Must have been a change by ST/Sonos on their end. Still no TTS available in DTH as yet, obviously.


The new Sonos DH in ST doesn’t support the fade level feature. I use one of my Sonos in the Master and love it to start with a very low volume level, increasing it over time.
Is there a way to reproduce this functionality through a piston? I tried a lot but were not able to find a way to increase the level over time.

Any ideas from the experts in this forum?