ebaauw / homebridge-zp

Homebridge plugin for Sonos ZonePlayer
Apache License 2.0
240 stars 20 forks source link

Grouped Sonos Speakers always show as 'playing' #166

Closed inmaterichard closed 3 years ago

inmaterichard commented 3 years ago

Hi, thank you for the plugin, it's excellent. I'm having a small issue with the playback status. I have a Sonos One in my bedroom which is always pairs to a Sonos Play:1 within the Bathroom.

I use a smart switch in the bathroom to mute/ unmute the bathroom speaker, meaning the music from the bedroom comes on when you use the bathroom, so they are always paired.

I've got the ZP plugin to show the Sonos as fans, as this seems to offer the most flexibility within HomeKit. I've noticed that when the Pair bedroom speaker is paused / stopped, the bathroom speaker keeps showing as playing / fan on. Any ideas how I can make it report the correct status? I've attached a picture below. The bedroom speaker seems to report the correct status, it's only the Bathroom one.

Screenshot 2021-02-23 at 10 11 50

I'm using the S2 Sonos app, in case that makes a difference.

ebaauw commented 3 years ago

How is the player displayed in the Sonos app? When you just mute it, it's still playing.

If you set speakers, you get an extra service per player, which you can use to group/ungroup zones. I use that (in combination with some motion sensors) to have my music follow me through my home.

inmaterichard commented 3 years ago

I have chosen Fan, because the Speak required the use of a light to control volume, then when you turn off all lights, it switches off the Sonos speaker as well. E.g. when watching a movie and I want to turn the lights off, I loose the sounds as well because my Sonos beam appears as a light in Homekit. Although there might be a better way to configure them? Can you maintain volume control with your configuration. Also, how do you group speakers? I've got some spare motion sensors and your set up sounds very cool!

The issue I was seeing before seems to be a start up issue. The grouped players (one muted), the muted played is showed as playing when there is nothing currently playing. But, if I play then stop music on the group, the issue seems to have been resolved, maybe a minor start up config issue.

ebaauw commented 3 years ago

See the README. Play/pause is per zone group; mute (and volume) is per zone (and per group). If you mute a single zone in a zone group, the group is still playing. The Sonos services by Homebridge ZP reflect the zone group. Set speakers to expose an additional Speaker service to control the zone (volume, mute, but also loudness, bass, treble, etc). You’ll need a decent HomeKit app for that, like Eve. By switching the Speaker service on or off, the zone joins or leaves a zone group. Set the Sonos Coordinator on the Sonos service to indicate which zone group they should join.