Google Home - Actions (API) now available!

I can see the thought process here, but I was messing around with my openHAB server remotely and wanted to see if the changes would work with the Google Home hence why I wanted to update the devices from within the Google Home app.

With that said, this voice command isn’t limited to the Google Home itself so I can use it with the Google Assistant on my phone. Thanks again for the command.

1 Like

I added a new group switch in an items file and restarted openhab2. In the Google Home app under Home control/Devices, when swiping down, I do indeed get the spinning circle, but the new switch doesn’t appear. If I ask the Google assistant on my phone to “update devices”, it updates and shows the switch.

I’m chalking the spinning circle up to just refreshing the page in the app.

I noticed this to be device independent. If you look at my post above, I had to remove OH and readd OH to my GH app just to sync devices. But this seemed to only happen on 1 android device and not on the others…

I’m not sure if this is right, because I have one thing ( a Light ) with 2 cannels/items ( brightness and color ) …
My GH mappes it to two independent devices and I think that is wrong.

I think GH also has “channel” (“traits”) for logical devices.

I found this Information here:

Really only need to link the color channel to GH, as the color channel includes brightness control (and on/off)

I do however see the following example:

2 switches
1 group with said 2 switches

Google home will see 3 switches (2 switches + 1 group). When I ask to turn off all lights, it states its turning off 3…

I went through the hard school trying to get it working with my own OH-Cloud instance. (and therefore a self deployed version of the action.
Here is what I have learned:

  • if you don’t get the scope right. google does not allow you to change it later on (for the oauth2 authentication) the only thing that helps is to add the scope later on into the mongo db.(Edit: You can change it - but the action will always use the first scope you have entered. Later changes are ignored I call bug!)
  • if you get the error that OH-cloud can not find jquery.cookies.js you are pretty screwed. So far I did not find a solution for me. @gstrike did you find an explanation why it never worked? I have tried most of what was suggested but a complete re-deplyment.
  • using the myopenhab cloud and the official action works.
  • google does not understand me as well as alexa. :wink:
  • Talking to my google watch and telling it to unlock my door makes me feel like my childhood hero Michael Knight
1 Like

Now we just need Google to open up the trigger words so we can set and use out own… “hey KITT”

Hello Kyle,

thanks for your answer, I tested it with my IKEA color light, and it worked. I’m able to adjust color, brightness and on/off switch with GH.

But this is not working for the ColorTemperature bulbs, which are logically Dimmer in OH.

But this doesn’t matter at the moment.

That is correct. You expose the group as a switch. Since it’s a group, if you turn it off, it will turn off all switches in it

Even thoug my current setup is broken again: About the Rollershutters… I have KNX rollershutter controllers and have tried two different things: Lighting and Switchable tags.
But neither of them would control the blinds… Google would say OK. but nothing happens.

Great work! Everything was easy to setup and works great. But I’m having trouble when I use Google assistant routines, after setting up what I want, when I run the routine I always get “can’t reach devices” but still I can control those devices with the assistant. Has anyone tried this?

I cannot even get the blinds to work at all. Maybe it is the name, but when I say “turn on office blinds” it says “here are some pictures” and shows me photos from internet… rollershutters are set as “switchable” (as I use turn off all lights, that would affect the blinds as well then if I set them to “lighting”)

You can create routines and turn off/on selectively.

Why can’t I say “Turn off Floor Lamp at 6 PM”


Can you add an example of items to group this way?

This is not supported by the Google Home.

Hi Friends,

I am trying to deploy the openhab-google-assistant functionality which allows controlling OH2 devices by the means of a Google Home device.
However I am stuck at the “Setup your Database” step:
Setup your Database
SSH into to your openhab cloud instance
Open the mongodb client mongo and enter these commands

According to the first instruction from above (“SSH into your openhab cloud instance”), where exactly the mongodb database should be installed? Google Cloud platform (from the Google Cloud Shell terminal)? openhab2 local (not cloud) instance (which in my case resides on a Raspberry Pi machine)?

I tried to run the mongo client from the Google Cloud Shell but it seems mongodb is not installed:
xxx@openhab-project-yyy:~$ mongo
-bash: mongo: command not found

When trying to install mongodb in my Google Cloud instance I am given a cost estimation of $347/month:
MongoDB (Google Click to Deploy)
Estimated costs: $347.48/month | 100+ recent deployments

so before taking this step I really need to ensure the mongodb deployment we will be using for our openhab-google-assistant project does not actually bring any costs in the Google Billing.

Am I proceeding right? Maybe I didn’t understand correctly the instruction “SSH into to your openhab cloud instance” and therefore the scope of the mongodb installation ?

Thank you!

Are you specifically trying to use your own instance of myopenhab? If not, then just follow this guide: Google Home & openHAB connection How-To - it’s much simpler than what you’re trying to do.

1 Like

I have a local openhab installation on a RPi which is linked to (openhab cloud). I am trying to link Google Home to the openhab cloud instance via the Google Cloud by following this guide.

In parallel I will try to apply the guide you suggested - thanks!.