Download image from a nest event

Has anybody already looked at downloading the related image of a Nest Doorbell (or camera) Event?

When the doorbell is pushed, or a person is detected, the device trigger that is triggered in HA contains an event Id that can be used with the nest GenerateImage call to create a downloadable image.

See Doorbell  |  Device Access  |  Google Developers and Device Access  |  Google Developers

The most used usecase for this is to send a picture to somewhere when the doorbell has been pressed. Due to delays, fetching an image from the stream when the event is handled in HA gives a slightly newer picture, where the person might not correctly in the frame. That’s why it’s best to use the image that is linked to the event.

According to the source code, the last event image should be returned for about 30 seconds after an event (core/camera_sdm.py at 822e8645ebf7884ddd9563f29925cf25a4b2c2f7 · home-assistant/core · GitHub)

So it should work as you describe.

1 Like

I just checked and you are absolutely right!

The image that is downloaded has quite a low resolution though. I’ve opened a issue at GitHub to make this configurable, or improve the resolution.

did anyone get this working? How were you sending the image, can it be sent in a push notification?

Has anyone figured out how to grab these files?
/media-browser/browser/app%2Cmedia-source%3A%2F%2Fnest/…

image

1 Like

There are examples in Nest - Home Assistant

1 Like

Did anyone found a way, I am looking to record all video events into HA media to avoid paying google every month :slight_smile:

1 Like

Check the device guides section here. It’s not achievable with most of devices. And even the doorbell, which supplies clip previews, works via HA Nest integration once in 20 times for me.

I’m wondering if anybody ever got this working. I am trying to send the generated images out to a discord chat via the discord integration, but I can’t find a way to access the images. The documentation trick of using an “/api” path does not appear to work with that.

Yup not working for me either, I get no images in my notifications, the documentation not working for me.

Likewise, I’m trying to figure out how to put the latest event preview image into a card on my dashboard, but can’t figure out how to access the latest image.

am I understanding this correctly that there is no option to download an image from the Media folder in the browser? No right-click or button to download the selected image?

Hi, did anything come of the issue?