HclX / WyzeHacks

Hacks I discovered allowing Wyze camera owners to do customizations
MIT License
786 stars 75 forks source link

NFS Archive Cleanup #88

Closed twig123 closed 3 years ago

twig123 commented 3 years ago

I've have multiple cams recording to my NFS server, and have the issue of them filling up the disk my NFS server is mounted to.

Is there a way to configure a retention time for the Archives? if not, can this be added as a feature request?

I'm sure there is probably some way to accomplish this with a custom background script or something (retention based on either days or available free space)... but I'm not familiar enough with linux to be able to code a script myself.

MelonSmasher commented 3 years ago

I just wrote a script that should do what you need. I'm not sure if this will run on a camera but it can defiantly be run from macOS or a Linux machine that has the same NFS share mounted. The script lets you chose the amount of hours you'd like to keep recordings around and prunes empty directories from the recordings directory.

MelonSmasher/wyze_rec_cleaner