Was wondering about an automation with lights. It would require a trigger from Nest cam but for a specific activity zone (set in nest app). Did anyone have experience with it? Would Nest send a separate event for user-defined zones?
Thanks.
Was wondering about an automation with lights. It would require a trigger from Nest cam but for a specific activity zone (set in nest app). Did anyone have experience with it? Would Nest send a separate event for user-defined zones?
Thanks.
It looks like the newer webrtc cameras may support zones in events with undocumented features. I am exploring plumbing these through home assistant Nest camera zones undocumented feature · Issue #186 · allenporter/python-google-nest-sdm · GitHub
Hello Allen. I’m able to get the automation running based on motion detected by a Nest Camera. The trace log does show the “zones” value from the activity zones defined in the Google Home application. How can I update the trigger to only use motion in a specific zone?
Hi, you want to set a condition based on the payload of the event in the trigger. I don’t have an example of that exact thing handy, but here is an example from another type of automation: Calendar - Home Assistant that is based on the condition of the trigger data. If you see the payloads in the event automation debug trace thing then you may be able to see how to use that example updated for your use case.
Thanks a lot for the tip, Allen. I was able to make it work based on the Calendar example. Now the issue I’m having is that is not consistent. I’m getting a bunch of warning messages on the “HA Logs” page. Not sure if that is related. The most common error is “Error from API: 429: RESOURCE_EXHAUSTED: Rate limited for the GenerateCameraEventImage command for the user.: Too Many Requests”.
Did you ever get this to work? I am looking for exactly this. My alarm system triggers by person detected (window cleaner), despite the activity zone excludes the window… Any help is appropriciated.
Thanks,
Hi, this is documented at Google Nest - Home Assistant including the example payload and the caveats about not being universally supported by nest devices.
If anyone has figured out to extract ZONES from a nest camera… high five from me if you can help.
I just spent about three hours digging into templates, states, etc. Learned a ton, but I am still not able to find or figure how to access the event_data from the camera event. I looked at {{states.camera.front_porch}} and I see values in there, but struggling to get the value out.
For instance:
{{states.camera.front_porch}}
there are values in there as referenced attributes but I cant say like I would in python.
{{states.camera.front_porch["model"]}}.
So thats just the state and details of the camera, I started looking at the event_data that is referenced in the gitlab above and I am not sure where to event reference that? I was in templates… that seemed like a dead end. Then I jumped over to automations and I assume it was a conditional after a trigger of a “person_detected” but not sure if I do that via a template, entity, device?
Bit lost… so if you have a few, would love some help if what I am asking is pretty easy?
The zone info is published in events for some cameras. It’s not part of the state machine.
Check out event triggers and the links in automation examples in the docs.
Thanks @allenporter … I’ll dig around, can you shoot me a link just to make sure I am loooking at the right thing?
Under Google Nest - Home Assistant – you’ll want to learn about how triggers work and how to use data from a trigger, then see example payload. You could also look at Developer tools - Home Assistant and how to check out event payloads.
@allenporter I went into devtools, triggered a payload and know what you are talking about. The Zone key is not included in the nest_event payload… atleast for my camera. I am 100% sure there are zones and I have them setup but maybe it not available or something.
Sample:
event_type: nest_event
data:
device_id: abcdef1234556u890
type: camera_person
timestamp: "2024-02-15T18:35:46.232000+00:00"
nest_event_id: >-
<base64 goo, but decoded its just goop, nothing in there at first glance.>
origin: LOCAL
time_fired: "2024-02-15T18:36:02.374895+00:00"
context:
id: 2345wfghjrtuyurtjndf
parent_id: null
user_id: null
Thanks for the help, not sure there is much else I can do.