Google Home - Actions (API) now available!

@Sk8ter,

yes it is incorrect. But you are really close!
If you gathered your OAuth2 ClientID & Secret for your „own“ openhab-google-assistant cloud function, you need of course „wire“ it to your own openhabcloud instance by putting it into your instance database (mongo). If I speak about wiring I mean that you need to create a trust and make those Backend-Token (Client-ID+secret) of Google Cloud known to your OHC instance.
Try to enter those IDs into mongo (I think oauth2clients is the schema) and make OHC aware of Google Cloud is comming to do an OAuth Flow.
How should OHC otherwise now something about the IDs you created? It doesnt know, so you need to wire/pair those backends one time
AND: Keep those ClientID & secret confidential and dont post it here as last time. This would be a security risk and you dont want that.

Your main mistake is, that in the Google Actions project you dont have to enter Google Endpoints/URLs! Otherwise Google tries to auth to itself.
You need to enter your OHC instance Auth URLs/Endpoints for OAuth, like: https://your-domain.com/.../auth &
https://your-domain.com/.../token

Iam sure your authorization error lies in the wrong wiring. Goggle Action (GCP) wants to do OAuth with your OHC and not with a Google endpoint. If I read all correctly and didnt get it wrong.

Hope this helps to get it running.

BR Mehmet

@MARZIMA
Thank you very much for your help.

I have added entry with Client ID and secret into mongo (I had to add a Scope too).
Changed also Auth URLs/Endpoints in Google Actions project to following values: “Authorization URL = https://my-domain.com/oauth2/authorize” and “Token URL = https://my-domain.com/oauth2/token”.

These changes pushed me much more forward.
Now, when I add new device (Home Control) it redirects to OAuth2 page with request to grand permission (which is then displayed in my-domain.com/applications). Home Control displays “Linking your [test] openhab account”, but then it shows “Couldn’t update the setting. Check your connection.”

I checked the logs, everything looks fine, except one thing. It gets 404 while trying to request “https://my-domain.com/oauth2/js-plugin/jquery-cookie/jquery.cookie.js?_=numbers”. If I manually remove oauth2 and paste into browser it loads the file.
Don’t know where it adds oauth2 to url. Is this configuration issue again or a bug in the application?

I haven’t tried this yet, decided to search on it because I have a huge install of openhab 1 that is highly customized and have been dreading upgrading to 2.
I have most items exposed to my.openhab. do I need openhab 2 for this to work? I haven’t read through the entire thread, it’s big.

If I can use openhab 1, how do I tag the items for categories? The doc on GitHub only says openhab at the top, but specifically mentions 2 at the bottom. Is that something that has to be done on 2 only, or do I need to finally upgrade? Hopefully not the latter. So many rules… Thanks for doing what I never would have finished.

Hey I know you submit the skill to google do you have confirmation yet ?

2 Likes

I dont think you need OH2, so long as the tags get passed through to my.openhab.

With respect to migrating from OH1 to OH2 - why not run both… leave your OH1 running all your rules etc whilst you get OH2 up and running and getting your head around the differences.
In most cases you can just copy your .items .sitemaps etc dirrectly over and they will work just fine.
Then when you are comfortable with OH2, begin moving yoru rules…which again will likely just work.

I will test that out. Hopefully tags do pass through. But, the reason I have not migrated is because of my zwave setup. I even have another updated zwave dongle, but I have not set it up because I would have to include everything in the right order and I have lots of things using zwave. It is a time thing, family and work and everything else adds up to not being able to commit a few hours to the task at one time.
I will get around to it, and maybe I will just set up an instance of openhab 2 with the new dongle and slowly move those over as I can. You are right that I could use both at the same time. And I have gotten away from using tasker for everything now that I can use IFTTT and google assistant. But that in itself is a chore, especially without cascading commands with one task being available.
Your work on this will motivate me to move on though. I am VERY excited that you have put this together. I seem to always choose the wrong tech based off of what is available at the edge instead of waiting for something concrete to use. But your work on this will support my choice of using openhab for the past 6 or so years. Thanks again for your time on this. I am sure that the community will greatly appreciate it and it will be one of the biggest reasons to use openhab in the future.

1 Like

Seems like Google is really taking time to approve the action. It’s been a week now since it was submitted. Hopefully we’ll have an approval soon, I’m checking every day to see if it’s now in the list.

Same here!

Still waiting, I tried to speed it up but without success.
Google needs more time to test

1 Like

Did they provide any estimations or what is regular processing time?
Do you have any ideas about my last post/question?

Retry Retry Retry
Google aint free of Bugs.
Just try 2 times after each other

BR Mehmet

Thanks for the little Update, good to hear that they are working on it. I think they’ll probably publish it next week, so it’s there before christmas, even though someone might need to work a little longer for that to happen.

2 Likes

Any updates can we have this as Christmas present :slight_smile:

/Mike

1 Like

You will know when its approved by just looking within the Google Home app and seeing if OpenHAB is listed as an Home Control > Add Devices.

As of writing this - it’s NOT there.

1 Like

I looked today…still under review :-/

Hope they will speed up

2 Likes

I was joking few months ago when asking if we can expect this feature before the end of the year. Now end of year is arriving…

2 Likes

oh well.

Thanks for all your work, currently planing to change from IOBroker to Openhab. This feature is one of the main arguments to change. So really looking forward.

1 Like

@Pumbadinho,

You are welcome.
There are also other reasons to switch over. To only name one, is the fair and tolerant community of openHAB. They iobroker folks have to learn a lot and I can only say, if you switch to openHAB you wont be dissapointed.
After all the years, I can say this with high confidence. You will always get support here and also feel always welcome to contribute, consume or get help.
Of course feel free to help to extend the openhab google assistant: It belongs to the community+public and not to mehmet or any particular person.

Whenever you need help, let us know (no matter which system you use :slight_smile: )

BR Mehmet

1 Like

Yes, off course.
I looked often to openhab, but with all the scripts i created in IOBroker is a lot of work to recreate in Openhab.
But I think now is the time…
Just looking for a hardware to do this. Planning to do this in any kind of docker environment, maybe located on a Synology which will be bought beginning of next year.