Puzzling with Sonos. Why nobody has my similar problem or frustration with Sonos Integration?

That's not true, unless I misunderstood what you were saying.

You can only control the master of any group, yes. But if your speakers are ungrouped then each is its own master. And if you create different groupings, you can always control the different groups by addressing their masters.

Just so there is no confusion about whether you can control more than one speaker or group with the built-in integration.

1 Like

I have 8 Sonos speakers in different places. They are all in 1 group. The beauty of smartthings is that you can create “one” media player tile using “any” Sonos speaker. This is a big advantage because when I build a dashboard with ActionTiles or SharpTools, I can randomly select one of the eight speakers regardless which one is the master. And I prefer to have one media player tile on the dashboard, so a dashboard doesn’t need to be clustered with all 8 speakers. Much cleaner look. The problem with HE, you must use the master of the group. Here is the problem: Master is not permanent. Master would be randomly selected if the original master goes offline. Now, you will have to find which becomes the master. Or I could put all 8 speakers on the the dashboard, and if a master gets re-elected, then I could find which one now becomes the master. But it still takes me some time to find it. Not intuitive at all. And, too many Sonos tiles make my dashboard clustered and ugly. That’s just my personal preference. I just want to see one integrated media player tile instead of 8. Another problem with HE’s Sonos implementation that bothers me is that non-master Sonos will just display “null” value rather than the song titles. To me, it’s not aesthetic. I understand many people prefer to put all Sonos media tiles on the dashboard. It’s just a matter of personal preference. But Smartthings at least gives me this personal preference. Again, our family enjoys same music playing uniformly throughout the entire house. That’s why I just have one group.

Let me put it this way, if Smartthings implemented this capability 8 years ago of allowing user to randomly use any Sonos speakers to control the group regardless whichever is master. I think HE developers could try little harder to get this feature built-in. It might benefit to some other folks too.

Another HE’s shortcoming in Sonos implementation, you cannot group or ungroup speakers, and you cannot natively control group volume. To be fair, Smartthings can’t achieve these either. But Home Assistant can do everything I described above.

So, I still heavily use HE for all the Zwave and Zigbee integration, but I use HA just for Sonos now.

1 Like

I wasn't intending to beat up Hubitat over this - I think the product is great, and it seems it's going to be a rock-solid replacement for my Vera Plus, and then some. That said, it's evident from the various posts in this thread that there's a lot of interest in getting a more robust integration with Sonos, especially given the number of other home automation "gadgets" out there that already do this much more elegantly (i.e. SmartThings, BriliiantSwitch, etc.), and Sonos has become such a popular audio system. So, it would seem there aren't any limitations on the Sonos side - it just needs to be an investment on the Hubitat side to improve what's already there.

Hubitat folks - hope you're receiving this feedback. I appreciate you probably have a big backlog on your product roadmap, but given you already have this integration, and it just needs some "beefing up" I'm hoping you might be able to do something sooner rather than later. My Harmony Hub has already died in one of my homes, and I'm expecting that to happen in the second one at any time. It would be ideal to maintain that level of automation over my Sonos system using Hubitat instead. :crossed_fingers:


I'm frustrated by this as well, they should just open source these drivers if they aren't going to be improving and maintaining them. I use TTS and tried to play a chime when a door opens but when music is playing in a group, it's nearly impossible to get the behaviour I want.

What behavior are you looking for in that case?

1 Like

a) Each Sonos speaker should be its own media device.
b) Each Sonos group should be its own media device.
c) The ability to select individual Sonos speakers to create a new group as a media device.
d) Add the ability to crossfade: Shuffle, repeat, and crossfade songs | Sonos
e) Each Sonos media device (individual or group) tracks the state of the last volume and last track and this is exposed via attributes / available via Rule Machine.

I think that would cover the ground for what I want to do and everything mentioned in this tread. As for the basics of what I want to do: Music is playing on a Sonos group (say 4 speakers) but I'd like the chime to play on a single speaker (crossfade) then resume the playback (crossfade) on the group of speakers.

TTS a bit more involved but would be covered by steps I mentioned above. If I had more time or incentives (Hubitat app store?) I'd write the driver.


Maybe (c) isn't required if you can create the group from Sonos and it is then discovered and exposed in step (b) on Hubitat:

You can do all of those things with the node-sonos-http-api. You have to run a separate machine that can run nodejs, but otherwise it's all local and fast/reliable.

All of the grouping and playback control are straightforward. I wrote a driver (additional discussion here) that does those things. The nice thing with that API is that you can always address a speaker as if it was an individual, and if it's in a group it will also control the group. And the API implementation allows you to address any speaker in the group, so it simplifies things quite a bit.

