Google-Nest Offical Device Access Console Finally Released!

Hey guys!

I’m struggling with setting up the NEST integration. I got ERROR 400 (invalid_request) message after setting my permissions to acces and manipulate temperature of my nest. Is this a personal error? Or something that others will soon run into as well?

Would love some advice or help

Hi, unfortunately a known issue being worked through, see Warning Message about nest OOB deprecation · Issue #22141 · home-assistant/home-assistant.io · GitHub for context and short term (with huge caveats) workarounds.

1 Like

I also got this when i created a new project in google developers, i got around this by creating web outh instead of desktop app and using a redirect uri

dont know the limitation here, but after adding it trough ha using web app its working fine

Web auth works fine, just complex for users to set-up

2 Likes

When selecting my Google account [email protected] I systematically get this : Error 400: redirect_uri_mismatch

Could this be because I did not pay the $ 5 fee ? I am ok to pay this fee but don’t see where, though I may already have paid this some time ago.

Hi, see Nest - Home Assistant for troubleshooting steps and 2022.6: Gaining new insights! - Home Assistant for context on what changed in Home Assistant (for all integrations) that requires this.

For everyone looking for App Credentials latest, see the Alert with context and Nest - Home Assistant for the migration steps. Basically, you upgrade to 2022.7 and Home Assistant will now walk you through the migration steps to resolve this if you click Reconfigure if you previously setup OAuth for Apps credentials.

1 Like

Thanks !!!

Hi @allenporter - Do you believe they might make this data available in the future/are there any available roadmap documentations from Google that you know of? Just wondering what the most effective way to keep an eye on this would be so I don’t miss if this is implemented.

Update: Apologies, I thought I was replying to a specific post. I am referring to this…

My impression is that they post updates at Release Notes  |  Device Access  |  Google Developers when new features are added to the API.

1 Like

Just noticed this error in my logs (happened past couple days):


2022-08-06 05:44:51.911 ERROR (Thread-1652 (_run)) [grpc._plugin_wrapping] AuthMetadataPluginCallback "<google.auth.transport.grpc.AuthMetadataPlugin object at 0x7f702e4a30>" raised exception!

Anyone else see these? Not sure if I should add to GitHub issues with additional logging

What is the right way to log all events that come to HA from google? I turned on logging but can’t see anything nest-related in the logs :frowning:

As far as I understand google API pushes out an event only if it’s set up as a notification in the google app… So is there a way to get an event to HA but not a notification to my phone’s google app?

Hi, Nest - Home Assistant has some instructions at the bottom of debug logs to enable to show all the events arriving.

Sorry, I am a bit lost with that. Do I need to add a susbcriber_id in config first and this should enable event logging? Where should I look for those events after I do it?
Right now all the logs are on, but I only see nest-related errors when they happen in the HA Core Log.

See “To aid in diagnosing subscriber problems or camera stream issues it may help to turn up verbose logging…” And the section before that talks about debugging messages in the console.

Thanks for your help. Found the events in full log as “google_nest_sdm.event”

Also checked the console. It shows some unacked messages. Is it normal? I don’t see a way to actually view the messages and when I click on a topic name it gives me a permissions error to access “sdm-prod”.

Yes, that’s all fine. Are you actually seeing a problem or just curious? I’m happy to explain what these consoles say, but if you have a goal in mind let me know. I suggest checking out What is Pub/Sub?  |  Cloud Pub/Sub Documentation  |  Google Cloud to learn more about how google cloud pubsub works as they have some nice videos, etc.

Messages are sent, then acked a moment later. I imagine if you shut down home assistant you’ll see the number of unacked messages increase, as well as the oldest unacked message age rise. The oldest message age is under a second so that means all messages are being acked.

Thanks Allen, I think I finally got it.
The pub/sub created by integration did not allow me to see any actual messages in the console when I tried to “pull” them. I even tried increasing retention time, but that didn’t help. I created another subscription and linked it to the same topic. And in it I can finally pull see all raw messages.

I’m looking for a way to make google send more notifications, for everything that’s happening, but then filtering out only the ones That are important. I will then replicate those important ones as HA push notifications or via telegram. The logic of determining important ones will be based on home/away status, day and time, zones, etc. Because what google home app offers in settings is not flexible enough.
To make this work I need to test a few things and needed to see all raw events.

1 Like

For a long time, I’ve been using camera.snapshot to capture doorbell images but it seems that as of some time in July, this stopped working and I get the following errors now. Any idea what might have changed?

Here’s one of the automation steps:

service: camera.snapshot
data:
  filename: /config/www/camera/back-door-{{now().strftime("%Y%m%d_%H%M%S")}}.jpg
target:
  entity_id: camera.back_door

and here’s the error:

Logger: homeassistant.core
Source: components/camera/__init__.py:523
First occurred: 11:50:10 AM (10 occurrences)
Last logged: 12:30:22 PM

Error executing service: <ServiceCall camera.snapshot (c:01GBZJWJJK69VBCFDJH2ZPTNEV): filename=Template("/config/www/camera/back-door-20220902_121012.jpg"), entity_id=['camera.back_door']>
Error executing service: <ServiceCall camera.snapshot (c:01GBZKEWGPFCTSJ43478T326RK): filename=Template("/config/www/camera/front-door-20220902_122000.jpg"), entity_id=['camera.front_door']>
Error executing service: <ServiceCall camera.snapshot (c:01GBZKEWGPFCTSJ43478T326RK): filename=Template("/config/www/camera/back-door-20220902_122012.jpg"), entity_id=['camera.back_door']>
Error executing service: <ServiceCall camera.snapshot (c:01GBZM16EQB7S7MQHF8TRXGGHG): filename=Template("/config/www/camera/front-door-20220902_123000.jpg"), entity_id=['camera.front_door']>
Error executing service: <ServiceCall camera.snapshot (c:01GBZM16EQB7S7MQHF8TRXGGHG): filename=Template("/config/www/camera/back-door-20220902_123012.jpg"), entity_id=['camera.back_door']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 524, in async_create_stream
    source = await self.stream_source()
  File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 143, in stream_source
    self._stream = await trait.generate_rtsp_stream()
  File "/usr/local/lib/python3.10/site-packages/google_nest_sdm/camera_traits.py", line 255, in generate_rtsp_stream
    response_data = await self._cmd.execute_json(data)
  File "/usr/local/lib/python3.10/site-packages/google_nest_sdm/traits.py", line 37, in execute_json
    return await self._auth.post_json(
  File "/usr/local/lib/python3.10/site-packages/google_nest_sdm/auth.py", line 100, in post_json
    resp = await self.post(url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/google_nest_sdm/auth.py", line 93, in post
    resp = await self.request("post", url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/google_nest_sdm/auth.py", line 64, in request
    return await self._websession.request(method, url, **kwargs, headers=headers)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 559, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 898, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1731, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 911, in async_handle_snapshot_service
    image = await camera.async_camera_image()
  File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 212, in async_camera_image
    stream = await self.async_create_stream()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 523, in async_create_stream
    async with async_timeout.timeout(CAMERA_STREAM_SOURCE_TIMEOUT):
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

There an issue with nest integration right now. I’m set up on web auth. It just went unavailable on me with some
Bad gateway error

I tried to reinstall and once I put in my cloud info it redirects me to a blank page . All best is down for me as of an hour ago