BirdNET App for Raspberry Pi/BeagleBone
-
24/7 recording from a USB microphone
-
local BirdNET analysis
-
Influx2 Database support
-
Telegram alerts
-
Web App for listening & visualizing captured audio
-
Grafana visualizing data from Influx2 Database:
- Sample Telegram Notificaiton:
- Web App to listen to and visualize recorded content.
- User has access to an Influx2 database instance (you can get a free one at influxdata.com)
- User has a telegram bot token and a chat id
- cd
$HOME
git clone --recurse-submodules https://github.com/mzakharo/birdnetapp.git
- Copy
config.example.yaml
toconfig.yaml
and fill in the details according to your hardware and environment
- setup
/tmp
as ramdisk:
sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount
sudo systemctl enable tmp.mount
sudo systemctl start tmp.mount
- Disable rsyslog
sudo apt remove rsyslog
- Move journal to ram edit
/etc/systemd/journald.conf
:
Storage=volatile
RuntimeMaxUse=64M
sudo systemctl restart systemd-journald
-
Install requirements via
sudo apt install sox ffmpeg libasound2-dev
-
for Beaglebone: Use BirdNET-Analyzer @
5b6d1c3
. As this is the last model that is fast enough for this platform -
for BeagleBone:
sudo apt instal llvm-dev libatlas-base-dev libsndfile1
-
for BeagleBone:
pip3 install numba==0.56.4
-
for BeagleBone:
pip3 install beaglebone/tflite_runtime-2.16.0-cp39-cp39-linux_armv7l.whl
-
Install dependencies via
pip3 install -r requirements.txt
-
Run the server:
cd $HOME/birdnetapp/BirdNET-Analyzer && python3 server.py
-
Run the app:
cd $HOME/birdnetapp && python3 main.py
-
Optional: install systemd services to run on startup via
birdnet_main.service
andbirdnet_server.service
sudo cp [email protected] /lib/systemd/system/
sudo cp [email protected] /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable birdnet_server@$USER.service
sudo systemctl start birdnet_server@$USER.service
sudo systemctl status birdnet_server@$USER.service
sudo systemctl enable birdnet_main@$USER.service
sudo systemctl start birdnet_main@$USER.service
sudo systemctl status birdnet_main@$USER.service
- install deps in system:
sudo pip3 install flask tzlocal gunicorn
- Serve the Web App by running
./flask.sh
- Optional: install a systemd service file to run on startup via
[email protected]
from(bucket: "main")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "birdnet")
|> count()
|> group()
|> sort(desc:true)
|> keep(columns: ["_field", "_value"])
|> rename(columns: { _value: ""})