Google-Nest Offical Device Access Console Finally Released!

Yes https://github.com/home-assistant/core/issues/42793 requires revamping the interaction between nest and stream component to support expiring urls. Its kind of flaky in the mean time.

2 Likes

I own a NEST Hello doorbell and as soon as I see the video stream, HAS crash. There is no information in the logs.

I appreciate all the great work being put into this since this has been made available.

Are there any plans to implement the Fan trait into the Nest Thermostat?

https://developers.google.com/nest/device-access/traits/device/fan

There is code to support fan in HA it but maybe itā€™s not working:

https://github.com/home-assistant/core/blob/5f4f6dea6bab1d47359b204e2440601d1617a5c7/homeassistant/components/nest/climate_sdm.py#L263

Would you mind filing an issue in HA and assigning to me? Happy to take a look.

Submitted. Thanks. Let me know if thereā€™s anything I can do to help.

Itā€™s live streaming now. Seems like a reboot of my server solved it.

I never had the old official nest integration, Iā€™ve only ever used bad nest previously, so I am unsure of what the official nest integration had previously and what is different with the new nest integration - a comparison chart would be nice).

In lovelace, my default entity card for camera shows a static picture, and then when I click on it, I get the live stream. Is this the normal behaviour? Or is there a way to show the live feed without having to click on it?

Does HA needs to be accessible from internet constantly for this integration to work, or is it required only while setting up the integration?

I have a NEST Doorbell and Thermostat. The integration was working perfectly until last night. I hadnā€™t changed any of the Home Assistant configuration for a few days. Tried rebooting and logs indication the integration was taking to long. Thought I would remove the integration, reboot and re-install. But now it times out after you click the final ā€œAllowā€ button.

Is it possible one the tokenā€™s expire or something?

I think that nest servers went down for about 2 hours last night
even nest app complained that doorbell was offline

I have been trying this morning and still not working.

It works fine here.

Iā€™ve posted this beforeā€¦
https://status.nest.com/

Hey guys, I set up everything and I got the camera on HA working. Apart from a small delay loading the video I also get the following errors showing up. The details on how to set up everything werenā€™t the clearest so Iā€™m wondering if I did something wrong or not.

2020-12-09 16:25:19 ERROR (stream_worker) [libav.rtsp] method DESCRIBE failed: 404 Not Found
2020-12-09 16:25:19 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream rtsps://stream-eu1-delta.dropcam.com:443/sdm_live_stream/CiQA2vuxr6Prq3Wgh8fpC0NSOFgO4Gk0oMht_fzHep4yD2juUCMScQBMPhenp1emCT5-[............]
2020-12-09 16:34:40 WARNING (Thread-OnRpcTerminated) [google_nest_sdm.google_nest_subscriber] Subscriber disconnected, will restart: <class 'google.api_core.exceptions.Unauthenticated'>: 401 Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

404 error and error opening stream seem to occur the most (98 times so far).

Whereas subscriber disconnect only happened 14 times so far.

Looks like you need to review your OAuth credentials?

I thought that but if itā€™s connected how can they be wrong? They canā€™t be half correct haha
Iā€™d expect if there was something wrong with them that I would never have been able to give access to HA in the first place, no?

On 2nd look, the OAuth line is a warning after the original error and may just be a generic ā€œI think this might have been the problemā€¦ā€. Might the 404 Error opening stream rtsps://stream-eu1-delta.dropcam.com:443/sdm_live_stream/ be a 2nd stream attempt or ?? Are you able to see the URL for the successful cam feed in the logs? I donā€™t know, donā€™t have Nest cams hereā€¦just thinking out loudā€¦

At first I thought it might have been unrelated from a second camera I added which currently isnā€™t connected. So I thought it might have been trying to fetch a stream for that camera. But now Iā€™ve disabled that entity and I can anyway see the errors show up even more frequently when Iā€™m actively on the cameraā€™s stream or if itā€™s showing live.

Theeā€™s no connected successfully to this url kind of log so not sure.

Iā€™ll increase the logs to debug and see if theyā€™re offering any more info

Debug logs donā€™t seem helpful to me but maybe someone actually understands them. This is only a snipset obviously

