Comments (19)
Seems like redownloading and reauthin to get a new tokens.js fixed it.
Wondering if the container needs to run a periodic refresh token command to make sure it doesn't expire?
from google-assistant-broadcast.
It's like the cert just randomly invalidated it'self, I'll refresh and redownload and see if it fixes it
from google-assistant-broadcast.
Glad to hear to you fixed the issue.
I have been running my docker container for couple of weeks without need for any manual refreshing of tokens, or re-downloading the tokens file. So I'm not sure refreshing the token is the issue.
I suggest that you leave your container running for couple of days/weeks now, when everything is working, and see how it goes.
Closing this issue for now, but please report back if you face any new issues!
from google-assistant-broadcast.
Looks like 11 days later and same error, wondering if my generated token has a short ttl
from google-assistant-broadcast.
So yeah 7 days, looks like this is how oauth works on testing accounts.
Refresh tokens will actually expire after 7 days if the project publishing status is "testing". Per google documentation: A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.
from google-assistant-broadcast.
If you look inside your tokens.json
you'll see your bearer expires:
"token_type":"Bearer","expiry_date":1657083576057}
from google-assistant-broadcast.
I'm guessing your either have a published project? or you have managed to set a longer token somehow
from google-assistant-broadcast.
Oh you need to publish the app: https://stackoverflow.com/a/67367752/803225
from google-assistant-broadcast.
yeah Ive published my app and refreshed the token, lets see if it lasts more than 7 days
from google-assistant-broadcast.
Thanks for the input! I have re-opened this issue.
I have not published my app in Google Assistant Console, so I dont think that is required in order to fix the token refreshing. And, Im still using the same token I generated months ago without any issues. What I assume is different between mine and yours setup is that Im using the Google Assistant broadcast every day in HA automation and I think that token is automatically refreshed when actively using the broadcast API and underlaying lib https://github.com/endoplasmic/google-assistant.
But it is also possible to schedule token refreshes, to avoid need for frequent usage of the broadcast api!
Im currently on vaccation, but will look at this in couple of weeks or so.
Help and PR is of course welcome!
from google-assistant-broadcast.
Maybe, but we send a Broadcast at least once a day, I noticed where it sent one in the morning and didn't later (When the garage was left open).
I'm wondering if there is some nuanced way the projects are setup/tokens, or that my setup is not able to refresh the token and write it to disk (maybe my docker container config?)
from google-assistant-broadcast.
Oh, then my assumption might be incorrect.
Another solution would be to publish the google assistant broadcast as custom HA component and let HA take care of OAuth flow (authentication and refreshing). But that requires development that I dont have time for currently.
from google-assistant-broadcast.
Maybe, let's see what happens in a week.
I really would like NabuCasa to add notification intergration into the cloud sub (https://developers.google.com/assistant/smarthome/develop/notifications) that would make that much more useful, where a doorbell could just send a direct notification instead of a roundabout Broadcast.
I started going down that route, but you need to create/register devices, which is possible as a HA plugin as they already expose those devices to Google Assistant - I was trying to do a standalone docker image.
from google-assistant-broadcast.
Seems publishing my project fixed it, 20+ days on still working!
from google-assistant-broadcast.
Thanks for the update, and happy to see that this solved your issue! So basically what you did where to configure the OAuth Consent Screen for your app in the Google Console?
from google-assistant-broadcast.
Yeah on this screen:
https://console.cloud.google.com/apis/credentials/consent
from google-assistant-broadcast.
Little confused why yours is fine without being published, but seems to fix it for me
from google-assistant-broadcast.
Alright! Glad you fixed the issue and I hope you are enjoying the Google Broadcast
from google-assistant-broadcast.
Thank you, appreciate it!
from google-assistant-broadcast.
Related Issues (10)
- Creating the package HOT 2
- Add support for sending commands to Google Assistant HOT 19
- Broadcast does not go to speakers - did I do the oauth config right? HOT 3
- Not getting broadcast message on my google home mini, while in My Activity got entries showing it broadcasted HOT 1
- support for commands (in addition to broadcast) HOT 1
- dumb-init: Permission denied HOT 3
- Broadcast request gets send, but not played/broadcasted to the speakers HOT 27
- Getting error as response when broadcasting a message HOT 12
- Sending message [OK] Conversation Response: empty No sound or message played on the speakers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-assistant-broadcast.