Google Home - Actions (API) now available!

Are you putting in a new item with the correct tags or adding a valid tag to a new item?

I am still on development setup through my own Openhab Cloud setup, but “Sync My Devices” has worked for me for quite some time. By saying “sync my devices” Google sends the “SYNC” intent to the action which is basically what happens when you’re adding in the Google Home App the first time. I find it odd that it doesn’t work.

Perhaps in future updates it will iron itself out.

I am on both (dev on my instance, but my home is actually on myopenhab). I have a temperature setup working also, I might request a PR soon. Now that I think about it, I’ll check what happens on a different Android device.

I have PR currently in for Thermostat/Temperature - check my code to see how it differs. Maybe there is something in there which allows Sync to work.

2 Likes

Can I ask how people are handling naming of items in openhab for use with Google Home ?

I got myself a GH Mini today and have been playing around with it - I expected that once the GH device was placed in a ‘room’ within the app, then saying things like ‘turn off the light’ would only do so for devices in the same room, but it turns off every single light… is that how it’s supposed to be ?

With colour lights, I have the following;

Dimmer   FF_MasterBedroom_Light              "Master Bedroom Light"    (gColorLights,gFirstFloorLights)    ["Switchable"]      {channel="miio:basic:036DABBA:brightness"}
Color    FF_MasterBedroom_Light_Color              "Master Bedroom Light Color"      (gColorLightsHSB)      ["Lighting"]  {channel="miio:basic:036DABBA:color"}

In the GH app, the light appears twice - so when I say ‘turn off the master bedroom’ it tries to switch ‘off’ the color item too… is there any way to combine items so they are presented to GH as the single physical device they are??

Also, does anyone know if there is a way to set a string item using this ? - I tried to add the ‘Switchable’ tag, in the hope it would just send the command I stated, but the device doesn’t show up after syncing.
(I’m trying to control a Logitech Harmony Hub - Current Activity channel)

Try to just add the Color Item only.
For the String, it is not possible ATM, but you can do that with IFTTT and both works together.

Thanks, I’ll try that out.
But if I just use colour how do I set brightness for the bulb since that uses its own channel?

If you specify the room name it works. But I’ve also found that despite having the ability to specify the lights’ room and the Google Home Mini’s room, you can’t ask it to turn off the lights in the room and have GH assume it is the room the Google Home Mini is in.

But for example telling GH to ‘turn off the lights in the hallway’, does, at least for me, only turn off the lights. Google would respond with ‘Okay, turning off 2 lights’ if you have for example 2 lights in the hallway.

The only thing you can do using this is to use either ‘lighting’ for On and Off (regardless of whether it is a light) or use ‘dimmer’ (dimmable? I can’t remember the right tag), and then trigger a rule based on a number. Google’s responses wouldn’t fit though.

Otherwise, as suggested, use IFTTT instead for specific commands like that. This also allows you to specify a response.

Quick question. What is the process for a new item in openHAB to show in Google Home under Home Control?

The only way I’ve figured out how to get a new openHAB item to show is to unlink the openHAB service in the Google Home app and re-link it. In the Amazon echo, I can simply just manually rescan (in the alexa app) and the new item is automatically added.

“hey google, sync my devices”
Usually works.

2 Likes

Thanks. Figures Google Assistant/Home would have a command to perform this but not an option in the Google Home app.

Well, Google does want you to talk to the system instead of digging through an app…

Anyone else having issues with the auth connection between google home and myopenhab? It was working prior and quit. I have deleted the application on myopenhab and wihtin the google settings, and then attempted to re-add in google. It lets me enter my credentials, click allow authorization within myopenhab, reverts back to the google home settings, and then fails to update, says to check connection.

Check your item/thing setup, I was having that same issue for the last few days, turns out I was missing the previously optional ip address for my hue bridge thing definition… Added that ip address and everything instantly started working again.

Hmm, nothing has changed from that perspective, and i connect directly to hue from google vs openhab. My hue and ecobee items work fine directly from goolge home. I’ll take a look and see if something might be confusing it.

I hadn’t made any changes either… It was working one day, then home suddenly started, saying there was an error and was unable to control my devices… I spent a couple days thinking it was an issue on googles end since I hadn’t changed anything… Finally thought I’d try restarting openhab to see if that might help. After the restart none of my hue devices initialized or worked (yet they worked fine before the restart) dug through the hue binding page to try to figure out why… That missing ip address in the .things text file, added it and everything worked again.

cool, i’ll give it a try. Thanks!

Hello,
does anybody know, why the “items” are mapped to google home and not the “things”?
I thougt that in OH the “thing” identifies the device ( LivingRoomLamp ) with the functionality/attributes of the “items” (brightness and color).
Is there a plan to change this in the future?

1 Like

I’m not a OH2 master (yet)
But it’s my understand that Things can have more than one Item linked, depending on the available channels, and we control the Items.
So it wouldn’t make sense to connect the things to GH as there would be nothing to control.

What I do to control ‘rooms’ is to create groups for every room, then add the appropriate tag for the group, and add specific switches/items to that group.

For example, I created a group called kitchen with all the kitchen lights. Then I can just say Hey Google, turn off the kitchen lights.

This way, you can assign a single switch to multiple groups (rooms) like for my kitchen lights, they belong to groups kitchen and indoor. I can say Hey Google, turn off the kitchen lights or Hey Google turn off all indoor lights.

3 Likes

Try swiping down within the Home control/Devices tab of the Google Home app.
I get a ‘spinning circle’ that indicates a device sync.