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

Source: Nest - "400 Bad Request" #1097

Open
Lockie85 opened this issue May 8, 2024 · 5 comments
Open

Source: Nest - "400 Bad Request" #1097

Lockie85 opened this issue May 8, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Lockie85
Copy link

Lockie85 commented May 8, 2024

Hey,

I'm trying to get my nest camera working on Version: 1.9.1 via the following method:

streams:
  nest-doorbell: nest:?client_id=***&client_secret=***&refresh_token=***&project_id=***&device_id=***

However, I'm getting "400 Bad Request".
image

I've checked my:
client_id
client_secret
refresh_token
project_id
device_id

All are correct and I've confirmed this via commands like:

curl -X GET \
  'https://smartdevicemanagement.googleapis.com/v1/enterprises/YOUR_PROJECT_ID/devices/YOUR_DEVICE_ID' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'

Which provided a successful response. I'll keep checking as maybe I've made and missed a tiny mistake somewhere, but assuming I've not, any ideas what might be going on? Many Thanks.

@Lockie85
Copy link
Author

Lockie85 commented May 8, 2024

Also worth noting that when I try entering details the camera via the "Add" > "Goggle Nest" UI, I get "no sources".

@miguelangel-nubla
Copy link
Contributor

go2rtc v1.9.0 had a bug where consumer connections where not closed.
It drained my nest doorbell battery.
Have you checked it works on the Google Home app?
v1.9.1 solved it for me.

@Lockie85
Copy link
Author

Lockie85 commented May 11, 2024

go2rtc v1.9.0 had a bug where consumer connections where not closed. It drained my nest doorbell battery. Have you checked it works on the Google Home app? v1.9.1 solved it for me.

On version 1.9.1, I still get "400 Bad Request". Is there a good method of debugging this problem?

I've set the log level to debug and here is what I'm seeing:

5/11/2024, 10:08:58 AM | debug | [webrtc] new consumer src=nest-doorbell
5/11/2024, 10:09:00 AM | debug | [mp4] add consumer error=streams: nest: wrong status: 400 Bad Request
5/11/2024, 10:09:01 AM | debug | [webrtc] add consumer error=streams: nest: wrong status: 400 Bad Request
5/11/2024, 10:09:01 AM | warn | [streams] json locked
5/11/2024, 10:09:02 AM | debug | [mjpeg] add consumer error=streams: nest: wrong status: 400 Bad Request

@miguelangel-nubla
Copy link
Contributor

miguelangel-nubla commented May 12, 2024

Sorry for repeating myself but are you sure it works on the home app?

Is there a good method of debugging this problem?

I would try to make it work using Home Assistant first with the nest integration, then copy the exact credentials from ha (/config/.storage/core.config_entries if I remember correctly. Just search for the nest client id in the .storage folder and the relevant json will show up) including the exact same refresh token.

@AlexxIT AlexxIT added the bug Something isn't working label May 12, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 12, 2024

I don't have Nest cameras, so can't help with that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants