Control Sonos Music in 2020?

@TechMedX, CSS code works brilliantly thank you. I had to tweek some of the vertical positioning, which I assume was due to the fact I'm not using Smartly. I've copied the changed code below for anyone who follows that's interested. I'm working on a 3-speaker and 4-speaker combo, as well. If anyone wants that, just ping me and I'll post that too.

Summary

#tile-97{padding-bottom:8em}
#tile-97 .tile-contents{display:inline-flex}
#tile-97 .material-icons{font-size:43px!important;line-height:1em}
#tile-97 .vue-slider{margin-top:2em!important}
#tile-97 .trackDescription{overflow:hidden;white-space:nowrap;padding-bottom:1em;margin:0 .5em}
#tile-97 .music-player{margin-top:-3px}
#tile-97 .tile-primary,#tile-99 .tile-primary,#tile-98 .tile-primary{width:100%}
#tile-98,#tile-100{border:0 none;background-color:transparent!important}
#tile-98{margin-top:-1em}
#tile-100 .tile-title{padding-bottom:.5em}
#tile-100 .music-player,#tile-98 .music-player,#tile-100 .trackDescription,#tile-98 .trackDescription{display:none}
#tile-97 .music-player>div.previous,#tile-97 .music-player>div.play-pause,#tile-97 .music-player>div.next,#tile-97 .music-player>div.muteControl{margin-top:0;top:unset;width:unset;position:relative}
#tile-97 .music-player>div{top:6em;position:absolute;width:100%}
#tile-97 .trackDescription{position:absolute;left:0;top:4em;height:100%;width:auto;padding:0;animation:slideshow 10s linear infinite}
@keyframes slideshow {0%{left:100%}100%{left:-150%}}
#tile-97 .tile-primary>.music-player{margin-top:5px}

I am having one problem with the Virtual Music Player app from @Cobra. When I change the volume of the parent virtual player, all the children change volume too as expected, but only for a minute or so, then they revert to their previous settings. My guess is that this has something to do with the fact that I'm not using Sonos groups. Even though the VMP docs on Cobra's website suggests this works for any speaker device, not only Sonos. I could use RM4 to could everything in sync, but I'd really rather use VMP if feasible.

In my setup, I'm using one Sonos as a source and a bunch of dumb speakers. In between, I've got a smart matrix amp that does the source and speaker selection. Any ideas?

Something else must be changing the speakersā€™ settings
You could try ā€˜Speaker Volume Chaseā€™ to see if that works better for you

Andy

There's literally nothing else attached to the speaker devices. confused. Could it be because I'm not using Sonos speakers? Will check out SVC, thanks Andy.

Edit: I wonder if I've messed up the config of Virtual Music Player app. Since I have a bunch of non-Sonos speaker devices and just one Sonos that I use as a source, I created a virtual device and then just picked one of the speakers to use as the master in. your app. Wonder if I should be configuring the app differently?

@SoundersDude

I know this is a bit old, but man I'm struggling. I'm waffling back and forth about how to get my multiroom audio working and integrated into my home.

Options include Hubitat interface, rasperry pi, or HomeKit. I have all available but it's just overwhelming to figure out which to use and how!

Can you explain a bit more about how yours is setup? Would really appreciate it.

No problem.
So yeah, I went with both;

  1. The built in Sonos integrations
  2. Hosting Sonos HTTP on an RPI (where I also - unrelated- have Homebridge installed which has been great)

I use the HTTP Momentary switches to trigger Sonos HTTP commands like grouping/ungrouping as you see in the screenshot.

And I use the native Sonos integration to do things in apps like RM to play a specific song file if motion is detected while in away more, or to use Sonos as speach to text speakers for things like HSM.

Does that help?

1 Like

Just in case it is useful, I use this for more quickly making buttons that do various things with the node-sonos-http-api:

@SoundersDude

Yes that helps very much. I just need to really wrap my head around this node.js stuff I guess and learn. I feel like I've jumped off the high dive without swimming lessons.

I'm hopeful that I can get those installed on my NAS under docker as that's where I have almost all my home stuff so far. I do have a pi but it's just one more thing to ssh into and manage so I've been trying to dockerize everything under one NAS point.

I will spend some time trying to understand the tools you have pointed out, what you're doing is exactly what I'm trying to do so it's very appreciated!

Cool cool.
Yeah, I took a fast route by installing the RPI image here from community member @csteele which already has NodeJS, Node-Red (I don't use this yet) and HomeBridge on it.

Then installed HTTP Sonos using their instructions.

What took me a while to figure out is how to get it to run all the time on a RPI reboot, which I ended up just adding it to PM2 per this comment: Raspberry PI Image for Homebridge + Node-Red - Integrations - Hubitat

Oh wow. This looks exactly like something I was looking for.
I'll give this a go over the weekend. Thank you for sharing.

1 Like

Awesome -- I hope it works for you. It's also listed on HPM if you prefer to install from there. But check the readme on GitHub for installation and usage instructions, particularly the webhook part if you want to avoid polling for updates.

1 Like

Cool thanks. One question I have is... have you exposed these button virtual devices to Alexa?
Curious if I could tell Alexa "Join outdoor speakers" and get her to "click" the right button here.

No, I only use them as part of other automations (for example, push a certain button when a scene switch is activated). I don't think Alexa can support buttons directly, but you could still use a virtual switch to push this button in a Rule Machine rule.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.