A live bird collage card for your Home Assistant dashboard.
In certain situations trying to recover from stalled analysis we can end up with low / no disk space and be unable to "escape." In the event of a backlog, the loop in birdnet_analysis.sh runs continuously, which means analyzed files do not get moved, which means in turn extract_new_birdsounds.sh cannot create mp3 extractions and move the processed files again, which would allow them to be cleaned up by the cron jobs.
Steve Doddeb86faddcd4a
diff --git a/scripts/birdnet_analysis.sh b/scripts/birdnet_analysis.shindex aadf6f8d..633c1e7d 100755--- a/scripts/birdnet_analysis.sh+++ b/scripts/birdnet_analysis.sh@@ -1,4 +1,4 @@-#!/usr/bin/env bash+#!/usr/bin/env -S --default-signal=PIPE bash# Runs BirdNET-Lite#set -xsource /etc/birdnet/birdnet.conf@@ -52,6 +52,7 @@ figet_files() {files=($( find ${1} -maxdepth 1 -name '*wav' ! -size 0\| sort \+ | head -n 20 \| awk -F "/" '{print $NF}' ))[ -n "${files[1]}" ] && echo "Files loaded"}