Fork of AvianVisitors with local customizations (configurable title, matte dimensions, interactive installer)
  • PHP 35.3%
  • JavaScript 35.2%
  • Shell 12.9%
  • Python 8.3%
  • CSS 7.1%
  • Other 1.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-29 09:20:06 -05:00
.github [CI] test: run checks on the release branch 2026-08-20 10:35:12 -07:00
avian Enable bird-name labels on the frame collage now that the render race is fixed 2026-08-29 09:20:06 -05:00
custom_components/avian_visitors Add Manual Refresh button entity to Home Assistant integration 2026-08-28 20:42:27 -05:00
docs docs(release): prepare Avian Visitors v1.1.0 2026-08-28 15:04:37 -07:00
extras/archive feat(frontend): refine settings and offer classic Atlas 2026-08-28 15:01:23 -07:00
frame [FIX] frame: empty-nest/missing-birds render race, plus hour rounding 2026-08-29 09:13:38 -05:00
homepage fix(security): enforce the LAN policy across server routes 2026-08-26 20:26:45 -07:00
model we previously merged both BirdNET label files, not realising one had traditional and the other simplified Chinese, so split properly and have both Chinese variants now. 2025-11-29 16:57:13 +01:00
scripts fix(caddy): reject the filesystem root as a webroot 2026-08-28 15:02:23 -07:00
templates cleanup: no need to edit phpsysinfo.ini, change it in the repo 2025-10-11 16:10:20 +02:00
tests test(release): cover version 1.1 integration boundaries 2026-08-28 15:02:53 -07:00
.flake8 do not override line lenght 2025-11-22 18:35:55 +01:00
.gitignore [CHORE] release: ignore local archives and working references 2026-08-19 09:22:47 -07:00
illustration-bundles.md Add Canberra / ACT, Australia (AU-ACT) illustration bundle (#65) 2026-08-18 11:31:17 -07:00
LICENSE Update LICENSE 2022-05-15 12:28:06 -04:00
newinstaller.sh AvianVisitors hardening pass — install via fork's newinstaller 2026-05-28 10:49:41 -07:00
README.md feat(frontend): refine settings and offer classic Atlas 2026-08-28 15:01:23 -07:00
README.upstream.md AvianVisitors: BirdNET-Pi collage frontend overlay 2026-05-28 10:14:25 -07:00
requirements.txt make testable in github action 2025-11-17 18:44:27 +01:00
version.md Feat : limit the number of audio files to keep per species (#121) 2024-07-12 18:18:27 +02:00

AvianVisitors

A live bird collage from your window.

See it running at bird.onethreenine.net.

avianvisitors collage

BOM

Qty Description Price Link Notes
1 Raspberry Pi (4B / 5 / 3A+ / Zero 2W) ~$25-80 Amazon See note for 512 MB Pis
1 Micro SD Card (≥32 GB) ~$10 Amazon
1 USB lavalier microphone $16.95 Amazon
1 Pi power supply ~$10 -

Optional: a Gemini API key to restyle illustrations, an eBird API key to filter species by region.

Kits

I offer the bird mic and the wall frame as separate electronics kits. I put up a store for some of my open-source projects and will soon be able to offer kits cheaper than buying all the components individually, once I start buying in bulk.


1. Flash the SD card

Use Raspberry Pi Imager. Pick Raspberry Pi OS Lite (64-bit). In the customisation dialog set:

  • Username
  • WiFi SSID + password
  • Hostname: birdnet
  • Enable SSH with password auth

Plug the USB mic into the Pi. Place the capsule in a window or mount it outside. Boot.


2. Run the installer

Installer assumes passwordless sudo (Raspberry Pi OS Lite default - if you've tightened it, run sudo raspi-config -> System Options -> restore the default first).

ssh <your-username>@birdnet.local
curl -s https://raw.githubusercontent.com/Twarner491/AvianVisitors/avian-visitors/newinstaller.sh | bash

Clones this fork, installs BirdNET-Pi, symlinks the AvianVisitors overlay into the Caddy web root. Takes 20-40 minutes. Reboots when done.

Collage: http://birdnet.local/. Stock BirdNET-Pi UI: http://birdnet.local/index.php. The menu button in the top right opens an admin overlay with Settings, System, Logs, and Tools.

Stock BirdNET-Pi pages still render, but privileged legacy controls are not enabled. Use the Avian Visitors menu for the station controls it exposes, and SSH for remaining maintenance.

Optional Google Drive backups are set up under Settings → Nightly Drive backup. Local cleanup stays unavailable until an archive run has been verified.

Local admin access

Optional password protection for local administrator controls can be enabled in Settings. Public bird pages remain available without signing in, while live audio is unavailable when protection is on.

If no password is configured, or the state is missing or invalid, recover it from an SSH session:

sudo /usr/local/sbin/avian-admin-control password-reset

The command prompts privately for a new password. Return to Settings after it finishes.

Updating an existing station

For the first v1 update, keep the existing checkout and run:

upgrade=$(mktemp "$HOME/avian-v1-upgrade.XXXXXX")
curl -fsSL https://raw.githubusercontent.com/Twarner491/AvianVisitors/avian-visitors/scripts/bootstrap_v1.sh -o "$upgrade"
sudo bash "$upgrade"
rm -f "$upgrade"

After v1, use Tools → Pull latest or run:

cd ~/BirdNET-Pi
./scripts/update_birdnet.sh

The updater keeps generated mask data and stops if tracked files have local edits. If its service setup needs repair, use Tools → Reinstall services or run:

cd ~/BirdNET-Pi
./scripts/reinstall_services.sh

3. (Optional) Restyle the illustrations

The repo ships with 666 bundled illustrations (333 species, perched + flight). To restyle them or generate a set for your own region:

pip install -r ~/BirdNET-Pi/avian/scripts/requirements.txt
export GEMINI_API_KEY='your-key'  # image generation requires billing enabled

# generate on a cream ground, cut the ground off, rebuild the collage masks
python3 ~/BirdNET-Pi/avian/scripts/pregen.py --labels ~/BirdNET-Pi/model/labels.txt --force
python3 ~/BirdNET-Pi/avian/scripts/cutout.py
python3 ~/BirdNET-Pi/avian/scripts/build_masks.py

On a Pi with 4 GB of RAM or less, add --model u2net to the cutout.py command; the default model may be OOM-killed.

Filter to your region with --ebird-region US-CA (needs EBIRD_API_KEY). The full pipeline, prompt, reference images, and per-species tuning live in avian/scripts/README.md. Style lives in prompt.template.md.

See illustration bundles for pregenerated bundles shared by other folks in the community, or share your own for others to use!


4. (Optional) Forward off your LAN

See avian/forwarding/ for three independent recipes:

  • Cloudflare Tunnel for a public HTTPS URL.
  • Home Assistant REST sensor that exposes the latest detection.
  • MQTT bridge that publishes every new detection.

Repo layout

avian/                  # everything we add to BirdNET-Pi
├── frontend/           # static HTML/JS/CSS for the collage
├── assets/             # 666 bundled illustrations + photo-cutout fallbacks
├── api/                # PHP shims served by BirdNET-Pi's PHP-FPM
├── scripts/            # generate -> cutout -> masks pipeline + prompt
└── forwarding/         # optional HA / MQTT / Cloudflare configs
frame/                  # optional e-ink wall display

Everything outside avian/ and frame/ is upstream BirdNET-Pi.


Wall frame

An optional e-ink frame mirrors the last 24h of birds onto a panel by your window. Build it from frame/. It can run off your own BirdNET mic, or standalone from BirdWeather data for any ZIP code with no mic at all.


License

CC-BY-NC-SA-4.0, inherited from BirdNET-Pi. Non-commercial use only. See the BirdNET-Pi README for full Cornell attribution.