Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add/remove speakers to currently playing music #191

Open
peterjuras opened this issue Apr 13, 2021 · 7 comments
Open

Feature request: Add/remove speakers to currently playing music #191

peterjuras opened this issue Apr 13, 2021 · 7 comments
Labels
feature New feature or request help wanted Extra attention is needed

Comments

@peterjuras
Copy link

Is your feature request related to a problem? Please describe.

I have multiple Google Homes (or Nest Audios) in my home and like to listen music from Spotify on multiple devices at the same time. There are multiple ways to achieve this, e.g. by selecting a preconfigured speaker group as the target for Spotify.

The Google Home app however, has a feature where you can dynamically add or remove speakers to the current music output. It appears to be a special API (potentially stream transfer), since the music playback is not interrupted when adding or removing speakers.

The functionality I'm referring to (Google Home Android app) can be seen in the screenshot below.

Describe the solution you'd like

I'd love to see the same API being usable as the Google Home app is using, to create better automations and lovelace interfaces that are able to switch speaker groups more smoothly.

Describe alternatives you've considered

Right now I'm using spotcast to continue playback on a different speaker groups. There are two main issues here:

  • All speaker groups have to be created before hand, i.e. if all possible speaker combinations should be supported than the user has to create a combination of all speakers before hand.
  • The playback is interrupted for a few seconds, which leads to a worse experience compared to the Google Home app feature.

Additional context

Screenshot of the feature in the Google Home Android app:

Screenshot_20210413-082414_Home

@leikoilja
Copy link
Owner

If the google home app has that functionality, I believe this can be implemented within the ha-google-home integration. A bit out of our current scope, but could defs be in a roadmap and @peterjuras if you have an interest and skills you are more than welcome to take a lead on helping to implement it 🚀

I don't think we should be adding API calls into the existing integration, but we have plans to move to something dedicated like googledevices to handle API calls one day. When we do that, we could look closer into implementing dynamic music group support :)

@leikoilja leikoilja added the feature New feature or request label Apr 13, 2021
@DurgNomis-drol
Copy link
Collaborator

I think this is out of scope for this integration as this is a Google Cast feature and not possible in the local API. 😊

What I mean by Google Cast feature is that, this is controlled by the Google Cast API as far as I understand and should be implemented in the Default cast integration instead of here. We don't expose Media players and don't have any way of connecting to the the API used for that. 😊

@DurgNomis-drol
Copy link
Collaborator

Under the eureka_info endpoint i can see that we can extract this information:

"multizone": {
  "audio_output_delay": 0,
  "audio_output_delay_hdmi": 0,
  "audio_output_delay_oem": 0,
  "aux_in_group": "",
  "dynamic_groups": [ ],
  "groups": [ ],
  "multichannel_status": 0
}

It is also possible to set eureka information with this endpoint.

I have not looked further into this matter, but maybe someone really creative and skilled can try to test if it is even possible to do something?

@leikoilja
Copy link
Owner

Maybe, @peterjuras has interest at diving deeper to help with that? :)

@leikoilja leikoilja added the help wanted Extra attention is needed label Apr 19, 2021
@peterjuras
Copy link
Author

Sorry for the late reply, I'm kind of short on time right now but I'll try to see whether I can explore this direction.

Since the cast API is involved, it might be interesting to capture the network traffic between the Google Home app and the cast devices. Does anyone know a good guide on how to capture this traffic? I sadly can't root my phone.

@Tiebe
Copy link

Tiebe commented Feb 8, 2022

Sorry for the late reply, I'm kind of short on time right now but I'll try to see whether I can explore this direction.

Since the cast API is involved, it might be interesting to capture the network traffic between the Google Home app and the cast devices. Does anyone know a good guide on how to capture this traffic? I sadly can't root my phone.

Something like this might work: https://www.telerik.com/blogs/how-to-capture-android-traffic-with-fiddler

It sets up a proxy that you can connect from using your computer, which then intercepts network data.

@leikoilja
Copy link
Owner

@Tiebe's answer reminds me of a similar project i was doing some years ago. I used 'charles proxy' to intercept and listen to all the traffic between by phone (iOS) and network. Don't have any guide references, but those should be readily available, if interested to explore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants