[Alpha] Community-maintained Google Home integration

You can get Google to tell Hubitat when the home/away is triggered using a virtual switch - there's another thread where people are trying it out:

1 Like

I already do that, but through Node-RED.

1 Like

@pahummel and @mbudnak
I am having the exact same problem. It is just refusing to add devices. I went in and re-enabled testing just in case that had something to do with it. I get a constant something went wrong. When I ask for it to sync, there is a full sync in the log. I can send that privately but cannot post that in the forum due to the sensitive information contained. Although it had previously always been annoying when you would issue a command and it would say something went wrong, nothing actually went wrong. Now it actually is not syncing devices correctly. I am loathe to uninstall and reinstall the app again, as I have done that multiple times now and resetting dozens of devices in Google Home is tedious, and it leaves ghost devices in Google that interfere with the actual new (old device). I actually have to move the device to the original room, then it will fail to work (actually go crazy on the Google Home screen) move it to another room, and then move it back again to get rid of "ghost" of the original device. Maybe the government's antitrust case will render this all moot anyhow, but assistance that can be provided would be helpful. Let me know what you need me to send.

UPDATE: I have completely uninstalled your app and deleted the project/action on the Google console. I have recreated everything from step 1. The first time it worked. It added the app into Google Home with the three devices that I had previously defined. Then when I went to create and add more devices, it refused to sync. Asking Google to sync or hitting reconnect in Google Home resulted in an error "check your connection and try again." There is nothing changed in the OAUTH, etc. There seems to be something broken somewhere in the change either in what Google expects in header returns or something has changed with the Hubitat cloud endpoints? I am wondering if there are firewall issues for some of us, Hubitat has been very opaque when it comes to providing information on firewall information. I am loathe to poke large holes and have maintained a stateful firewall on the VLAN for IOTs allowing for established and related connections. I wonder if that has something to do with it. The problem is, I am not going to poke more holes without knowing explicit IP ranges that traffic may be coming from if it is an unestablished "new" connection. I am not just going to port forward and expose the hub to attack since they are also not transparent on their software, security settings, etc. Hence why I have all IOTs devices walled off on their own VLAN. Like I said before, the only problems I have had in the past has been the occasional Google indicating that it cannot contact my action, although the action is still performed. Now the app seems completely broken.

Is it possible for your to provide the code to your app from a few months ago? Perhaps some of the more recent changes have introduced some issues?

The app code itself doesn't handle OAuth at all. If you're having issues it's almost certainly some configuration corner case. Turn on debug logging and check the SYNC request. If you don't see a SYNC request in the Hubitat log then OAuth is likely configured incorrectly in the Google Action. If you doo see a SYNC request then try de-selecting devices until you find the one that's causing the issue.

If you do want to try old versions the history is available on GitHub though.

Possibly it is a broken device. Would that then cause the errors I was receiving prior to recreating the app? Would that cause Google Home to completely disregard the app and pop an error? What portion of the console should I be looking for an error on the Google side if it is not liking a parameter being passed by your app? The syncs go through fine on the hubitat side. It seems that Google is not liking something being passed along, but I don't know how to troubleshoot what it might be.

I haven't found anywhere to find debug info from Google.

Where exactly in the process of linking Google Home do you see the error? If it's before you enter your username or password then the problem is probably with the OAuth URLs. If it's after you enter your credentials and before you select the devices then it's probably a problem with the OAuth client ID, client secret, or scopes. If the error occurs after that then it can be a problem either with the fulfillment URL configured in the Google Action or an issue with the configuration of the selected devices.

I have my fan all setup with an Inovelli Fan/Light switch. The light works great, and I can turn the fan on and off. I was able to control the speed (via voice) then the last couple of days I've been getting an error with controlling that device message. Here are my logs:

app:6422020-11-02 08:27:07.028 pm debug[requestId:10284158578590337835, payload:[commands:[[status:ERROR, errorCode:hardError, ids:[710]]]]]

