A live bird collage card for your Home Assistant dashboard.
these are the changes from small_tweaks
mcguirepr898b8688d3d271
diff --git a/scripts/birdnet_log.sh b/scripts/birdnet_log.shindex e480664c..1d490239 100755--- a/scripts/birdnet_log.sh+++ b/scripts/birdnet_log.sh@@ -1,2 +1,2 @@#!/usr/bin/env bash-journalctl --no-hostname -q -o short -fu birdnet_analysis -ubirdnet_server -uextraction | sed "s/$(date "+%b %d ")//g;s/${HOME//\//\\/}\///g"+journalctl --no-hostname -q -o short -fu birdnet_analysis -ubirdnet_server -uextraction | sed "s/$(date "+%b %d ")//g;s/${HOME//\//\\/}\///g;/Line/d;/systemd/d;s/ .*\[.*\]: /---/"diff --git a/scripts/restart_services.sh b/scripts/restart_services.shindex f0cead99..98993af9 100755--- a/scripts/restart_services.sh+++ b/scripts/restart_services.sh@@ -22,6 +22,6 @@ sudo systemctl restart "${i}"doneuntil grep 5050 <(netstat -tulpn 2>&1);dosudo systemctl restart birdnet_server.service-sleep 20+sleep 30donesudo systemctl restart birdnet_analysis.servicediff --git a/scripts/server.py b/scripts/server.pyindex 6c96e123..35833e13 100755--- a/scripts/server.py+++ b/scripts/server.py@@ -261,7 +261,7 @@ def writeResultsToFile(detections, min_conf, path):def handle_client(conn, addr):global INCLUDE_LISTglobal EXCLUDE_LIST- print(f"[NEW CONNECTION] {addr} connected.")+ #print(f"[NEW CONNECTION] {addr} connected.")connected = Truewhile connected:@@ -335,7 +335,7 @@ def handle_client(conn, addr):# Get Date/Time from filename in case Pi gets behind#now = datetime.now()full_file_name = args.i- print('FULL FILENAME: -' + full_file_name + '-')+ #print('FULL FILENAME: -' + full_file_name + '-')file_name = Path(full_file_name).stemfile_date = file_name.split('-birdnet-')[0]file_time = file_name.split('-birdnet-')[1]@@ -463,13 +463,13 @@ def start():global INTERPRETER, INCLUDE_LIST, EXCLUDE_LISTINTERPRETER = loadModel()server.listen()- print(f"[LISTENING] Server is listening on {SERVER}")+ #print(f"[LISTENING] Server is listening on {SERVER}")while True:conn, addr = server.accept()thread = threading.Thread(target=handle_client, args=(conn, addr))thread.start()- print(f"[ACTIVE CONNECTIONS] {threading.activeCount() - 1}")+ #print(f"[ACTIVE CONNECTIONS] {threading.activeCount() - 1}")-print("[STARTING] server is starting...")+#print("[STARTING] server is starting...")start()