Official Google Assistant Integration for openHAB

I’m not sure if this is what you’re after -

It presents a facility to send POST commands from any 3rd party system to the Google Assistant. You can also control devices with it. For example, if a motion sensor is tripped, you can send a POST command with the text “Stream Nest Camera abc on Chromecast xyz”.

I’m using it to broadcast voice events of my home automation system on about six Google Home/Mini’s throughout the house. It’s a cost effective Text-to-Speech option.

I have it running on a Raspberry Pi. I couldn’t imagine there’s any reason why it won’t run concurrently on the same installation as openHAB.

1 Like

This is exactly what I had in mind…

Next question…
This may be a very long shot, and perhaps even the wrong community to ask. But I´m trying to figure this Google assistant stuff, which is rather confusing, cause it seems like there are different Assistants, depending of which devices. (Ie Google Home and Android Auto). And I think there is no obvious connection between them.

Thing is - I´m using Google Home (openhab binding seems to work great) at home. However, in my car, (Renault Kadjar with R-link 2) i´m using Android Auto through my Android mobilephone connected with USB cable.
My question is - Would it somehow be possible to send speech commands from my car to openHab, through the Android Auto assistant? This would be a great way to open/close the garagedoor on the way, or turn on/off lights or something simular.

Thank you. I still have a problem which I can’t solve. I have been working for days but still no solution. Can someone help me?

I just made one item connected to one thing in de Paper UI of OpenHAB. When I look in the console to the item I see this.

openhab> smarthome:items list
Lampenuit (Type=SwitchItem, State=ON, Label=null, Category=null, Tags=[Switchable])

The problem is that I am not able to connect Google Home to OpenHAB. It won’t connect and mentions there is a problem.

Any suggestions?

Regards,
Simon

You need a label on your Item. The label is what is used to name the device in the Google Assistant.

Mike

Thank you!!
Now I got it labeled and the console items show this:
Lampenuit (Type=SwitchItem, State=ON, Label=Allesuit, Category=null, Tags=[“Switchable”])

But Google Home and Openhab still won’t connect.

In Google Assistant you may need to perform a “sync devices” to refresh the devices.

I asked Google Home to sync my devices. It answered that it synced my Nest devices.The problem still exists.
Any other ideas? I am running out of ideas.

Regards,
Simon

Well oke if the answer is that Google is syncing Nest devices and there is no OpenHab in the response, you will have an issue with your account linking.
Remove OpenHab from your Google home app, remove Google Assistant from your myOpenHab account.
After that configure OpenHab again from your Google Home app.
I hope for you that will solve the issue.

Thx but the problem is I see no Openhab account linked in my Google Home app.

Just to be completely certain… on your mobile device:

From Google support (https://support.google.com/googlehome/answer/7073578):

Disconnect devices from Google Home

  1. Open the Google Home app Google Home app.
  2. In the bottom right corner of the Home screen, tap Account .
  3. Make sure that the Google Account listed is the one linked to your device. To switch accounts, click the down arrow .
  4. If you’re using an Android device, tap Settings . If iOS, tap More Settings.
  5. Tap ASSISTANT tab and then Home Control.
  6. In the “Devices” tab, at the top right tap More More and then Manage accounts .
  7. Tap the account you want to disconnect and then Unlink account and then Unlink .

Go to https://myopenhab.org and provide your Cloud Connector credentials to log in. Once logged in, move your mouse pointer over your user ID (upper right) and once the context menu displays, click on ‘Applications’. If any ‘Google Assistant Voice Control’ entries are listed, delete them

Now go back to your mobile device and follow the process above but this time you will be linking your openHAB account.

Hopefully the linking will complete successfully and this will get everything straightened out.

Once it is linked successfully, you will be able to add Items to openHAB and then just ‘sync devices’ on Google Assistant to “import” any new Items. When you sync devices, Google ought to inform you that it has refreshed each of your linked accounts. If you prefer, you can tell Google Assistant to ‘sync devices from openHAB’ and it will only refresh that linked service.

Mike

So…
Unlink in Google Home
Delete in myopenhab.org
Link in Google Home

The Google Voice Control application is added back in myopenhab.org? Yet, the service is not added in Google Home? Or, is the service added in Google Home as well… but none of your openHAB Items show up?

How are you declaring your openHAB Item? You mentioned the Karaf Console listing of the Item, but I don’t recall seeing how you declared it.

Yes, unlink in Google Home (but not possible because OpenHAB service was not there), then delete in myopenhab.org (Google Voice service was there), then Link in Google Home which first said ‘Accounts now linked’ and then comes up with ‘something went wrong, try again later’.

Then de Google Voice is added back in myopenhab.org, that’s as you mention. But there is still no OpenHAB service in Google Home.

What do you mean with het Karaf Console?

This:

openhab> smarthome:items list

How did you declare the Item. If Google can’t see any Items when it goes to add the openHAB service, that may be the reason for the failure. Just speculating. So, let’s look at the openHAB side of things to eliminate that as a possibility. For the Item that is listed when you use the Karaf Console,

Lampenuit (Type=SwitchItem, State=ON, Label=Allesuit, Category=null, Tags=[“Switchable”])

how did you declare Lampenuit in the first place?

Lampenuit is the name of the Item which I added in openHAB.

What do you means with ‘declare’?

I have been using Google Assistant with my Google Home for quite som time without problems, turning on and off lights etc. From today the Home finally supports Danish (and a lot of other smaller languages) but I can’t control my devices in Danish. It still works when I speak English. The Assistant responds something that translates to “Sorry I can’t help with that yet”. Is this due to the Google Assistant not supporting light controls in Danish or is it due to a missing translation in the openHAB skill?

Declare, Define, Specify, … What statement(s) or syntax did you use in order to set up Lampenuit and for it to have the settings (Type, Label, Tags, etc.) it has? How did Lampenuit get “into” openHAB? Did you do this through the Console (i.e., at the openhab> command prompt) as well?

Hi @HomeBoss,
Your issue is something Google is struggling width. The same issues are reported for the Dutch language (also launched today).

I entered the item through throug the PaperUI