Now logs the closest flights to your location and farthest destinations!
- Top N closest flights to your location (
MAX_CLOSEST) - Top N farthest flights based on origin or destination (
MAX_FARTHEST)
Each time a flight is detected:
- Calculates the distance from home
- Updates
close.txtandfarthest.txtif a new closest flight or a new top-N farthest flight is found - Sends an automatic email alert when these changes occur with flight details and map
Email notifications:
- Sent from
flight.tracker.alerts2025@gmail.com - Includes a link to an interactive map showing flight positions (Link is good for 30 days. You can always view the maps on your local IP page)
Key details:
- Adjustable limits with
MAX_CLOSESTandMAX_FARTHEST - Closest flights to your house are always updated in
close.txt - Farthest destination/origin flights are maintained in
farthest.txtindependently - Alerts taper off as flight positions stabilize
- Emails can be turned off while still keeping the log files and local wegpage.
New features:
- Generates interactive maps for both closest and farthest flights
- Maps and log files can be viewed via your Pi’s local IP at
http://<Pi_IP>:8080(The local IP address of your flight tracker ie 192.168.x.x:8080 etc)
This setup lets you stay updated without watching the clock, in addition to receiving email summaries with distance and map information.
If you would like to manually view the log files they are located here
nano /home/path/its-a-plane-python/close.txt
nano /home/path/its-a-plane-python/farthest.txt
Please read if you already have a tracker setup
It won't work if you are using "sudo" to run the code (if you set this up on Bullseye). You'll have to go into crontab and take "sudo" out if you are using it.
If you already have a tracker setup and want to do these additions you'll have to install these.
pip install folium selenium pillow
pip3 install --user flask
Make sure if you replace its-a-plane.py that you reown it
chmod +x /home/path/its-a-plane-python/its-a-plane.py
This project is based on Colin Waddell's work, with some additional features I’ve added.
- Displays time, date, current temperature, and a 3-day forecast.
- The current temperature color is based on the current humidity level on a gradient of white-blue.
- Time changes color at sunrise and sunset.
- The date shows moon phases with a purple-to-white gradient. It gradually becomes white on the right until the full moon, then fades white on the left as the moon wanes.
- The display dims at predefined times, set in the config file.
- You can switch between 12hr/24hr time and choose imperial or metric units.
-
Displays the origin and destination airport codes, with distances to both airports.
-
Airport codes are color-coded based on the difference between the scheduled and actual departure times, as well as the scheduled and estimated arrival times.
Departure:
- 0-20 mins: Green
- 20-40 mins: Yellow
- 40-60 mins: Orange
- 1-4 hrs: Red
- 4-8 hrs: Purple
- 8+ hrs: Blue
Arrival:
-
On-time or early: Green
-
0-30 mins late: Yellow
-
30-60 mins late: Orange
-
1-4 hrs late: Red
-
4-8 hrs late: Purple
-
8+ hrs late: Blue
-
If either the actual arrival time is None (not updated yet) or actual departure time is None (not updated yet) the airport code will be Grey. Happens if you live close to an airport
-
An arrow between the airport codes acts as a progress bar for the flight, starting red (just left) and turning green (almost complete).
-
Below, the airline’s IATA name, flight number, abbreviated aircraft type, and the distance/direction to your location are displayed.
-
The airline's ICAO code is shown in the logo, indicating which airline is operating the flight. This is especially useful for regional carriers, where an airline might operate flights for multiple brands (e.g., Republic Airways flying for American Eagle, Delta Connection, and United Express).
I've put a LOT of my time and effort into this project. 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
Had to remount the Pi since the display ribbon bumped into the panel
The close.txt file. Farthest.txt looks the same.
Map will show the top 3 farthest flights, and the closest ping'd flights to your location.
The email
This is what I used to make mine. Other than the Pi and the Bonnet you can use whatever you want.
- Raspberry Pi 3A+ (Pi Zero had flickering, and Pi 5 isn’t compatible)
- 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.
Once you get your Raspberry Pi up and running, you can follow this guide to set up the project.
Using the official Raspberry Pi Imager, go to Other and select Raspberry Pi 64 OS Lite (the Pi Zero only supports Raspberry Pi 32 OS lite). Note These instructions are for Bookworm
When using the Imager make sure these settings are selected to enable SSH and make sure your WIFI information is typed in EXACTLY or else it won't connect when turned on.
I use MobaXterm on Windows to SSH into the Pi. After SSH-ing into the Pi, proceed with the following steps.
Install the bonnet by following the instructions provided by Adafruit.
You can solder a bridge between the 4 and 18 to enable PWM for less screen flicker and smoother scrolling. It is optional as it will work without the bridge. More details in the link above.
Test to make sure the panel works before you do anything else. You're looking for "HELLO WORLD" yellow happy face, with HELLO in green and WORLD in red. If it's only partially displaying or displaying parts in the wrong color than reattach the bonnet to the Pi. Do not continue unless it runs the test script perfectly.
"path" is your username for the pi
cd /home/path/rpi-rgb-led-matrix/examples-api-use/
If you DIDN'T 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
You'll need Git for downloading the project files and other resources:
sudo apt-get install git
git config --global user.name "YOUR USER NAME"
git config --global user.email "YOUR EMAIL"Clone the repository:
git clone https://github.com/c0wsaysmoo/plane-tracker-rgb-pi
If the bridge on the bonnet is not soldered, you'll need to set HAT_PWM_ENABLED=False in the config file.
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 /home/path/plane-tracker-rgb-pi/* /home/path/
mkdir /home/path/logos
mv /home/path/logo/* /home/path/logos/
mv /home/path/logo2/* /home/path/logos/
For Linux Bookworm:
sudo apt install python3-pip
sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED
pip3 install pytz requests
pip install beautifulsoup4
pip3 install FlightRadarAPI
pip install folium selenium pillow
pip3 install --user flask
sudo setcap 'cap_sys_nice=eip' /usr/bin/python3.11
Move the RGB Module
mv /home/path/rpi-rgb-led-matrix/bindings/python/rgbmatrix /home/path/its-a-plane-python/
Make the Script Executable
chmod +x /home/path/its-a-plane-python/its-a-plane.py
Edit the config file
nano /home/path/its-a-plane-python/config.py
Run the Script
/home/path/its-a-plane-python/its-a-plane.py
Set Up the Script to Run on Boot
To ensure the script runs on boot, use crontab -e to edit the cron jobs and add the following line:
@reboot sleep 60 && /home/path/its-a-plane-python/its-a-plane.py
You can also run it like so to create a log file in case there are issues.
@reboot sleep 60 && /home/path/its-a-plane-python/its-a-plane.py >> /home/path/its-a-plane-python/workdammit.log 2>&1
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


