ismarslomic / google-assistant-broadcast Goto Github PK
View Code? Open in Web Editor NEWBroadcast message to your speakers with Google Assistant without interrupting your music
Broadcast message to your speakers with Google Assistant without interrupting your music
Hi,
this seems like a nice litle solution to integrate broadcasting for non disruptive tts notifications in home assitant - thank you :-)
I tried to setup your solution but I got the same problems as described in #9 #5 #7.
I am pretty confident with js and docker so that setup was no problem for me but I am quite confused about the oauth setup - I used your oauth docker to get the token from the client_secret and I followed the instructions - but I am not sure If I did everything right?
The documentation in https://github.com/ismarslomic/google-assistant-oauth
Application type
of the OAuth Client is Desktop
client_secret_****.apps.googleusercontent.com.json
to client_secret.json
is actually quite confusing for me. In the link to issue #7 there is something about readding a device model - but I did not find anything about adding this in the first place? It is not clear how to obtain the correct client_secret for me. Also - where do I configure which speakers the broadcast goes to? Does the Google Assistant sdk automatically detect my google home minis linked to my google account?
Sorry for all the questions - I'd love to use this.
This is great work!
To make it easier on others who may want to use this. You can create your docker file and package it up and push it directly to github. This will allow people to point directly to the packages without needing to know how to use docker commands for building.
Let me know if you want help.
Other similar projects have exposed a /broadcast and /command endpoint. Is it possible to do this?
Thank you for this! Yours is the only one I was able to get authenticated, and all other similar projects appear to be unmaintained.
Hey thanks for putting this together, unforutnatly after getting the token and client_secrete when sending curl commands to the docker container all I get is error outputs:
Checked Google API console, no requests ever hit it, so looks like an issue before it even gets that far, fyi I'm running docker on x86 machines, not sure if that makes a difference considering it's node?
Hi,
I am able to generate auth and also able to hit the broadcast message and it is reaching to my activity but not hearing any sound on home mini speaker, I tried deleted all the devices and re-added in action console and also tried changing the language as suggested but it didn't work.
I also tried setting APPEND_BROADCAST_TO_MESSAGE to false and then used below broadcast message
{
"message": "Broadcast to bedroom speaker, Hello world."
}
My speaker is set to high volume as well.
Please help,
Hi, first of all I want to thank you for this tool, I hope I can use it,
I know this is an know issue but tried with the provided solutions without success
No issues on getting the auth up after that tried the solutions published on the Known issues section but Still no sound is played, the way I finally started my docker instance is:
docker run --name google-assistant-broadcast \ -p 8085:8085 \ -e LANGUAGE=es-MX \ -v /softw/app/docker/google-assistant-oauth/config:/usr/src/config \ ismarslomic/google-assistant-broadcast:latest
On the docker side it prints:
[2022-08-21T19:57:39.923Z] Sending message (es-MX): Broadcast Hola [2022-08-21T19:57:42.343Z] [OK] Conversation Response: empty [2022-08-21T19:57:42.516Z] [OK] Conversation Completed
The curl I am using:
curl -X POST http://localhost:8085/broadcast -d '{"message":"Hola"}' -H "Content-Type: application/json"
The response:
{"response":"empty"}
Please any help would be appreciated.
Still looking into it but rebooting docker and now seeing:
[2022-06-19T17:53:13.335Z] [ERROR] Error while broadcasting: Error: 16 UNAUTHENTICATED: Failed to retrieve auth metadata with error: invalid_grant
at Object.callErrorFromStatus (/usr/src/app/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
at Object.onReceiveStatus (/usr/src/app/node_modules/@grpc/grpc-js/build/src/client.js:391:49)
at Object.onReceiveStatus (/usr/src/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
at /usr/src/app/node_modules/@grpc/grpc-js/build/src/call-stream.js:187:78
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
code: 16,
details: 'Failed to retrieve auth metadata with error: invalid_grant',
metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}
Could you allow to send commands instead of broadcast. So I could turn on some routines or send commands to assistant?
I was able to get the container up & running, but when I send request via Insomnia/CURL/Home Asisstant I get the following lines in the logs of the container:
But the speakers (Google Nest Audio's) do not broadcast the message.
If I look at the Google Console Platform I see that the request do get send but still they aren't played:
The client_secret is made for my main google account which is also the owner of my google home, so it should have all the rights/persmissions it needs.
My question is did I forget to configure some things?
Using the arm/v7 container in docker on raspberry pi3
Container exits with the following message:
ash: can't open '/usr/local/bin/dumb-init': Permission denied
Could just be a permissioning error, but it may also be related to the use of the x86 release of dumb-init.
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.