Nest integration is filling up my storage device with camera images

Is there some way to setup an automation to regularly delete the Nest Media files? I am running on a Raspberry Pi with somewhat limited storage(120GB SSD) and just don’t want to fill it up with video files. It’s fine if there is not built-in setting to configure but if there was a service to call to delete media I’d be fine setting that up myself to run. Perhaps there is a script I can create and call?

this would be great!

You could also just periodically run a cronjob that deletes files older than x from that folder:

The target storage usage is 125MB so i hope you aren’t actually concerned about filling up the disk? even if its off it should still be well under 1gb

2 Likes

@allenporter thanks I didn’t recall seeing that there was already a limit built in. That works for me.

If media_dirs is supposed to be a way that integrations should let users configure storage for their needs, then feel free to contribute this to the actual nest integration.

Just jumping in as i’m seeing a similar issue - one of the suggestions here is to just delete the files, but ‘just deleting’ the files doesn’t remove the object references from HA itself - so what is the solution to purge correctly?

You can delete the internal storage for the references in json if you are feeling lucky. There is not a feature for what you’re looking for. I guess just ignore it since you have it off anyway?

Can you expand on this please?

There is a json file in .storage that references the media files.

Yup, seen that, removed it as a test…it gets re-created with events referenced again after a HA restart.
Is it pulled the event data from Google perhaps?

ok, interesting -
Using the partner connections dashboard, disabling screenshots/clips, turning off HA, removing the “nest.event_media” file from .storage, starting HA again, the media folder within the HA WebGUI still shows the nest object, but with a ‘no items’ status, with the “nest.event_media” file NOT being re-created.
So it must have been pulling from Google?

I never had those snapshots in that nest folder, already have the nest integration active like for 2 years , on last backup I noticed an increase of the backup file… And there were a lot of snapshots now…

Did this behavior changed?

Anyway, as suggested I now disabled:

Based on the events you’ve selected to share from this device, allow nest_api to access camera snapshots

Let’s hope it stops making snaps now

I do not see any media in my Nest media director, even though I believe I set correct permissions.

Any idea why media dir might be empty?

Was this finally implemented?

I just switched to the Google Nest integration from the Nest integration with a recent notification that Nest Dev accounts were going to go away at the end of the year. So, from reading this thread, the integration should ultimately delete these files on its own once it reaches a limit?

Tried disabling the permissions but it didn’t remove old files…

Anyone looking for the files they are here (after logging in to HassOS via SSH)
cd /config/nest/event_media

1 Like

I’d just like to revive this thread because I’m running into this issue now as well where I’ve got multiple cameras and this is adding like 300 MB to my backup files. I opened a new issue in Github: Nest integration bloats HA backups · Issue #122434 · home-assistant/core · GitHub

1 Like

Thanks toxicode!

Noticed the same today when trying to find out why my backups were getting large. The nest media folder had grown to 2GB. For now, I used boomam suggestion above to disable the screenshots/clips.

1 Like

Also here with the same issue as tejesh83. Realised my HASSIO backups were getting a bit silly at 3GB per update and having limited space on my HA Green, I was led here from my searches.

Turned off the saving of snapshots for now but would like the option to store x amount or a month’s worth if that is possible in a future update.

1 Like