Skip to content

Add support for RTSP cameras for Nest source - #1253

Merged
AlexxIT merged 4 commits into
AlexxIT:masterfrom
jamal:nest-rtsp
Feb 22, 2025
Merged

Add support for RTSP cameras for Nest source#1253
AlexxIT merged 4 commits into
AlexxIT:masterfrom
jamal:nest-rtsp

Conversation

@jamal

@jamal jamal commented Jul 12, 2024

Copy link
Copy Markdown
Contributor

Add support for RTSP cameras for Nest. The protocol information is carried in the stream URL, to avoid having to make a call to resolve the device when a stream is started. The same logic for extending the stream is used, but StreamExtensionToken is used when it's an RTSP stream.

@AlexxIT AlexxIT self-assigned this Jul 12, 2024
@felipecrs

Copy link
Copy Markdown
Contributor

This is nice, drops the need of https://github.com/felipecrs/hass-expose-camera-stream-source for these cameras.

@felipecrs

felipecrs commented Jul 12, 2024

Copy link
Copy Markdown
Contributor

Although I suppose users still has to provide their own authentication details instead of having them fetched from Home Assistant, right? (which would make total sense).

@jamal

jamal commented Jul 12, 2024

Copy link
Copy Markdown
Contributor Author

I didn't look at the Hass integration works so unsure if it will properly fetch credentials. I suppose if it works with the WebRTC cameras that it should work with this change as well, as any changes I made happen after the Nest API is initialized.

I guess one issue may be with the stream URL expecting a protocol parameter. I updated the logic that generated the URL in the "Add" tab of the UI to include this. I can take a look at that later today to make sure it works properly.

@davidparradev

Copy link
Copy Markdown

Any news on this? I think I saw a comment on a different issue saying that work on Nest-integrated cameras had been abandoned. This was particularly difficult for me since I have a Nest Doorbell Wired Camera (1st gen) that supports RTSP stream only. I saw https://github.com/felipecrs/hass-expose-camera-stream-source was recommended by you @felipecrs on various other issues. But, I managed to utilize the RTSPtoWebRTC integration, setting up the RTSP server on the same port as go2rtc, to add my Nest Doorbell camera to go2rtc. Could this a good alternative to the expose camera source?

@MacgyverH

MacgyverH commented Sep 9, 2024

Copy link
Copy Markdown

@RobotTheMLG The Nest Doorbell Gen1 supports WebRTC now. just upgraded mine a couple weeks ago. It's now working in Frigate through latest release of Go2RTC.

I suggest you double check the Nest/Google Home app to see if you can upgrade yours.

Source: https://developers.google.com/nest/device-access/release-notes#legacy_camera_migration

@davidparradev

Copy link
Copy Markdown

@RobotTheMLG The Nest Doorbell Gen1 supports WebRTC now. just upgraded mine a couple weeks ago. It's now working in Frigate through latest release of Go2RTC.

I suggest you double check the Nest/Google Home app to see if you can upgrade yours.

Source: https://developers.google.com/nest/device-access/release-notes#legacy_camera_migration

Are you sure you have the Nest Doorbell 1st gen (Formally Nest Hello)? I believe that documentation is referring to the current Nest Wired Doorbell (2nd gen).

@MacgyverH

Copy link
Copy Markdown

Screenshot_20240909-111346~2.png

Yes, It's an original Nest Hello.

@felipecrs

Copy link
Copy Markdown
Contributor

https://developers.google.com/nest/device-access/supported-devices

This page still says that Nest Hello is RTSP-only. But it may just be outdated.

If there are no more devices that are RTSP-only, maybe this PR is unnecessary then.

@trvrnrth

trvrnrth commented Sep 9, 2024

Copy link
Copy Markdown

For my 1st gen Nest Hello I have a Google Home app notification which reads as follows:

nest cameras launched before autumn 2021 don't support the new camera controller experience in the Google Home app. This will be supported soon.

I've only just enrolled in the Public Preview so I don't know if that's a recent announcement or what "supported soon" will turn out to mean in terms of functionality or timescale.

@jamal

jamal commented Sep 9, 2024 via email

Copy link
Copy Markdown
Contributor Author

@davidparradev

Copy link
Copy Markdown

I believe I found a useful article by Google on this specific process: https://support.google.com/googlenest/answer/13038234?hl=en

