Official Google Assistant Integration for openHAB

Correct, for each account in the Google Home app, go to Home Control, press the + button and select openHAB and log in with your openHAB credentials. Once linked, just say “OK Google, Sync my devices”.

Perfect! That’s the way all my other devices have worked. I was gun shy after my Sonoff woes.

@ranielsen Rob - Help!

I’ve got to bother you further. I’m trying to go through the setup, but some things are a bit unclear. I apologize in advance for the long question(s)!

I got through the portions on creating a GCP project and enabling the API. Followed procedure step-by-step. I set up a Node.js development environment. I’ve gotten through installing gactions and giving it execute rights.

I’m at the openHAB setup step where it says to edit the functions\config.js. What does “your openhab cloud instance” mean for the ‘host’ parameter I’m supposed to update. I thought my cloud connector was ‘’ (i.e., pretty static) where the access is given based on using my openHAB Cloud Connector credentials.

Now to the authentication and linking. To set this up, I created a GCP project under my Google ID. At some point in the Node.js setup process, there’s a step that goes through the Google Cloud SDK authentication. The procedure provides a long URL that returns a verification code which I was to paste into one of the steps. Then, there’s another authentication step for the Google Cloud Library for Node.js. The result of this authentication procedure is to generate a JSON file with the Oauth keys. I didn’t perform this step because it was not clear to me what these service account(s) are for and whether I need one for each person I need to set up to have Assistant linking to openHAB. So, there’s lots of “credentials” in even setting up the first instance… and I don’t understand them all. But then my question is, do I need to go through the credentials creation, i.e., the full GCP quickstart even creating a separate project for each user? And, then getting back to the config.js ‘host’, since the Cloud Connector requires authentication, and you add users to be able to access it, is that set of credentials also part of this Connector to Assistant linking? Somehow I think I’m making all of this all way to complicated. I’m afraid the setup documentation ends up taking you to a GCP setup, which takes you to a gactions setup which takes you to a Node.js setup, which takes you to an authentication setup, … I’ve got a stack overflow in winding through all of these procedures!

Again, since you’ve successfully navigated this, any pointers you can provide or any more detailed instructions you can point me to is greatly appreciated!



@meingraham, sorry but I use the official one, not one I set up myself.

I am trying to do that too… and following the setup procedure documented. What procedure did you use?

The guide you followed is mainly for developers who want to test or implement new features before they are officially published, or for people who want an installation which doesn’t rely on the servers.

If you’re the “standard” user profile, ie have a local openhab installation linked to a cloud account with, then use this link: Google Home & openHAB connection How-To, or follow the procedure from the first post of this thread (Official Google Assistant Integration for openHAB)

If you are more a techy guy who wants to contribute and test/implement new features in openhab that are not yet released, then you can follow this guide here :

1 Like

@gael.grasset @ranielsen OMG! Did I go down a rabbit hole. I made the mistake of going to the top of that github readme and trying to follow that.

Gaël - Thanks for pulling me out. It works like all the other Google Assistant services… AND COULD NOT BE ANY SIMPLER! Again, thanks!

I am getting openhab is unavailable from Google since about 24hrs ago. Is it working for everyone else? I can access openhab via myopenhab so it’s not a connection issue my end as far as I am aware?

Yesterday evening Google Assistant also was telling me that OpenHAB is unavailable. I restarted my openHAB instance and it worked again.

Ok I restarted and it connected but I looked through the logs of myopenhab and it shows:

|Yesterday at 4:41 PM|openhab|offline|
|Yesterday at 4:35 PM|openhab|online|
|Yesterday at 4:34 PM|openhab|online|
|Yesterday at 4:32 PM|openhab|online|
|Yesterday at 4:32 PM|openhab|online|
|Yesterday at 4:32 PM|openhab|online|

I just noticed that it seems openhab is throwing some errors too:


That is strange. For me it’s working again since then. Maybe you are using an outdated version of openHAB?

I got the same issue. Sometimes Google Assistant is able to update items and sometimes not.
I also see the error messages you mentioned.

There have been issues with in the last couple of days. It is much better now but there have still been a couple of very short duration outages in the afternoon.

I’ve also noticed that GH have had some issues with the openhab service lately. But now
I’m strugglin even more. Couldn’t get GH syncing openhab devices. So I tried to remove openhab service from the google home app, and reauthenticate. But Now I can’t get Oath2 to pass. When I press “allow” in the authentication window, it just throws an error, complaining about my settings or to check my connection :frowning:



Just wondered if there is something wrong with the official Google assistant integration for openhab? I tried the phrase “sync my devices”, and suddenly I got an error everytime i tried. So I tried to remove the openhab service from my google home app, and reauthenticate. But now I can’t get passed the authentication point. Get an error after pressing allow on the Oauth2 window. Any help would be much appreciated.


i have finally got around to sorting this i just manually recreated the items needed in text files

@MARZIMA Thanks for the hard work on this very easy to setup

1 Like

Is there a way to make my Google Home openHAB actions stick to the room that the Google Home device is assigned? Right now, if I say “turn on the lights,” it turns on all of them in every room. It’s not like that with my TVs on Chromecasts. Maybe it’s just not programmed like that, or I’m not using it properly?

Just tell “turn on the lights in < room name >”.
Ofc you have to assign all the devices to it’s rooms correctly.
Works fine for me so far.

1 Like

That works fine, but I just mean the shorter version of that without including the room name in the voice command. When I say “Turn on the TV,” my Chromecast turns on the TV in whatever room I’m in. I recently had a guest that expected the lights to work the same way, but they turned on every room when they didn’t include the room name (as I expected, but only because I’ve used and tested it).


Thanks for putting an amazing amount of effort into this.

May l ask two questions?

(I’m completely new to OpenHab2, thanks solely to the Velbus binding that @cedricboon has created)

For simplicity, I’m reluctant to mess with text files as I don’t have a great history of success in coding, so…

I added the “switchable” and “lighting” tags to the only *Items.json file I could find, which enabled me to sync with Google and get all 34 Velbus lights working. (Which was a fairly painless process, once I found the JSON file and was brave enough to edit it)

My problem is that I’ve added an extra dimmer which was very quickly added to the list of “Things” and is completely accessible via HabPanel and the Control section inside PaperUI, but there is no sign of it being added to the JSON file. (Even through the JSON file appears to be backed up most evenings)

Do I need to do something to get the new dimmer added to the JSON file?


The second question is, what are the long term plans to enable these tags to be added via the paperUI ? (Or other guided GUI)

MDAR Ltd is an importer of Velbus products, so I’m keen to find a UI solution that clients and installers can setup without needing to be high functioning coders.

Many thanks in advance,


You talk about Things. Do you have simple mode enabled? If not did you create an Item and link it to one or more Channels on the Thing?

1 Like