Google-Nest Offical Device Access Console Finally Released!

Generally I don’t think there are any problems installing nest on a pi that i’m aware of, though I haven’t tried it myself.

@allenporter Should I try to install it manually with pip --no-cache-dir install google-nest-sdm ?

I’m not sure that I have any great ideas here, this is out of my area of expertise. I have to assume that you’d get this with installing any integration though.

Hoping that someone can tell me what step I missed. When I add the nest integration I’m getting this error.
Retrying setup: Error from API: 403: PERMISSION_DENIED: Smart Device Management API has not
been used in project 672858097730 before or it is disabled.

The docs says
'Error 403: access_denied means that you need to visit the [OAuth Consent Screen]
(https://console.developers.google.com/apis/credentials/consent) and add your Google Account as a
Test User.

But I can find where I do that on that page. Any help is apricated.

Hi,
Maybe double check step #24 to enable the SDM API.

this is what I have for #24 I believe it is turned on.

Hi,
To clarify, I meant go to step #24 and double check step #25 to enable the API.

To elaborate: Your error message 403: PERMISSION_DENIED: Smart Device Management API has not been used in project 672858097730 before or it is disabled. is not the same as the troubleshooting step referenced. It says that the SDM API may be disabled, hence me sending you to step #24 which is the start of the steps to enable the API.

Let me know if that helps.

Really sorry if I’m hijacking the topic but I can’t seem to get this to work. The whole setup seemed to work fine, no errors whatsoever.

I have three Nest devices, a doorbell, a regular camera and the thermostat. All three of them have been detected and added to Lovelace. I can control the thermostat without issues, however, the camera streams do not come up at all. The error stack I get is:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/auth.py", line 80, in _raise_for_status
    resp.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('https://smartdevicemanagement.googleapis.com/v1/enterprises/xxxxxx/devices/xxxxx:executeCommand')

Anyone able to help with this?

Allen,
Your a lifesaver that was it. Thanks so much for the help.

@vtebeek There should be additional logs with traces and throwing of an ApiException that may give us more detail. In a previous version I added some extra debug details to help diagnose that issue:
python-google-nest-sdm/auth.py at cb2dc1bb5c61284e6f489f9e8933dfa758645196 · allenporter/python-google-nest-sdm · GitHub however those details appear to be missing in your trace.

Do you have additional details on the logs that you can share that include the details of the ApiException?

Hi Allen, thanks for helping. Here’s the full stacktrace

Logger: aiohttp.server
Source: components/nest/camera_sdm.py:117
First occurred: 1:25:39 (6 occurrences)
Last logged: 11:12:43

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/auth.py", line 80, in _raise_for_status
    resp.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 503, message='Service Unavailable', url=URL('https://smartdevicemanagement.googleapis.com/v1/enterprises/ad52de72-5721-4197-b70d-58f85e0cc67f/devices/AVPHwEsH2r5ut-sbZ6ZahpyKJWAPgvbIGYR-ktZ-rOAlEYsy_EgCSxzzoeUanPrhnDdUMnAP9FI3JIzSilK2H3EoTDVL-Q:executeCommand')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 486, in get
    return await self.handle(request, camera)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 503, in handle
    image = await camera.async_camera_image()
  File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 182, in async_camera_image
    stream_url = await self.stream_source()
  File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 117, in stream_source
    self._stream = await trait.generate_rtsp_stream()
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/camera_traits.py", line 143, in generate_rtsp_stream
    resp = await self._cmd.execute(data)
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/traits.py", line 23, in execute
    return await self._auth.post(f"{self._device_id}:executeCommand", json=data)
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/auth.py", line 73, in post
    return await AbstractAuth._raise_for_status(resp)
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/auth.py", line 85, in _raise_for_status
    raise ApiException(": ".join(detail)) from err
google_nest_sdm.exceptions.ApiException: Error from API: 503: UNAVAILABLE: The service is currently unavailable.: Service Unavailable

And here’s another one I saw earlier (the http500)

Logger: homeassistant
Source: components/nest/camera_sdm.py:117
First occurred: 1:25:36 (1 occurrences)
Last logged: 1:25:36

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/auth.py", line 80, in _raise_for_status
    resp.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('https://smartdevicemanagement.googleapis.com/v1/enterprises/ad52de72-5721-4197-b70d-58f85e0cc67f/devices/AVPHwEsH2r5ut-sbZ6ZahpyKJWAPgvbIGYR-ktZ-rOAlEYsy_EgCSxzzoeUanPrhnDdUMnAP9FI3JIzSilK2H3EoTDVL-Q:executeCommand')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 247, in preload_stream
    stream = await camera.create_stream()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 355, in create_stream
    source = await self.stream_source()
  File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 117, in stream_source
    self._stream = await trait.generate_rtsp_stream()
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/camera_traits.py", line 143, in generate_rtsp_stream
    resp = await self._cmd.execute(data)
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/traits.py", line 23, in execute
    return await self._auth.post(f"{self._device_id}:executeCommand", json=data)
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/auth.py", line 73, in post
    return await AbstractAuth._raise_for_status(resp)
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/auth.py", line 85, in _raise_for_status
    raise ApiException(": ".join(detail)) from err
google_nest_sdm.exceptions.ApiException: Error from API: 500: INTERNAL: Internal error encountered.: Internal Server Error

After a lot of troubleshooting I fixed my issues. The issue was that I was trying to get this all working with an account that isn’t the owner of the Google Home. Once I tried it with the owner account all was well, no issues whatsoever.

Hi, i also tried as one of my first steps with HA to install the Nest integration for my Nest Hello door bell. All steps seems to be Ok for my installation.
But when it comes to “Device Setup” with the redirection to Google to choose an account i get the following message:
“No devices found which can be connected to HomeAssistant” and the text
“If your home has more then one user the person which initialy setup the home has to migrate his Nest-account to google. After that HomeAssistant can be connected”.

(I have translated the above messages from german and hopefully understandable:) )

