c0wsaysmoo/plane-tracker-rgb-pi
关于
A passion project years in the making. The tracker runs as a system service on a Raspberry Pi driving a 64×32 RGB LED matrix and is configured entirely through a web UI. It shows the time, weather, moon phases, overhead flights, active alerts, and can track specific flights end-to-end. Multiple clocks in the same house sync intelligently so you're never burning duplicate API credits. With all of the vibe coding flight trackers, I'm not sure how many people are still using this.
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +2
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Overview
A passion project years in the making. The tracker runs as a system service on a Raspberry Pi driving a 64×32 RGB LED matrix and is configured entirely through a web UI. It shows the time, weather, moon phases, overhead flights, active alerts, and can track specific flights end-to-end. Multiple clocks in the same house sync intelligently so you're never burning duplicate API credits. With all of the vibe coding flight trackers, I'm not sure how many people are still using this.
What's New (November 2026)
Easier setup
- One-command installer —
setup/install.shdoes the whole install for you: packages, the matrix library, the bonnet, the panel test, the service, and everything below. If the Pi reboots or your SSH connection drops part-way, run it again and it picks up where it left off. - WiFi setup hotspot — if the clock can't find its WiFi (new router, moved house), it opens a PlaneTracker-Setup network and shows a QR code on the display. Scan it with your phone, pick your network, done.
Stability
- Memory leaks fixed — the clock no longer slowly fills up the Pi's RAM over days of running.
- Compressed RAM swap instead of SD-card swap (what used to freeze Pi 3s), a hardware watchdog that reboots a frozen Pi, and logs that survive a reboot.
- Optional network watchdog that restarts WiFi if it drops.
- The airport and city databases now live on disk instead of in memory, and the web page runs inside the tracker instead of as a second program — both big memory savings on a Pi 3.
Tracked flights
- Connecting trips — track the first flight, then press + Leg for each connection. The display shows "Leg 1/3" and moves to the next flight when each one lands.
- Flights already in the air are picked up right away, and the picker lists the airborne flight plus upcoming departures of the same flight number so you can choose the right one.
- Fixed a case where the route API sent the departure time of a different leg, which made the clock wait instead of tracking.
- Over the ocean the display now names the sea or ocean the flight is crossing.
Alerts
- Air quality (AQI) — shows
AQI ###when the air reaches Unhealthy. Works with no key; add a free AirNow key for EPA station readings. - The ISS alert now shows ISS VIS while the station is actually passing overhead.
Web page
- New Unknowns page (under Logs) listing airline, airport and aircraft codes the clock didn't recognise.
- Color-coded CPU load and temperature on the config page.
- Stats maps place airports more reliably when two airports share a code.
- Bigger airline, airport and aircraft-type databases.
Web Configuration & Clock Mirror
Open a browser on any device on your network and go to http://hostname.local:8080 (use the Pi's hostname, not your username).
From this page you can:
- Fill out and update all settings — including WiFi network — without touching any raw files
- View system stats and current API usage per service at the bottom
- Mirror the clock display live in your browser, with a pop-out option that floats always-on-top and is freely resizable — useful for keeping an eye on the display from another room or monitor
Upgrading from an older version? Make a copy of your existing config file before pulling, then use it to fill in the new config format.
WiFi Setup Hotspot
New router or moved house? If the Pi can't join any saved WiFi network within about 90 seconds of booting, it opens its own open network called PlaneTracker-Setup and the clock shows a setup screen. Join that network on your phone and a page pops up (or go to http://10.42.0.1) where you pick your new WiFi and type the password. The Pi connects and goes back to being a clock — no SD card or keyboard needed.
Stability
The clock is built to run for months without being touched:
- Compressed RAM swap instead of swapping to the SD card, which is what used to freeze Pi 3s
- Hardware watchdog — if the Pi ever hangs it reboots itself within about 15 seconds
- Network watchdog (optional) — restarts WiFi if it drops and reboots if it's still offline after ~12 minutes
- Logs that survive a reboot, so if something goes wrong you can see why
- Memory leaks fixed, so it no longer slowly fills up the Pi's RAM
The installer sets all of this up for you.
Clock Screen
- Displays time, date, current temperature, and forecast
- Forecast modes:
- 3-day forecast — the default view showing three days at a glance
- Daily forecast — breaks the current day into Morning / Afternoon / Evening / Night periods
- Hybrid — automatically shows the daily breakdown during certain hours of the day and switches to the 3-day view the rest of the time; configure the time windows in the config
- Temperature color is based on current humidity (white → blue gradient)
- Time color shifts at sunrise and sunset
- Date line shows moon phase with a purple-to-white gradient that tracks the lunar cycle
- Display dims at predefined times set in the config
- Toggle between 12 hr / 24 hr and imperial / metric
Alerts
When enabled, the clock scales down and shows active alerts beneath it. All alerts sync to a secondary screen if you run one.
- FAA Airport Alerts — ground stops, departure delays, and more for major US airports
- NWS Weather Alerts — real-time warnings for your local area
- ISS Pass-by Countdown — live countdown when the ISS is minutes away from passing overhead (works anywhere)
- Air Quality (AQI) — shows
AQI ###when the air quality reaches Unhealthy (151+), colored by severity. Uses EPA AirNow station data if you add the free AirNow key, otherwise a free estimate from Open-Meteo (no key needed). US only; turns on and off with the NWS weather alerts
Flight Tracker Screen
Detects aircraft in your bounding box every 30 seconds via OpenSky and displays:
Origin → Destination airport codes with distances to each
Airport codes color-coded by delay status:
Departure delay Color 0–20 min Green 20–40 min Yellow 40–60 min Orange 1–4 hrs Red 4–8 hrs Purple 8+ hrs Blue Arrival Color On time / early Green 0–30 min late Yellow 30–60 min late Orange 1–4 hrs late Red 4–8 hrs late Purple 8+ hrs late Blue Grey = actual time not yet available (common near airports)
Arrow between codes acts as a progress bar: red at departure, green near arrival
Airline IATA name, flight number, abbreviated aircraft type, and distance / direction / altitude to your location
Airline ICAO logo — especially useful for regional carriers operating under multiple brands (e.g., Republic Airways flying as United Express, Delta Connection, or American Eagle)
Tracked Flight
Track a specific flight from departure to landing via the web UI at http://hostname.local:8080.
How to use:
- Enter a flight number (must use the 3-letter ICAO airline code — e.g., UAL1134 not UA1134)
- If the flight is active, tracking starts immediately
- If it hasn't departed yet, save it and tracking begins automatically once ADSB confirms wheels-up — no credits burned until then
- Regional flights may not be supported due to API constraints
What the display shows:
- Airline logo, name, and route in the header
- Dynamic progress bar with a moving arrow icon (turns red when live position data is unavailable, e.g. over the ocean)
- Bottom line: time and distance remaining, aircraft type, airspeed, and altitude with a climb/descent indicator
- When the flight lands, the display automatically returns to the weather forecast
- Overhead flight detection continues normally throughout
The "Waterfall" API Stack
The system exhausts free tiers before touching paid ones, and rotates through multiple keys automatically:
| Service | Role | Cost |
|---|---|---|
| ADSB.lol/OpenSky Network | Primary position scout — required | Free |
| AirLabs | 1,000 credits/mo | Free |
| FlightAware | 1,000 lookups | Free 5$ worth of credits a month |
| FlightRadar24 | 30,000 lookups | 9$/mo |
Stack as many keys as you want across providers. The system rotates automatically. You can order them however you wish based on what accounts you have. You also can have 1 or all 3 providers.
Credit efficiency features:
- ADSB signal must confirm takeoff before any route API is called
- ETA calculated locally from current airspeed, position, and descent pattern — no repeated polling
- Most flights consume one credit total for the entire tracking duration
Master / Slave Multi-Clock Sync
For households with multiple clocks:
- One Pi is designated Master — it handles all API lookups and weather fetching
- Slave units pull data from the Master over the local network
- Single weather API key covers all clocks
- The loading pulse in the top-right corner tells you status at a glance:
- White — pinged OpenSky
- Yellow — route found via AirLabs
- Green — route found via FR24 (or Slave connected to Master)
- Cyan — route found via FlightAware
- Red — Slave cannot reach Master
Flight Logs & Email Alerts
The tracker logs the closest and farthest flights it detects:
- Top N closest flights to your location (configurable via
MAX_CLOSEST) - Top N farthest flights by origin or destination (configurable via
MAX_FARTHEST)
Automatic email alerts fire when a new record is set, sent from [email protected] with flight details and a link to an interactive map (link valid 30 days; maps also always viewable on your local web page). Emails can be disabled while keeping the log files and local web stats.
Statistics Dashboard
The web UI includes a stats dashboard showing real-time analytics: average daily flight counts, per-service API usage, and projected monthly consumption — so you can pick the API combination that matches your local sky traffic.
System Service
The tracker runs as a dedicated system service rather than via crontab, so it starts on boot and restarts itself if it ever crashes. The installer sets this up; see Useful commands below to start, stop, or check on it.
Credits
Built on Colin Waddell's its-a-plane-python. Additional forks and inspiration from a10kiloham, yashmulgaonkar, and ajplotkin — thanks especially to ajplotkin for the alerts feature.
This is a solo passion project built entirely in my spare time. Every feature you see has been researched, coded, tested, and debugged by myself. As the feature set grows, so does the complexity of keeping everything working together. I do my best to keep things stable, but please be patient and kind if something isn't perfect as it's getting very time consuming to test each feature every time I update. If you'd like to show your appreciation (especially if I help you troubleshoot), consider getting me a coffee! I've shared this project in good faith—please don't take advantage of it. paypal.me/c0wsaysmoo
Please please please reread the instructions carefully if you have any issues. Most issues are by not following them properly. If you absolutly can't figure it out shoot me a message. I am also on reddit under Mediocre-Opposite225
https://github.com/user-attachments/assets/854f535a-4aa3-4a97-8ee5-4d9e60f76eaf
Had to remount the Pi since the display ribbon bumped into the panel
The difference in size between P4 and P2.5 panel. I use P4 for the living room and P2.5 for my desk.
The close.txt file. Farthest.txt looks the same.
Map will show the top 3 (by default) farthest flights, and the top 3 closest ping'd flights to your location. Solid lines is the flown section and dashed is unflown. Uses actual flight path travelled (if available) then uses calculated Great-circle distance for the remainder. If no flight path travelled available then uses Great-circle distance for both. (If you want to reset your maps to take advantage of the newer flight path data, delete the farthest.txt file and reboot)
The email
The local webpage to track flights or to look at your maps/logs/stats. You can look at the overall stats or click on the dates at the bottom to look at stats for individual days
https://github.com/user-attachments/assets/1944d063-83e5-4118-aad3-f6a9678fa22f
How the display looks while it is tracking a flight
Showing a weather alert and an airport alert. If there are multiple alerts it cycles between them every 4 seconds.
If it boots up and it can't find the network after 90 seconds it'll create a hotspot and give you a QR code to connect to wifi
Hardware Overview:
This is what I used to make mine. Other than the Pi and the Bonnet you can use whatever you want. You will need a computer with a SD card reader to setup the Pi and to do the install. You won't need it after it is setup.
- Raspberry Pi 3A+ You can use the Pi 3B+/Pi 4 as well. (If you use a Pi 4 you'll need to adjust the "GPIO_SLOWDOWN" in the config file since it's more powerful than the Pi 3). It's just more expensive and you don't need the ethernet jack. You can also get them at Microcenter. I tried with a Pi Zero, but couldn't get rid of the flicking completely even with soldering. I have not tried with a Pi 5, it requires different instructions with the Bonnet. If someone gets it running on the Pi 5 please let me know and I'll update the instructions.
- Adafruit bonnet
- 64x32 RGB P4 panel (I used a P4 panel measuring approximately 10 inches by 5 inches. If you prefer a smaller screen, you can opt for P3 or P2.5 panels etc, as long as they are 64x32 in size. These are available on Amazon and other websites. If the colors appear inverted, adjust the display file by changing 'RGB' to 'RBG.')
- Tinted acrylic makes the screen so much easier to read and looks nicer 10/10 recommend. Keep in mind that the acrylic panel is slightly larger than the P4 screen when you make the case.
- double sided tape (I use it to attach the acrylic to the panel)
- MicroSD card (any size)
- 5V 4A power supply (powers both the Pi and the bonnet)
- CPU heatsink (this is the smaller heatsink)
- 2x20 pin extender to prevent the bonnet from resting on it (the smaller heatsink you may not need the extender, but a normal size heatsink you will)
- Optional power button (though not really necessary)
- Soldering iron only required for PWM bridge or power button. The Pi 3 seems to be ok without the PWM bridge, but anything less and you'll want to.
- The case I built using a strip of 2in x 1/4in wood that I clampted and glued togother.
- However my friend made this case that you can 3D print.
- M2.5 machine screws to screw the bonnet onto the Pi and to screw the Pi onto the case from Ace Hardware.
Getting Your API Keys
Before starting the setup, sign up for the following APIs. The free tiers are sufficient to get started.
| Service | Purpose | Sign Up |
|---|---|---|
| Tomorrow.io | Weather data | app.tomorrow.io/signup |
| OpenSky Network | Primary flight detection (required) | opensky-network.org |
| AirLabs | Route & status data (1,000 free credits/mo) | airlabs.co/signup |
| FlightAware AeroAPI | Route lookup fallback ($5 free credit/mo which is about 1,000 calls) | flightaware.com/aeroapi/signup/personal |
| Flight Radar 24 | Route lookup fallback ($9 subscription a month but 30,000 calls.) | fr24api.flightradar24.com/docs/getting-started. |
| AirNow (optional) | More accurate air quality (AQI) alerts from EPA stations — free. Without it the clock uses a free estimate instead | docs.airnowapi.org/account/request |
Have these keys handy — you'll enter them on the Configuration page at the end of setup.
Each provider offers free credits that the system will automatically rotate through before moving to the next tier. You can stack multiple keys from the same provider to extend your capacity.
- Single key for both AirLabs + FlightAware → ~66 flights/day
- Two keys for both AirLabs + FlightAware → ~130 flights/day, and so on
FlightRadar24 is a paid tier at $9/mo for 30,000 calls — more than enough for several users sharing a single key, especially when combined with AirLabs and FlightAware free credits.
The config page (hostname.local:8080/config) keeps a running tally of your API usage for each service, and the stats page shows your daily flight average so you can estimate how many credits you'll need per month. If you run out of credits the tracker will still work, but route information won't be displayed.
Plane Tracker RGB Pi Setup Guide
Once you get your Raspberry Pi up and running, you can follow this guide to set up the project.
1. Install Raspberry Pi OS Lite
Using the official Raspberry Pi Imager, go to Other and select Raspberry Pi OS 64-bit Lite Note: These instructions are for Trixie.
When using the Imager make sure these settings are selected to enable SSH and make sure your WiFi information is typed in EXACTLY or it won't connect when turned on.
Make sure you select the correct timezone since that is what is displayed on the clock. You can always change it later.
2. Connect via SSH
I use MobaXterm on Windows to SSH into the Pi since it allows you to see the folder structure and edit files directly without using the command prompt. After SSH-ing into the Pi, proceed with the following steps.
3. Run the installer
You can solder a bridge between GPIO 4 and 18 on the bonnet to enable PWM for less screen flicker and smoother scrolling. It is optional — it will work without the bridge. Do it before running the installer if you want it.
Copy and paste these two commands:
sudo apt-get update && sudo apt-get install -y git
git clone https://github.com/c0wsaysmoo/plane-tracker-rgb-pi ~/plane-tracker-rgb-pi && bash ~/plane-tracker-rgb-pi/its-a-plane-python/setup/install.sh
The installer does every step of the manual install below for you. It takes a while on a Pi 3 — building the matrix library is the slow part. It will stop and ask you a few things:
- The Adafruit bonnet script: choose Bonnet (option 1), Quality if you soldered the bridge or Convenience if not, and 2 for the dedicated core.
- Panel test: it shows a test pattern for 15 seconds. You're looking for a yellow happy face with HELLO in green and WORLD in red (red and blue swapped is fine — you can fix that on the config page). If only part of the panel lights up or it's garbled, power off, reseat the bonnet and run the installer again.
- Run inside tmux: say yes. The install takes a while, and this keeps it running even if your SSH connection drops.
- Network watchdog: say yes unless you have a reason not to.
- Reboot at the end: say yes.
If your SSH connection drops or the Pi reboots part-way through (the bonnet script may ask to), SSH back in and run:
bash ~/plane-tracker-rgb-pi/its-a-plane-python/setup/install.sh
(or bash ~/its-a-plane-python/setup/install.sh once the files have been moved). If the install is still running it reconnects you to it; otherwise it skips everything that's already done and carries on.
4. Fill in the Config file
Once the Pi is back up, go to http://hostname.local:8080 in a browser connected to the same network and click on "Configuration". Fill it in, save and reboot. Remember that "hostname" is the name of your Pi (not your username). If you soldered the PWM bridge, tick HAT PWM Enabled.
That's it. (Hopefully)
Manual install
Only needed if the installer doesn't work for you. These are the same steps the installer runs.
M1. Install prerequisites and build the RGB Matrix library
sudo apt-get update
sudo apt-get install -y git python3-dev python3-pip python3-venv python3-pillow cython3 python3-setuptools build-essential
Clone and build hzeller's library:
git clone https://github.com/hzeller/rpi-rgb-led-matrix.git
cd rpi-rgb-led-matrix
make
M2. Increase swap size (Pi 3 only)
The wheel compilation requires more memory than the Pi 3's 1GB provides. Without this it will crash mid-install.
sudo apt-get install -y dphys-swapfile
sudo dphys-swapfile swapoff
sudo nano /etc/dphys-swapfile
Add this line: CONF_SWAPSIZE=512
Save with Ctrl+O, Enter, Ctrl+X, then:
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
Verify with free -h — you should see ~512MB (or more) under Swap. Leave it on for now: step M14 replaces it with compressed RAM swap, which is easier on the SD card.
M3. Install the Adafruit RGB Matrix Bonnet
Install the Python installer dependency and run the Adafruit setup script:
cd ~
sudo pip3 install adafruit-python-shell --break-system-packages
wget https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/raw/main/rgb-matrix.py
python3 -m venv --system-site-packages env
source env/bin/activate
sudo -E env PATH=$PATH python3 rgb-matrix.py
During the script:
- Interface board type: Bonnet (Option 1)
- Quality if you soldered the jumper, Convenience if not
- 2 to the dedicated core
After the script completes (and after rebooting, if it asks you to), copy the rgbmatrix module to system Python so it works without a venv:
deactivate 2>/dev/null
sudo cp -r ~/env/lib/python3*/site-packages/rgbmatrix /usr/lib/python3/dist-packages/
cd ~ && python3 -c "import rgbmatrix; print('ok')"
You should see ok printed. If not, do not continue.
M4. Test the panel
Test to make sure the panel works before doing anything else. You're looking for a "HELLO WORLD" yellow happy face, with HELLO in green and WORLD in red (depending on the panel, instead of RGB it's RBG. You can fix this in the config page later if the colors are inverted). If it's only partially displaying or showing colors in the wrong place, reattach the bonnet to the Pi. Do not continue unless the test runs perfectly.
sudo chown -R $(whoami): ~/rpi-rgb-led-matrix
cd ~/rpi-rgb-led-matrix/examples-api-use
make
ls -l demo
(The chown is needed because the bonnet script in M3 runs as root and leaves the folder owned by root.)
If you did not solder:
sudo ./demo -D 1 runtext.ppm --led-rows=32 --led-cols=64 --led-limit-refresh=60 --led-slowdown-gpio=2 --led-gpio-mapping=adafruit-hat
If you did solder:
sudo ./demo -D 1 runtext.ppm --led-rows=32 --led-cols=64 --led-limit-refresh=60 --led-slowdown-gpio=2 --led-gpio-mapping=adafruit-hat-pwm
M5. Git the tracker
Clone the tracker:
cd ~
git clone https://github.com/c0wsaysmoo/plane-tracker-rgb-pi
If the bridge on the bonnet is soldered, you'll need to tick HAT PWM Enabled on the config page. It's off by default.
After cloning the files, move everything to the main folder, as some files need to be in /home/path/ rather than /home/path/plane-tracker-rgb-pi/ You'll need to combine the two logos folders since Github only allows 1,000 files per folder so I had to split them.
mv ~/plane-tracker-rgb-pi/* ~/
mkdir -p ~/logos
mv ~/logo/* ~/logos/
mv ~/logo2/* ~/logos/
rmdir ~/logo ~/logo2
M6. Install Python dependencies
pip install pytz requests beautifulsoup4 folium selenium pillow flask ephem --break-system-packages
If Bookworm
sudo setcap 'cap_sys_nice=eip' /usr/bin/python3.11
If Trixie
sudo setcap 'cap_sys_nice=eip' /usr/bin/python3.13
M7. Make the Script Executable
chmod +x ~/its-a-plane-python/its-a-plane.py
M8. Run the Script
Test the script manually by running
~/its-a-plane-python/its-a-plane.py
Press Ctrl+C to stop it once you've seen it start.
M9. Find your project path
Open a terminal on your Pi and run:
cd ~/its-a-plane-python
pwd
Copy the path it shows — you'll need it in the next step. It will look something like /home/pi/its-a-plane-python or /home/flight/its-a-plane-python.
M10. Create the service file
Run these commands from inside your project folder (after the cd above):
cat > /tmp/its-a-plane.service << EOF
[Unit]
Description=Plane Tracker
After=network.target
[Service]
User=$(whoami)
WorkingDirectory=$HOME
ExecStart=$(pwd)/its-a-plane.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
⚠️ Important: Run the
cdcommand first or the paths will be wrong!
M11. Install and start the service
sudo cp /tmp/its-a-plane.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable its-a-plane
sudo systemctl start its-a-plane
Check it's running:
sudo systemctl status its-a-plane
You should see Active: active (running) in green. If it shows an error, check the logs with the commands under Useful commands below.
M12. Enable the web UI restart button
If you want the Restart App button and the WiFi settings in the web config page to work, your user needs permission to run those commands without a password. Run this one command:
echo "$(whoami) ALL=(ALL) NOPASSWD: /bin/systemctl restart its-a-plane, /usr/bin/systemctl restart its-a-plane, /usr/bin/nmcli" | sudo tee /etc/sudoers.d/its-a-plane && sudo chmod 440 /etc/sudoers.d/its-a-plane && sudo visudo -c
It fills in your username automatically. You should see a line ending in parsed OK. Now the web UI restart button will work.
M13. WiFi setup hotspot
Sets up the PlaneTracker-Setup network described above, so you can change WiFi without plugging anything in:
sudo bash ~/its-a-plane-python/setup/install_wifi_setup.sh
M14. Stability hardening
Switches to compressed RAM swap (and turns off the SD-card swap from step M2), turns on the hardware watchdog, and keeps logs across reboots:
sudo bash ~/its-a-plane-python/setup/harden.sh
Optional network watchdog — restarts WiFi if it drops and reboots if the Pi is still offline after ~12 minutes:
echo "*/3 * * * * root /bin/bash $HOME/its-a-plane-python/setup/netwatch.sh" | sudo tee /etc/cron.d/its-a-plane-netwatch
Then reboot:
sudo reboot
M15. Fill in the Config file
Same as step 4 above: go to http://hostname.local:8080, click "Configuration", fill it in, save and reboot.
Useful commands
| What you want to do | Command |
|---|---|
| Check if it's running | sudo systemctl status its-a-plane |
| Restart it | sudo systemctl restart its-a-plane |
| Stop it | sudo systemctl stop its-a-plane |
| Start it | sudo systemctl start its-a-plane |
| Watch live logs | sudo journalctl -u its-a-plane -f |
| See last 50 log lines | sudo journalctl -u its-a-plane -n 50 |
| See logs since last crash | sudo journalctl -u its-a-plane -b |
| See the logs from before the last reboot | sudo journalctl -u its-a-plane -b -1 |
| Health check (memory, swap, watchdog) | sudo bash ~/its-a-plane-python/setup/memcheck.sh |
| WiFi setup hotspot logs | sudo journalctl -u wifi-setup -b |
Optional: Add a Power Button If you'd like to add a power button, you can solder the button to the GND/SCL pins on the bonnet. Then, run the following commands:
git clone https://github.com/Howchoo/pi-power-button.git
./pi-power-button/script/install
探索相关项目
加载中…