I have the exact same “issue” seems like documentation is incomplete?
The integration as described works flawlessly btw!
I have the exact same “issue” seems like documentation is incomplete?
The integration as described works flawlessly btw!
So I was thinking the same thing. But then I remembered a tiny discussion that was ended quickly.
The Nest Dev asked if he should make binary sensors for person, motion, sound, and doorbell like the previous Nest integration had and was told, no the new standard is to create them as events.
Edit: changed dispute to discussion, no dispute was had on GitHub.
I personally disagree with this but it’s not really a cause I feel like fighting for. If you click on your Nest camera and click add automation it will suggest the four events you can use as triggers for automations. Binary sensors are just so much easier and can be referenced in Node-Red with no fuss… oh well.
I’m going to be working on seeing if I can make a binary_sensor templates for these events tonight, I don’t know if it’s possible.
Did not realize it was hidden away like this. I agree binary sensors would’ve been easier to use, however I will give the current option a try.
I guess further clarification on the reasoning. Events don’t have state.
I get that, but I think for the sake of usability it’d be nice if there was some option in the Nest config to enable binary sensors that would turn on for some maximum duration. Still looking into how to do this myself, it looks like there might be something in HACS.
I gave it a try, but it does not appear to work. Nothing like the old Nest integration with the binary sensor. It’s randomly triggering when no one is there, and when I stand next to it, it does not trigger.
alias: Front Door Person Detect
description: ''
trigger:
- platform: device
device_id: 82a4911147b8e88e5b698ddabc756a5e
domain: nest
type: camera_person
condition:
- condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
action:
- service: light.turn_on
data: {}
entity_id: light.porch_light
mode: single
Here’s my automation that I made to turn on an input_boolean for now.
Still interested in creating binary_sensor templates.
I might need to keep this and convert the input_boolean into a binary_sensor template.
- id: '1608052570987'
alias: Front Yard | Person Detected
description: ''
trigger:
- platform: device
device_id: edd41f715ee0fbdb90aaca14342e7ebe
domain: nest
type: camera_person
condition: []
action:
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.front_yard_person_detected
- delay: '20'
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.front_yard_person_detected
mode: single
Very cool, it works!
How did you obtain the device ID for the camera?
I followed this forum and installed the Nest integration. It worked for a couple of days, but stopped working. I can still see the camera feed in Home Assistant, but the Automations triggers for person detected and doorbel pressed are not being triggered anymore.
I already removed the integration and reinstalled it, but still not working. Any idea how to check this? Is there any logfile available for this triggers from the API?
@Davy_Heuts in addition to what was said about checking for enabling the api, you can turn on verbose logging to see that events are being received by home assistant. See the troubleshooting steps at
Thanks a lot for responsing @allenporter and @keithcroshaw .
I check it and the pub/sub topic is enabled.
Also I enabled verbose logging. Seeing this lines in the log:
2021-04-12 22:59:27 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-04-12 22:59:27 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 6.007461 seconds.
2021-04-12 22:59:33 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-04-12 22:59:33 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 8.813842 seconds.
2021-04-12 22:59:42 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-04-12 22:59:42 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 5.192356 seconds.
2021-04-12 22:59:45 DEBUG (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Sent heartbeat.
2021-04-12 22:59:47 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-04-12 22:59:47 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 0.553994 seconds.
2021-04-12 22:59:48 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-04-12 22:59:48 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 1.668124 seconds.
2021-04-12 22:59:49 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-04-12 22:59:49 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 2.368854 seconds.
2021-04-12 22:59:52 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-04-12 22:59:52 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 0.608449 seconds.
2021-04-12 22:59:52 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-04-12 22:59:52 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 6.725065 seconds.
Ok so that tells us your.subscriber thinks it’s working but maybe thst no events are arriving? It may be worth taking a look at the subscriber cloud console and see if you see events being sent or if there is a backlog.
(I’m expecting events are being triggered during this time like motion or doorbell press etc, and aren’t being seen)
Thanks!
Yes, I triggered it by walking by a couple of times and making sound. In the Nest app I see the events.
In the cloud console subscription graph, I see no events…
I just added a new api auth, New device access control, and re added the integration. But still no difference. The camera is working, but the trigger doesnt.
Any idea what to check? It worked last week for a couple of days.
EDIT: suddenly it was working again this morning! Thanks a lot!
Fantastic! If you figure out what it was let us know.
I am having similar issue.
I am able to complete the Nest integration and add the cameras to HA (Ver. 2021.10.3)
On google console Pup/Sub I see messages and 99% acked
I have both old and new (battery powered) Nest cameras and also the new Door bell battery powered.
I create an automation with trigger on Motion Detected and it works randomly 1 out of 20 times. Not sure what makes it work some times.
I know the Access token is right because I use it in Postman and I get a response from the Device list endpoint.
I do see several errors in the log, some are related to the video streaming but there is one that maybe causing the issue:
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://smartdevicemanagement.googleapis.com/v1/enterprises/[...]/devices/[...]:executeCommand')
(I Replaced the long GUIDS in the URL by […])
It looks like there is an issue calling that endpoint?
More details on that error:
Logger: aiohttp.server
Source: components/nest/camera_sdm.py:124
First occurred: 4:31:13 PM (51 occurrences)
Last logged: 5:02:06 PM
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 86, in _raise_for_status
resp.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://smartdevicemanagement.googleapis.com/v1/enterprises/[...]/devices/[...]:executeCommand')
Any help is appreciated.
Hi @JotaDe based on the other thread, i assume you got this working? Curious what the fix was for others that hit this in the future.
Hi, I actually still have the issue. I just tested in Debug mode for about 10 minutes I generated evens in two nest cameras, one old model and another one new model battery powered. I see most of the events came in but the actions were triggered only twice and after about 10 seconds.
Among the error I see are:
Error opening stream rtsps://stream-ue1-charlie.dropcam.com:443/sdm_live_stream/CiUA2vuxry0qBumByB5GwC4D4MVi3h6eITHknbeRpp68jMizBqbTEnEAM83T_GRN0mRbCxjvoNXX7N3vhulKOLmNsfQqRaZwD96IQc4QbeVKrPkDgp23Xoha64RwYDsU6sbUdlh-c6CjhnpZwcqNrJEwgv8JO1k7ukIXpm2D7MQuB43ImT7ykdX9rJyehnBuQ4PEE6-IfZRMeg?auth=g.0.eyJraWQiOiIyMzhiNTUxZmMyM2EyM2Y4M2E2ZTE3MmJjZTg0YmU3ZjgxMzAzMmM4IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJuZXN0LXNlY3VyaXR5LWF1dGhwcm94eSIsInN1YiI6Im5lc3RfaWQ6bmVzdC1waG9lbml4LXByb2Q6ODc0NTAxOCIsInBvbCI6IjNwLW9hdXRoLXNjb3BlLUFQSV9TRE1fU0VSVklDRS1jbGllbnQtMTAxNjM1ODczNjk1MC1laGdhMWhnaG5qZGE2OHRoOTZkcWpkcW02dDI5cWdoZS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImV4cCI6MTYzNDM0NjYwMn0.eJxo2HBKY9oP5HdQ3nNv1VUb3Jmnxj5oqeMtyNqEtjddrECSPxlZPlJsNdYxCxdgP9higVJ4Yve9Glc0rq79wnHWj2EANmhICSTKrr8jl3b0Nri32Pwy7WvwNf5yAJ7MPvVd7kedG_GlNECHdUegEl2xF3-wyVaKFfgvLkoBW29z8tB2jGhzC3i5C8U4aAUhrUSEMcExCmF4-7K4F2lJv351G94SklSZWL05jo78prYJsnStxH0Y1Itd71WxSePAqzXlbp6hprCOLln67UAm7XY5bXhcKzqeyTcWw3yIVzu2SZp_Nh3WY895p35o5LywmZd9u0ia8CLDIy0LXTIvkg
6:13:19 PM – (ERROR) Stream - message first occurred at 6:06:55 PM and shows up 4 times
method DESCRIBE failed: 404 Not Found
6:13:19 PM – (ERROR) components/stream/worker.py - message first occurred at 6:06:55 PM and shows up 4 times
The specified session has been invalidated for some reason.
6:11:16 PM – (ERROR) components/stream/worker.py - message first occurred at 6:06:40 PM and shows up 2 times
Received message for unregistered webhook 347f2653a87c7fb3aa5b89e01f3135f3a079facd511dccc15cc145d8654f4927 from 192.168.86.1
6:11:12 PM – (WARNING) Webhook - message first occurred at 6:02:03 PM and shows up 14 times
Error demuxing stream:
6:10:46 PM – (ERROR) Stream - message first occurred at 6:06:30 PM and shows up 2 times
The specified session has been invalidated for some reason.
6:10:46 PM – (ERROR) components/stream/worker.py - message first occurred at 6:06:30 PM and shows up 2 times
Error handling request
6:03:36 PM – (ERROR) components/nest/camera_sdm.py - message first occurred at 6:03:35 PM and shows up 3 times
[0x8735:1:0x0b04]: async_initialize: all attempts have failed: [DeliveryError('[0x8735:1:0x0b04]: Message send failure'), DeliveryError('[0x8735:1:0x0b04]: Message send failure'), DeliveryError('[0x8735:1:0x0b04]: Message send failure'), DeliveryError('[0x8735:1:0x0b04]: Message send failure')]
6:00:48 PM – (WARNING) Zigbee Home Automation - message first occurred at 6:00:47 PM and shows up 6 times
In the detail log I see:
2021-10-15 18:02:20 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Processing 1 received message(s), currently on hold 0 (bytes 0).
2021-10-15 18:02:20 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2021-10-15 18:02:20 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).
2021-10-15 18:02:20 DEBUG (MainThread) [google_nest_sdm.event] EventMessage raw_data={'eventId': '5a9d84d0-00e2-414d-bffc-7fd1d717a8ea', 'timestamp': '2021-10-16T01:02:14.830Z', 'resourceUpdate': {'name': 'enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtW2Z2eo3_23nb9E-5qqqiWDtonFhnmLzNAzAiddmvqcyFK9VDNvPk_tL7ZM-tLDV0dvufcDEY1OXJVVrLN_E-ANQ', 'events': {'sdm.devices.events.CameraPerson.Person': {'eventSessionId': '1630027968', 'eventId': '1302081482'}}}, 'userId': 'AVPHwEuBnkrXUpb-XlLLIiepAjrq4SkWzDhb7_j4m_Cb', 'eventThreadId': '8a2eedbe-bd20-4466-bb15-af5241019b13', 'resourceGroup': ['enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtW2Z2eo3_23nb9E-5qqqiWDtonFhnmLzNAzAiddmvqcyFK9VDNvPk_tL7ZM-tLDV0dvufcDEY1OXJVVrLN_E-ANQ'], 'eventThreadState': 'STARTED'}
2021-10-15 18:02:20 DEBUG (MainThread) [google_nest_sdm.device] Processing update 5a9d84d0-00e2-414d-bffc-7fd1d717a8ea @ 2021-10-16 01:02:14.830000+00:00
2021-10-15 18:02:20 DEBUG (MainThread) [google_nest_sdm.device] Event Update dict_keys(['sdm.devices.events.CameraPerson.Person'])
2021-10-15 18:02:20 DEBUG (MainThread) [homeassistant.components.nest] Event Update dict_keys(['sdm.devices.events.CameraPerson.Person'])
2021-10-15 18:02:20 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.dispatcher] Handling 1 batched requests
2021-10-15 18:02:20 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2021-10-15 18:02:22 DEBUG (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Sent heartbeat.
2021-10-15 18:02:23 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Processing 1 received message(s), currently on hold 0 (bytes 0).
2021-10-15 18:02:23 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2021-10-15 18:02:23 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).
2021-10-15 18:02:23 DEBUG (MainThread) [google_nest_sdm.event] EventMessage raw_data={'eventId': '78cacd47-05bc-41b5-a028-0aabe7d869bc', 'timestamp': '2021-10-16T01:02:14.830Z', 'resourceUpdate': {'name': 'enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtW2Z2eo3_23nb9E-5qqqiWDtonFhnmLzNAzAiddmvqcyFK9VDNvPk_tL7ZM-tLDV0dvufcDEY1OXJVVrLN_E-ANQ', 'events': {'sdm.devices.events.CameraPerson.Person': {'eventSessionId': '1630027968', 'eventId': '1302081482'}}}, 'userId': 'AVPHwEuBnkrXUpb-XlLLIiepAjrq4SkWzDhb7_j4m_Cb', 'eventThreadId': '8a2eedbe-bd20-4466-bb15-af5241019b13', 'resourceGroup': ['enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtW2Z2eo3_23nb9E-5qqqiWDtonFhnmLzNAzAiddmvqcyFK9VDNvPk_tL7ZM-tLDV0dvufcDEY1OXJVVrLN_E-ANQ'], 'eventThreadState': 'UPDATED'}
2021-10-15 18:02:23 DEBUG (MainThread) [google_nest_sdm.device] Processing update 78cacd47-05bc-41b5-a028-0aabe7d869bc @ 2021-10-16 01:02:14.830000+00:00
2021-10-15 18:02:23 DEBUG (MainThread) [google_nest_sdm.device] Event Update dict_keys(['sdm.devices.events.CameraPerson.Person'])
2021-10-15 18:02:23 DEBUG (MainThread) [homeassistant.components.nest] Event Update dict_keys(['sdm.devices.events.CameraPerson.Person'])
2021-10-15 18:02:23 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.dispatcher] Handling 1 batched requests
2021-10-15 18:02:23 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2021-10-15 18:02:26 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:02:26 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 2.134728 seconds.
2021-10-15 18:02:28 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:02:28 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 0.388969 seconds.
2021-10-15 18:02:29 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:02:29 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 5.552375 seconds.
2021-10-15 18:02:34 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:02:34 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 7.786297 seconds.
2021-10-15 18:02:42 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:02:42 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 1.770511 seconds.
2021-10-15 18:02:43 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Processing 1 received message(s), currently on hold 0 (bytes 0).
2021-10-15 18:02:43 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2021-10-15 18:02:43 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).
2021-10-15 18:02:43 DEBUG (MainThread) [google_nest_sdm.event] EventMessage raw_data={'eventId': '78cacd47-05bc-41b5-a028-0aabe7d869bc', 'timestamp': '2021-10-16T01:02:14.830Z', 'resourceUpdate': {'name': 'enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtW2Z2eo3_23nb9E-5qqqiWDtonFhnmLzNAzAiddmvqcyFK9VDNvPk_tL7ZM-tLDV0dvufcDEY1OXJVVrLN_E-ANQ', 'events': {'sdm.devices.events.CameraPerson.Person': {'eventSessionId': '1630027968', 'eventId': '1302081482'}}}, 'userId': 'AVPHwEuBnkrXUpb-XlLLIiepAjrq4SkWzDhb7_j4m_Cb', 'eventThreadId': '8a2eedbe-bd20-4466-bb15-af5241019b13', 'resourceGroup': ['enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtW2Z2eo3_23nb9E-5qqqiWDtonFhnmLzNAzAiddmvqcyFK9VDNvPk_tL7ZM-tLDV0dvufcDEY1OXJVVrLN_E-ANQ'], 'eventThreadState': 'ENDED'}
2021-10-15 18:02:43 DEBUG (MainThread) [google_nest_sdm.device] Processing update 78cacd47-05bc-41b5-a028-0aabe7d869bc @ 2021-10-16 01:02:14.830000+00:00
2021-10-15 18:02:43 DEBUG (MainThread) [google_nest_sdm.device] Event Update dict_keys(['sdm.devices.events.CameraPerson.Person'])
2021-10-15 18:02:43 DEBUG (MainThread) [homeassistant.components.nest] Event Update dict_keys(['sdm.devices.events.CameraPerson.Person'])
2021-10-15 18:02:43 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.dispatcher] Handling 1 batched requests
2021-10-15 18:02:43 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2021-10-15 18:02:44 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:02:44 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 8.448712 seconds.
2021-10-15 18:02:52 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:02:52 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 0.738699 seconds.
2021-10-15 18:02:52 DEBUG (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Sent heartbeat.
2021-10-15 18:02:53 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:02:53 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 6.777461 seconds.
2021-10-15 18:03:00 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:00 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 4.133201 seconds.
2021-10-15 18:03:04 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:04 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 1.906678 seconds.
2021-10-15 18:03:06 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:06 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 6.958855 seconds.
2021-10-15 18:03:13 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:13 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 3.983685 seconds.
2021-10-15 18:03:17 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:17 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 5.612741 seconds.
2021-10-15 18:03:22 DEBUG (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Sent heartbeat.
2021-10-15 18:03:22 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:22 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 0.549902 seconds.
2021-10-15 18:03:23 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:23 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 7.323827 seconds.
2021-10-15 18:03:27 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Processing 1 received message(s), currently on hold 0 (bytes 0).
2021-10-15 18:03:27 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2021-10-15 18:03:27 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).
2021-10-15 18:03:27 DEBUG (MainThread) [google_nest_sdm.event] EventMessage raw_data={'eventId': 'ff1e7a81-2035-4106-a580-6d7877af143e', 'timestamp': '2021-10-16T01:03:15.654Z', 'resourceUpdate': {'name': 'enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEuLJW2P86e3OIUVdtVAMJhLbSfuBr4ItjpUScqaFAzYYOztWuDYsTqlB4MwnHk2XabRgxgXvkQT-gcAYCImFvBO5A', 'events': {'sdm.devices.events.CameraPerson.Person': {'eventSessionId': 'AVPHwEvAhXxcmzqaZ2ZiZWvjzOUMWk_-ei6-4V6AZczZ3zo2wrMIV7D07rhpr83sWCwOEPxjtB80a9UtO4sPLXAiE9N_qQ', 'eventId': 'CiUA2vuxr-rvFnef13y8DS19kYWp01V8mPR4RKEFBAt4KZS7zzBrEo0BADPN0_yskUyqjZsn36M9ko5dm5Qw24w4l1evrj1H9bO7UrNxSVB8QkxhpXTddr3ezbS7Jt1w6uKuW9FdFG3gX7waA-LIbj0fNuGGRgTE-ZQ8fywsnuo9iEm2vTshVRcOsX6ODOeEFTJ2y8pKzLXSaxT1TOCGx7lHiwEAfH-1CkTKlRQWYutVkfUDoucO'}}}, 'userId': 'AVPHwEuBnkrXUpb-XlLLIiepAjrq4SkWzDhb7_j4m_Cb', 'resourceGroup': ['enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEuLJW2P86e3OIUVdtVAMJhLbSfuBr4ItjpUScqaFAzYYOztWuDYsTqlB4MwnHk2XabRgxgXvkQT-gcAYCImFvBO5A']}
2021-10-15 18:03:27 DEBUG (MainThread) [google_nest_sdm.device] Processing update ff1e7a81-2035-4106-a580-6d7877af143e @ 2021-10-16 01:03:15.654000+00:00
2021-10-15 18:03:27 DEBUG (MainThread) [google_nest_sdm.device] Event Update dict_keys(['sdm.devices.events.CameraPerson.Person'])
2021-10-15 18:03:27 DEBUG (MainThread) [homeassistant.components.nest] Event Update dict_keys(['sdm.devices.events.CameraPerson.Person'])
2021-10-15 18:03:27 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.dispatcher] Handling 1 batched requests
2021-10-15 18:03:27 DEBUG (Thread-CallbackRequestDispatcher) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Sent request(s) over unary RPC.
2021-10-15 18:03:30 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:30 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 0.151479 seconds.
2021-10-15 18:03:30 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:30 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 1.588266 seconds.
2021-10-15 18:03:32 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2021-10-15 18:03:32 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 7.020139 seconds.
2021-10-15 18:03:34 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 347f2653a87c7fb3aa5b89e01f3135f3a079facd511dccc15cc145d8654f4927 from 192.168.86.1
2021-10-15 18:03:34 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 347f2653a87c7fb3aa5b89e01f3135f3a079facd511dccc15cc145d8654f4927 from 192.168.86.1
2021-10-15 18:03:34 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 347f2653a87c7fb3aa5b89e01f3135f3a079facd511dccc15cc145d8654f4927 from 192.168.86.1
2021-10-15 18:03:35 DEBUG (MainThread) [homeassistant.components.nest.camera_sdm] Fetching stream url
2021-10-15 18:03:35 DEBUG (MainThread) [google_nest_sdm.auth] request[post]=https://smartdevicemanagement.googleapis.com/v1/enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtCJaWCgwKOuQfWA-nzsH-KGgmXtEtrFV501nbhVtJpV3Lq2c65eTwH9rWkvhwtX9xJjDRNyWQrUn-TTMqPOKImMA:executeCommand
2021-10-15 18:03:35 DEBUG (MainThread) [homeassistant.components.nest.camera_sdm] Generating event image URL for event_id CiUA2vuxr-rvFnef13y8DS19kYWp01V8mPR4RKEFBAt4KZS7zzBrEo0BADPN0_yskUyqjZsn36M9ko5dm5Qw24w4l1evrj1H9bO7UrNxSVB8QkxhpXTddr3ezbS7Jt1w6uKuW9FdFG3gX7waA-LIbj0fNuGGRgTE-ZQ8fywsnuo9iEm2vTshVRcOsX6ODOeEFTJ2y8pKzLXSaxT1TOCGx7lHiwEAfH-1CkTKlRQWYutVkfUDoucO
2021-10-15 18:03:35 DEBUG (MainThread) [google_nest_sdm.auth] request[post]=https://smartdevicemanagement.googleapis.com/v1/enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEuLJW2P86e3OIUVdtVAMJhLbSfuBr4ItjpUScqaFAzYYOztWuDYsTqlB4MwnHk2XabRgxgXvkQT-gcAYCImFvBO5A:executeCommand
2021-10-15 18:03:35 DEBUG (MainThread) [homeassistant.components.nest.camera_sdm] Fetching stream url
2021-10-15 18:03:35 DEBUG (MainThread) [google_nest_sdm.auth] request[post]=https://smartdevicemanagement.googleapis.com/v1/enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtW2Z2eo3_23nb9E-5qqqiWDtonFhnmLzNAzAiddmvqcyFK9VDNvPk_tL7ZM-tLDV0dvufcDEY1OXJVVrLN_E-ANQ:executeCommand
2021-10-15 18:03:35 DEBUG (MainThread) [homeassistant.components.nest.camera_sdm] Fetching stream url
2021-10-15 18:03:35 DEBUG (MainThread) [google_nest_sdm.auth] request[post]=https://smartdevicemanagement.googleapis.com/v1/enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEsdAOafrw-Ja4h6LHSF8V3AvhCSwtmTKWoKH1u3-nsWvf04muicIi01gkJmLcBZURUbj4wkvkkCHnvAZu6SSxJZhA:executeCommand
2021-10-15 18:03:35 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 86, in _raise_for_status
resp.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://smartdevicemanagement.googleapis.com/v1/enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtCJaWCgwKOuQfWA-nzsH-KGgmXtEtrFV501nbhVtJpV3Lq2c65eTwH9rWkvhwtX9xJjDRNyWQrUn-TTMqPOKImMA:executeCommand')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/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 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 591, in get
return await self.handle(request, camera)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 609, in handle
image = await _async_get_image(
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 164, in _async_get_image
image_bytes = await camera.async_camera_image(
File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 193, in async_camera_image
stream_url = await self.stream_source()
File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 124, in stream_source
self._stream = await trait.generate_rtsp_stream()
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/camera_traits.py", line 153, in generate_rtsp_stream
resp = await self._cmd.execute(data)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/traits.py", line 26, in execute
return await self._auth.post(f"{self._device_id}:executeCommand", json=data)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 79, in post
return await AbstractAuth._raise_for_status(resp)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 91, in _raise_for_status
raise ApiException(": ".join(detail)) from err
google_nest_sdm.exceptions.ApiException: Error from API: 400: INVALID_ARGUMENT: Command sdm.devices.commands.CameraLiveStream.GenerateRtspStream not supported.: Bad Request
2021-10-15 18:03:36 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 86, in _raise_for_status
resp.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://smartdevicemanagement.googleapis.com/v1/enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEsdAOafrw-Ja4h6LHSF8V3AvhCSwtmTKWoKH1u3-nsWvf04muicIi01gkJmLcBZURUbj4wkvkkCHnvAZu6SSxJZhA:executeCommand')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/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 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 591, in get
return await self.handle(request, camera)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 609, in handle
image = await _async_get_image(
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 164, in _async_get_image
image_bytes = await camera.async_camera_image(
File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 193, in async_camera_image
stream_url = await self.stream_source()
File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 124, in stream_source
self._stream = await trait.generate_rtsp_stream()
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/camera_traits.py", line 153, in generate_rtsp_stream
resp = await self._cmd.execute(data)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/traits.py", line 26, in execute
return await self._auth.post(f"{self._device_id}:executeCommand", json=data)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 79, in post
return await AbstractAuth._raise_for_status(resp)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 91, in _raise_for_status
raise ApiException(": ".join(detail)) from err
google_nest_sdm.exceptions.ApiException: Error from API: 400: INVALID_ARGUMENT: Command sdm.devices.commands.CameraLiveStream.GenerateRtspStream not supported.: Bad Request
2021-10-15 18:03:36 DEBUG (MainThread) [google_nest_sdm.auth] request[get]=https://nexusapi-us1.dropcam.com/sdm_resource/CiUA2vuxr-rvFnef13y8DS19kYWp01V8mPR4RKEFBAt4KZS7zzBrEo0BADPN0_yskUyqjZsn36M9ko5dm5Qw24w4l1evrj1H9bO7UrNxSVB8QkxhpXTddr3ezbS7Jt1w6uKuW9FdFG3gX7waA-LIbj0fNuGGRgTE-ZQ8fywsnuo9iEm2vTshVRcOsX6ODOeEFTJ2y8pKzLXSaxT1TOCGx7lHiwEAfH-1CkTKlRQWYutVkfUDoucO/snapshot
2021-10-15 18:03:36 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 86, in _raise_for_status
resp.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://smartdevicemanagement.googleapis.com/v1/enterprises/e9d343b5-ad41-4041-8db0-abb8d2eebc22/devices/AVPHwEtW2Z2eo3_23nb9E-5qqqiWDtonFhnmLzNAzAiddmvqcyFK9VDNvPk_tL7ZM-tLDV0dvufcDEY1OXJVVrLN_E-ANQ:executeCommand')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/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 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 591, in get
return await self.handle(request, camera)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 609, in handle
image = await _async_get_image(
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 164, in _async_get_image
image_bytes = await camera.async_camera_image(
File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 193, in async_camera_image
stream_url = await self.stream_source()
File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 124, in stream_source
self._stream = await trait.generate_rtsp_stream()
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/camera_traits.py", line 153, in generate_rtsp_stream
resp = await self._cmd.execute(data)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/traits.py", line 26, in execute
return await self._auth.post(f"{self._device_id}:executeCommand", json=data)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 79, in post
return await AbstractAuth._raise_for_status(resp)
File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/auth.py", line 91, in _raise_for_status
raise ApiException(": ".join(detail)) from err
google_nest_sdm.exceptions.ApiException: Error from API: 400: INVALID_ARGUMENT: Command sdm.devices.commands.CameraLiveStream.GenerateRtspStream not supported.: Bad Request
Hi,
Battery cam streams don’t work yet, but are in progress. Totally new API and way that streams work.
As for the Automation, it’s hard to tell from this since these logs are all about stream issues.
To debug automations check out troubleshooting on the nest instructions about how to look for which pubsub messages are published. In the cloud console you can run a test subscriber and see if the message is published and observed in the console… You can compare with turning on debug logging for homeasisstant.components.nest
(only!) And see what events are delivered to home assistant.