BirdNET App for raspberry Pi that saves bird sightings to Influx, alerts over Telegram
- User has access to an InfluxDB instance
- User has telegram bot token and chat id
- clone BirdNet-Analyzer repository https://github.com/kahst/BirdNET-Analyzer.git to
/home/pi
- follow BirdNet-Analyzer README instructions for Ubuntu/Linux.
- clone this repository to
/home/pi
- in
birdnetapp
folder of this repository, create a secrets.py with the following contents:
TELEGRAM_TOKEN = 'blah'
TELEGRAM_CHATID = '-XXXXX'
INFLUX_URL = "http://host:PORT"
INFLUX_TOKEN= "XXXXXX"
- 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 filliup up the SD card:
sudo apt remove rsyslog
- Move journal to ram edit
/etc/systemd/journald.conf
:
Storage=volatile
RuntimeMaxUse=64M
sudo systemctl restart systemd-journald
- Install dependencies via
pip3 install -r requirements.txt
sudo apt install sox ffmpeg
- run the server:
cd /home/pi/BirdNET-Analyzer && python3 server.py
- Edit config.py and adjust Microphone (
RATE
,CARD
,CHANNELS
), and birdnet (LON
/LAT
) settings - run the app: `cd /home/pi/birdnetapp && python3 main.py'
- Optional: install systemd services to run on startup
birdnet_main.service
andbirdnet_server.service
- default influx bucket is
main
, orghome
. Change this withORG
andBUCKET
variables in config.py - Telegram notification cooldown is controlled by
SEEN_TIME
variable in config.py. If a bird has been seen within this time window, it will not trigger notificaitons - default recording save directory is specified in config.py,
SAVEDIR
variable - User can expose
SEVEDIR
directory over web broser throughbirdnet_browser.service