Google Home - Actions (API) now available!

(Mehmet Arziman) #504

Hi All,

I am currently trying to figure out why we receive strange OAuth scopes at
We expect scope „Google“ but receive scope „Google+google-assistant“, which leads to uknown scope error in OAuth flow.

At OAuth Playground I tested it and myOH behaves correctly with right scope.

Last thing is to find out where this strange scope comes from (Google App cache? Nginx cache?..)

Its a little tricky and inly started when we moved to Google PROD.

BR Mehmet

(Phillip Cisneros) #505

The title of this thread is actually not true . It should read “Nearly available!” . I’m surprised that Google agreed to this unfinished solution. They now have OpenHAB in their app . Which doesn’t actually work.
It may as well be a pile of bricks !

(Mehmet Arziman) #506

The title of the thread is that Google API is available and doesnt promise any more.

Yes, thats sad…but on Googles side. All worked until they released it on production.

(Sam) #507

This thread was for the Google API becoming available, not Google Home working with openhab. After all the work people are putting in here, I find your post quite rude. No one needs sarcasm or condescension when they are working in their free time to create something for the community. I suggest if you need Google Home working with whatever setup you have, maybe try looking down a route where you pay for the software. That way you can complain as you have paid for it!

(Brett Hiltbrand) #508

Nice, really constructive comment. Thanks for that… (obviously sarcasm) The title is absolutely correct, since people have been able to set up their own connections for testing for quite some time now. As stated, the issue is not on the OpenHAB side, but on Google using a different scope between test servers and prod servers. This sort of thing happens and will be remedied. You sir, need to work on your etiquette.

(Phillip Cisneros) #509

C’mon guys it’s funny !

(dalibor) #510

It is actually not funny to me. If you read above you would see how much effort and patience have people put into this project (especially Marzima) beside personal problems and life in general, i don’t think anyone here has the right to say anything but big Thank you (especially if the post is not constructive and doesn’t help the community)

So… Thank you all who have contributed, this is such a big thing for both Google and OpenHab that it is understandable if it takes time for issues to be resolved

(Michael Parment) #511

This is absolutely not fanny, especially from someone that has not contributed at all to OpenHAB. This is just rude.


(Trey Sheldon) #512

Mehmet – is it possible something got changed in the AOG project for account linking between when you created the account and when it was published? (Did you grant anybody else enough access to the project to adjust account linking scopes?)

Feel free to message me directly- I’d love to try and help debug this.

(Ryan) #513

Seems like the scope might somehow getting concatenated when google’s testing…hopefully not in the production side. Maybe they (Google) prefix their scopes by default with [Google] and then with the already defined [google-assistant], seems to make sense that the issue is on their side of things. The test simulation has been purring like a kitten.

Also, I know you were not feeling well recently but I had some features working (like Thermostat) which weren’t in the initial git pull, I have been testing and they work great so far.

(Massimo) #514

If my memories of OAuth2 are good, the scope can be ignored completely by the auth server (i.e. ) especially if for now you do not distinguish authorizations with different granularities.
So why bother at all about the scope??
Just ignore it!!!
It’s also suggested in the OAuth2 RFC:
" The authorization server MAY fully or partially ignore the scope requested by the client, based on the authorization server policy or the resource owner’s instructions."

We do not have at the moment any resource owner instructions…

My suggestion is to just accept whatever scope string Google send us in PROD or TEST or whatever.
This is probably a quick fix on your side, which needs no interaction at all with the Google team, and we would be all good to go with the current flow…
What do you think?

(Kai Kreuzer) #516

This was actually also my first thought, but @MARZIMA told me that the strict check of the scope for “Google” is actually one criteria for getting the certification. As we don’t want to risk this, we prefer Google to figure out why their own guidelines do not seem to match reality. Be assured that their experts are working on it :slight_smile:

(Brett Hiltbrand) #518

Thanks for the update! :slight_smile:

(Trey Sheldon) #519

I’m taking a stab here, but is it possible that Google is sending multiple scopes like “Google google-assistant” and openhab-cloud and the underlying layers aren’t decoding it correctly?

If I remember correctly, a space can be represented as a + in application/x-www-form-urlencoded data.

(Trey Sheldon) #520

I’m actually beginning to lean this direction…

  1. Home app sends the user to /oauth2/authorize?resposne_type=code&client_id=&redirect_uri=&scope=Google+google-assistant

  2. “Scope” gets passed straight through to oauth2.js line 121 as “Google+google-assistant” (when technically it should have been split at + into [‘Google’, ‘google-assistant’]

  3. oauth2.js line 122 then attempts to find “Google+google-assistant” in the database of scopes.

Unfortunately I don’t have the dev environment or JS experience to test this hypothesis.

Filed for tracking.

(Mehmet Arziman) #521

This ist true and I found this before.
But again we can fix our side, but Google should send the correct scope.
I will try 2 things to make it work, since Google takes too much time.

BR Mehmet

(Nick Madge) #522

hey :slight_smile:

I’m the developer of a competitor’s alexa/GH app.
I was curious about how OpenHAB was getting on with GH - if there’s anything I can do to help, let me know.

(Flole) #523

I have got it to work here using the official skill, it is working great. Just had to fix the scope in the request.

However, I’m having issues when asking for a status of my lights. When i ask for the TV status it works fine, but not when i want to hear a status of a Homematic light. Maybe it’s because of a percentage being sent?

(Gaël Grasset) #524

Same here, working perfectly when modifying the scope in the request ! Depending on the fix, I will relink my account if needed, but in the meantime I fully enjoy using my GH with the official Openhab app !
Thanks again for your hard work :smiley: The wait was worth every minute :smiley:

(dennis de vreede) #525

would you mind clarifying what exactly you got working - and how you got it to work??