The mentioned “HomeAssistant” in the text is my project name in the Google Device Access Console.
My nest account is still migrated to Google since a few month.

Any ideas what will be the problem for my setup?

P.S.: I use my Nest Doorbell without any supscription model.

Best regards
Sebastian

Do you have nest set up with an older nest account?

Hi Allen,
If you mean the original created account yes. Created the Account with purchase oft the Nest hello in 2018.
If you mean an older developer project with the Nest Hello: I remember i tried that. But at the old Nest developer website there is no nformation about that.

Maybe this page is helpful FAQs about accounts for the Nest app - iPhone & iPad - Google Nest Help

Sorry I can’t be of more help, maybe someone else more familiar with this has a more specific suggestion.

Hi Allen, thank you, the Link was helpfull!
I disconnected my Google Account on all devices in the Nest App and cut off the connection to Google home app. Then reconnect in the Nest App on all devices with the google account.
After that the integration ist working and i find my Nest doorbell as entity!

Great Support, thank you!

So, I got the integration working successfully and I see video streams from my cameras, lets say that I want to record the streams that are now working with an application like blue iris, would I be able to?

I have tried to copy the video stream url that the browser sees, but I get a 404 error when I copy that url into a new browser tab and i’ve tried to get blue iris to connect to the stream but it fails… I must be missing a step as it seems like this should be possible using ha as the proxy for the connected streams.

Any incite would be great!

Thanks all!

@allenporter Finally I could install the Nest integration by enabling a swap file of 1 GB on my rpi.
My 2 devices (Nest Hello camera and Nest Hub Max camera) are added in HA. The only think i’m missing now is the livestream view off my cameras. Both camrera devices are staying in HA in the state idle. What do I have to check to solve this? Regards, Bernd

@cferra the nest integration works just like any other home assistant camera integration. I’m not familiar with blue iris, but my guess is that it doesn’t actually pull in cameras through home assistant cameras, but instead connects to the cameras directly. My guess is if folks do this, they use the “share publicly” feature available on nest.google.com or something. You may want to look around on reddit or something, or maybe someone else with more info can respond.