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

Nest source error: webrtc/offer: streams: nest: wrong query #1621

Closed
dannytrigo opened this issue Feb 27, 2025 · 7 comments
Closed

Nest source error: webrtc/offer: streams: nest: wrong query #1621

dannytrigo opened this issue Feb 27, 2025 · 7 comments
Labels
question Further information is requested

Comments

@dannytrigo
Copy link

When I try to set up a go2rtc stream from a Nest source I get the following error when trying to view the stream:

webrtc/offer: streams: nest: wrong query

If I try to add Nest through the UI I get a 404 with no sources in the UI.

However, I've written my own python script which successfully lists the devices, gets the srtsp URL from google, and can add that URL manually into go2rtc and it works, so I am sure all my parameters are correct.

Do you have any idea what might be the issue?

I'm using version 1.9.2 and it is embedded in Frigate.

@dannytrigo
Copy link
Author

I think I was missing the ? after nest:, however, correcting that I still get: webrtc/offer: streams: nest: wrong status: 400 Bad Request.

And that doesn't apply to adding the Nest details through the UI.

I've tried with 1.9.8 with the same results.

@AlexxIT AlexxIT added the question Further information is requested label Feb 27, 2025
@AlexxIT
Copy link
Owner

AlexxIT commented Feb 27, 2025

You haven't shown your config

@dannytrigo
Copy link
Author

Here's the go2rtc config part of my Frigate config, with some parts of the sensitive fields masked:

go2rtc:
  log:
    level: trace
  streams:
    front_door:
      - rtsp://neolink:8554/front_door/main
    front_door_sub:
      - rtsp://neolink:8554/front_door/sub

    bbq_one:
      - rtsp://wb:mIWU67qaEm5W5hohnUau866EdfngnvhZFfqALjsK@wyze-bridge:8554/bbq-cam-1
    bbq_two:
      - rtsp://wb:mIWU67qaEm5W5hohnUau866EdfngnvhZFfqALjsK@wyze-bridge:8554/bbq-cam-2

    pool:
      - nest:?client_id=***.apps.googleusercontent.com&client_secret=GOCSPX-***_s&refresh_token=1//05oTMT****USNwF-L9IrHCJ******-_rbqG****_zkE*****Q&project_id=879fe9d3-4aa4-4d12-bf63-********&device_id=AVPHw****-Bfh8****N3j_JN-zLGtzUVBGmZ****2ImvoTQ

It is the pool camera that gives the above errors. But also just trying to add a Nest source through the UI doesn't work either, which I don't think should need config?

@AlexxIT
Copy link
Owner

AlexxIT commented Feb 27, 2025

Unfortunately, this part of the code has no logs. wrong status happening in a lot of places
https://github.com/AlexxIT/go2rtc/blob/master/pkg/nest/api.go

Perhaps if you have programming skills - could find the exact location. Or you can send your source to me by private message.

@dannytrigo
Copy link
Author

I'll try to compile/debug it and add some logs, and failing that I'll send you the credentials. Thanks for the support

@dannytrigo
Copy link
Author

dannytrigo commented Feb 28, 2025

With some extra logging I was able to figure out that it was failing with this response:

{\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Command sdm.devices.commands.CameraLiveStream.GenerateWebRtcStream not supported.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n"

I then compared that with what I had in Python, and I was calling GenerateRtspStream rather than GenerateWebRtcStream.
I then checked what drove which one to call and figured out that by adding protocols=RTSP in my camera URI it will call the Rtsp version, and now it works. I don't recall seeing that parameter in the docs, but I'll check and open a PR to add it if its missing.

Unfortunately its not available in 1.9.2 used in my Frigate docker image so I'll have to try to update the go2rtc binary in that

@AlexxIT
Copy link
Owner

AlexxIT commented Feb 28, 2025

Yes. You using nest protocol with RTSP camera. This is very new feature and supported only in master version: #1253

@AlexxIT AlexxIT closed this as completed Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants