robwolff3 / google-assistant-webserver Goto Github PK
View Code? Open in Web Editor NEWDocker for google-assistant-webserver
License: GNU General Public License v3.0
Docker for google-assistant-webserver
License: GNU General Public License v3.0
Authorisation Error
Error 403: restricted_client
This app is not yet configured to make OAuth requests. To do that, set up the app’s OAuth consent screen in the Google Cloud Console.
Learn more
Request Details
access_type=offline
o2v=1
response_type=code
redirect_uri=xxxxxxxxxxxxxxxxxxxx
state=xxxxxxxxxxxxxxxxxxxxxx
prompt=consent
client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
scope=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I followed instructions
When i first navigate to http://container:9324 and click authorization I get the above error.
Does this not work with a Pi4? Unfortunately I get an exec error in my logs :-/
Hi
I'm getting encoding error:
2019-01-12T19:26:30.480952308Z ON_CONVERSATION_TURN_STARTED -
2019-01-12T19:26:30.482750476Z Traceback (most recent call last):
2019-01-12T19:26:30.482861749Z File "/gawebserver.py", line 182, in <module>
2019-01-12T19:26:30.483008450Z main()
2019-01-12T19:26:30.483045945Z File "/gawebserver.py", line 179, in main
2019-01-12T19:26:30.483104911Z process_event(event)
2019-01-12T19:26:30.483134133Z File "/gawebserver.py", line 70, in process_event
2019-01-12T19:26:30.483193397Z print(event)
2019-01-12T19:26:30.483222601Z UnicodeEncodeError: 'ascii' codec can't encode character '\u2026' in position 92: ordinal not in range(128)
From what I've found, it because of wrong locale env setting, and it can be fixed using PYTHONIOENCODING=utf-8
. I've put it in docker run command and seems to work fine.
@robwolff3 I tried to install the container on my Synology, but I can't seem to make the sound card work. Any ideas on implementing a dummy sound card?
error
Hi, when I try to run the container I have this error standard_init_linux.go:228: exec user process caused: exec format error
. I searched some answer to this error and I found that maybe is not made for this OS.
Will I be able to talk to it via microphone? Just like how I talk to Ok Google in my phone?
I am having some problems with my audio. I am running it on a synology NAS (DS918+) So I thought, see if I can access the image through the command line so I would have a shell to troubleshoot the audio.
However docker run -it robwolff3/ga-webserver /bin/sh
results in an error [Error] You need initialize GoogleAssistant with a client secret json!
BTW not relevant to this issue, but log when starting normally is it seems it can't find the soundcard.:
2019-06-02 08:32:57,stderr,[FATAL:audio_input_stream.cc(47)] Input device could not be opened: default
2019-06-02 08:32:57,stderr,ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
2019-06-02 08:32:57,stderr,ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
2019-06-02 08:32:57,stderr,ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
2019-06-02 08:32:57,stderr,ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
2019-06-02 08:32:57,stderr,ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
2019-06-02 08:32:57,stderr,ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
2019-06-02 08:32:57,stderr,ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
2019-06-02 08:32:57,stderr,ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
2019-06-02 08:32:50,stderr,[FATAL:audio_input_stream.cc(47)] Input device could not be opened: default
2019-06-02 08:32:50,stderr,ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
2019-06-02 08:32:50,stderr,ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
2019-06-02 08:32:50,stderr,ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
2019-06-02 08:32:50,stderr,ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
2019-06-02 08:32:50,stderr,ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
2019-06-02 08:32:50,stderr,ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
2019-06-02 08:32:50,stderr,ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
2019-06-02 08:32:50,stderr,ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
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 628, in respond
self._do_respond(path_info)
File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py", line 687, in _do_respond
response.body = self.handler()
File "/usr/local/lib/python3.5/dist-packages/cherrypy/lib/encoding.py", line 219, 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 "/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 307, 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 415, 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 425, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.5/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 432, 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 405, in raise_from_error
raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) Bad Request
Powered by CherryPy 18.1.0
Is there any way to capture/return the responses form the assistant? I see some attempts at in the the BobsYourUncle code, but in this code there is just the return 200 ok. I was hoping I could send a command "Is the back door locked" via a text query and get the response as text or some form of a response that I could parse.
I just wanted to thank you for this. I inadvertently revoked access to it yesterday and went to get it set back up, only to realize I have had it running for three years now, and it has just run without problems. An amazing piece of software that I don't know what I would do without. Thanks again.
Hello,
I'm getting encoding error:
i use Language KOREAN and test JAPANESE language too.
i try -e PYTHONIOENCODING=utf-8 and euc-kr , but can't work it.
can you fix it?
192.168.0.200 - - [28/May/2019 15:35:07] "GET /command?message=turn%20off%20light HTTP/1.1" 200 -,
[2019-05-28 15:35:18,202] ERROR in app: Exception on /command [GET],
Traceback (most recent call last):,
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1832, in full_dispatch_request,
rv = self.dispatch_request(),
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1818, in dispatch_request,
return self.view_functionsrule.endpoint,
File "/usr/local/lib/python3.5/dist-packages/flask_restful/init.py", line 458, in wrapper,
resp = resource(*args, **kwargs),
File "/usr/local/lib/python3.5/dist-packages/flask/views.py", line 88, in view,
return self.dispatch_request(*args, **kwargs),
File "/usr/local/lib/python3.5/dist-packages/flask_restful/init.py", line 573, in dispatch_request,
resp = meth(*args, **kwargs),
File "/gawebserver.py", line 169, in get,
assistant.send_text_query(message),
File "/usr/local/lib/python3.5/dist-packages/google/assistant/library/assistant.py", line 215, in send_text_query,
self._lib.assistant_send_text_query(self._inst, query.encode('ASCII')),
UnicodeEncodeError: 'ascii' codec can't encode character '\ubd88' in position 0: ordinal not in range(128),
192.168.0.200 - - [28/May/2019 15:35:18] "GET /command?message=불%20꺼 HTTP/1.1" 500 -,
Not a problem with the ga-webserver itself, but...
I tried to install it on my docker 1½ year ago, and didn't get it working properly, or didn't find an use-case for it,
Anyway, it havent been running for long time, but I still have a "phantom speaker" in the google home app, and when I say "ok google, syncronize devices" I get an error from this "service".
When I try to remove the "speaker" in google home app, there is no associated service, like my automower is associated with Husquarna, my roomba is associated with iRobot etc. So the speaker is orphaned.
When I try to start the container, I see in the logs {\n "error": "deleted_client",\n "error_description": "The OAuth client was deleted."\n}')
It fits with that I can't find the app in the google developer console; it's probably purged because it weren't used for more than a year.
I had a long chat with Google One Help, but they couldn't help.
I just want to get rid of the "speaker" in the list of devices in google home. Is there a way to "force-remove" devices?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.