Sonos - setting options for devices

Hi,

I'm currently a Home Assistant and HomeKit automation user. Intrigued by Hubitat so bought myself a C7 and looking to move my devices to HE. One of my 'must have' integrations is Sonos. In particular I have a Beam and Arc and, in HomeAssistant, set the Night Sound and Speech Enhancement options based on time of day. I see that HE has a Sonos 'driver' but cannot work out how to use it to automate these two options. Can someone point me in the right direction so I can learn how to achieve this?

Thanks,
Mark

I did some monkeying around with this a couple of months back, and got as far as being able to turn my playbar’s night mode on and off with an API call, but never got around to teaching myself to write a Hubitat app (or driver?) to handle the authentication and control. Am back to homeschool teaching now the UK is back in lockdown, but will post something if I ever pick it back up.

I'm a Hubitat user and I recently bought a "Sonos Arc" soundbar. I'd love to do what @msbc was doing in Home Assistant which is to automate turning on and off "Night Sound" on the soundbar at certain times of the day. But unfortunately, the Sonos device I have setup in Hubitat doesn't have a toggle for that setting.

Does anyone have an app or device driver for Hubitat that will allow me to turn on or off "Night Sound" on my "Sonos Arc"?

There are a couple options, depending on whether you care if it is local or if cloud-based is acceptable.

If you require local, the best option in my opinion is to run the node-sonos-http-api in a Node.js instance. There are many options for this, but I use Raspberry Pi. I created a driver to make it easier to interact with from Hubitat, and adding the nightmode and speechenhancement functions would be no problem. Some other users just interact with the node API directly from Rule Machine for simple functions.

If you want something easier to set up and don't mind a cloud reliance, the Sonos cloud API also supports those functions. I wrote a Hubitat app to do the authentication and token management, which would make it relatively quick to add a Hubitat driver to access the various APIs. But I haven't put much effort into that driver yet because I prefer the non-cloud option. But I would be willing to add this functionality and release my cloud driver if you would be willing to test it.

FYI @msbc