[Alpha] Community-maintained Google Home integration

I am having an issue with adding new devices to my configuration. I set things up a few weeks ago and all was working well and continues to in terms of controlling devices from Google Home, but today I tried to add a few more devices to the integration and they don't appear in the Google Home app. Asking google to "sync my SmartHome devices" replies with "something went wrong with the integration". Not sure what to try or how to troubleshoot. Any help would be appreciated!

Turn on debug logging in the Hubitat app and then watch the Hubitat logs when you do the sync. It will log the sync request and response as well as any errors that occur in between. That's a good place to start troubleshooting.

1 Like

I'm seeing the SYNC in the log and the new device is listed in the lengthy message following it but not seeing any errors. The device still doesn't show in the Google Home app. I tried removing an existing device in the HE App. It stayed in the Goggle home app but I was no longer able to control it. Put it back in HE App and control was restored. Tried flushing the storage/cache of the Google Home app with no luck. I did have an odd situation today where the IP of my HE Hub changed (I've since reserved it's IP in my router) but everything else seems to be working after that. Can't point to a direct correlation between that and this issue, but maybe? Thinking unlinking/relinking the integration to Google Home is the logical next thing to try, but that'd require some reconfiguration afterwards (reassigning devices to rooms, etc.).

What does your device type configuration look like? Also, can you post the SYNC response for that device?

Is there anyway to utilize Google home and away routines that they have recently released?

1 Like

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.