2020-12-09 20:08:04 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:08:04 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 3.520335 seconds.
2020-12-09 20:08:05 DEBUG (MainThread) [homeassistant.components.nest.camera_sdm] Extending stream url
2020-12-09 20:08:07 DEBUG (MainThread) [homeassistant.components.nest.camera_sdm] New stream url expires at 2020-12-09 18:13:07.359000+00:00
2020-12-09 20:09:02 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:02 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 1.050425 seconds.
2020-12-09 20:09:03 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:03 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 6.206507 seconds.
2020-12-09 20:09:09 ERROR (stream_worker) [libav.rtsp] method DESCRIBE failed: 404 Not Found
2020-12-09 20:09:09 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream rtsps://stream-eu1-delta.dropcam.com:443/sdm_live_stream/CiQA2vuxr2NRYoDNlUfvglpiJuKW-...................
2020-12-09 20:09:09 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:09 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 7.810491 seconds.
2020-12-09 20:09:17 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:17 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 6.022198 seconds.
2020-12-09 20:09:23 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:23 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 1.274471 seconds.
2020-12-09 20:09:25 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:25 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 0.139389 seconds.
2020-12-09 20:09:25 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:25 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 3.938090 seconds.
2020-12-09 20:09:26 DEBUG (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Sent heartbeat.
2020-12-09 20:09:29 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:29 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 3.998471 seconds.
2020-12-09 20:09:33 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:33 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 8.109617 seconds.
2020-12-09 20:09:39 ERROR (stream_worker) [libav.tls] The specified session has been invalidated for some reason.
2020-12-09 20:09:39 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream: 
2020-12-09 20:09:41 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:41 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 8.430022 seconds.
2020-12-09 20:09:49 ERROR (stream_worker) [libav.tls] The specified session has been invalidated for some reason.
2020-12-09 20:09:49 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:49 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 0.704521 seconds.
2020-12-09 20:09:50 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:50 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 5.891708 seconds.
2020-12-09 20:09:56 DEBUG (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Sent heartbeat.
2020-12-09 20:09:56 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:09:56 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 7.445459 seconds.
2020-12-09 20:10:00 ERROR (stream_worker) [libav.rtsp] method DESCRIBE failed: 404 Not Found
2020-12-09 20:10:00 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream rtsps://stream-eu1-delta.dropcam.com:443/sdm_live_stream/CiQA2vuxr2NRYoDNlUfvglpiJuKW-......................
2020-12-09 20:10:03 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:10:03 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 3.198088 seconds.
2020-12-09 20:10:03 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Processing 1 received message(s), currently on hold 0 (bytes 0).
2020-12-09 20:10:04 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2020-12-09 20:10:04 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Released held message, scheduling callback for it, still on hold 0 (bytes 0).
2020-12-09 20:10:04 DEBUG (MainThread) [google_nest_sdm.event] EventMessage raw_data={'eventId': '10aa1', 'timestamp': '2020-12-09T18:10:01.182Z', 'resourceUpdate': {'name': 'enterprises/f2aa2bdf-addf-46f4-bb75', 'events': {'sdm.devices.events.CameraSound.Sound': {'eventSessionId': 'AVPHwEvmdKcktxlI8Ir03EpM', 'eventId': 'CiQA2vuxrxGo1jqiwOkFmdx8MX17XuqR7i1sRTi1vxT1JNQNja4SjQEATD4Xp6BeiGecNX'}}}, 'userId': 'AVPHwEu28P'}
2020-12-09 20:10:04 DEBUG (MainThread) [google_nest_sdm.device] Processing update 10aa1ed5-6e90-4412-ac23-8d2ba3135905 @ 2020-12-09 18:10:01.182000+00:00
2020-12-09 20:10:04 DEBUG (MainThread) [google_nest_sdm.device] Event Update dict_keys(['sdm.devices.events.CameraSound.Sound'])
2020-12-09 20:10:04 DEBUG (MainThread) [homeassistant.components.nest] Update for enterprises/f2aa2bdf-addf-46f4-bb75 @ 2020-12-09 18:10:01.182000+00:00
2020-12-09 20:10:04 DEBUG (MainThread) [homeassistant.components.nest] Event Update dict_keys(['sdm.devices.events.CameraSound.Sound'])
2020-12-09 20:10:04 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.dispatcher] Handling 1 batched requests
2020-12-09 20:10:04 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2020-12-09 20:10:06 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:10:06 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 2.198340 seconds.
2020-12-09 20:10:09 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:10:09 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 7.294090 seconds.
2020-12-09 20:10:16 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-12-09 20:10:16 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 6.726814 seconds.

Iā€™m not seeing anything useful there either. Iā€™m thinking that the integration may still be trying to open that 2nd camera stream. Not sure how to help you dig into that further. If itā€™s been removed from Nest then maybe uninstall/re-installing the integration might help it to forget itā€¦

I think there are two separate things:

  • subscriber oauth creds expire every so often and the subscriber restarts and logs that warning. Its a hack. No action needed here, except maybe we reduce the log spam
  • video streams expire every 5 minutes and the stream component doesnā€™t current support refreshing the url so it starts a new stream thread each time. I have a couple prs in flight, e.g. https://github.com/home-assistant/core/pull/43718 to start addressing this thorny issue
1 Like