Nest integration is filling up my storage device with camera images

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

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
1 Like

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?