rename to BirdNET-Pi
This commit is contained in:
+16
-16
@@ -1,11 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
my_dir=${HOME}/Birding-Pi
|
my_dir=${HOME}/BirdNET-Pi
|
||||||
trap '${my_dir}/scripts/dump_logs.sh && exit' EXIT SIGHUP SIGINT
|
trap '${my_dir}/scripts/dump_logs.sh && exit' EXIT SIGHUP SIGINT
|
||||||
|
|
||||||
|
|
||||||
if [ "$(uname -m)" != "aarch64" ];then
|
if [ "$(uname -m)" != "aarch64" ];then
|
||||||
echo "Birding-Pi requires a 64-bit OS.
|
echo "BirdNET-Pi requires a 64-bit OS.
|
||||||
It looks like your operating system is using $(uname -m),
|
It looks like your operating system is using $(uname -m),
|
||||||
but would need to be aarch64.
|
but would need to be aarch64.
|
||||||
Please take a look at https://birdnetwiki.pmcgui.xyz for more
|
Please take a look at https://birdnetwiki.pmcgui.xyz for more
|
||||||
@@ -44,11 +44,11 @@ EOF
|
|||||||
echo
|
echo
|
||||||
echo "Installing stage 2 installation script now."
|
echo "Installing stage 2 installation script now."
|
||||||
cd ~
|
cd ~
|
||||||
curl -s -O "https://raw.githubusercontent.com/mcguirepr89/Birding-Pi/rpialpha/Birders_Guide_Installer.sh"
|
curl -s -O "https://raw.githubusercontent.com/mcguirepr89/BirdNET-Pi/rpialpha/Birders_Guide_Installer.sh"
|
||||||
chmod +x Birders_Guide_Installer.sh
|
chmod +x Birders_Guide_Installer.sh
|
||||||
cat << EOF | sudo tee /etc/systemd/user/birdnet-system-installer.service &> /dev/null
|
cat << EOF | sudo tee /etc/systemd/user/birdnet-system-installer.service &> /dev/null
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=A Birding-Pi Installation Script Service
|
Description=A BirdNET-Pi Installation Script Service
|
||||||
After=graphical.target network-online.target
|
After=graphical.target network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
@@ -106,9 +106,9 @@ stage_2() {
|
|||||||
echo
|
echo
|
||||||
if [ ! -d ${my_dir} ];then
|
if [ ! -d ${my_dir} ];then
|
||||||
cd ~ || exit 1
|
cd ~ || exit 1
|
||||||
echo "Cloning the Birding-Pi repository in your home directory"
|
echo "Cloning the BirdNET-Pi repository in your home directory"
|
||||||
git clone https://github.com/mcguirepr89/Birding-Pi.git ~/Birding-Pi
|
git clone https://github.com/mcguirepr89/BirdNET-Pi.git ~/BirdNET-Pi
|
||||||
cd Birding-Pi && git checkout rpialpha
|
cd BirdNET-Pi && git checkout rpialpha
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f ${my_dir}/Birders_Guide_Installer_Configuration.txt ];then
|
if [ -f ${my_dir}/Birders_Guide_Installer_Configuration.txt ];then
|
||||||
@@ -138,9 +138,9 @@ and then close the Mouse Pad editing window to continue."
|
|||||||
echo "It looks like you haven't filled out the Birders_Guide_Installer_Configuration.txt file
|
echo "It looks like you haven't filled out the Birders_Guide_Installer_Configuration.txt file
|
||||||
completely.
|
completely.
|
||||||
|
|
||||||
Open that file to edit it. (Go to the folder icon in the top left and look for the \"Birding-Pi\"
|
Open that file to edit it. (Go to the folder icon in the top left and look for the \"BirdNET-Pi\"
|
||||||
folder and double-click the file called \"Birders_Guide_Installer_Configuration.txt\"
|
folder and double-click the file called \"Birders_Guide_Installer_Configuration.txt\"
|
||||||
Enter the latitude and longitude of where the Birding-Pi will be.
|
Enter the latitude and longitude of where the BirdNET-Pi will be.
|
||||||
You can find this information at https://maps.google.com
|
You can find this information at https://maps.google.com
|
||||||
|
|
||||||
Find your location on the map and right click to find your coordinates.
|
Find your location on the map and right click to find your coordinates.
|
||||||
@@ -151,9 +151,9 @@ Good luck!"
|
|||||||
read
|
read
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Installing the Birding-Pi configuration file."
|
echo "Installing the BirdNET-Pi configuration file."
|
||||||
[ -f ${my_dir}/soundcard_params.txt ] || touch ${my_dir}/soundcard_params.txt
|
[ -f ${my_dir}/soundcard_params.txt ] || touch ${my_dir}/soundcard_params.txt
|
||||||
SOUND_PARAMS="${HOME}/Birding-Pi/soundcard_params.txt"
|
SOUND_PARAMS="${HOME}/BirdNET-Pi/soundcard_params.txt"
|
||||||
SOUND_CARD="$(sudo -u pi aplay -L \
|
SOUND_CARD="$(sudo -u pi aplay -L \
|
||||||
| grep -e '^hw' \
|
| grep -e '^hw' \
|
||||||
| cut -d, -f1 \
|
| cut -d, -f1 \
|
||||||
@@ -178,7 +178,7 @@ The installation has finished. Press Enter to close this window."
|
|||||||
install_birdnet_config() {
|
install_birdnet_config() {
|
||||||
cat << EOF > ${my_dir}/birdnet.conf
|
cat << EOF > ${my_dir}/birdnet.conf
|
||||||
################################################################################
|
################################################################################
|
||||||
# Configuration settings for the Birding-Pi #
|
# Configuration settings for the BirdNET-Pi #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
#___________The four variables below are the only that are required.___________#
|
#___________The four variables below are the only that are required.___________#
|
||||||
@@ -283,7 +283,7 @@ REMOTE_RECS_DIR=
|
|||||||
|
|
||||||
## EXTRACTIONS_URL is the URL where the extractions, data-set, and live-stream
|
## EXTRACTIONS_URL is the URL where the extractions, data-set, and live-stream
|
||||||
## will be web-hosted. If you do not own a domain, or would just prefer to keep
|
## will be web-hosted. If you do not own a domain, or would just prefer to keep
|
||||||
## the Birding-Pi on your local network, you can set this to http://localhost.
|
## the BirdNET-Pi on your local network, you can set this to http://localhost.
|
||||||
## Setting this (even to http://localhost) will also allow you to enable the
|
## Setting this (even to http://localhost) will also allow you to enable the
|
||||||
## GoTTY web logging features below.
|
## GoTTY web logging features below.
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ PUSHED_APP_SECRET=${PUSHED_APP_SECRET}
|
|||||||
# Keep this EMPTY if you do not want to install NoMachine. #
|
# Keep this EMPTY if you do not want to install NoMachine. #
|
||||||
|
|
||||||
## INSTALL_NOMACHINE is simply a setting that can be enabled to install
|
## INSTALL_NOMACHINE is simply a setting that can be enabled to install
|
||||||
## NoMachine alongside the Birding-Pi for remote desktop access. This in-
|
## NoMachine alongside the BirdNET-Pi for remote desktop access. This in-
|
||||||
## staller assumes personal use. Please reference the LICENSE file included
|
## staller assumes personal use. Please reference the LICENSE file included
|
||||||
## in this repository for more information.
|
## in this repository for more information.
|
||||||
## Set this to Y or y to install NoMachine alongside the BirdNET-Lite
|
## Set this to Y or y to install NoMachine alongside the BirdNET-Lite
|
||||||
@@ -373,7 +373,7 @@ EXTRACTED=${RECS_DIR}/Extracted
|
|||||||
## change this variable between data-sets to preserve records of disparate
|
## change this variable between data-sets to preserve records of disparate
|
||||||
## data-sets according to name.
|
## data-sets according to name.
|
||||||
|
|
||||||
IDFILE=${HOME}/Birding-Pi/IdentifiedSoFar.txt
|
IDFILE=${HOME}/BirdNET-Pi/IdentifiedSoFar.txt
|
||||||
|
|
||||||
## OVERLAP is the value in seconds which BirdNET should use when analyzing
|
## OVERLAP is the value in seconds which BirdNET should use when analyzing
|
||||||
## the data. The values must be between 0.0-2.9.
|
## the data. The values must be between 0.0-2.9.
|
||||||
@@ -437,7 +437,7 @@ The installer runs in two stages:
|
|||||||
Stage 1 configures and enables the zRAM kernel module and allocates 4G
|
Stage 1 configures and enables the zRAM kernel module and allocates 4G
|
||||||
to its swapping size if needed. This will trigger a reboot.
|
to its swapping size if needed. This will trigger a reboot.
|
||||||
Stage 1 also ensures the system is up to date.
|
Stage 1 also ensures the system is up to date.
|
||||||
Stage 2 guides you through configuring the essentials and installs the full Birding-Pi system."
|
Stage 2 guides you through configuring the essentials and installs the full BirdNET-Pi system."
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f ${HOME}/stage_1_complete ] ;then
|
if [ ! -f ${HOME}/stage_1_complete ] ;then
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 997 KiB |
@@ -1,10 +1,10 @@
|
|||||||
# Birding Pi
|
# BirdNET-Pi
|
||||||

|

|
||||||
|
|
||||||
A realtime acoustic bird classification system for the Reaspberry Pi 4B
|
A realtime acoustic bird classification system for the Reaspberry Pi 4B
|
||||||

|

|
||||||
## Introduction
|
## Introduction
|
||||||
The Birding Pi project is based on the BirdNet-Lite project and is able to recognize bird sounds from the microphone and the sound card in realtime. The system installs all needed services on the Raspberry Pi.
|
The BirdNET-Pi project is based on the BirdNet-Lite project and is able to recognize bird sounds from the microphone and the sound card in realtime. The system installs all needed services on the Raspberry Pi.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
* A Raspberry Pi 4B
|
* A Raspberry Pi 4B
|
||||||
@@ -14,20 +14,20 @@ The Birding Pi project is based on the BirdNet-Lite project and is able to recog
|
|||||||
## Installation
|
## Installation
|
||||||
The system can be installed with:
|
The system can be installed with:
|
||||||
```
|
```
|
||||||
curl -s https://raw.githubusercontent.com/mcguirepr89/Birding-Pi/rpialpha/Birders_Guide_Installer.sh | bash
|
curl -s https://raw.githubusercontent.com/mcguirepr89/BirdNET-Pi/rpialpha/Birders_Guide_Installer.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
The script first enables and configures the zRAM kernel module for swapping, and reboots.
|
The script first enables and configures the zRAM kernel module for swapping, and reboots.
|
||||||
After the reboot, the configuration file is opened for editing. Here, you will input your latitude and longitude and will set a few passwords to protect your Pi. When the installation has finished, the Birding Pi is ready to start collecting and analyzing data on the next boot.
|
After the reboot, the configuration file is opened for editing. Here, you will input your latitude and longitude and will set a few passwords to protect your Pi. When the installation has finished, the BirdNET-Pi is ready to start collecting and analyzing data on the next boot.
|
||||||
|
|
||||||
If you have trouble with the installation script, you can cancel and rerun the installer:
|
If you have trouble with the installation script, you can cancel and rerun the installer:
|
||||||
```
|
```
|
||||||
~/Birding-Pi/Birders_Guide_Installer.sh
|
~/BirdNET-Pi/Birders_Guide_Installer.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Access
|
## Access
|
||||||
The Birding Pi system can be accessed from any web browser on the same network:
|
The BirdNET-Pi system can be accessed from any web browser on the same network:
|
||||||
- http://birdingpi.local
|
- http://birdnetpi.local
|
||||||
|
|
||||||
#### Access Credentials:
|
#### Access Credentials:
|
||||||
- Username:`birdnet`
|
- Username:`birdnet`
|
||||||
@@ -35,7 +35,7 @@ The Birding Pi system can be accessed from any web browser on the same network:
|
|||||||
|
|
||||||
## Uninstallation
|
## Uninstallation
|
||||||
```
|
```
|
||||||
/usr/local/bin/uninstall.sh && cd ~ && rm -drf Birding-Pi
|
/usr/local/bin/uninstall.sh && cd ~ && rm -drf BirdNET-Pi
|
||||||
```
|
```
|
||||||
|
|
||||||
## ToDo, Notes, and Comming Soon
|
## ToDo, Notes, and Comming Soon
|
||||||
@@ -50,4 +50,4 @@ You can try to overclock your Pi by placing the following in your `/boot/config.
|
|||||||
over_voltage=6
|
over_voltage=6
|
||||||
arm_freq=1750
|
arm_freq=1750
|
||||||
```
|
```
|
||||||
Be sure the Pi is adequately cooled and powered. Check http://birdingpi.local:9090 for CPU temperature and over-volatage warnings (anything other than "throttled:0x0" is bad).
|
Be sure the Pi is adequately cooled and powered. Check http://birdnetpi.local:9090 for CPU temperature and over-volatage warnings (anything other than "throttled:0x0" is bad).
|
||||||
|
|||||||
+2
-2
@@ -133,7 +133,7 @@ def predict(sample, interpreter, sensitivity):
|
|||||||
|
|
||||||
# Remove species that are on blacklist
|
# Remove species that are on blacklist
|
||||||
for i in range(min(10, len(p_sorted))):
|
for i in range(min(10, len(p_sorted))):
|
||||||
if p_sorted[i][0] in ['Human_Human', 'Non-bird_Non-bird', 'Noise_Noise']:
|
if p_sorted[i][0] in ['Human_Human', 'Non-bird_Non-bird', 'Noise_Noise', 'Quiscalus major_Boat-tailed Grackle', 'Megascops asio_Eastern Screech-Owl', 'Cygnus columbianus_Tundra Swan', 'Cathartes aura_Turkey Vulture', 'Cygnus buccinator_Trumpeter Swan', 'Scolopax minor_American Woodcock', 'Bubo virginianus_Great Horned Owl', 'Strix varia_Barred Owl', 'Quiscalus quiscula_Common Grackle']:
|
||||||
p_sorted[i] = (p_sorted[i][0], 0.0)
|
p_sorted[i] = (p_sorted[i][0], 0.0)
|
||||||
|
|
||||||
# Only return first the top ten results
|
# Only return first the top ten results
|
||||||
@@ -246,7 +246,7 @@ def main():
|
|||||||
connection = mysql.connector.connect(host='localhost',
|
connection = mysql.connector.connect(host='localhost',
|
||||||
database='birds',
|
database='birds',
|
||||||
user='birder',
|
user='birder',
|
||||||
password='databasepassword')
|
password='maddypaddy')
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
mySql_insert_query = """INSERT INTO detections (Date, Time, Sci_Name, Com_Name, Confidence, Lat, Lon, Cutoff, Week, Sens, Overlap)
|
mySql_insert_query = """INSERT INTO detections (Date, Time, Sci_Name, Com_Name, Confidence, Lat, Lon, Cutoff, Week, Sens, Overlap)
|
||||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) """
|
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) """
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ REMOTE_RECS_DIR=
|
|||||||
|
|
||||||
## EXTRACTIONS_URL is the URL where the extractions, data-set, and live-stream
|
## EXTRACTIONS_URL is the URL where the extractions, data-set, and live-stream
|
||||||
## will be web-hosted. If you do not own a domain, or would just prefer to keep
|
## will be web-hosted. If you do not own a domain, or would just prefer to keep
|
||||||
## Birding-Pi on your local network, you can set this to http://localhost.
|
## BirdNET-Pi on your local network, you can set this to http://localhost.
|
||||||
## Setting this (even to http://localhost) will also allow you to enable the
|
## Setting this (even to http://localhost) will also allow you to enable the
|
||||||
## GoTTY web logging features below.
|
## GoTTY web logging features below.
|
||||||
|
|
||||||
@@ -152,10 +152,10 @@ PUSHED_APP_SECRET=
|
|||||||
# Keep this EMPTY if you do not want to install NoMachine. #
|
# Keep this EMPTY if you do not want to install NoMachine. #
|
||||||
|
|
||||||
## INSTALL_NOMACHINE is simply a setting that can be enabled to install
|
## INSTALL_NOMACHINE is simply a setting that can be enabled to install
|
||||||
## NoMachine alongside the Birding-Pi for remote desktop access. This in-
|
## NoMachine alongside the BirdNET-Pi for remote desktop access. This in-
|
||||||
## staller assumes personal use. Please reference the LICENSE file included
|
## staller assumes personal use. Please reference the LICENSE file included
|
||||||
## in this repository for more information.
|
## in this repository for more information.
|
||||||
## Set this to Y or y to install NoMachine alongside the Birding-Pi
|
## Set this to Y or y to install NoMachine alongside the BirdNET-Pi
|
||||||
|
|
||||||
INSTALL_NOMACHINE=
|
INSTALL_NOMACHINE=
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ EXTRACTED=${RECS_DIR}/Extracted
|
|||||||
## change this variable between data-sets to preserve records of disparate
|
## change this variable between data-sets to preserve records of disparate
|
||||||
## data-sets according to name.
|
## data-sets according to name.
|
||||||
|
|
||||||
IDFILE=${HOME}/Birding-Pi/IdentifiedSoFar.txt
|
IDFILE=${HOME}/BirdNET-Pi/IdentifiedSoFar.txt
|
||||||
|
|
||||||
## OVERLAP is the value in seconds which BirdNET should use when analyzing
|
## OVERLAP is the value in seconds which BirdNET should use when analyzing
|
||||||
## the data. The values must be between 0.0-2.9.
|
## the data. The values must be between 0.0-2.9.
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ if ! diff ${LAST_RUN} ${THIS_RUN};then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CUSTOM_LIST="/home/pi/Birding-Pi/custom_species_list.txt"
|
CUSTOM_LIST="/home/pi/BirdNET-Pi/custom_species_list.txt"
|
||||||
|
|
||||||
# Create an array of the audio files
|
# Create an array of the audio files
|
||||||
# Takes one argument:
|
# Takes one argument:
|
||||||
@@ -75,7 +75,7 @@ run_analysis() {
|
|||||||
WEEK="$(echo "${WEEK_OF_YEAR} + 4" |bc -l)"
|
WEEK="$(echo "${WEEK_OF_YEAR} + 4" |bc -l)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${HOME}/Birding-Pi || exit 1
|
cd ${HOME}/BirdNET-Pi || exit 1
|
||||||
for i in "${files[@]}";do
|
for i in "${files[@]}";do
|
||||||
echo "${1}/${i}" > ./analyzing_now.txt
|
echo "${1}/${i}" > ./analyzing_now.txt
|
||||||
[ -z ${RECORDING_LENGTH} ] && RECORDING_LENGTH=15
|
[ -z ${RECORDING_LENGTH} ] && RECORDING_LENGTH=15
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ setterm --cursor off
|
|||||||
TMP_FILE="$(mktemp)"
|
TMP_FILE="$(mktemp)"
|
||||||
|
|
||||||
while true;do
|
while true;do
|
||||||
cat << "EOF"
|
cat << 'EOF'
|
||||||
___ _ ___
|
____ __ __ __ _____ ______ ____
|
||||||
( _`\ _ ( ) _ ( _`\ _
|
/\ _`\ __ /\ \/\ \/\ \/\ __\/\__ _\ /\ _`\ __
|
||||||
| (_) )(_) _ __ _| |(_) ___ __ | |_) )(_)
|
\ \ \_\ \ /\_\ _ __ \_\ \ \ `\\ \ \ \_/\/_/\ \/ \ \ \_\ \/\_\
|
||||||
| _ <'| |( '__)/'_` || |/' _ `\ /'_ `\ | ,__/'| |
|
\ \ _ <'\/\ \/\`'__\/'_` \ \ , ` \ \ _\ \ \ \ \ \ ,__/\/\ \
|
||||||
| (_) )| || | ( (_| || || ( ) |( (_) | | | | |
|
\ \ \_\ \\ \ \ \ \//\ \_\ \ \ \`\ \ \ \/__ \ \ \ \ \ \/ \ \ \
|
||||||
(____/'(_)(_) `\__,_)(_)(_) (_)`\__ | (_) (_)
|
\ \____/ \ \_\ \_\\ \___,_\ \_\ \_\ \____/ \ \_\ \ \_\ \ \_\
|
||||||
( )_) |
|
\/___/ \/_/\/_/ \/__,_ /\/_/\/_/\/___/ \/_/ \/_/ \/_/
|
||||||
\___/'
|
|
||||||
EOF
|
EOF
|
||||||
if [ "$(find ${EXTRACTED} -name '*.wav' | wc -l)" -ge 1 ] &> /dev/null;then
|
if [ "$(find ${EXTRACTED} -name '*.wav' | wc -l)" -ge 1 ] &> /dev/null;then
|
||||||
a=$(find "${EXTRACTED}/By_Date" -type f -name '*.wav' | wc -l)
|
a=$(find "${EXTRACTED}/By_Date" -type f -name '*.wav' | wc -l)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/clear_all_data.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/clear_all_data.sh");
|
||||||
header('Location: http://birdingpi.local/scripts/index.html?success=true');
|
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ echo "Recreating necessary directories"
|
|||||||
[ -d ${EXTRACTED}/By_Date ] || sudo -u ${BIRDNET_USER} mkdir -p ${EXTRACTED}/By_Date
|
[ -d ${EXTRACTED}/By_Date ] || sudo -u ${BIRDNET_USER} mkdir -p ${EXTRACTED}/By_Date
|
||||||
[ -d ${EXTRACTED}/By_Common_Name ] || sudo -u ${BIRDNET_USER} mkdir -p ${EXTRACTED}/By_Common_Name
|
[ -d ${EXTRACTED}/By_Common_Name ] || sudo -u ${BIRDNET_USER} mkdir -p ${EXTRACTED}/By_Common_Name
|
||||||
[ -d ${EXTRACTED}/By_Scientific_Name ] || sudo -u ${BIRDNET_USER} mkdir -p ${EXTRACTED}/By_Scientific_Name
|
[ -d ${EXTRACTED}/By_Scientific_Name ] || sudo -u ${BIRDNET_USER} mkdir -p ${EXTRACTED}/By_Scientific_Name
|
||||||
sudo -u ${BIRDNET_USER} ln -s /home/pi/Birding-Pi/templates/index.html ${EXTRACTED}
|
sudo -u ${BIRDNET_USER} ln -s /home/pi/BirdNET-Pi/templates/index.html ${EXTRACTED}
|
||||||
[ -d ${PROCESSED} ] || sudo -u ${BIRDNET_USER} mkdir -p ${PROCESSED}
|
[ -d ${PROCESSED} ] || sudo -u ${BIRDNET_USER} mkdir -p ${PROCESSED}
|
||||||
[ -L ${EXTRACTED}/scripts ] || sudo -u ${BIRDNET_USER} ln -s /home/pi/Birding-Pi/scripts ${EXTRACTED}/
|
[ -L ${EXTRACTED}/scripts ] || sudo -u ${BIRDNET_USER} ln -s /home/pi/BirdNET-Pi/scripts ${EXTRACTED}/
|
||||||
[ -L ${EXTRACTED}/spectrogram.php ] || sudo -u ${BIRDNET_USER} ln -s /home/pi/Birding-Pi/scripts/spectrogram.php ${EXTRACTED}
|
[ -L ${EXTRACTED}/spectrogram.php ] || sudo -u ${BIRDNET_USER} ln -s /home/pi/BirdNET-Pi/scripts/spectrogram.php ${EXTRACTED}
|
||||||
[ -L ${EXTRACTED}/spectrogram.sh ] || sudo -u ${BIRDNET_USER} ln -s /home/pi/Birding-Pi/scripts/spectrogram.sh ${EXTRACTED}
|
[ -L ${EXTRACTED}/spectrogram.sh ] || sudo -u ${BIRDNET_USER} ln -s /home/pi/BirdNET-Pi/scripts/spectrogram.sh ${EXTRACTED}
|
||||||
[ -L ${EXTRACTED}/viewdb.php ] || sudo -u ${BIRDNET_USER} ln -s /home/pi/Birding-Pi/scripts/viewdb.php ${EXTRACTED}
|
[ -L ${EXTRACTED}/viewdb.php ] || sudo -u ${BIRDNET_USER} ln -s /home/pi/BirdNET-Pi/scripts/viewdb.php ${EXTRACTED}
|
||||||
|
|
||||||
sudo -u ${BIRDNET_USER} cp ~/Birding-Pi/templates/index.html ${EXTRACTED}/
|
sudo -u ${BIRDNET_USER} cp ~/BirdNET-Pi/templates/index.html ${EXTRACTED}/
|
||||||
echo "Dropping and re-creating database"
|
echo "Dropping and re-creating database"
|
||||||
sudo /home/pi/Birding-Pi/scripts/createdb.sh
|
sudo /home/pi/BirdNET-Pi/scripts/createdb.sh
|
||||||
echo "Restarting services"
|
echo "Restarting services"
|
||||||
sudo systemctl restart birdnet_recording.service
|
sudo systemctl restart birdnet_recording.service
|
||||||
|
|||||||
+2
-2
@@ -39,5 +39,5 @@ GRANT ALL ON birds.* TO 'birder'@'localhost' IDENTIFIED BY '${DB_PWD}' WITH GRAN
|
|||||||
|
|
||||||
exit
|
exit
|
||||||
EOF
|
EOF
|
||||||
sed -i "s/databasepassword/${DB_PWD}/g" /home/pi/Birding-Pi/analyze.py
|
sed -i "s/databasepassword/${DB_PWD}/g" /home/pi/BirdNET-Pi/analyze.py
|
||||||
sed -i "s/databasepassword/${DB_PWD}/g" /home/pi/Birding-Pi/scripts/viewdb.php
|
sed -i "s/databasepassword/${DB_PWD}/g" /home/pi/BirdNET-Pi/scripts/viewdb.php
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# A comprehensive log dumper
|
# A comprehensive log dumper
|
||||||
# set -x # Uncomment to debug
|
# set -x # Uncomment to debug
|
||||||
source /etc/birdnet/birdnet.conf &> /dev/null
|
source /etc/birdnet/birdnet.conf &> /dev/null
|
||||||
LOG_DIR="${HOME}/Birding-Pi/logs"
|
LOG_DIR="${HOME}/BirdNET-Pi/logs"
|
||||||
SERVICES=(avahi-alias@.service
|
SERVICES=(avahi-alias@.service
|
||||||
birdnet_analysis.service
|
birdnet_analysis.service
|
||||||
birdnet_log.service
|
birdnet_log.service
|
||||||
@@ -29,7 +29,7 @@ for i in "${SERVICES[@]}";do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Create password-removed birdnet.conf
|
# Create password-removed birdnet.conf
|
||||||
sed -e '/PWD=/d' ${HOME}/Birding-Pi/birdnet.conf > ${LOG_DIR}/birdnet.conf
|
sed -e '/PWD=/d' ${HOME}/BirdNET-Pi/birdnet.conf > ${LOG_DIR}/birdnet.conf
|
||||||
|
|
||||||
# Create password-removed Caddyfile
|
# Create password-removed Caddyfile
|
||||||
if [ -f /etc/caddy/Caddyfile ];then
|
if [ -f /etc/caddy/Caddyfile ];then
|
||||||
@@ -57,6 +57,6 @@ for i in "${CALLS[@]}";do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# TAR the logs into a ball
|
# TAR the logs into a ball
|
||||||
tar --remove-files -cvpzf ${HOME}/Birding-Pi/logs.tar.gz ${LOG_DIR} &> /dev/null
|
tar --remove-files -cvpzf ${HOME}/BirdNET-Pi/logs.tar.gz ${LOG_DIR} &> /dev/null
|
||||||
# Finished
|
# Finished
|
||||||
echo "Your compressed logs are located at ${HOME}/Birding-Pi/logs.tar.gz"
|
echo "Your compressed logs are located at ${HOME}/BirdNET-Pi/logs.tar.gz"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/edit_birdnet.conf.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/edit_birdnet.conf.sh");
|
||||||
header('Location: http://birdingpi.local:9898');
|
header('Location: http://birdnetpi.local:9898');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ trap '${my_dir}/dump_logs.sh && echo -e "\n\nExiting the installation. Goodbye!"
|
|||||||
cd $my_dir || exit 1
|
cd $my_dir || exit 1
|
||||||
|
|
||||||
if [ "$(uname -m)" != "aarch64" ];then
|
if [ "$(uname -m)" != "aarch64" ];then
|
||||||
echo "Birding-Pi requires a 64-bit OS.
|
echo "BirdNET-Pi requires a 64-bit OS.
|
||||||
It looks like your operating system is using $(uname -m),
|
It looks like your operating system is using $(uname -m),
|
||||||
but would need to be aarch64.
|
but would need to be aarch64.
|
||||||
Please take a look at https://birdnetwiki.pmcgui.xyz for more
|
Please take a look at https://birdnetwiki.pmcgui.xyz for more
|
||||||
@@ -46,7 +46,7 @@ install_deps() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install_birdnet() {
|
install_birdnet() {
|
||||||
cd ~/Birding-Pi || exit 1
|
cd ~/BirdNET-Pi || exit 1
|
||||||
echo "Upgrading pip, wheel, and setuptools"
|
echo "Upgrading pip, wheel, and setuptools"
|
||||||
sudo pip3 install --upgrade pip wheel setuptools
|
sudo pip3 install --upgrade pip wheel setuptools
|
||||||
echo "Fetching the TFLite pre-built binaries"
|
echo "Fetching the TFLite pre-built binaries"
|
||||||
@@ -67,7 +67,7 @@ install_birdnet() {
|
|||||||
|
|
||||||
read -sp "\
|
read -sp "\
|
||||||
Be sure you have read the software license before installing. This is
|
Be sure you have read the software license before installing. This is
|
||||||
available in the Birding-Pi directory as "LICENSE"
|
available in the BirdNET-Pi directory as "LICENSE"
|
||||||
If you DO NOT want to install BirdNET and the birdnet_analysis.service,
|
If you DO NOT want to install BirdNET and the birdnet_analysis.service,
|
||||||
press Ctrl+C to cancel. If you DO wish to install BirdNET and the
|
press Ctrl+C to cancel. If you DO wish to install BirdNET and the
|
||||||
birdnet_analysis.service, press ENTER to continue with the installation."
|
birdnet_analysis.service, press ENTER to continue with the installation."
|
||||||
@@ -93,16 +93,16 @@ echo " BirdNet is installed!!
|
|||||||
'sudo systemctl disable --now birdnet_analysis.service'
|
'sudo systemctl disable --now birdnet_analysis.service'
|
||||||
|
|
||||||
Visit
|
Visit
|
||||||
http://birdingpi.local to see your extractions,
|
http://birdnetpi.local to see your extractions,
|
||||||
http://birdlog.local to see the log output of the birdnet_analysis.service,
|
http://birdlog.local to see the log output of the birdnet_analysis.service,
|
||||||
http://extractionlog.local to see the log output of the extraction.service, and
|
http://extractionlog.local to see the log output of the extraction.service, and
|
||||||
http://birdstats.local to see the Birding-Pi Report"
|
http://birdstats.local to see the BirdNET-Pi Report"
|
||||||
echo
|
echo
|
||||||
read -n1 -p " Would you like to run the birdnet_analysis.service now?" YN
|
read -n1 -p " Would you like to run the birdnet_analysis.service now?" YN
|
||||||
echo
|
echo
|
||||||
case $YN in
|
case $YN in
|
||||||
[Yy] ) sudo systemctl start birdnet_analysis.service \
|
[Yy] ) sudo systemctl start birdnet_analysis.service \
|
||||||
&& journalctl -fu birdnet_analysis;;
|
&& journalctl -fu birdnet_analysis;;
|
||||||
* ) echo " Thanks for installing Birding-Pi!!
|
* ) echo " Thanks for installing BirdNET-Pi!!
|
||||||
I hope it was helpful!";;
|
I hope it was helpful!";;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ REMOTE_RECS_DIR=${REMOTE_RECS_DIR}
|
|||||||
|
|
||||||
## EXTRACTIONS_URL is the URL where the extractions, data-set, and live-stream
|
## EXTRACTIONS_URL is the URL where the extractions, data-set, and live-stream
|
||||||
## will be web-hosted. If you do not own a domain, or would just prefer to keep
|
## will be web-hosted. If you do not own a domain, or would just prefer to keep
|
||||||
## Birding-Pi on your local network, you can set this to http://localhost.
|
## BirdNET-Pi on your local network, you can set this to http://localhost.
|
||||||
## Setting this (even to http://localhost) will also allow you to enable the
|
## Setting this (even to http://localhost) will also allow you to enable the
|
||||||
## GoTTY web logging features below.
|
## GoTTY web logging features below.
|
||||||
|
|
||||||
@@ -355,10 +355,10 @@ PUSHED_APP_SECRET=${PUSHED_APP_SECRET}
|
|||||||
# Keep this EMPTY if you do not want to install NoMachine. #
|
# Keep this EMPTY if you do not want to install NoMachine. #
|
||||||
|
|
||||||
## INSTALL_NOMACHINE is simply a setting that can be enabled to install
|
## INSTALL_NOMACHINE is simply a setting that can be enabled to install
|
||||||
## NoMachine alongside the Birding-Pi for remote desktop access. This in-
|
## NoMachine alongside the BirdNET-Pi for remote desktop access. This in-
|
||||||
## staller assumes personal use. Please reference the LICENSE file included
|
## staller assumes personal use. Please reference the LICENSE file included
|
||||||
## in this repository for more information.
|
## in this repository for more information.
|
||||||
## Set this to Y or y to install NoMachine alongside the Birding-Pi
|
## Set this to Y or y to install NoMachine alongside the BirdNET-Pi
|
||||||
|
|
||||||
INSTALL_NOMACHINE=${INSTALL_NOMACHINE}
|
INSTALL_NOMACHINE=${INSTALL_NOMACHINE}
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ EXTRACTED=${RECS_DIR}/Extracted
|
|||||||
## change this variable between data-sets to preserve records of disparate
|
## change this variable between data-sets to preserve records of disparate
|
||||||
## data-sets according to name.
|
## data-sets according to name.
|
||||||
|
|
||||||
IDFILE=${HOME}/Birding-Pi/IdentifiedSoFar.txt
|
IDFILE=${HOME}/BirdNET-Pi/IdentifiedSoFar.txt
|
||||||
|
|
||||||
## OVERLAP is the value in seconds which BirdNET should use when analyzing
|
## OVERLAP is the value in seconds which BirdNET should use when analyzing
|
||||||
## the data. The values must be between 0.0-2.9.
|
## the data. The values must be between 0.0-2.9.
|
||||||
@@ -457,7 +457,7 @@ EOF
|
|||||||
sudo ln -sf $(dirname ${my_dir})/birdnet.conf /etc/birdnet/birdnet.conf
|
sudo ln -sf $(dirname ${my_dir})/birdnet.conf /etc/birdnet/birdnet.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks for a birdnet.conf file in the Birding-Pi directory for a
|
# Checks for a birdnet.conf file in the BirdNET-Pi directory for a
|
||||||
# non-interactive installation. Otherwise,the installation is interactive.
|
# non-interactive installation. Otherwise,the installation is interactive.
|
||||||
if [ -f ${BIRDNET_CONF} ];then
|
if [ -f ${BIRDNET_CONF} ];then
|
||||||
source ${BIRDNET_CONF}
|
source ${BIRDNET_CONF}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ gotty_url="https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_a
|
|||||||
CONFIG_FILE="$(dirname ${my_dir})/birdnet.conf"
|
CONFIG_FILE="$(dirname ${my_dir})/birdnet.conf"
|
||||||
|
|
||||||
install_scripts() {
|
install_scripts() {
|
||||||
echo "Installing Birding-Pi scripts to /usr/local/bin"
|
echo "Installing BirdNET-Pi scripts to /usr/local/bin"
|
||||||
ln -sf ${my_dir}/* /usr/local/bin/
|
ln -sf ${my_dir}/* /usr/local/bin/
|
||||||
rm /usr/local/bin/index.html
|
rm /usr/local/bin/index.html
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ ${EXTRACTIONS_URL} {
|
|||||||
php_fastcgi unix//run/php/php7.3-fpm.sock
|
php_fastcgi unix//run/php/php7.3-fpm.sock
|
||||||
}
|
}
|
||||||
|
|
||||||
http://birdingpi.local {
|
http://birdnetpi.local {
|
||||||
root * ${EXTRACTED}
|
root * ${EXTRACTED}
|
||||||
file_server browse
|
file_server browse
|
||||||
basicauth /Processed* {
|
basicauth /Processed* {
|
||||||
@@ -271,7 +271,7 @@ ExecStart=/bin/bash -c "/usr/bin/avahi-publish -a -R %I $(avahi-resolve -4 -n %H
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable --now avahi-alias@birdingpi.local.service
|
systemctl enable --now avahi-alias@birdnetpi.local.service
|
||||||
systemctl enable --now avahi-alias@birdlog.local.service
|
systemctl enable --now avahi-alias@birdlog.local.service
|
||||||
systemctl enable --now avahi-alias@extractionlog.local.service
|
systemctl enable --now avahi-alias@extractionlog.local.service
|
||||||
systemctl enable --now avahi-alias@birdstats.local.service
|
systemctl enable --now avahi-alias@birdstats.local.service
|
||||||
@@ -280,7 +280,7 @@ EOF
|
|||||||
install_spectrogram_service() {
|
install_spectrogram_service() {
|
||||||
cat << EOF > /etc/systemd/system/spectrogram_viewer.service
|
cat << EOF > /etc/systemd/system/spectrogram_viewer.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Birding-Pi Spectrogram Viewer
|
Description=BirdNET-Pi Spectrogram Viewer
|
||||||
[Service]
|
[Service]
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
@@ -312,7 +312,7 @@ RestartSec=3
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=${USER}
|
User=${USER}
|
||||||
Environment=TERM=xterm-256color
|
Environment=TERM=xterm-256color
|
||||||
ExecStart=/usr/local/bin/gotty -p 8080 --title-format "Birding-Pi Log" journalctl -o cat -fu birdnet_analysis.service
|
ExecStart=/usr/local/bin/gotty -p 8080 --title-format "BirdNET-Pi Log" journalctl -o cat -fu birdnet_analysis.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@@ -346,7 +346,7 @@ RestartSec=3
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=${USER}
|
User=${USER}
|
||||||
Environment=TERM=xterm-256color
|
Environment=TERM=xterm-256color
|
||||||
ExecStart=/usr/local/bin/gotty -p 9090 --title-format "Birding-Pi Statistics" tmux new -A -s birdstats /usr/local/bin/birdnet_stats.sh
|
ExecStart=/usr/local/bin/gotty -p 9090 --title-format "BirdNET-Pi Statistics" tmux new -A -s birdstats /usr/local/bin/birdnet_stats.sh
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@@ -406,7 +406,7 @@ RestartSec=3
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=pi
|
User=pi
|
||||||
Environment=TERM=xterm-256color
|
Environment=TERM=xterm-256color
|
||||||
ExecStart=/usr/local/bin/gotty -w -p 9898 --title-format "Edit birdnet.conf" tmux new -A -s editbirdnet nano /home/pi/Birding-Pi/birdnet.conf
|
ExecStart=/usr/local/bin/gotty -w -p 9898 --title-format "Edit birdnet.conf" tmux new -A -s editbirdnet nano /home/pi/BirdNET-Pi/birdnet.conf
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@@ -433,7 +433,7 @@ install_icecast() {
|
|||||||
|
|
||||||
config_icecast() {
|
config_icecast() {
|
||||||
if [ -f /etc/icecast2/icecast.xml ];then
|
if [ -f /etc/icecast2/icecast.xml ];then
|
||||||
cp /etc/icecast2/icecast.xml{,.prebirdnetsystem}
|
cp /etc/icecast2/icecast.xml{,.prebirdnetpi}
|
||||||
fi
|
fi
|
||||||
sed -i 's/>admin</>birdnet</g' /etc/icecast2/icecast.xml
|
sed -i 's/>admin</>birdnet</g' /etc/icecast2/icecast.xml
|
||||||
passwords=("source-" "relay-" "admin-" "master-" "")
|
passwords=("source-" "relay-" "admin-" "master-" "")
|
||||||
@@ -446,7 +446,7 @@ install_livestream_service() {
|
|||||||
echo "Installing Live Stream service"
|
echo "Installing Live Stream service"
|
||||||
cat << EOF > /etc/systemd/system/livestream.service
|
cat << EOF > /etc/systemd/system/livestream.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Birding-Pi Live Stream
|
Description=BirdNET-Pi Live Stream
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=XDG_RUNTIME_DIR=/run/user/1000
|
Environment=XDG_RUNTIME_DIR=/run/user/1000
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# ONLY run this additional script if you trust everyone on your
|
# ONLY run this additional script if you trust everyone on your
|
||||||
# local network completely as the credentials are sent WITHOUT
|
# local network completely as the credentials are sent WITHOUT
|
||||||
# any SSL/TLS encryption. For a secure remote connection to your
|
# any SSL/TLS encryption. For a secure remote connection to your
|
||||||
# Birding-Pi command line, consider enabling SSH on the
|
# BirdNET-Pi command line, consider enabling SSH on the
|
||||||
# Raspberry Pi and using another Linux machine or an SSH
|
# Raspberry Pi and using another Linux machine or an SSH
|
||||||
# client software, or you can alternately add the 'tls internal'
|
# client software, or you can alternately add the 'tls internal'
|
||||||
# directive to the Caddyfile to add a self-signed certificate for TLS/SSL
|
# directive to the Caddyfile to add a self-signed certificate for TLS/SSL
|
||||||
@@ -46,7 +46,7 @@ install_tmux() {
|
|||||||
install_web_terminal() {
|
install_web_terminal() {
|
||||||
cat << EOF | sudo tee /etc/systemd/system/birdterminal.service
|
cat << EOF | sudo tee /etc/systemd/system/birdterminal.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=A Birding-Pi Web Terminal
|
Description=A BirdNET-Pi Web Terminal
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/reboot_system.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/reboot_system.sh");
|
||||||
header('Location: http://birdingpi.local/scripts/index.html?success=true');
|
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Reconfigure the Birding-Pi
|
# Reconfigure the BirdNET-Pi
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
uninstall.sh
|
uninstall.sh
|
||||||
${HOME}/Birding-Pi/scripts/install_config.sh
|
${HOME}/BirdNET-Pi/scripts/install_config.sh
|
||||||
sudo ${HOME}/Birding-Pi/scripts/install_services.sh
|
sudo ${HOME}/BirdNET-Pi/scripts/install_services.sh
|
||||||
echo "Birding-Pi has now been reconfigured."
|
echo "BirdNET-Pi has now been reconfigured."
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/restart_birdnet_analysis.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_birdnet_analysis.sh");
|
||||||
header('Location: http://birdingpi.local/scripts/index.html?success=true');
|
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/restart_birdnet_recording.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_birdnet_recording.sh");
|
||||||
header('Location: http://birdingpi.local/scripts/index.html?success=true');
|
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/restart_caddy.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_caddy.sh");
|
||||||
header('Location: http://birdingpi.local/scripts/index.html?success=true');
|
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/restart_extraction.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_extraction.sh");
|
||||||
header('Location: http://birdingpi.local/scripts/index.html?success=true');
|
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/restart_services.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/restart_services.sh");
|
||||||
header('Location: http://birdingpi.local/scripts/index.html?success=true');
|
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
|
|||||||
sudo systemctl start birdnet_recording.service
|
sudo systemctl start birdnet_recording.service
|
||||||
|
|
||||||
SERVICES=(avahi-alias@birdlog.local.service
|
SERVICES=(avahi-alias@birdlog.local.service
|
||||||
avahi-alias@birdingpi.local.service
|
avahi-alias@birdnetpi.local.service
|
||||||
avahi-alias@birdstats.local.service
|
avahi-alias@birdstats.local.service
|
||||||
avahi-alias@extractionlog.local.service
|
avahi-alias@extractionlog.local.service
|
||||||
birdnet_analysis.service
|
birdnet_analysis.service
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/Birding-Pi/scripts/shutdown_system.sh");
|
shell_exec("/home/pi/BirdNET-Pi/scripts/shutdown_system.sh");
|
||||||
header('Location: http://birdingpi.local/scripts/index.html?success=true');
|
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
shell_exec("/home/pi/BirdSongs/Extracted/spectrogram.sh");
|
shell_exec("/home/pi/BirdSongs/Extracted/spectrogram.sh");
|
||||||
header('Location: http://birdingpi.local/spectrogram.png');
|
header('Location: http://birdnetpi.local/spectrogram.png');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Make sox spectrogram
|
# Make sox spectrogram
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
analyzing_now="$(cat /home/pi/Birding-Pi/analyzing_now.txt)"
|
analyzing_now="$(cat /home/pi/BirdNET-Pi/analyzing_now.txt)"
|
||||||
spectrogram_png=${EXTRACTED}/spectrogram.png
|
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 spectrogram -t "Currently Analyzing" -c "${analyzing_now}" -o "${spectrogram_png}"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ ${HOME}/.gotty)
|
|||||||
|
|
||||||
|
|
||||||
SERVICES=(avahi-alias@birdlog.local.service
|
SERVICES=(avahi-alias@birdlog.local.service
|
||||||
avahi-alias@birdnetsystem.local.service
|
avahi-alias@birdnetpi.local.service
|
||||||
avahi-alias@birdstats.local.service
|
avahi-alias@birdstats.local.service
|
||||||
avahi-alias@extractionlog.local.service
|
avahi-alias@extractionlog.local.service
|
||||||
avahi-alias@birdterminal.local.service
|
avahi-alias@birdterminal.local.service
|
||||||
@@ -109,5 +109,5 @@ remove_scripts() {
|
|||||||
remove_services
|
remove_services
|
||||||
remove_scripts
|
remove_scripts
|
||||||
if [ -d /etc/birdnet ];then sudo rm -drf /etc/birdnet;fi
|
if [ -d /etc/birdnet ];then sudo rm -drf /etc/birdnet;fi
|
||||||
if [ -f ${HOME}/Birding-Pi/birdnet.conf ];then sudo rm -f ${HOME}/Birding-Pi/birdnet.conf;fi
|
if [ -f ${HOME}/BirdNET-Pi/birdnet.conf ];then sudo rm -f ${HOME}/BirdNET-Pi/birdnet.conf;fi
|
||||||
echo "Uninstall finished. Remove this directory with 'rm -drfv' to finish."
|
echo "Uninstall finished. Remove this directory with 'rm -drfv' to finish."
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ TMPFILE=$(mktemp) || exit 1
|
|||||||
|
|
||||||
[ -f ${IDFILE} ] || touch ${IDFILE}
|
[ -f ${IDFILE} ] || touch ${IDFILE}
|
||||||
|
|
||||||
if [ $(find ${PROCESSED} -name '*csv' | wc -l) -ge 1 ];then
|
if [ $(find ${PROCESSED} -name '*csv' | wc -l) -ge 1 ] &> /dev/null;then
|
||||||
sort $(find ${PROCESSED} ${ANALYZED} ${EXTRACTED} -name '*csv') \
|
sort $(find ${PROCESSED} ${ANALYZED} ${EXTRACTED} -name '*csv') \
|
||||||
| awk -F\; '!/Scientific/ {print"Common Name: " $4 "\nScientific Name: " $3""}' \
|
| awk -F\; '!/Scientific/ {print"Common Name: " $4 "\nScientific Name: " $3""}' \
|
||||||
| uniq > "$TMPFILE"
|
| uniq > "$TMPFILE"
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$dbhost = 'localhost';
|
$dbhost = 'localhost';
|
||||||
$dbuser = 'birder';
|
$dbuser = 'birder';
|
||||||
$dbpass = 'databasepassword';
|
$dbpass = 'maddypaddy';
|
||||||
$dbname = 'birds';
|
$dbname = 'birds';
|
||||||
$mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
|
$mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ ${EXTRACTIONS_URL} {
|
|||||||
}
|
}
|
||||||
reverse_proxy /stream localhost:8000
|
reverse_proxy /stream localhost:8000
|
||||||
}
|
}
|
||||||
http://birdingpi.local {
|
http://birdnetpi.local {
|
||||||
root * ${EXTRACTED}
|
root * ${EXTRACTED}
|
||||||
file_server browse
|
file_server browse
|
||||||
basicauth ${PROCESSED}* {
|
basicauth ${PROCESSED}* {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ ${EXTRACTIONS_URL} {
|
|||||||
birdnet ${HASHWORD}
|
birdnet ${HASHWORD}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
http://birdingpi.local {
|
http://birdnetpi.local {
|
||||||
root * ${EXTRACTED}
|
root * ${EXTRACTED}
|
||||||
file_server browse
|
file_server browse
|
||||||
basicauth ${PROCESSED}* {
|
basicauth ${PROCESSED}* {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Birding Pi</title>
|
<title>BirdNET-Pi</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<style>
|
<style>
|
||||||
@@ -320,12 +320,12 @@ footer {
|
|||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h1>
|
<h1>
|
||||||
<a href="https://github.com/mcguirepr89/BirdNET-Lite">🕊 Birding Pi</a>
|
<a href="https://github.com/mcguirepr89/BirdNET-Lite">🕊 BirdNET-Pi</a>
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
<hr>
|
<hr>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="http://birdingpi.local:9090">
|
<a href="http://birdnetpi.local:9090">
|
||||||
<span class="name">🐦 Recognized Birds</span>
|
<span class="name">🐦 Recognized Birds</span>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
@@ -353,7 +353,7 @@ footer {
|
|||||||
<td>
|
<td>
|
||||||
<a href="./By_Common_Name/">
|
<a href="./By_Common_Name/">
|
||||||
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
||||||
<span class="name">By_Common_Name</span>
|
<span class="name">By Common Name</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -362,7 +362,7 @@ footer {
|
|||||||
<td>
|
<td>
|
||||||
<a href="./By_Date/">
|
<a href="./By_Date/">
|
||||||
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
||||||
<span class="name">By_Date</span>
|
<span class="name">By Date</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -371,7 +371,7 @@ footer {
|
|||||||
<td>
|
<td>
|
||||||
<a href="./By_Scientific_Name/">
|
<a href="./By_Scientific_Name/">
|
||||||
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
||||||
<span class="name">By_Scientific_Name</span>
|
<span class="name">By Scientific Name</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -406,7 +406,7 @@ footer {
|
|||||||
<tr class="file">
|
<tr class="file">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="http://birdingpi.local:8080">
|
<a href="http://birdnetpi.local:8080">
|
||||||
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
||||||
<span class="name">⚙ Analysis Log</span>
|
<span class="name">⚙ Analysis Log</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -415,7 +415,7 @@ footer {
|
|||||||
<tr class="file">
|
<tr class="file">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="http://birdingpi.local:8888">
|
<a href="http://birdnetpi.local:8888">
|
||||||
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
<svg width="1.5em" height="1em" version="1.1" viewBox="0 0 317 259"><use xlink:href="#folder"></use></svg>
|
||||||
<span class="name">⚝ Extraction Log</span>
|
<span class="name">⚝ Extraction Log</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -444,7 +444,7 @@ footer {
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
Help:<a rel="noopener noreferrer" href="https://birdnetwiki.pmcgui.xyz/">🕊 Birding Pi Wiki</a>
|
Help:<a rel="noopener noreferrer" href="https://birdnetwiki.pmcgui.xyz/">🕊 BirdNET-Pi Wiki</a>
|
||||||
</footer>
|
</footer>
|
||||||
<script>
|
<script>
|
||||||
var filterEl = document.getElementById('filter');
|
var filterEl = document.getElementById('filter');
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Birding-Pi Live Stream
|
Description=BirdNET-Pi Live Stream
|
||||||
[Service]
|
[Service]
|
||||||
Environment=XDG_RUNTIME_DIR=/run/user/1000
|
Environment=XDG_RUNTIME_DIR=/run/user/1000
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#birdnet
|
#birdnet
|
||||||
*/1 * * * * /usr/local/bin/species_notifier.sh &> /dev/null
|
*/2 * * * * /usr/local/bin/species_notifier.sh &> /dev/null
|
||||||
|
|||||||
+2
-2
@@ -11,12 +11,12 @@ set-window-option -g mode-keys vi
|
|||||||
|
|
||||||
set-option -g status-interval 5
|
set-option -g status-interval 5
|
||||||
set-option -g status 2
|
set-option -g status 2
|
||||||
set-option -g status-format[1] '#[bg=cyan,fg=black]#[align=left][Birding-Pi] #[bg=cyan]#[align=centre]#(vcgencmd measure_temp) #(vcgencmd get_throttled)#[align=right]#(~/Birding-Pi/scripts/disk_usage.sh)%l:%M%p'
|
set-option -g status-format[1] '#[bg=cyan,fg=black]#[align=left][BirdNET-Pi] #[bg=cyan]#[align=centre]#(vcgencmd measure_temp) #(vcgencmd get_throttled)#[align=right]#(~/BirdNET-Pi/scripts/disk_usage.sh)%l:%M%p'
|
||||||
set-option -g status-style bg=magenta,fg=cyan
|
set-option -g status-style bg=magenta,fg=cyan
|
||||||
set-option -g status-justify centre
|
set-option -g status-justify centre
|
||||||
set-option -g status-left-length 50
|
set-option -g status-left-length 50
|
||||||
set-option -g status-left '#[fg=brightyellow]arm clock #(vcgencmd measure_clock arm)'
|
set-option -g status-left '#[fg=brightyellow]arm clock #(vcgencmd measure_clock arm)'
|
||||||
set-option -g status-right '#[fg=brightyellow]%A, %B %e#(~/Birding-Pi/scripts/pretty_date.sh)'
|
set-option -g status-right '#[fg=brightyellow]%A, %B %e#(~/BirdNET-Pi/scripts/pretty_date.sh)'
|
||||||
|
|
||||||
bind r source-file /etc/tmux.conf \; display "Reloaded!"
|
bind r source-file /etc/tmux.conf \; display "Reloaded!"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user