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

Tags: #<Tag:0x00007f78061e62e0>

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!
Tks

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/_cprequest.py”, line 627, in respond
self._do_respond(path_info)
File “/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py”, line 686, 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 54, 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 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/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
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 https://github.com/Apipa169/Assistant-Relay-for-Hassio (based on https://github.com/greghesp/assistant-relay) 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/plugin_credentials.cc","file_line":82,"grpc_status":14}"

How to resolve it

suggests that the token created when you first installed this has expired - I would suggest (but I’m guessing!) taking a backup of client.json and cred.json and starting again as if you have just installed…

Thanks for this mate, I managed to get it to work by turning off night mode on my Google Home Mini.

Iim very, very new to this, and would just like to know how I can use a contact sensor to trigger a broadcast.
I’ve done it with the TTS plugin, but unsure how to do it with this one,
I don’t mess around too much with the code yet, so I was wondering if it’s achievable via the web interface?

Thanks for the work!

just replace code calling the TTS plugin notifier with a new notifier that calls the broadcast…

notify.yaml

- name: Google Assistant
  platform: rest
  resource: http://localhost:5000/broadcast_message

and then

   - service: tts.google_say
      data:
        entity_id: media_player.rumpas_room
        message: 'Ready to Go!'

becomes

   - service: notify.google_assistant
      data:
        message: 'Ready to Go!'
1 Like

Thanks, I got it all working.
I’m even using the command function to control some Wiz lights that aren’t directly compatible with HA.

http://192.168.1.xx:5000/broadcast_message?message=hello%20there gives me:

{"status": "OK"}

but unfortunately my Google Home doesn’t say anything.

http://192.168.1.xx:5000/command?message=turn%20on%20tv turns on the TV as it should.

What’s going wrong with the broadcasting. Is there anything I have to set up to broadcast over my Google Home speaker?