GithubHelp home page GithubHelp logo

mzakharo / birdnetapp Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 1.0 7.84 MB

BirdNET App for RaspberryPi/BeagleBone.

License: Apache License 2.0

Python 52.56% Shell 0.47% Makefile 0.25% HTML 3.99% Dart 42.73%
birdnet birdnet-pi influxdb influxdb-python influxdb2 telegram telegram-bot beaglebone beaglebone-black raspberry-pi

birdnetapp's Introduction

birdnetapp

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.

Assumptions

Installation

  • cd $HOME
git clone --recurse-submodules https://github.com/mzakharo/birdnetapp.git
  • Copy config.example.yaml to config.yaml and fill in the details according to your hardware and environment

Optional: reduce SD card wear

  • 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

Installation (continued.)

  • 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 and birdnet_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 

Web App

  • 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]

Influx Query for the Bar Gauge Grafana Widget

 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: ""})

birdnetapp's People

Contributors

mzakharo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mryan1

birdnetapp's Issues

Problem with detected cards

Hey there,

I'm trying to install birdnetapp on my raspberry pi for I find the solution with Telegram and InfluxDB very interessting! I had some problems, which I was able to solve (install missing modules, load secrets.py-file), but unfortunately my very rudmientary skills in python and the alsaaudio module are not good enough for the following problem. It seems that birdnetapp is not able to find my microphone and use it. When I try to start the main.py it stops with the following error:

INFO:birdnetapp:detected cards ['Headphones', 'Microphones', 'vc4hdmi0', 'vc4hdmi1'] configuring: Device
Traceback (most recent call last):
File "/home/pi/birdnetapp/main.py", line 2, in
main()
File "/home/pi/birdnetapp/birdnetapp/init.py", line 276, in main
stream.open()
File "/home/pi/birdnetapp/birdnetapp/init.py", line 190, in open
card_i = cards.index(self.card)
ValueError: 'Device' is not in list

How can I solve this?

Thanks in advance and kind regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.