The crossfade thing may take some more research. You could brute force it:

  • pause group
  • ungroup the speaker where you want TTS
  • play the TTS (probably easiest to use the built-in Hubitat integration for this step)
  • play the group
  • re-join the TTS speaker to the group

...or there may be a way built-in to do it with that API that I'm not aware of.

1 Like

Hmm ok, so it would be possible to expose the 'node-sonos-http-api' via some device driver commands like you did here and and get some automation:

It's still a whole lot of hackery (using a separate server) that I don't think should be necessary. I like lean stuff that are maintenance free and can't say that's been my experience with the "smart home" :slight_smile:

1 Like

Totally agree.

But the built-in integration doesn't do any of this and it doesn't look like it is going to get any new features. So, you either hack at it or don't have the functionality (or go to another automation controller).


As @tomw has said, it's well worth the effort, especially if you have a lot of speakers and groups to manage. The "presets" make things so much easier than you can imagine.

Also, a note about the SmartThings integration. As it stands today, that integration is based on a proprietary websocket-based groovy DTH. As yet, despite numerous inquiries, SmartThings has made no commitment to delivering an equivalent Edge-compatible driver/integration. So that integration might not continue in its present form at all.

Hubitat's integration would improve significantly if they were able to utilize the Sonos Websocket API, but even if that happened I would still use the node-sonos-http-api. I can't imagine having a significant Sonos investment without it.

ETA: Hours after I posted the above, SmartThings announced that an EDGE based was in development and would be released in the very near future.


Thanks for the suggestion, I think I will end up using NodeJS on a separate server :neutral_face:


Another node-sonos-http-api user here. Definitely the way to go!

1 Like

Im going to upvote this for improved Sonos Integration. Features I am looking for within the native HE experience;

  1. Group/Ungroup Speakers
  2. Cycle Sonos Favourites (like the Lutron Pico Integration using the middle button)
  3. Load Sonos Playlist (can this be done already? if no I can't figure it out)

For the few of you who still have SmartThings access and either aren't interested in running the node-http-sonos-api or are waiting for the Raspberry Pi supply shortage to ease, I've just released a bridge solution to some of the issues discussed in this and a few other threads with a Sonos Replica driver for HubiThings.

I became involved with HubiThings Replica as a tester while it was in Alpha and tackled this project after some other discussions piqued my interest.

For what it's worth, I'm still very much an advocate for an updated Hubitat integration, and nobody's ever going to pry my node-sonos-http-api away from me :wink:


Wow! Wow! Wow! I am all dancing and singing. You don't know how excited I was to see your post. This is AMAZING!!! For so many years, I was so frustrated and disappointed that I had been forced to keep the Smartthings hub just because of the imperfection and half-baked HE's implementation of Sonos driver. I thought I was the only one who was struggling to migrate from Smartthings to HE just because of HE's Sonos Integration. I mean Smartthings is not perfect, but I could totally use most of the Sonos functions from Smartthings hub.

I am so glad you took the lead and help out the community. I am going to try it now! But thank you thank you thank you! I hope the HE developers will take your driver to become part of their firmware!

1 Like

Thanks for the kind words. To be clear, of course, this doesn't eliminate the need to keep your SmartThings hub running, but quite the opposite! HubiThings Replica just allows you to mirror SmartThings' devices to Hubitat, and this driver simply leverages that capability for Sonos. My part in creating this driver is tiny compared to the work that @Bloodtick_Jones put in to creating HubiThings. My work rests upon the foundation he created.

They wouldn't be able to use anything from my driver. A entirely new websockets driver is what's really needed, IMO.

1 Like

Merry Christmas everyone, and here's to another year with HE!

I'm currently using the a dedicated server to utilise the 'Control API' for my Sonos speakers to utilise the audioClip endpoint to overlay announcements without using the HE built in TTS feature (which is a bit jarring).

I've noticed that others have started to document local websockets based options to expose various URI's - GitHub - seaside1/jrule-sonos: JRule Sonos Integration

Is there anything similar that can run on our HE hub as a driver/app please, as that will go someway to bridge the gap mentioned in some of use cases in this thread?

Best wishes,

Not sure if this will help you...

1 Like

As @DGBQ linked, I've got a cloud integration for Sonos that can do the non-interrupting TTS without needing to run anything anywhere on a dedicated server. You do need to get a client secret + client key from the Sonos developer portal, but that's free and not really hard.

I've got a big update coming soon for it, which will utilize the local UPnP and SSDP features of these speakers to get a bunch of "current state" and allow for local control over much of it as well, eliminating any need to run the built-in app as well. I've got it pulling in current playing state, current track/artist, and a few other things already, so depending on how much time I have over the long weekend here, it should be close to having a big update with that.