app:6422020-11-02 08:27:07.024 pm debugApp exception stack trace: user_app_mbudnek_Google_Home_Community_417.executeCommand_BrightnessAbsolute(user_app_mbudnek_Google_Home_Community_417.groovy:1491) user_app_mbudnek_Google_Home_Community_417$_handleExecuteRequest_closure35$_closure102$_closure105.doCall(user_app_mbudnek_Google_Home_Community_417.groovy:1354) user_app_mbudnek_Google_Home_Community_417$_handleExecuteRequest_closure35$_closure102.doCall(user_app_mbudnek_Google_Home_Community_417.groovy:1351) user_app_mbudnek_Google_Home_Community_417$_handleExecuteRequest_closure35.doCall(user_app_mbudnek_Google_Home_Community_417.groovy:1350) user_app_mbudnek_Google_Home_Community_417.handleExecuteRequest(user_app_mbudnek_Google_Home_Community_417.groovy:1345) user_app_mbudnek_Google_Home_Community_417.handleAction(user_app_mbudnek_Google_Home_Community_417.groovy:1312)

app:6422020-11-02 08:27:07.014 pm errorError executing command BrightnessAbsolute on device Fan: java.lang.NullPointerException: Cannot get property 'setBrightnessCommand' on null object at line 1491 (executeCommand_BrightnessAbsolute)

app:6422020-11-02 08:27:07.005 pm debugChecking MFA for Set Brightness command

app:6422020-11-02 08:27:06.976 pm debug{inputs=[{context={locale_country=US, locale_language=en}, intent=action.devices.EXECUTE, payload={commands=[{devices=[{id=710}], execution=[{command=action.devices.commands.BrightnessAbsolute, params={brightness=5}}]}]}}], requestId=10284158578590337835}

--- Live Log Started, waiting for events --

It looks like you're trying to use a brightness trait that isn't configured. Did you previously have a brightness trait configured for that device type that you've since removed? If so, make sure to have Google sync your devices, either by dragging down in the Google Home app or by voice with "Hey Google, sync my smart home devices".

I saw that...I must have fubared at initial setup. Oh well..That did the trick. Thanks!

Possible to get the live camera feeds yet?

Yes it's possible, but Google is pretty picky about video formats and streaming protocols. You may need some intermediary software to convert to the feed to the correct format. See this post from earlier in this thread and the following posts from @lpakula.

1 Like

Hi @mbudnek.

Been using this integration for a while (thank you) and just noticed something odd in my logs. No idea if this is new or has been going on for a while, unfortunately.

When I turn some lights on/off via GH command, I get the following log entries. The on/off works fine, the light always goes to the desired state, but I get mismatch entries like below.

I thought at first it was limited to Z-Wave switches which I know have bad reporting habits, but it also affects Z-Wave Plus switches, though the amount of logging is longer for the Z-Wave switches.

Any ideas? As I said, I am not 100% sure this is new, possibly related to the 2.2.4 release. I've never seen these types of entries before, but then again, I was never looking for them...

Z-Wave switch:

Z-Wave Plus Switch:

That looks totally normal. Your dimmer took a little over 1 second to turn on. That's pretty normal for a lot of dimmers that fade in and don't report that they're on until they've reached full brightness. The integration currently waits 5 seconds for devices to reach the state that was requested before reporting back to Google that the operation is complete. That's what those log messages are about. It's checking the dimmer every 100ms to see if it's reported that it's on yet. If you don't want things like that to clutter your logs you can disable the "Debug Logging" toggle on the app's main preferences page.

OK, thanks very much for that info. I'd never been in the logs when a GH command ran before, and so it was all new and odd looking.

Love this integration, thanks for making it available.

Can anyone show me how you setup a multipurpose sensor like smarthings multipurpose sensor or zooz multipurpose sensor. For the god of me i'm unable to get the readings on google.

The only types of sensor readings this app currently supports are temperature and humidity. I'm currently using it with a Zooz and an Inovelli 4-in-1 Sensor (as well as several other temperature-only sensors). Note that the Google Home app does not have any UI for sensors. You can query them with voice by saying things like "Hey Google, what's the temperature in {room}?". The Nest Hub has UI for lots of things that the app is missing, so it may have sensor readings, but I don't have one to tell you for sure.

Here's how I have my Temperature/Humidity Sensor device type configured:



Ok will try thanks

Is it possible to use this with CoCoHue? I'm not able to add my lights/plugs.

I can't think of any reason it wouldn't work with CoCoHue. All of their drivers implement the appropriate Hubitat device types, so in Google Home Community you just need to pick the right one when defining your GH device type (i.e. "Color Control" for RGB bulbs, "Color Temperature" for CT bulbs, "Switch Level" for bulbs that don't have any color settings, and "Switch" for plugs) and they should show up in the list. The corresponding Google device traits would be some combination of "On/Off", "Brightness", and "Color Setting" depending on exactly what type of bulbs you have.