Skip to content

A live bird collage card for your Home Assistant dashboard.

seems to work

Patrick McGuireae3e29ef1d92
diff --git a/scripts/extract_new_birdsounds.sh b/scripts/extract_new_birdsounds.sh
index 15b9e2ee..83533851 100755
--- a/scripts/extract_new_birdsounds.sh
+++ b/scripts/extract_new_birdsounds.sh
@@ -129,7 +129,7 @@ for h in "${SCAN_DIRS[@]}";do
"${NEWSPECIES_BYDATE}/${NEWFILE}"
# Create spectrogram for extraction
- sox "${NEWSPECIES_BYDATE}/${NEWFILE}" -n remix 1 rate 20k spectrogram \
+ sox "${NEWSPECIES_BYDATE}/${NEWFILE}" -n remix 1 rate 24k spectrogram \
-t "${COMMON_NAME}" \
-c "${NEWSPECIES_BYDATE}/${NEWFILE}" \
-o "${NEWSPECIES_BYDATE}/${NEWFILE}.png"
diff --git a/scripts/species_notifier.sh b/scripts/species_notifier.sh
index 620d93ec..8c2d30d5 100755
--- a/scripts/species_notifier.sh
+++ b/scripts/species_notifier.sh
@@ -1,19 +1,19 @@
#!/usr/bin/env bash
# Sends a notification if a new species is detected
#set -x
-trap 'rm -f $TMPFILE' EXIT
+trap 'rm -f $tmpids' EXIT
source /etc/birdnet/birdnet.conf
-TMPFILE=$(mktemp)
+tmpids=$(mktemp)
[ -f ${IDFILE} ] || touch ${IDFILE}
-cat "${IDFILE}" > "${TMPFILE}"
+cat "${IDFILE}" > "${tmpids}"
/usr/local/bin/update_species.sh > /dev/null
-if ! diff "${IDFILE}" "${TMPFILE}" &> /dev/null; then
- SPECIES=("$(diff "${IDFILE}" "${TMPFILE}" \
+if ! diff "${IDFILE}" "${tmpids}" &> /dev/null; then
+ SPECIES=("$(diff "${IDFILE}" "${tmpids}" \
| grep "Common Name" \
| sort \
| awk '{for(i=4;i<=NF;++i)printf $i""FS ; print ""}')")
diff --git a/scripts/spectrogram.sh b/scripts/spectrogram.sh
index 50f84c0c..db36975b 100755
--- a/scripts/spectrogram.sh
+++ b/scripts/spectrogram.sh
@@ -4,4 +4,4 @@ source /etc/birdnet/birdnet.conf
analyzing_now="$(cat /home/pi/BirdNET-Pi/analyzing_now.txt)"
spectrogram_png=${EXTRACTED}/spectrogram.png
#sudo -u pi sox "${analyzing_now}" -n spectrogram -t "Currently Analyzing" -c "${analyzing_now}" -o "${spectrogram_png}"
-sudo -u pi sox "${analyzing_now}" -n remix 1 rate 20k spectrogram -t "Currently Analyzing" -c "${analyzing_now}" -o "${spectrogram_png}"
+sudo -u pi sox "${analyzing_now}" -n remix 1 rate 24k spectrogram -t "Currently Analyzing" -c "${analyzing_now}" -o "${spectrogram_png}"
diff --git a/scripts/viewdb.php b/scripts/viewdb.php
index 9703232b..ac70b0f4 100644
--- a/scripts/viewdb.php
+++ b/scripts/viewdb.php
@@ -53,14 +53,10 @@ $mysqli->close();
<head>
<meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
<title>BirdNET-Pi DB</title>
<!-- CSS FOR STYLING THE PAGE -->
<style>
- @media screen and (max-width: 600px) {
- .column {
- width: 100%;
- }
- }
* {
box-sizing: border-box;
}
@@ -114,6 +110,50 @@ $mysqli->close();
text-align: center;
}
+ @media screen and (max-width: 800px) {
+ .column {
+ float: none;
+ width: 100%;
+ }
+ table {
+ margin: 0 auto;
+ font-size: medium;
+ border-collapse: collapse;
+ border-spacing: 1;
+ width: 100%;
+ border: 1px solid black;
+ }
+
+ h1 {
+ text-align: center;
+ color: black;
+ font-size: large;
+ font-family: 'Gill Sans', 'Gill Sans MT',
+ ' Calibri', 'Trebuchet MS', 'sans-serif';
+ }
+
+ h2 {
+ text-align: center;
+ color: black;
+ font-size: large;
+ font-family: 'Gill Sans', 'Gill Sans MT',
+ ' Calibri', 'Trebuchet MS', 'sans-serif';
+ }
+
+ td {
+ background-color: rgb(119, 196, 135);
+ border: 1px solid black;
+ }
+
+ th,
+ td {
+ font-weight: bold;
+ border: 1px solid black;
+ padding: 10px;
+ text-align: center;
+ }
+ }
+
td {
font-weight: lighter;
}