can you add a latest
tag?
Community Hass.io Add-on: Google Assistant Webserver (broadcast messages without interrupting music)
It appears the Assistant API doesn’t expose the Cast function? See here: https://developers.google.com/assistant/sdk/device-actions-overview
My success may have been a fluke.
when I try to set up the add-in and do the oauth authorization, I get the following error after pasting the token and clicking connect on page served up on :9324
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='accounts.google.com', port=443): Max retries exceeded with url: /o/oauth2/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd9143ed390>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
I’m not sure what I’m doing wrong.
Edit with some more information, the full error is a 500 Internal Error from CherryPy server. With several blocks of similar errors to what I have above. All essestially saying an erro in name resolution when try to access accounts.google.com which make no sense to me…
I’ve uninstalled the add-on and re-installed with no change. (note the same error that shows up in the browser also is in the log of the add-on.
Yea, I am unable to get it work at all. I feel like it should be possible to do it. Any idea why it worked once for you in the beginning?
Casting definitely not working here. I’d assumed anything you could type into the Assistant app would work but it seems the SDK is more restricted than that.
Thanks for this.
Messages working great without interupting music, turning on light working.
casting doesn’t work, which is a pitty, i can’t start a documentary about global warming when the wife uses the dryer and it is sunny
Hi Bob,
First of all thanks for your excellent work on google command integration with hassio. I have been looking for this feature for long now.
however, after installation and following all steps for OAuth setup, though I am able to run the webserver at 5000 and able to see the response OK… I’m still not seeing any activity on my google Home.
Im running my hass on RPi and using ssl with duckdns.org setup.
Earlier, I have successfully done all below integration with google home:
-
diaglogflow - got it working and created my own agent and intents to control basic components like switch and scripts.
-
Google Assistant - Got it enabled and integrated successfully to natively control hassio entities from home control feature of Google Home.
What I wanted to mention here is my oAuth and other setup are correct as visible in addon log as well as below.
[Info] Install/Update service client_secrets file
- Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
192.168.1.11 - - [11/Jan/2018 23:38:00] “GET / HTTP/1.1” 404 -
192.168.1.11 - - [11/Jan/2018 23:38:00] “GET /favicon.ico HTTP/1.1” 404 -
192.168.1.11 - - [11/Jan/2018 23:38:33] “GET / HTTP/1.1” 404 -
192.168.1.11 - - [11/Jan/2018 23:39:50] “GET /broadcast_message?message=testing%20it%20now HTTP/1.1” 200 -
192.168.1.11 - - [11/Jan/2018 23:41:46] “GET /broadcast_message?message=testing%20it%20now HTTP/1.1” 200 -
192.168.1.11 - - [11/Jan/2018 23:42:06] “GET /broadcast_message?message=testing HTTP/1.1” 200 -
192.168.1.11 - - [11/Jan/2018 23:42:12] “GET /broadcast_message?message=testing HTTP/1.1” 200 -
192.168.1.11 - - [11/Jan/2018 23:42:53] “GET /command?message=are%20you%20there? HTTP/1.1” 200 -
192.168.1.11 - - [11/Jan/2018 23:43:20] “GET /command?message=are%20you%20there? HTTP/1.1” 200 -
192.168.1.11 - - [11/Jan/2018 23:43:29] code 400, message Bad request version (’\xc0+\xc0/\xcc\xa9\xcc\xa8\xc0,\xc00\xc0’)
192.168.1.11 - - [11/Jan/2018 23:43:29] "
and below are responses:
headers…
Content-Length: 17
Content-Type: application/json
Date: Thu, 11 Jan 2018 15:56:38 GMT
Server: Werkzeug/0.13 Python/3.5.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.5
Connection: keep-alive
Host: 192.168.1.9:5000
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Everything seems to be working fine except any activity on Google Home itself.
what do you think a problem could be?
by the way how can i enable debugging so we are able to get more details as what’s going on here?
thx
Thanks, I might try it but the fact that casting functionality is not exposed is a real bummer
I’ll keep my workaround with tasker for now and follow this thread and hopefully Google will allow casting from the Assistant API.
Keep up the great work!
I have tasker, but I can’t figure out how to automate casting. Can you tell about your workaround?
So I tried installing your addon on hassio but when I start it and refresh the page it’s stopped. I already tried creating a new idea and switching ports twice. What else can I try?
Edit: Yes I use ssl
So? What can I do?
I press start, the logs say
18-01-16 21:59:17 INFO (SyncWorker_4) [hassio.docker.interface] Clean andbobsyouruncle/armhf-google-assistant-webserver docker application
18-01-16 21:59:33 INFO (SyncWorker_4) [hassio.docker.addon] Start docker addon andbobsyouruncle/armhf-google-assistant-webserver with version None
and that’s it. I refresh the hassio page and the plugin is not running.
@tube0013 I’ve had same issue. What worked for me was to setup docker dns as written here: https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/ ( “The permanent system-wide fix” ). After that it worked.
thanks, i figured that out last week, I should have posted. that did indeed fix the issue.
Hmmm when i try to start the addon im getting the below. I have created the .json file and everything already. Any ideas?
[Info] Install/Update service client_secrets file
[Info] Start WebUI for handling oauth2
Traceback (most recent call last):
File “/hassio_oauth.py”, line 6, in
import cherrypy
File “/usr/local/lib/python3.5/dist-packages/cherrypy/init.py”, line 76, in
from . import _cprequest, _cpserver, _cptree, _cplogging, _cpconfig
File “/usr/local/lib/python3.5/dist-packages/cherrypy/_cpserver.py”, line 8, in
from cherrypy.process.servers import ServerAdapter
File “/usr/local/lib/python3.5/dist-packages/cherrypy/process/init.py”, line 13, in
from .wspbus import bus
File “/usr/local/lib/python3.5/dist-packages/cherrypy/process/wspbus.py”, line 66, in
import ctypes
ValueError: source code string cannot contain null bytes
Anyone have any ideas, its killing me that I cant use this lol.
I was desperate so I back up all my configs and fresh installed hass.io then it was good to go! Not sure what the issue was. I had the original google assistant installed before this so maybe thats what did it? idk. but thanks for this addon its perfect!!!
Has anyone been successful using this to trigger an Assistant shortcut?
I have a multi language family, is it possible (how?) to insert the language to be spoken by the GH?
p.s. in tts is possible
how to do it?
My workaround is quite cumbersome but here’s the workflow:
Requirements:
- Dedicated Android device with Google Assistant installed
- Tasker
- Tasker plugin Touchtask
https://play.google.com/store/apps/details?id=com.balda.touchtask&hl=en - Tasker plugin Tasker Network Event Server
https://play.google.com/store/apps/details?id=bidoismorgan.httpevent&hl=en
In Home Assistant I have an input_text automation which sends a rest_command to Tasker Network Event Server. Then Tasker triggers Touchtask which simulates a keyboard typing in the Google Assistant app.
This is working so far, but as soon as casting is supported by the Assistant API, I will switch to this add-on.