Community Add-on: Google Assistant Webserver (broadcast messages without interrupting music)

Tags: #<Tag:0x00007f78027509f0>

change data_template: to data:

Ok, thanks I will try this. When did it change?

That i don’t know but it works for me.

I send message using:

  - service: notify.google_assistant
      message: "blablabla"

Mmhh no, it’s still not working

Ok so for me broadcasting messages to my google assistant is working.
Accept for sending commands, when sending commands I get the following error: on /command [GET]
Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/flask/”, line 1813, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/local/lib/python3.5/dist-packages/flask/”, line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File “/usr/local/lib/python3.5/dist-packages/flask_restful/”, line 480, in wrapper
resp = resource(*args, **kwargs)
File “/usr/local/lib/python3.5/dist-packages/flask/”, line 88, in view
return self.dispatch_request(*args, **kwargs)
File “/usr/local/lib/python3.5/dist-packages/flask_restful/”, line 595, in dispatch_request
resp = meth(*args, **kwargs)
File “/”, line 49, in get
response_text, response_html = assistant.assist(text_query=message)
File “/”, line 132, in assist
text_response = resp.dialog_state_out.supplemental_display_text()
TypeError: ‘str’ object is not callable
INFO:werkzeug: - - [05/Aug/2019 20:05:40] “GET /command?message=hoe+laat+is+het+nu HTTP/1.1” 500 -

But when I send a command with broadcast and then my command it works but just the command by itself doesn’t.

Can anybody help me with this.

regards Jordy

Whenever I run through setting this up, after pasting my password into the web server prompt the page that loads afterward shows “The page isn’t working”.

The token Google gives back is 4/NUMBERS AND LETTERS
When I look at the logs the token it’s yelling about is without the 4/
Did Google maybe start adding 4/ to this and maybe it can’t handle it?

Let me know if anybody has any ideas. Thanks.

I hame the same issue. Can’t make it work. Waiting for ideas

1 Like

It seems so simple.
I wonder if pursuing a way to control an android phone would be easier.
Or putting my Raspberry Pi next to a Google Home device with a speaker…

I can’t get it working either.

I know this is open source and people give up their own time to create these add-ons so I hope this is taken in the spirit it is given.

This has to be the worst documented add-on for HA.

seems overkill. I’ll open an issue on github. Let’s see ig the developer is still intrested.

1 Like

Hi, is it still not possible to give play X music on Y device instruction? This would be so nice!

Hi, I followed the setup steps and couldn’t get through the authentication. My HA version is 0.99.3 on Raspberry Pi 4. Here are the error messages I got after clicking the “connect” button on the authentication page.

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/”, line 627, in respond
File “/usr/local/lib/python3.5/dist-packages/cherrypy/”, line 686, in _do_respond
response.body = self.handler()
File “/usr/local/lib/python3.5/dist-packages/cherrypy/lib/”, line 221, in call
self.body = self.oldhandler(*args, **kwargs)
File “/usr/local/lib/python3.5/dist-packages/cherrypy/”, line 54, in call
return self.callable(*self.args, **self.kwargs)
File “/”, 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/”, 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/”, line 411, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File “/usr/local/lib/python3.5/dist-packages/oauthlib/oauth2/rfc6749/”, line 379, in parse_token_response
File “/usr/local/lib/python3.5/dist-packages/oauthlib/oauth2/rfc6749/”, line 386, in validate_token_parameters
raise_from_error(params.get(‘error’), params)
File “/usr/local/lib/python3.5/dist-packages/oauthlib/oauth2/rfc6749/”, line 415, in raise_from_error
raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) Bad Request
Powered by CherryPy 17.0.0

1 Like

I just tried the setup using HA version 0.100.2 and got the same error after entering the Google auth code. Did you get it sorted out at all?

1 Like

Just tried to install this on HA version 0.101.2, and it seems to have installed successfully but I am unable to start the add-on, does anyone have any ideas as to why this might be?

1 Like

Is it the same as what I get here?

If so I think something changed on Google’s end and the dev has stopped working on the project.
I’m just waiting to see if Google will allow us to trigger routines based on Smart Home devices after the last press event. It seemed like they will.

That will satisfy my needs and the whack-a-mole will be over.

If so I think something changed on Google’s end and the dev has stopped working on the project.

Looks like (based on supports broadcasting without interruption and is (currently) being maintained.

Nothing is ever permanent with Google. :disappointed_relieved:

A reminder that if you are using either this add-on - Google Assistant Webserver (GAW) - or the Assistant Relay (AR) Add-On - you might have issues with IPv6.

I have a BT Smarthub and both GAW and AR are working for me with Address Allocation Mode set to “Off” on the IPV6 Address Allocation. You can find this under Advanced Settings - IPv6 - Configuration.

If Address Allocation Mode is set to “Stateful” then no sound will come from any of my Google Homes - although both Add-ons show every indication it is working correctly

The Google Assistant Webserver is working on my Hassio RB4. Broadcasting is ok… and I can turn lights on and off but anything else command seems not to work.
I’d like to use this do skip video playing on one of my 2 Chromecasts and trigger it from a button on Hass. Skipping by voice works but by text through the webserver not.
Am I missing something? Could it be the italian language? I added English as second language but honestly I don’t know why it doesn’t work…
I didn’t try with Assistant Relay for Hassio because if I’m not wrong it’s just for broadcasting and notifications… or not?
please help

Assistant Relay can do more than only sending broadcasts. But I’m afraid it has the same limitation as what you are running now. The Google sdk does not support all types of commands.

Am using Google Assistant Webserver Addon Evertthing was working fine till yesterday,
Now, Suddenly it stopped working I see the following error in HA Addon Logs

"description":"Getting metadata from plugin failed with error: ('invalid_grant: Token has been expired or revoked.', '{\n "error": "invalid_grant",\n "error_description": "Token has been expired or revoked."\n}')","file":"src/core/lib/security/credentials/plugin/","file_line":82,"grpc_status":14}"

How to resolve it