I mistakenly believed that I had "migrated" because my Nest Hello camera appeared in Google Home but that is incorrect. These specific steps actually need to be taken to "migrate" the camera.

A potential problem would be users that wish to keep utilizing the Nest app to manage their camera.

@felipecrs

felipecrs commented Sep 9, 2024

Copy link
Copy Markdown
Contributor

A potential problem would be users that wish to keep utilizing the Nest app to manage their camera.

Right. I guess @AlexxIT has to decide now.

Worst case users can still use https://github.com/felipecrs/hass-expose-camera-stream-source to import their RTSP-only Nest cameras into go2rtc.

@michaelarnauts

Copy link
Copy Markdown

Not sure what I'm missing, but I have an first gen Nest Hello with a Nest Aware subscription, but I don't have the option to migrate in the Nest app.

I'm in the Public Preview of the Home app for a long time.

Maybe it's region related, since I'm in Europe.

@trvrnrth

Copy link
Copy Markdown

For my 1st gen Nest Hello I have a Google Home app notification which reads as follows:

nest cameras launched before autumn 2021 don't support the new camera controller experience in the Google Home app. This will be supported soon.

I've only just enrolled in the Public Preview so I don't know if that's a recent announcement or what "supported soon" will turn out to mean in terms of functionality or timescale.

Seems like my enrollment to the Public Preview may have just been taking a while. I have now successfully migrated my 1st gen Nest Hello and have it hooked up to Home Assistant and streaming into frigate via go2rtc without any apparent issues so far.

Comment thread pkg/nest/client.go Outdated
refreshToken := query.Get("refresh_token")
projectID := query.Get("project_id")
deviceID := query.Get("device_id")
protocols := strings.Split(query.Get("protocols"), ",")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The array doesn't make sense. There is no priority check below. The first protocol specified will always be selected.

@AlexxIT
AlexxIT merged commit 6365968 into AlexxIT:master Feb 22, 2025
@AlexxIT

AlexxIT commented Feb 22, 2025

Copy link
Copy Markdown
Owner

Thanks! Did a little refactoring. I don't use Nest, so hopefully it all works.

@AlexxIT AlexxIT added this to the v1.9.9 milestone Feb 22, 2025
@AlexxIT AlexxIT changed the title nest: add support for RTSP cameras Add support for RTSP cameras for Nest source Mar 10, 2025
@AlexxIT

AlexxIT commented Mar 10, 2025

Copy link
Copy Markdown
Owner

@Roachforlife

Copy link
Copy Markdown

This is nice, drops the need of https://github.com/felipecrs/hass-expose-camera-stream-source for these cameras.

@felipecrs does your expose module work with Nest Hello Doorbell? (Gen 1)? Having trouble getting the go2rtc straight method to work in frigate and would give this a try since I have the nest working in HA no issues. Thanks

@felipecrs

Copy link
Copy Markdown
Contributor

It should work, if you haven't upgraded your firmware to the WebRTC-only one.

@Roachforlife

Copy link
Copy Markdown

It should work, if you haven't upgraded your firmware to the WebRTC-only one.

I assume you mean the Nest unit itself? I think mine is already upgraded to WebRTC. When I go thru the steps with the refresh token and auth code, etc the output has this in it. Unless you mean something else?

"supportedProtocols": [
"WEB_RTC"

@felipecrs

Copy link
Copy Markdown
Contributor

If you migrated your doorbell to the Google Home app, then you no longer have RTSP capability on it. It's WebRTC-only. This PR is not relevant for you anymore, nor my integration.

Your best option is the Nest source in go2rtc.

You can find better details in this PR:

@Roachforlife

Copy link
Copy Markdown

If you migrated your doorbell to the Google Home app, then you no longer have RTSP capability on it. It's WebRTC-only. This PR is not relevant for you anymore, nor my integration.

Your best option is the Nest source in go2rtc.

You can find better details in this PR:

* [Added details on how to get Nest doorbell refresh token and device ID #1628](https://github.com/AlexxIT/go2rtc/pull/1628)

Thanks Ill check out. I actually originally found this on the frigate git and followed the steps (which seems to work for some) but I keep getting a 404 not found in my go2rtc log within frigate, so exploring all options. It works in HA at least

blakeblackshear/frigate#17527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants