Google Music in HA -- Now as a media player!

Does the Next/Previous buttons work for anyone?

Edit: I’m not sure if I am in the right forum, is this for Google Minis as players?

I think your in the wrong place but

If you are trying to use gmusic_player

There will only be working next/previous buttons for media_player.gmusic_player → It will not add these controls to the speaker ( media player ) it is connected to.

I created a group in the Google Home app that includes two chromecast audios however I can’t seem to get it added to Home Assistant. Is it possible to to do this so I can play Google Music to multiple speakers?

I actually have the same setup. I’m sorry I can’t really offer an advice on getting the group to show up in HA. I couldn’t say if it is even HA related. In my case I think the problem was my network. My network is all Ubiquiti gear. At one point I upgraded my Cloud Key ( Just a device that run the Unifi software ) anyways, with that upgrade my chromecast groups suddenly appeared in Home Assistant.

I am able to play to my chromecast group with gmusic_player but the group must show up as a media_player in Home Assistant first. You then need to add that group to your list of speakers in gmusic_config.yaml, just like you added your other media players. – To be clear, this step is only for gmusic_player. It will not help HA see the group, sorry I can’t help with that part,

Hmmm, that’s funny, I am also using Ubiquiti gear although not the cloud key. Hopefully maybe it will suddenly show up one day.

I’m guessing it something to do more with the software than the hardware it’s running on. Outside of HA but still related to chromecast discovery… My phone has never had a problem connecting to a cast device on my network. For a while after I installed unifi I was also able to see and cast to my devices from my hard wired, desktop computer.

At some point my cast devices stopped showing up to my desktop computer – Just as a matter of fact, When the cast group appeared in HA, my desktop computer was able to see all cast devices again as well

You can definitely do this, I have multiple groups of speakers set up so I can choose which areas of the house to play music. You need to have discovery: enabled for the Google speaker groups to show up in HA

I do have discovery enabled however HA isn’t picking up on the group I created within the app. Going by what @troy had mentioned it sounds like it possibly related to the Unifi equipment as we both seemed to have run into this issue. I can access the group via my phone and cast to it however the group isn’t recognized in HA.

I have a Ubiqiti network as well, still works

I have just set this up. Working great for playing playlists. I don’t have any stations in my library so I need to sort that.

Is there a way to Play albums or Artists?

Also I am using the default media player Lovelace card and it’s not showing any media info or artwork. Any ideas what that might be?

Not yet, I have plan to hopefully add this at some point

It should work for music available through Google but might not work for music you uploaded. This just does a lookup from gmusic database, it doesn’t actually read the ID3 tag

1 Like

I realize this is not an issue of this thread however wanted to throw this out in case anyone had any ideas. I am still not able to get my created GH groups to be discovered in HA. I have both discovery and zeroconf enabled in my config.yaml. Does anyone have any ideas of what I might be missing or is it truly a byproduct of using the Unifi system @troy had mentioned? Seems odd that Unifi would block that but maybe there’s a setting I am not aware of.

Appreciate the reply, let me check, i think my playlist was for music i uploaded.

Hi! I installed the integration from hacs, I have hassio, I followed the guide by inserting username (my Gmail), password (always Gmail) and id 00, but I can’t find the media player … I also tried with the double factor of authentication with app password but I was not able to. How can i solve it?

Hi @Achille.858 – sorry for the delay.

If it is not setup correctly you should have some errors in the HA logs. That would be helpful to know where to start with troubleshooting.

For username and password, here is how it should work — If you log into Google using a username and password, you must do the same using gmuisc_player – If you are using 2FA to your Google login, then you must create and use an app password for gmusic_player.

If the is a failure to login, there should be an error in the HA logs.

For the device id, setting to 00 will only show a list of valid ids to pick from ( this again will be in the HA logs ) – Use one of the 16 digit device ids to replace 00 in gmusic_player.config

Hi and thanks for the reply! I log in to google with my gmail and I enter this, the password tried both with normal and with the double factor but it always reports the same error.

Did you include both gmusic_config.yaml and gmusic_player.yaml inside your homeassistant/packages directory?

Yes I did and i edited only ‘gmusic_config.yaml’

@Achille.858 Have you had any luck? – I took some time to install the HA Supervised (former HassIO) to test this myself … Everything works as expected in my test so I’m thinking there is an error in your configuration or maybe you do not have a registered device ID.

I have spent some time trying to completely rewrite this component from scratch with no success :frowning:

I think, I did manage to learn a few things though. I am attempting to at least refactor some of this existing component so the main configuration and options will be configured through HA UI ( aka config flow )

If nothing else, I hope to separate the login so it will not cause the component to completely fail.

thank you very much! I also think there is a problem in my configuration but I don’t understand where the error may be. I entered the data correctly