[Alpha] Community-maintained Google Home integration

All of them. Bulbs, switches, , fans, locks, you name it. It seems to be some kind of left over metadata in Google Home that is looking for the old device even though it was removed. What I found that eventually worked was clicking on each device... If it threw a can't connect or offline error, I moved it's room to somewhere else and then immediately moved it back into the room it belongs. Then it would work! It seems this process would over write whatever the "ghost data" was. This shouldn't have to happen though. I don't know if this is a developer problem on the Hubitat side where commands to remove do not properly instruct Google's servers or if it is a Google problem. I never encountered it with Smart things before... This seems new to Hubitat when switching between the official Google Home App and the Community App.

@mbudnek Thank you for your incredibly helpful and on point step-by-step instructions for n00bs like me. Worked perfectly for my Graber shades! An error that I got of "Couldn't update the setting. Check your connection" was because I had not correctly entered my Hubitat ID in the fulfillment URL. Silly mistake.

A funny thing is that I can ask GH to open my blinds 50% (I have 5 in one room) and it will open all of them to 50% but respond, "OK, opening 90%" or some nonsense that doesn't correlate with my original command. Any idea why it does what I ask but responds with a different value? The open/close attribute is unset. Truly just curiousity because I'm just so happy it works!

That's probably the same issue some others have reported. When the app gets a command from Google, it sends it to the relevant devices and then waits a few seconds for their reported state to match what it told them to do. Some devices like shades and garage doors take too long to reach the desired state, and so the app ends up reporting back to Google with either the initial state before they started moving or some intermediate state. I need to do a bit or redesign to change the way that works; I just haven't had the time or motivation recently to do it.

1 Like

I'm have issues link my app to google. I have a device in the app and I can click authorized but I get circle spinning saying signing in. Then it goes away and nothing is linked. I never see anything from google come into my logs. This is my fulfillment URL https://cloud.hubitat.com/api/xxxxxxxxxxxxxx/apps/xxx/action. Any help would be great.

Thanks

First, make sure you have debug logging turned on in the Google Home Community app. If you still don't see anything in your Hubitat logs from the Google Home Community app then either the OAuth settings or the fulfillment URL is likely configured incorrectly.

The fulfillment URL shouldn't include any brackets or anything. The {} in the instructions are just there to indicate that you need to replace that section with your value. The fulfillment URL should look something like this:

https://cloud.hubitat.com/api/2c43c142-489e-49f8-b343-a08c365ea19d/apps/123/action

In the OAuth settings make sure:

  • Client ID matches the ID from your app
  • Client secret matches the secret from your app
  • Authorization URL should be https://oauth.cloud.hubitat.com/oauth/authorize
  • Token URL should be https://oauth.cloud.hubitat.com/oauth/token
  • app should be the only scope

The settings page should look something like this:

I can now control my three garage doors and three door locks using Google Home with PINs!

Thanks, @mbudnek, and thanks for also including it in [BETA] Hubitat Package Manager.

Just one question: Is it at all possible to integrate the PIN functionality with Lock Code Manager?

I have everything (ok my garage door) linked up to Google. Just curious on 2 things.

  1. On the Google Home app on my phone, it doesn't show the state of the garage door nor can I control. However, if I ask the app if the Garage Door is open or closed, it reports back correctly. (see pic below).

  2. On my Google Home Hub display, it shows the garage door as, I think, a sensor (see second pic below).

Thanks!

#1. For the phone app, that is normal. #2 For the Google hub display, It is not normal. Google broke something in the last update. It has been this way for about a month. I have sent feedback to google a few times. Hopefully it will be fixed soon. My Nest hello doorbell is showing up as a sensor like this also.

1 Like

Thanks for the quick response! At least I'm not losing my mind.

When adding fan devices (Lutron Fan Switches) with FANSPEED as a device trait, I get this error ...

java.lang.NullPointerException: Cannot invoke method split() on null object on line 2026 (handleAction)

Saw there were some posts on this but no workaround I can get to work. Any suggestions what I am doing wrong?

Thanks Robert

It sounds like the mapping of Hubitat fan speed settings to Google fan speed settings isn't configured. In your Fan Speed trait settings do you have at least one speed selected under "Supported Fan Speeds" and are the "Google Home Level Names for ..." settings all populated? They should all be flagged required, so it shouldn't be possible to leave them unset, but stranger things have happened.

They are all populated, still not working :frowning:

What am I doing wrong?

Hmm, can you click the gear in the top-right of the app settings and find the settings for that device trait? You can look for a deviceTypes.N.display matching your device type name and find all of the matching deviceTypes.N.traits.FanSpeed settings. It will look something like this:


For some reason the Google name mapped to one of your fan speeds isn't getting loaded correctly, and I'm not sure why that's happening.

Help!
I can't get past the
-Enter your Hubitat account credentials and click "Sign In"- section.

in step 23, I keep getting "The parameter state must be in the query string" message.

Also in step 17, I don't see the phone/laptop icon you're referring to.

Please help!

Thanks.

Finally received a software update today. Everything is back to normal.

1 Like

It doesn't look like the list of supported devices includes the Hello Doorbell does it? Any idea if the recent Google announcement will enable integration of the doorbell with HE?

Check your OAuth client ID and client secret. I just went back through the setup instructions and it seems like Hubitat changed them after the first time I generated them? Putting in the wrong client info caused the error you're seeing.

Looks like they changed their UI since I wrote those instructions. There's now a Settings button in the top-right of the simulator page and the on-device testing setting has been moved there. I'll update the instructions.

This integration is specifically for controlling and querying Hubitat devices with Google Assistant/Home. It cannot be used to query or control devices linked directly to Google Home from Hubitat, so it's not really appropriate for a Hello Doorbell.

Hi.
Thanks for your reply.

I checked and double checked the OAuth credentials and no change.
I also checked the fulfillment url to make sure its correctly formatted.
My username and password work properly from all browsers.

I removed the Google Home community app.
I deleted the app code.

I started all over again.
I repasted the code.
I received a different set of OAuth credentials and app ID.
I carefully entered everything correctly.

I attempted to sign in a dozen more times.

I'm still getting the "The parameter state must be in the query string" message.
What could I possibly be doing wrong?

Thanks in advance for your patience.

Just to confirm, all of your OAuth settings are configured like this (I highlighted the important stuff in red)?

At what point in the login flow are you seeing the error? Is it before you enter your email address and password, before you select a hub, before you select devices, or after selecting devices? If it's after entering your email address and password but before selecting a hub then you're likely missing the "app" scope. If it's after selecting a hub then it's something wrong with the client ID and/or client secret.

I wish they'd make the Garage Door reflect the status in the icon. :man_shrugging:

1 Like

Download the Hubitat app