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
@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
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
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.
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.
I’ve setup an daily automation using the Shell Command Integration to delete Nest media event files older than 30 days.
First, add the following to your configuration.yaml file:
shell_command:
delete_old_nest_media: find ./nest/event_media -type f -mtime +30 -exec rm -f {} \;
You can change the “30” in the above command to whatever you prefer; files older than this number of days will be deleted.
Restart Home Assistant to pick up this change.
Then, create an Automation with an Action of action: shell_command.delete_old_nest_media
My automation runs every night at midnight and looks like this:
alias: At Midnight / Cleanup Nest Media
description: ""
triggers:
- trigger: time
at: "00:00:00"
conditions: []
actions:
- action: shell_command.delete_old_nest_media
data: {}
mode: single
I’m just getting started with all of this having installed a nest doorbell last week, and an outdoor battery camera earlier today. I finally got events working, and am now seeing clips appearing. I don’t want to pay the subscription fee for additional storage of media on google, however would like to be able to retain clips for longer via HA - i.e. if I go away camping for a weekend with no mobile coverage, and stuff happens at home that I don’t get notified of.
I understand it’s not possible to easily change the default storage location of the clips, and they default to /config/nest.
I have a nest folder on my NAS mapped to HA, and am wondering if it would be possible to use a similar script to above to first (eg.) rsync from my raspberry pi /nest/event_media folder to my NAS /nest folder, and then clean up files on the pi?
unrelated to the above, I’ve noticed that when I get a notification via the google home app of an acitvity, the clip in the google home app is (eg) 10 seconds, however all the clips I have access to through HA are around 1 second. Is this some limitation of the integration?
I noticed if I delete the files manually, then the file is still referenced in the media section of the gui, so it shows a list of blank files. You also need to delete the json file in .storage, this only works if you are deleting all files. Does using the shell command clear up the references as well?