[Alpha] Community-maintained Google Home integration

That's because this app doesn't provide the ability to cast anything. For that you have to use something like the CATT director or Google Assistant Relay.

I think you're getting hung up on terminology. You won't be able to "cast" to your Nest/Home device with this app, but you will be able to view the feed from cameras on your Nest/Home devices that have screens. It may require a PC in the loop to convert the feed to a format that Google likes though; they're pretty picky about the video format they'll work with.

As long as the camera directly outputs a HTTP stream that Google supports, you can link it to Hubitat. In my case, my DVR only outputs RTSP (IP camera format), and I use BlueIris to "convert" that into a HTTP HLS type stream that google devices can display via the Blue Iris webserver.

I need to do some quick cleanup that mbudnek requested to pull in the changes, but at the end of it, Hubitat is merely holds "dead links" to video streams so that Google Home can map in.

When you look at your Google Home app, you will see these "cameras" listed there with a camera icon. On the Nest Hubs, tapping on them allows them to be displayed on the Nest Hub screen. In addition, you can also say "heh google, play on " and that device will display that feed,

You could also link in a web URL to a static MP4 video of your choosing (tranquil ocean scene for bedtime, horror clips from the Saw series, etc. :slight_smile:

Now I need to pick up an IP camera to see if I can display it purely by linking it this way. I'd love to put one on my 3D printer so that I can call it up to see if it's progressing nicely. Cases like this, I really don't care about the feed when I'm not watching it.

I am hoping someone can help me out. I have been trying to get this to work for a while now with no luck. I even deleted everything and started over double and triple checking all the steps. I am sure that I am not doing something right. If I ask google home to sync my devices nothing happens (not even in the logs). When I press the created app in GH it's says account is linked then it flashes to something went wrong. I have gone through this forum a few times now and haven't been able to fix anything. I have tripled checked my inputs, client ID, secret, hub, app ID and URLs in the action console. When I look at the logs in hubitat i receive the following error only when i press the created app in the google home app. Thanks in advance

2020-08-06 10:23:40.632 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 2026 (handleAction)

app:4672020-08-06 10:23:40.609 pm debug{inputs=[{intent=action.devices.SYNC}], requestId=518533943349500127}

app:4672020-08-06 10:23:39.931 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 2026 (handleAction)

app:4672020-08-06 10:23:39.907 pm debug{inputs=[{intent=action.devices.SYNC}], requestId=13057802990541446702}

app:4672020-08-06 10:23:39.176 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 2026 (handleAction)

app:4672020-08-06 10:23:39.153 pm debug{inputs=[{intent=action.devices.SYNC}], requestId=3048060564118330063}

app:4672020-08-06 10:23:38.414 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 2026 (handleAction)

app:4672020-08-06 10:23:38.388 pm debug{inputs=[{intent=action.devices.SYNC}], requestId=3458216966261119890}

This is pointing towards the FanSpeed trait. It looks like you have a device type with the FanSpeed trait that's not fully configured. Check any fan devices you've defined to make sure at least one speed setting is selected and there's a name mapped to each selected level and make sure to click "next" on each trait preference page (don't use your browser's back button).

If that doesn't fix the issue, click the little gear icon in the top-right of the app settings, find any settings with FanSpeed in them, and post them here. I'll try to debug further from there.

Update 0.24: New Trait Camera Stream

Big thanks to @lpakula for contributing this.

The app now supports the Camera Stream trait. This trait will allow you to view the video feed from cameras on Chromecast and Nest devices. It also includes wrapper device drivers to expose the camera feed URLs to the app if your camera either doesn't have a Hubitat driver or its driver doesn't expose an attribute to get the URL to its video feed. Note that Google requires a pretty specific set of video and audio encodings and streaming protocols, so you may need to pass the feed through some other PC application to convert it if it doesn't produce a suitable stream natively (notably, RSTP streams are not supported).

3 Likes

@mbudnek- Just curious - I've got my blinds working perfectly with Google Home via voice commands, via your app-- THANK YOU!! However, when I go into the Google Home app, I see the Blind Icons with a gear at the upper right corner and if I select it, I only see the device settings, and I cannot control the blinds from within the icon. Should I also be able to control the blinds from within the Google Home App? Am I missing something?
Thanks!

What you are seeing is "normal". Blinds, cameras, etc only show up as voice control in the google app (gear in the corner), but are usable in the nest hub.

For the cameras, they are visible on the camera tab on the nest hubs, but do not show on the camera tab of the google app. Not sure what google uses to determine which devices get allowed to be used in the app, since they don't list any of that information on the developer portal.

1 Like

For people trying to use the camera route, just as mbudnek mentioned, google is pretty particular about their streams. Here is some troubleshooting tips if you try this trait:

  1. You need a HTTP URL, video in h.264 and audio in AAC (you must enable audio).
  2. When you call up the stream, you will see it buffer for 0-20 seconds (depending on source), and then the video will display.
  3. If it spools forever, and stops, then your URL is not reachable.
  4. If it spools and displays a black screen with the text "Smart Home Camera", then you are sending it an invalid video stream, a stream not using h.264 video, or a stream without audio.

Hopefully those tips help others.

1 Like

This is awesome, and I'm just just moving over to this community app. Have to be careful with transition from stock app since WAF relies on good Google Home integration...

My 4K cameras are streaming in h265 RTSP but I have a beefy box for transcoding and repackaging streams. Is there a good app for on-the-fly transcoding to the valid formats on demand?

Ideally I'd expose all six cameras on a transcoding box with HTTP endpoints, and start transcoding the RTSP h265 to HTTP HLS h264 when connected. Any ideas?

Errrmergggggerrrrrrd!!!1!

Edit: Beefy box is my BlueIris box with an NVIDIA card. I'm set. You are awesome.

How would you use the Google Home integration to display a camera on your Google Nest Hub or Hub Max? The Google Home integration is all about linking Hubitat devices to Google for control by the Google Assistant. It doesn't have anything to do with media or camera feeds. You would need something that allows your to Cast to the Google Nest Hub in order to display that feed from Blue Iris. If you are able to do this with the Google Home integration I would like to hear how you are accomplishing that.

The recently committed changes has a "fake" driver that simply holds a stream URL for Google. The Community app allows the nest displays to see this as a "camera". When you call that camera from the nest, it just links through to the URL for viewing.

Hubitat and the community app are merely a link for google to the video source, since Hubitat has no use for camera feeds.

Cameras from the google perspective have no control. Google requests the URL for the stream, and the device simply responds. At that point google has no interaction with Hubitat. Quoted from the Google developer portal:
" Note that this command is not straight execution as with other traits/commands, but the first stage of a pipeline; GetCameraStream returns an address which the Assistant feeds to the media target (for now, just Chomecast-enabled targets). However, since these have real effects, rather than simply querying potentially cached data, they are EXECUTE commands, not QUERY."

It is a bit different than the convention on/off or open/close type command structure.

You could expose the blinds as a switch. Add the on/off, open/close and brightness traits. You can then control them but you won't have the blinds icon.

1 Like

I am trying to bring my 5 Iris Motion Sensors from Hubitat to Google Home. Two of them I am able to access via the "What's the temperature of [device name]" voice command, but on the other three I get a response that the device has not been setup yet. I am able to see the temperatures just fine of all the sensors in HE.

While setting up this integration, I apparently broke the built-in Google Home app. When I try to add it to Google Home, I get a "Couldn't update your settings. Check your connection" error.

At some point I was using the wrong {app ID} in the Fulfillment URL (perhaps the one that was originally setup for the built-in Google Home app). Any chance I broke some authentication setting? Is there any way to reset that?

I had that happen as well. I don't remember for sure, but I think I had to go to my Google account and remove a phantom linked Hubitat account. You can check that here: https://myaccount.google.com/accountlinking.

When I select the Video Camera Capability in the Community Google Home app in Hubitat, the virtual device I created with the driver doesn't show up. The list of selectable devices is blank.

I had to add the Actuator capability to the driver and use that in the app in order to get the device to show up on the list.

Also, the only thing I get on the display is text saying "Smart Home Camera". I know that the feed is viewable on Google devices since I am casting the stream to the display using CATT currently. So, what could possibly be causing the camera to not display?

For some reason Hubitat uses capability.videoCapture as the device selector for both its Video Camera and Video Capture device types, and I didn't notice that when building the mapping in this app. I guess its a bug, but really, why would Hubitat do that? You can work around it by selecting "Video Capture" as the device type for your camera device type.

Google is very picky about codecs and streaming protocols. CATT is probably doing some conversion. This app will not do any conversion. It just hands off a URL to Google. If that URL doesn't point to something the device can handle then it won't display.

The video is MJPG....so I guess I'll stick with the method I've been using.

Yes, that fixed it. Thanks.