Google Assistant Component - for Google Home integration

Hey All-

I just bought a couple google home minis and am trying to integrate… I unfortunately found out that the emulated hue support no longer exists (so I can’t just reuse my Alexa support) so I went through the steps of configuration. Everything seems to be correct in that I can see all of the exposed items in my GH app (screen shots attached), but telling it to turn on / turn off stuff doesn’t work. Am I missing something? Here is my configuration:

google_assistant:
  project_id: !secret gh_project_id
  client_id: !secret gh_client_token
  access_token: !secret gh_access_token
  exposed_domains:
    - group
    - scene
    - remote

And the screen shots of my items in my GH app:

Am I missing something? All looks good in my gcp dev console. there are no errors validating and the google app pulls all my HA data so I assume no connectivity problems…

BTW, running .58.1 on rpi3.

I think groups are still treated as scenes. Can you try “activate kitchen lights” or “start kitchen lights”?

Just tried that (makes sense since the icons all look like scenes). She comes back with (verbatim) “I’m sorry, there was an error and I am unable to control your home device”.

Also, churns for a bit… I was under the assumption that it all worked locally once setup… Not true?

Just strange that it all shows up, but it’s not accessible.

Unlink relink

Just did… Also rebooted GH. Same result.

Also, just enabled the request_sync service. Here is my new configuration:

google_assistant:
  project_id: !secret gh_project_id
  client_id: !secret gh_client_token
  access_token: !secret gh_access_token
  agent_user_id: !secret gh_agent
  api_key: !secret gh_api_key
  exposed_domains:
    - group
    - scene
    - remote

Strangely, I am tailing my ha logs and I am getting an iCloud error… could there possibly be some sort of contention?

Traceback (most recent call last):
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/icloud.py", line 307, in keep_alive
    self.api.authenticate()
  File "/srv/homeassistant/lib/python3.4/site-packages/pyicloud/base.py", line 186, in authenticate
    data=json.dumps(data)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/sessions.py", line 555, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/pyicloud/base.py", line 67, in request
    response = super(PyiCloudSession, self).request(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/adapters.py", line 490, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
2017-12-01 14:20:42 ERROR (Thread-32) [pychromecast.socket_client] Error reading from socket.

not true unfortunately. it calls out to The Cloud with every command. that said, mine is pretty snappy when it’s working.

i’m not sure about your issue though. can you access your home assistant instance from the outside world? e.g. https://yoursite.duckdns.com? you have to have port 443 or 80 (i think) point to your home assistant for google assistant to work.

I can. I use the iphone app or a browser to access via pc or mobile (on cell). It’s accessible via :443 (and I used to use MQQT for location tracking via owntracks on 8333 (and then switched to https:// via homeassistant mqqt vs. the standalone broker)- since stopped and using iCloud.

Being that the developer console seems to validate and the GH app on my phone brings back all of the devices, I would think it was all working fine - but seems not. I just rebooted the pi, unlinked everything, rebooted the GH and relinked for shits and giggles and same issue… All of the devices show up, but will not allow me control (btw, all of these devices are also exposed via hue emulator and can be controlled successfully via Alexa).

Hi every one.
Hoppefuly someone can help me with this lilttle issue of mine.

I have been trying to set up the google_assistant component and was quite successful but not completely.
The last step failed for me.
Steps that I hopefully have managed to complete correctly:

  • raspberry pi 3 is externally accessible with a hostname and SSL certificate, done via duck dns, via add on in hass
  • I linked my home assistant with google home in the developer console
  • I can access Settings > Home Control+ sign, and there I have my test your “app name”

Everything seams to be set up correctly, only it is not.
Once I tap on the test your app in the google home assistant app, where the google home should connect to home assistant, I get the following message:

This site can’t provide a secure connection
xxxxxxxx.duckdns.org sent an invalid response.
ERR_SSL_PROTOCOL_ERROR
RELOAD

I know that my Pi is communicating with the google home app because in the lock from my home assistant I get the following message:
Error handling request
14:07 /usr/lib/python3.6/site-packages/aiohttp/web_protocol.py (ERROR)
Error handling request
14:07 /usr/lib/python3.6/site-packages/aiohttp/web_protocol.py (ERROR)
Error handling request
14:07 /usr/lib/python3.6/site-packages/aiohttp/web_protocol.py (ERROR)
Error handling request
14:07 /usr/lib/python3.6/site-packages/aiohttp/web_protocol.py (ERROR)

Log Details (ERROR)
Sat Mar 31 2018 17:11:15 GMT+0200 (Central Europe Daylight Time)

Error handling request
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 231, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp_http_parser.pyx”, line 295, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method

My configuration
raspberry pi 3
home assistant version 0,65.6
add on duck dns version 1.2
ssh server version 1.2

Any suggestion what might be wrong with it will be greatly appreciated.

Thank you in advance

Hi

Thanks to the github community I could solve this issue. .

The problems were http-https protocols. I was using both of them, so the system got confused.

There were two things I had wrong in my setup

The first was
I was missing these lines in my yalm file

http:
base_url: https://my-domain.duckdns.org:8123
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

Second
I had double entries in my google developer console https://http ://my-domain.duckdns.org:8123
It could not have worked, once I have cleared those double entries, everything started to work like a charm.