Google Home Integration - Just got my Hubitat

Which devices are not controllable? Can't you simply create a rule and control the device with a virtual switch in GH if it's not controllable via the HE device in GH?

I don't know. Does that work? I have never tried it.

Works for Alexa. Can’t see how GH would be so different.

I will have to try it.

I have no need for it with HE, but it's how I trigger TTS on Alexa, by triggering a SmartThing virtual switch via Google Assistant (GH), so it shouldn't be any different with HE.

Yup. I've setup a few when I was messing around with it. A GH routine, like an Alexa routine, can flip a virtual switch on/off. However, locks and some other devices (motion, contact, etc) do not show up in GH from HE.

Also, GH is much more restrictive about what voice terms you can use to kick off a custom routine. Your voice command can't contain ANY of the reserved keywords (like Good morning or Good night).

1 Like

Thanks!

1 Like

Thanks to all of you for your comments on this thread.

I have been looking at configuring virtual devices so that my Hubitat can control devices configured on Google Home that are not compatible with HE.

When I go in to configure a virtual device, the only options for Type remotely close to my Etekcity outlets and Smart Life switches are either Generic Component Switch or Virtual Switch. With either, I am not sure what to put in for Device Name or Device Network ID. Any thoughts?

When creating a Virtual Device on Hubitat, it is best to always pick one of the "Virtual..." Drivers from the list. These are designed to be used as virtual devices and expose additional features to allow manual control.

Once you select your Driver, you can enter any unique string in for the Device Network ID. Just be sure to make it truly unique and not just a number. Other real devices sometimes use pure numeric device network ID's, so best to not conflict. Try something like "VirtualSwitch0001" as your device network ID. If you add another, make it "VirtualSwitch0002", etc...

You can put whatever you want in for Device Name and Device Label. If you define the Label field, that is the string that will be displayed on Dashboards, in Rule Machine, etc...

@ogiewon Where do I indicate that I want it to connect to a specific device configured in Google Home? It seems in your reply that I am typing in whatever I want, but that I am not indicating anything about the specific device or Google Home. Sorry for my ignorance, I am just getting started.

I did get it to work with IFTTT. My Z-wave motion detector senses motion immediately per my Hubitat dashboard, Hubitat informs IFTTT, the rule to turn the light on runs in a few seconds, and the light goes on (light switch). When the 8 second motion timeout expires for the motion detector (set in Hubitat), IFTTT should know based on the direct connection to Hubitat. Even though my Z-Wave motion detector has not sensed motion, and hence should fire off my IFTTT to turn the light off, it does not shut off the light for about 10 minutes. I can see the indication in the Hubitat dashboard that the motion sensor is showing no activity 8 seconds after it first does. As far as I can tell, IFTTT is useless for anything you want to do in a timely matter. Is there anything obvious I am doing wrong?

Use rule machine. If virtual switch turns on, then turn on non virtual device.

IFTTT is useless for lights, correct

1 Like

@dan_eccher - have you set up the Google Assistant Relay on a standalone Raspberry Pi yet? I believe @SmartHomePrimer suggestion below is what you are attempting to accomplish, correct?

If yes, the data flow would be as follows:

Vitual Switch -> Rule Machine -> Google Assistant Relay device (using the [CC] custom command syntax in a Notify/Speak action - for example "[CC]Turn on Desk Lamp", which is the exact same phrase you'd issue to your Google Home today to turn on your existing light.)

3 Likes

@dan_eccher
Here's what it looks like. As @ogiewon said, you need to have that Google Assistant Relay running first. If you haven't sunk your teeth into that yet, you must start there. Once that's running, you create your virtual switch, and then you create a rule that sends the commands to Google Assistant using the Google Assistant Relay driver. The driver is the HE connection to the Node.js server, and the Node.js server passes the commands onto Google Assistant in the cloud.

HE Virtual Switch ON > HE RM Rule is True= [CC] Hey Google, turn on switch name
HE Virtual Switch OFF > HE RM Rule is False= [CC] Hey Google, turn off switch name

I use this for controlling an iDevices outlet. Similar to your situation, I have an iDevices WiFi outlet that cannot be controlled directly via HE, but can be controlled via Google Assistant. I have a lighted mirror in my daughter's room that is plugged into the outlet. The mirror has a button, but of course teenagers don't turn off lights. So the mirror is controllable via a Xiaomi button right next to it, via a Xiaomi button right next to her bed, via HomeKit, and via automation when there is no longer movement in her room after an hour. All this is done by just turning that virtual switch ON or OFF.


I use the method for a lot of things, including making Alexa speak when something happens in Hubitat, be it a switch, door contact, or whatever I want.

55%20PM

Okay, I did not realize the Raspberry Pi is required. Sounds like an additional learning curve I do not have time for. I think I will use those Smart Life switches where I can use voice commands and use the Z-wave switch I just bought to do this. Thank you @ogiewon and @SmartHomePrimer, I will definitely save those references provided if I want to tackle that down the road.

For anyone else trying to add a Virtual Device to Google Home via the integrated app, note that the virtual device requires an initial state to be passed to GH. After creating the devices and adding them, they appeared in the HE App for about 30 seconds and disappeared (Also never showing in GH). In my case they were simple virtual switches and hitting the "Off" button in the device config set the initial state and then they could be added to Google Home.

4 Likes

Good Pro Tip! Thanks for sharing.

More issues with Google Today (they may have started late last night after upgrading firmware). Today, google was presenting me with "can't connect to hubitat, blah, blah, blah..." so I removed the Google Home App and then unlinked Hubitat from Google Home. I then go back to re-link the Hubitat, it has me auth and then I pick my Hub. It just spins for a while and the the resonse from oauth-redirect.googleuserconnect.com is just

"The parameter state must be set int eh query string." I'm about ready to toss hubitat out the window.

Anyone else having issues

Yes, see Cloud endpoints not working

2 Likes

Wouldn't you be able to use this: Local execution | Actions on Google Smart Home | Google Developers

to continue hubitat integrations?? It would require talking to google assistant first but I'm doing that anyways as is with current deployment software, and it would maintain local autonomy rather than having to go to cloud for response.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.