[Alpha] Community-maintained Google Home integration

got it going. How do you set up blinds? the first thing i tried got them in as blinds but i couldn't control them in the app?

Not sure about blinds, i don't have any......yet anyway.

If you use the open and close trait....it looks like they can be controlled on the home hub or home hub max. But on the phone app it just has an icon with no controls, but should still work with voice controls.

Also you have to uncheck this other wise you can only ask about the status if they are open or close...not control them.

yeah :thinking:

@BorrisTheCat Here are my blinds. I've highlighted the attributes you would likely use in green and the commands you would likely use in yellow:

Here's how I have my blinds set up. I used the switch attribute and device type because I have several double windows that I want to show up in Google Home as a single device so they're set up in the built-in Groups and Scenes app as groups:


To set them up using Hubitat's WindowShade capability, I would probably do something like this:


For a full reference for what commands and attributes different types of devices should have available, see Hubitat's List

I just pushed a change that lets actions be configured to require either confirmation or a PIN code.
This update adds two new settings to each device type. One to select which actions should require confirmation and one to select which actions should require a PIN code.

When you ask the Google Assistant to perform an action that's configured to require confirmation, it will respond by asking if you're sure you want to perform that action. Respond with a simple "yes" or "no".

When you ask the Google Assistant to perform an action that's configured to require a PIN code, it will respond by asking for your code. If you say a correct code, the action will be performed as requested. If you say nothing, or give an incorrect code no action will be taken. This is primarily useful for security-sensitive devices, such as opening a garage door or unlocking a lock (once I implement the LockUnlock trait).

2 Likes

The only issue with that is I'm using the built-in generic z-wave shade and all I have is this.


I want to be able to set the position of the blinds ideally.

My second example should work for you then. Keep both "Discrete Only" and "Query Only" un-selected and use position for "Open/Close Attribute" and setPosition for "Open Position Command". That should let you open your blinds to any position by saying something like "Hey Google, open the blinds to 60%". If that doesn't work then it's possible there's a bug in the app. Send me your Google Home Community logs and I'll take a look.

@BorrisTheCat Yep, turns out that trait was just broken when "Discrete Only" wasn't set. I just pushed a change that should fix it. Grab the latest code from GitHub and let me know if that fixes your issues.

will do thanks. The import doesn't work on you app? Would you add the import URL setting?

yours would be the below at line 27

importUrl: "https://raw.githubusercontent.com/mbudnek/google-home-hubitat-community/master/google-home-community.groovy",

would i have to delete and recreate the devices to get them updated?

tried the above and still the same.

@BorrisTheCat I added the importUrl setting, though it doesn't seem to do anything. Hubitat still shows the import box blank until I paste a URL into it and then just remembers that URL.

And no, you shouldn't need to delete and recreate anything. I did just find another small bug in the OpenClose handler, so you may want to update again. The bug I just fixed shouldn't have prevented anything from working, but it would make requests to open your blinds 100% take about 5 seconds longer than they should.

1 Like

I think that is correct, the 1st time but it should remember it now.

@BorrisTheCat @mbudnek, unless something changed recently, the importUrl doesn't not work with apps...only drivers. Once you enter the url manually once, the browser will cache it regardless, but it won't automatically enter the url as it does in drivers. Essentially, adding importUrl will have no impact now, but it's good practice to add it anyway. That way, if the feature ever gets added, you are already good to go.

3 Likes

Hello,
This will only work if the device supports a pin# correct? My current garage door device doesn't have this on the device page so when I add a pin to the integration it doesn't seem to do anything.

Do you plan to implement the LockUnlock trait soon? I can't wait to test it.
I was going to purchase the Nest X yale lock but I think I will be able to save myself some $$ and get the zwave version and use it with this integration instead.

Thanks!

All I get when I try to select the [test] Action from my list, is sent right back to the Set up screen. I deleted my native Google integration so now I have nothing. Would be wonderful if this actually worked.

I select the devices, click authorize and get an error stating could not update setting, check connection. And it says " Could not load provider information. Check your network connection and try again."

The very odd part is that I got the same error when I tried to load the original google integration back in. But the devices still linked and my devices still showed. So, is there something different about the way that Hubitat is handling it that is the reason this isn't working?

@gassgs PIN code support should work for any device type. The PIN codes used for Google Assistant are managed per device type in the Google Home Community app, and are not necessarily the same as the codes used directly on the device. LockUnlock is the next trait I'm planning to work on. Probably this weekend.

@Ryan780 The most common causes for errors like that are either trying to link to Google Home with no devices selected or configuration problems within the Google Action. Make sure you have at least one device selected when linking. If you do, check your Fulfillment URL in the Action; it should look something like https://cloud.hubitat.com/api/c1776b22-f9fe-44b9-ac49-93e5adefd672/apps/254/action, where c1776b22-f9fe-44b9-ac49-93e5adefd672 is your Hub ID and 254 is the app instance ID.

If neither of those fix your problem, turn on debug logging in the Google Home Community app and watch the Hubitat log while linking. You should see a line like {inputs=[{intent=action.devices.SYNC}], requestId=9516322382727038343}. If you see that then the Action is likely configured correctly. If you don't then the issue is likely on the Action side.

1 Like

Yes, I see this:
{inputs=[{intent=action.devices.SYNC}], requestId=LONGNUMBER}

Then, when i go back in again, it completely errors out without allowing me to even select devices the second time. I have to go into my google account settings and remove the linking to the account, which doesn't even show up in Google home but somehow still shows up in Linked acount.

I think the problem is on the hubitat side. I try to go in and authroize my devices after unlinking my accounts and it shows the full list of devices, not just the ones I have authorized in the Community app in Google Home. So, I am going to delete everything in Hubitat and let it sit for a while and see what happens.

Seeing the same thing here. Also seeing this in the log...