Official Google Assistant Integration for openHAB

NOTE: With MARZIMA’s permission I am closing this thread to new posts. For future issues or requests for assistance with Google Assistant, please open a new thread. @rlkoshak

Hello all,

I am happy to announce that the openHAB 2 Google Assistant Action has been certified by Google today and is now live. This integration allows you to connect your openHAB through the myopenHAB.org cloud service to Google Assistant and control your openHAB by voice control. With this Action you can control items that respond to on/off and e.g. brighten your lights. The Action was tested with the languages English & German, but should support other languages, too (depending on Google Assistant language support).

Some sample commands are:

Light Bulbs and Plugs:

Turn on the <light name>
Turn off the <light name>
Dim the <light name>
Brighten the <light name>
Dim the <light name> 20%
Brighten the <light name> 20%
Set the <light name> to 50%
Set the <light name> to <color>
Is the <light name> on?
Is the <light name> off?
Turn on the <plug name>
Turn off the <plug name>
Turn on the lights
Turn on all the lights
Turn on the lights in the <room name>
Turn on the <room name> lights
Turn on the <device nick name>
<blind nick name> down / up
<blind nick name> 80% down / 80% up
<blind nick name> 80% up
Stop <blind nick name> 

Items that you wish to expose to Google Assistant will need to be tagged. Lighting and switchable tags are currently supported (although not limited to those types of items).

Some examples of tagged items are:

Switch KitchenLights "Kitchen Lights" <light> (gKitchen) [ "Lighting" ]
Dimmer BedroomLights "Bedroom Lights" <light> (gBedroom) [ "Lighting" ]

Currently the follwoing Tags are supported (also depending on Googles API capabilities):

["Lighting"]
["Switchable"]
["CurrentTemperature"]
["Thermostat"]
["Blinds"]

To use the openHAB integration for Google Assistant on your smartphone, you will need the Google Assistant or Google Home app (iOS or Android) and follow these steps:
Usage and setup of openHAB in Google app

If you are interested in the code for this action or want to contribute to its functionality, check out openhab-google-assistant and be sure, contributors are always welcome!

It was not an easy way (since we found some issues with Google), but we did it!
Thanks to all who helped to make this happen and many thanks to
the cmmunity for the patience. I hope you will enjoy the integration!!!

BR Mehmet

139 Likes

Nice work @MARZIMA !
We appreciate your efforts and can look forward to new device types/traits as Google adds them!

Exellent @MARZIMA !!!
Thanks a lot for your work.
For now for me it works like a charm!
This integration will definitely make openHAB even more attractive for many many people!
Bye
Massi

Excellent work, @MARZIMA and all who contributed to this!!! I’ve already got it working with my setup (it took no time at all and the setup was a breeze!) and it makes the system SO much more useful and interactive!!

Thanks again!

P.S. Is [ “TargetTemperature” ] on the list of to be added tags, as well?

1 Like

Thanks for all your hard work and patience to see it through. I am excited to try it.

Great stuff! Ever since I’ve bought a Google mini, I’ve been waiting and checking for this announcement like every day.

Amazing work! Already turning my porch lights on and off! what must the neighbors think!
A question I do have is what is the correct procedure to add extra items? For example, if I add another tag to another item, do I need to remove the openhab link in google home and re-add for it to see the new item?

@Rexz1 - I just ran across the same issue myself - adding more devices/tags…

Just say “Hey Google - Sync My Devices”, and it will pull down all new devices from openhab, then you can link them to proper rooms in the Google Home app on your phone.

So I’ve been trying to link openhab with google home since the announcement and though I get the successfully linked message, none of my items are appearing.

This is located in my default.items folder…anything obviously wrong?

Dimmer Master_Bedroom_Lights "Master Bedroom Lights" ["Lighting"] {channel="zwave:device:160a8da614e:node2:switch_dimmer"}

I’ve also tried it with spaces before and after the quotations around Lighting with no success.

Thanks!

@cporourke try what I just suggested to @Rexz1 (“Hey Google - sync my devices”) - that should refresh your list…

Turning off and on my heater already is nice… I’ll see if I can help work on the thermostat parts soon. Thanks again for all your hard work on this!

I was just about to edit my post and include that I had tried that. It keeps responding “Syncing unavailable for assistant.” It’s doing this on both of my Google Homes and my phone.

Any ideas?

edit: I’ve rebooted them both as well with no luck

1 Like

Weird, I definitely don’t see an issue with your items description - have you been successful in using myopenhab otherwise? I.e. are your secret/uuid set up correctly?

Yep no issues to report

Cross-posted from the development thread:

Awesome! Great work Mehmet!

I am getting an error though… After linking works, I hit done back to the Home app and at the bottom I get the message “Something went wrong. Try again.” (That’s on IOS)

From an Android tablet, I get the “Linking your OpenHAB account”, then “Couldn’t update the setting. Check your connection”

Any ideas?

I’m getting this error after allowing oath

“couldn’t update the setting check your connection”

Very nice @MARZIMA! Congrats on this long deserved success! :tada:

1 Like

@waspie, @Ian_Bishop @cporourke - I did stumble across a vague report of issues with syncing devices for people who had multiple users set up on the Google Assistant - just a shot in the dark here, but maybe that’s the issue?

I just saw that as well. I had three different users on my phone so I deleted two of them…no luck yet but I haven’t turned anything off and back on yet. I’ll report if I get any movement.

I only have one linked account for google home/assistant.