Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Google Nest cam: curl: (22) The requested URL returned error: 404 #5

Closed
rickitaly opened this issue Dec 5, 2022 · 20 comments

Comments

@rickitaly
Copy link

rickitaly commented Dec 5, 2022

Hello, have a problem with getting RTSP stream from a Nest Cam that is working fine in HA as WebRTC.
In HA it is streaming as camera.soggiornocam.
I installed this extension from HACS.
Followed the instructions with the double restart.

Install also go2rtc, and then create the following go2rtc.yaml

streams: my_camera: - echo:bash /config/custom_components/expose_camera_stream_source/get_stream.sh camera.soggiornocam
If i try to access to my_camera from go2rtc i cannot see any streaming,
If i access to HA terminal and try to run
bash get_stream.sh camera.soggiornocam
then i get:
curl: (22) The requested URL returned error: 404

Is this solution compatible with Google cams? Any help?

Just to confirm everything, if i switch just the camera.soggiornocam to another camera entity which is not from google, everything works fine! I get all the streams, so i guess the issue is related to the camera coming from Google Nest integration.

Thanks!

@felipecrs
Copy link
Owner

felipecrs commented Dec 5, 2022

Hm... are you sure the integration is enabled in your configuration.yaml? 404 can mean a lot of things. To be sure the integration is working, can you try to create a fake camera and check?

rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4

@rickitaly
Copy link
Author

Thanks for your reply, i just edited the post above
Just to confirm everything, if i switch just the camera.soggiornocam to another camera entity which is not from google, everything works fine! I get all the streams, so i guess the issue is related to the camera coming from Google Nest integration.

@felipecrs
Copy link
Owner

That's sad. :(

stevenbrown1862 reported in #3 that it worked for a Nest camera.

@stevenbrown1862 is there advice you can share with @rickitaly? I don't have a Nest cam myself.

If we conclude that it's not supported at all I'll remove the mention of it from the readme.

@rickitaly
Copy link
Author

let me know if i can help with any kind of logs, but what i see is that calling the get_stream.sh for the other camera its returning the source RTSP address, and this is passed properly to the go2rtc stream object.
With Google Nest camera WebRTC, this is not happening. Just to notice, this is from the documentation of the nest camera integration:
"WebRTC: These devices support direct browser to camera communication and a super low latency stream. A Picture Glance Card can show the live stream in the grid with the Camera View set to live (not recommended for battery-powered cameras). camera services like stream recording are not supported."

@felipecrs
Copy link
Owner

Is RTSPToWebRTC enabled in your HA?

https://www.home-assistant.io/integrations/rtsp_to_webrtc/

You can use go2rtc as the server for it:

https://github.com/AlexxIT/go2rtc#from-hass-to-go2rtc

@felipecrs
Copy link
Owner

Anyway, my advice is: try to fetch the URL once with RTSPToWebRTC enabled and try once again with it disabled. See if it changes anything.

@rickitaly
Copy link
Author

yes it is enabled
image
tried also after disabling, no difference to get stream, still 404

@stevenbrown1862
Copy link
Contributor

That's sad. :(

stevenbrown1862 reported in #3 that it worked for a Nest camera.

@stevenbrown1862 is there advice you can share with @rickitaly? I don't have a Nest cam myself.

If we conclude that it's not supported at all I'll remove the mention of it from the readme.

Hi both,
Just to confirm that I have this working fine with both my Nest Hello (wired doorbell) and my Nest Hub Max. I didn't do anything special beyond the instructions in the readme to get this working. I'm in work at the moment but will have a look at my configs this evening just to make sure there's nothing that I've forgotten.

@rickitaly
Copy link
Author

Hello @stevenbrown1862 ! Thanks for sharing.
Indeed looking at Google Nest docs, the Wired Doorbell is part of RTSP devices, while my Nest Cam Indoor is WebRTC based.
So i guess that is the difference, and i still cannot find a way to get this stream to Frigate or any other device :-(
image

@felipecrs
Copy link
Owner

felipecrs commented Dec 5, 2022

Hm... if it isn't RTSP and there isn't an URL, I wonder how go2rtc can stream it using Picture Glance card with RTSPToWebRTC enabled. @AlexxIT, perhaps you have any idea?

If there's another method for fetching the stream source for webrtc cases, I can probably amend this integration to handle it.

@AlexxIT
Copy link

AlexxIT commented Dec 5, 2022

@rickitaly well. If you or some one else can share Nest API credentials with me (for Hass integration), maybe I can implement WebRTC source for go2rtc.

@rickitaly
Copy link
Author

Hello, this is linked to Google credentials, sorry but i'm not gonna be able to share it :-(
Let me know if i can help you in any other way, whatever i could find about getting a stream out of Nest Indoor camera it's always mentioning that this is not possible!

@felipecrs
Copy link
Owner

I'm trying to play with:

https://github.com/home-assistant/core/blob/7f90fb1cd1c83128cdb6552845dbbfdd434671d2/homeassistant/components/camera/__init__.py#L541

But I think it can only return something if a proper WebRTC offer_id is sent. @AlexxIT Is there any API or something like that in go2rtc which I can use to get a proper offer string?

Currently this seems to be handled in HA frontend:

https://github.com/home-assistant/frontend/blob/dev/src/components/ha-web-rtc-player.ts#L121

@AlexxIT
Copy link

AlexxIT commented Dec 6, 2022

I don't think I could implement such a complicated thing blindly without access to API.

@felipecrs
Copy link
Owner

Yeah. You are right.

@AlexxIT
Copy link

AlexxIT commented Dec 6, 2022

You can create separate Google account. As I understand it will cost you $5.

@pergolafabio
Copy link

@rickitaly well. If you or some one else can share Nest API credentials with me (for Hass integration), maybe I can implement WebRTC source for go2rtc.

Hey @AlexxIT , I have an tuya wifi petfeeder, it doesnt support local rtsp, it doesn't support fetching the rtsp url from tuya cloud... I can only fetch with tuya API the turn/stun address for the webrtc config with the credentials... I can provide you details if you want to setup a pure webrtc cam?... Would be great if I can add this cam to HA

@AlexxIT
Copy link

AlexxIT commented Dec 20, 2022

@pergolafabio yes. You can share info in telegram or discord. Check contacts on my github.

@pergolafabio
Copy link

Ok, will do later, thnx

@felipecrs
Copy link
Owner

As there is nothing that can be made from this project's side, I'm closing this issue.

I added a section in README to make this clear.

https://github.com/felipecrs/hass-expose-camera-stream-source#:~:text=go2rtc%20and%20Frigate.-,Note%2C%20however,-%2C%20that%20this%20will

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

No branches or pull requests

5 participants