Google Home Integration - Just got my Hubitat

I have a Google Home that controls my VeSync (Etekcity) outlets and light switches connected to the "Smart Life" app. I am trying to figure out what level of bi-directional communication I have.

Google Home to Hubitat:

  1. Can I use voice commands to control all of my devices connected to Hubitat?
  2. Can I continue to control devices only configured in Google Home, while also controlling separate Hubitat-connected devices?
  3. Can a device such as Nest be set up to fire a trigger/event within Hubitat, be it through Google Home or otherwise?

Hubitat to Google Home:

  1. I have some cheap outlets and light switches (see above). Can I control devices from Hubitat that are only connected to my Google Home, and not directly to Hubitat?
  2. Can I adjust the thermostat setting on Next thermostat from Hubitat directly or via Google Home?

I want to set up every device I can in Hubitat, use Google for non-supported devices, create all of my rules in Hubitat, and control all of the devices through Google home voice commands.

In addition to the above, if the answers are not ideal, I have the skills to write a driver, etc. Are these things I can do with Groovy or similar on the platform? Assuming of course that I can connect to either VeSync or the outlets directly from Hubitat.

Yes, there are conditions for each. On the Nest, you'll have use a community app for now.

1 Like

you should be able to still create an oauth on developers.nest.com

Login with your primary nest username
it will ask you to fill in a form/contact
when that is done, and you submit, scroll to bottom of next page and "create Oauth client"

In NST manager are the details for creating this. note you don't have to do all this with NST manager, but if you want your own clientID, then you can.

Saying that you can control ALL the devices you have in Hubitat via Google Home may be an overstatement. You can control all the devices that you have in Hubitat that are supported by Google. This should be most but there is no guarantee that it is all of them.

Google Home works well with Hubitat. The only thing I control directly from Google is the Roomba. As you suggest, I can use voice through Google Home to control most things (primarily lighting) if I need some manual intervention (if a rule is not meeting the immediate need). It's fairly fast.

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.