Hi,
I’m migrating from OH2 to OH3. In OH2 I had Google TTS working for years.
Now I can’t get it to work. I’ve followed the instructions in Google Cloud Text-to-Speech - Voices | openHAB to obtain the web app credentials (I had the credentials for OH2, which were for desktop type). The project is named “openHAB”.
But when I try to get the authorization code, the Google account selection page prompts me to select a Google account (I have several) to access a project named “Quickstart”, not “openHAB”. Quickstart is another GCP I have.
If I continue and get the authorization code, I get the following error starting OH3 (which I find normal, since the authorization code is for a different project):
2022-12-16 22:54:11.117 [ERROR] [oauth2client.internal.OAuthConnector] - grant type authorization_code to URL https://accounts.google.com/o/oauth2/token failed with error code invalid_grant, description Bad Request
2022-12-16 22:54:11.124 [WARN ] [ce.googletts.internal.GoogleCloudAPI] - Error initializing Google Cloud TTS service: Error fetching access token. Invalid authcode? Please generate a new one.
How can I specify the project in the URL to request the authorization code?
Thank you.
I already had a project created with the TTS API enabled in Google Cloud, because I had it working in OH2. This project is called “openHAB”.
I already had credentials for this project for OH2, but they were desktop type (“OAuth client”). Yesterday, following the instructions for OH3 I created the web app credentials (“TTS openHAB”):
I continue and I get the authorization code from de parameter in the URL. It is what I copy in org.openhab.voice.googletts:authcode=MY_AUTH_CODE in services/googletts.cfg and appears in the web GUI.
But then I restart openHAB and I get the error and the waring in the log.
I believe I have a problem retrieving the authorization code because the name of the project that appears in the account selection and the permission granting pages is “Quickstart”, but it should be “openHAB”. Is this correct? Am I doing something wrong?
Thank you very much.
All I can say is that I thoroughly documented the steps and I lately recreated everything from scratch (and it worked well) to make sure the steps I documented work out correctly. I would recommend to start from scratch exactly how I wrote it. Otherwise we would have to check were you diverted from that (at least you edited files on the server which I haven’t documented in my steps).
Hi,
With the configuration in files I got it to accept the authentication code but I had no voices listed in the karaf console.
I started from scratch from the GUI and now it’s all working. I’m going to leave it like this, I’m tired of fiddling with this.
Thank you very much for your help!!!
Recently upgraded OH from 3.3 to 3.4.2. but still after OH restart Google TTS stop working …Maybe someone know when issue with authcode wil be fixed? When I generate new authcode it is working till restart…