Google Home - Actions (API) now available!

Hi All,

I am currently trying to figure out why we receive strange OAuth scopes at myOH.org.
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

12 Likes

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 !

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.

1 Like

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!

13 Likes

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.

10 Likes

C’mon guys it’s funny !

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

11 Likes

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

/mike

10 Likes

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.

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.

2 Likes

Hi @MARZIMA,
If my memories of OAuth2 are good, the scope can be ignored completely by the auth server (i.e. myoh.org ) 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?
Thanks
massi

1 Like

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:

10 Likes

Thanks for the update! :slight_smile:

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.

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 https://github.com/openhab/openhab-cloud/issues/165 for tracking.

3 Likes

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

2 Likes

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.

1 Like

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?

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:

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