Add Google Home account issue

I have solved this problem. I am posting my solution in hope that no-one else has to repeat my journey.

To get the Google Master Token, I installed the Windows Docker and in the Terminal window, ran the command:

docker run --rm -it breph/ha-google-home_get-token

After entering my email address and App password, a 233 character master token was produced.

Important
If you use 2FA for google, your primary Google password will not work, so you will need to generate an app password to make this work. See Create and manage your app passwords

Chances are that if you cut and paste your master token into HA, authentication will probably fail with an “Master token invalid” error. In my case, this is because the token is so long that when you cut and paste, you will pick up one or more carriage return characters.

Not the most elegant way to deal with this, I first pasted the token into Microsoft word so that I could see and remove the carriage return characters.

I then copied the token from word and put it into an excel spreadsheet. I created a formula to check the length of the token, like =LEN(A1), where the token was in cell A1. This confirmed that the length was 233 characters.

I then cut and pasted the token into HA Google Home Cofiguration dialogue and it authenticated correctly.

There are a few moving parts here that need to be dealt with and you need to get them all correct for this to work.

8 Likes