Google Assistant within Hass.io

Hello,
I am currently trying to get HomeAssistant to integrate the Google Assistant Addon but its starting to exasperate me.
I Have been on it for the last 36 hours
Reinstalled the Whole platform twice and followed the Instructions to the Letter.

I can’t seem to get it to work.
Build an AlexaPi before that worked like a charm on the exact same hardware so i really dont get what the problem is.

I am running HomeAssistant on a raspberry Pi 3
Connected to a Speaker using the Audio Jack
an to a usb Mic

First issue is that, in the config that the addon log shows me, the Mic.
I’ll post the Output here as reference:

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[Info] Setup audio device
[Info] Install/Update service client_secrets file
[Info] Start WebUI for handling oauth2
[13/Aug/2017:19:00:34] ENGINE Listening for SIGUSR1.
[13/Aug/2017:19:00:34] ENGINE Listening for SIGTERM.
[13/Aug/2017:19:00:34] ENGINE Listening for SIGHUP.
[13/Aug/2017:19:00:34] ENGINE Bus STARTING
CherryPy Checker:
The Application mounted at '' has an empty config.
[13/Aug/2017:19:00:34] ENGINE Started monitor thread '_TimeoutMonitor'.
[13/Aug/2017:19:00:34] ENGINE Started monitor thread 'Autoreloader'.
[13/Aug/2017:19:00:34] ENGINE Serving on http://0.0.0.0:9324
[13/Aug/2017:19:00:34] ENGINE Bus STARTED`

I asked that question before and all i got was

Searching would tell you it’s on 1,0 :wink:

Indeed i did do my research and that showed up but:

A) It is not in the config, or i am too blind to see it
B) As far as i understand that number can be variable from one system ro another

So i really would like an explanation as to how to find that value.

I Tried that of course and went with the following config

 {
  "mic": "1,0",
  "speaker": "0,0",
  "client_secrets": "google_assistant.json"
}

pressed the button open Web UI and got a new webpage telling me it could not connect.
I managed to find that page by going to

http://my.Devices.Internal.ip:9324
clicked on generate token, authenticated copied and pasted the token and clicked send

again i got a message that it cant connect.

I even followed the API;Ai instructions but the damned thing doesnt even hear me.
Im really starting to loose hope on this so Please help me

Thank you

If you did search you’d see where I’ve answered that before as well, it just doesn’t show up in the log, no idea why but others have concurred. As I said previously, I used a USB speaker as well which showed in the log as being on 2,0, logic then implying the mic is probably on the unreported 1,0 which it indeed was. You don’t have any other devices so logic again would imply yours is on 1,0 too.

The mic has nothing to do with the remainder of the set up so you just need to work out where you’ve gone wrong with the rest of it, can’t help you with that one sorry. Enough said that when you do sort it, the mic will almost certainly work just fine using 1,0 :slight_smile:

As i said, i am currently Usingen 1,0 For the mic and 0,0 for the speaker which normally ist the default headphone Jack.

I went step by step through the instructions and everyone Error i described above persists.

The search function was anything but helpfull until now and i tried to make it Work a grand total of 14 Times now, the Last five of which we’re total reinstallations (formated SD Card)

The instructions given in the on the Website seem to either be incomplete or incorrect, unless i made the Same mistake 14 Times which ist less Than likely.

I even tried finding a Tutorial in Google without much success.

Has Nobody ever had Problems with that or Whats

Sorry im starting to rant but im getting frustrated.

Ok Sometimes a good nights sleep helps.

It Lives and speaks. English only for now
Havnt found a way to make it speak german or configure anything but the mic yet.

According to google you will have to subscribe to their google cloud speach API to make it do anything other than english.
If that turns out to be the only way i just wasted a lot of time.

Sulumar did you find out what was wrong. I have the same problem when Paste the token.

EDIT: Never mind. I got it to work even tho i got an error message when typing in the token. My problem was tht the usb mic i was using couldn’t be found. So I connected an old web cam and it worked :smiley:

I dont exactly know what went wrong but it works even when you get the error message the token went through

Only problem i have now is to find a way to let google add-on control my lights… been at it all day with no luck!

Hi HerrKingsley! Have you figured out how to controll your lights with google assistant?

You can use ifttt, really easy to set up following the guide in the docs.

I have been using Home Assistant for about 1 year now, I recently upgraded my Pi3 to Hass.io and after some config file changes got everything running good. I implemented Google assistant through the Add-on and all was working well outputting the responses through the external speaker plugged into the Pi’s audio jack. Recently it quit working and I was struggling to fix the problem. After some searching I figured out what happened to make it quit working and thought I should share. I recently bought a HDMI splitter since my tv doesn’t have enough HDMI inputs for all of the devices I have. This allowed me to keep my Pi HDMI plugged in, THAT is what caused my audio output to change from the speakers to the TV. With the HDMI switch on the Pi the audio would go to the TV if I had rebooted the Pi. Since I never use Hass.io through the tv I just unplugged the HDMI cable and rebooted the PI. The audio is back to using the external speaker and the audio jack.

Hope this helps other novice users like myself. It would be nice to have the ability to set the audio output within Hasio, is that something that the programmers out there could work out???

Could you please tell me where I get the token to paste on the WEB UI?

it should come up in the HA notification bell thing, top right corner

Thank. But it doesn’t come up in the HA notification. Have you an idea why?

Following is the log I have in Google Assistant addon after starting it:

[Info] Install/Update service client_secrets file
[Info] Start WebUI for handling oauth2
[22/Dec/2018:02:15:15] ENGINE Listening for SIGTERM.
[22/Dec/2018:02:15:15] ENGINE Listening for SIGUSR1.
[22/Dec/2018:02:15:15] ENGINE Listening for SIGHUP.
[22/Dec/2018:02:15:15] ENGINE Bus STARTING
CherryPy Checker:
The Application mounted at ‘’ has an empty config.
[22/Dec/2018:02:15:15] ENGINE Started monitor thread ‘Autoreloader’.
[22/Dec/2018:02:15:15] ENGINE Serving on http://0.0.0.0:9324
[22/Dec/2018:02:15:15] ENGINE Bus STARTED
77.139.34.99 - - [22/Dec/2018:02:15:22] “GET / HTTP/1.1” 200 713 “” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36”

not sure. have you tried a HA restart?

Yeah, tried to restart. As well as uninstall-restart-install-restart-start. Weird. More and more thinking of switch from hassio to Raspbian+HA

The issue is on the Google side, not HassIO. I have had a lot of trouble with getting Google working properly. The process is the same for both HassIO and Hassbian etc.

Thanks for your assistance. I clicked ’ Get token from google: [Authentication]. And this time it asked for authorization and provided me with the token, but after confirm with the token I get following error now:

500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py”, line 631, in respond
self._do_respond(path_info)
File “/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py”, line 690, in _do_respond
response.body = self.handler()
File “/usr/local/lib/python3.5/dist-packages/cherrypy/lib/encoding.py”, line 221, in call
self.body = self.oldhandler(*args, **kwargs)
File “/usr/local/lib/python3.5/dist-packages/cherrypy/_cpdispatch.py”, line 60, in call
return self.callable(*self.args, **self.kwargs)
File “/hassio_oauth.py”, line 46, in token
self.oauth2.fetch_token(self.user_data[‘token_uri’], client_secret=self.user_data[‘client_secret’], code=token)
File “/usr/local/lib/python3.5/dist-packages/requests_oauthlib/oauth2_session.py”, line 244, in fetch_token
self._client.parse_request_body_response(r.text, scope=self.scope)
File “/usr/local/lib/python3.5/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py”, line 408, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File “/usr/local/lib/python3.5/dist-packages/oauthlib/oauth2/rfc6749/parameters.py”, line 379, in parse_token_response
validate_token_parameters(params)
File “/usr/local/lib/python3.5/dist-packages/oauthlib/oauth2/rfc6749/parameters.py”, line 386, in validate_token_parameters
raise_from_error(params.get(‘error’), params)
File “/usr/local/lib/python3.5/dist-packages/oauthlib/oauth2/rfc6749/errors.py”, line 415, in raise_from_error
raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) Bad Request