jjlawren / sonos_cloud

Sonos cloud API integration for Home Assistant with improved TTS/alerts handling
121 stars 5 forks source link

Playback on groups #6

Closed jjlawren closed 2 years ago

jjlawren commented 3 years ago

Hi. I am having an issue. Two Sonos One v2 speakers grouped as Living Room. When I use this integration and select the Living room speak only the left speaker does the TTS rather than both as per the normal sonos integration

_Originally posted by @cstrand89 in https://github.com/jjlawren/sonos_cloud/issues/2#issuecomment-969088254_

jjlawren commented 3 years ago

@cstrand89 moved your comment here. The Sonos audio clip API only allows you to target one specific speaker at a time, not a group. You can try to target multiple media_player entities in the same service call, but they will not necessarily be perfectly synchronized as it will try to send the same request to each speaker in parallel.

If you have speakers in a stereo pair or home theater setup, those will be considered one "speaker" and will play simultaneously.

cstrand89 commented 3 years ago

Hi. They are set up in a stereo pair but the voice only gets played on one of the speakers so it is not played on both.

jjlawren commented 3 years ago

Ha, you're right. I had tested against a stereo pair but I had always been sitting to the side and didn't notice sound was only coming out of the nearest speaker. Unfortunately I'm not sure how to solve this since the cloud API only provides information for the "primary" speaker of the pair (the left one). We don't even have a way to target the right (non-left) one at this time.

jjlawren commented 2 years ago

@cstrand89 I added support for playback on bonded speakers in the 0.1.0 release.