The Raspberry Pi 3 running the flight tracker and rtl_433 for weather station and driveway alarm data was in need of an update. Past articles include Update to LaCrosse weather, Adding LaCrosse weather to garage-pi, Mighty-Mule and LaCrosse update, Mighty Mule driveway alarm, Updates and a new rtl-sdr,
More flight tracking adding Radarbox, Updates to flight tracking.
Updating the Raspberry Pi OS Bookworm 32 bit installation to Trixie proved more complex than expected. With Trixie, 64-bit is the expected choice by quite a few things. Even Openhab 5.x has removed 32-bit support. This means that not everything we wanted to install had a 32 bit Trixie option. After getting pretty well tangles the best choice was to start over again with a new Raspberry Pi OS 32-bit Bookworm Lite SD card. Using the Raspberry Pi Imager allows you to predefine hostname, localization, username/password, WiFi if needed, and enable ssh.
rtl_433 /weather station data / driveway alarm
First we will update everything and install the rtl_sdr libraries and setup to listen at 433.92Mhz for the LaCrosse weather station and the Mighty Mule driveway alarm:
sudo apt update
sudo apt upgrade
sudo apt install rtl-sdr rtl-433
At this point we need to update the udev rules to allow for the proper discovery of the rtl-sdr devices. The rtl-sdr file can be found at https://github.com/osmocom/rtl-sdr/raw/master/rtl-sdr.rules
curl https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules >rtl-sdr.rules
sudo cp rtl-sdr.rules /etc/udev/rules.d/rel-sdr.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
Next the serial numbers of the rtl-sdr devices need to be unique. If not already set previously, this is done by plugging the devices in one at a time and using rtl_eeprom.
#only plug in the rtl-sdr for 433 weather station/Mighty Mule
sudo rtl_eeprom -d 0 -s 433 # set the serial number for the rtl-sdr device
#only plug in the rtl-sdr for 1090 adsb
sudo rtl_eeprom -d 0 -s 1090
#only plug in the rtl-sdr for 978 UAT reception
sudo rtl_eeprom -d 0 -s 978
There is a sample rtl_433.conf file with the serial number set to 433, mqtt output in json format set and Mighty Mule decoder included. Grab a copy into your home directory, rename it to rtl_433.conf and give things a test.
rtl_433
If things appear to work and your mqtt broker is receiving messages it’s time to make this a service. First let’s create the service definition file at /etc/systemd/system/rtl_433-mqtt.service:
[Unit]
Description=rtl_433 to MQTT publisher
After=network.target
[Service]
ExecStart=/usr/bin/rtl_433
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Then we need to copy the config file into place, enable and start the service and check its status
sudo mkdir /etc/rtl_433
sudo cp rtl_433.conf /etc/rtl_433/
sudo systemctl enable rtl_433-mqtt.service
sudo systemctl start rtl_433-mqtt.service
sudo systemctl status rtl_433-mqtt.service
sudo journalctl -u rtl_433-mqtt.service # for additional logging display
Flight Tracking and Feeding
readsb
The setup for ADS-B and UAT listening and aggregation has quite a few steps. First up is readsb as an alternative to dump1090-fa or dump1090-mutability. The basics are:
sudo bash -c "$(wget -O - https://github.com/wiedehopf/adsb-scripts/raw/master/readsb-install.sh)"
sudo readsb-set-location 50.12344 10.23429 # set long and lat
sudo nano /etc/default/readsb # edit config if needed
sudo systemctl restart readsb # restart the service after config edits
The config file will definitely need --device 1090 added to the RECEIVER OPTIONS line in the config file. If you know the ppm deviation for you rtl-sdr you can add it there, too.
RECEIVER_OPTIONS="--device 1090 --device-type rtlsdr --gain auto --ppm 0"
tar1090
Next up is tar1090 to let us see what’s up there on a map. Once installed view your map at http://your_ip/tar1090.
sudo bash -c "$(wget -nv -O - https://github.com/wiedehopf/tar1090/raw/master/install.sh)"
sudo nano /etc/default/tar1090 # edit config file if needed
sudo systemctl restart tar1090 # restart the service after config edits
sudo apt install -y lighttpd # if connection refused when trying http://host_ip/tar1090
graphs1090
graphs1090 is a nice utility to add for displaying stats and graphs. The installation follows a similar pattern to the previous software. Once installed view your graphs at http://your_ip:graphs1090
sudo bash -c "$(curl -L -o - https://github.com/wiedehopf/graphs1090/raw/master/install.sh)"
sudo nano /etc/default/graphs1090 # edit the config as needed
sudo cp /usr/share/graphs1090/default-config /etc/default/graphs1090 # restore original settings
FlightAware
Now is the time to start adding the aggregators to share the ADS-B data with. FlightAware has simple instructions online. You’ll add their repository and install piaware using apt. Once its up an running you visit their website to claim the feed.
wget https://www.flightaware.com/adsb/piaware/files/packages/pool/piaware/f/flightaware-apt-repository/flightaware-apt-repository_1.2_all.deb
sudo dpkg -i flightaware-apt-repository_1.2_all.deb
sudo apt update
sudo apt install piaware
ADSBExchange
ADSBExchange is also pretty simple.
ccurl -L -o /tmp/axstats.sh https://www.adsbexchange.com/stats.sh
sudo bash /tmp/axupdate.sh
Once it is installed you can check your feed at https://www.adsbexchange.com/myip/. They also have an optional stats package you can install.
curl -L -o /tmp/axstats.sh https://www.adsbexchange.com/stats.sh
sudo bash /tmp/axstats.sh
FlightRadar24
FlightRadar24 has a simple one-liner installation.
wget -qO- https://fr24.com/install.sh | sudo bash -s
Since we are feeding to multiple sites we should follow their advice and disable mlat in fr24feed.ini. FlightRadar24 feed stats can be viewed locally at http://your_ip:8754. You can also visit https://www.flightradar24.com/account/data-sharing.
Airnav / Radarbox
Airnav / Radarbox also has simple to follow instructions.
sudo bash -c "$(wget -O - http://apt.rb24.com/inst_rbfeeder.sh)"
sudo nano /etc/rbfeeder.ini # refer to file below
[client]
network_mode=true
log_file=/var/log/rbfeeder.log
[network]
mode=beast
external_port=30005
external_host=127.0.0.1
Once setup and connected for a few minutes use sudo rbfeeder --showkey to reveal your key and the visit their site to claim your feed.
AirplanesLive
AirplanesLive has instruction’s on github. Once installed you can check your status at https://airplanes.live/myfeed.
curl -L -o /tmp/feed.sh https://raw.githubusercontent.com/airplanes-live/feed/main/install.sh
sudo bash /tmp/feed.sh
pico /etc/default/airplanes # edit the configuration
sudo systemctl status airplanes-feed # display feeder service status
sudo systemctl status airplanes-mlat # display mlat service status
Planefinder
Planefinder also has instructions online for a variety of clients. This is the summary for the 32 bit Raspberry Pi 3. Find the appropriate Debian package on their page and copy the link. Retrieve the file with wget. The commands will look something like those below. Follow the link provided once the install completes – http://your_ip:30053.
wget http://client.planefinder.net/pfclient_x.x.x_armhf.deb
sudo dpkg -i pfclient_x.x.x_armhf.deb # update filename to reflect actual download
UAT / 978
We skipped adding the UAT 978 sections along the way. Now we need dump978-fa. This is best installed using the FlightAware instructions. Assuming you already have the FlightAware repos installed from the previous steps:
sudo apt install dump978-fa
You will want the update /etc/default/dump978-fa to include driver=rtlsdr,serial=978 on the RECEIVER_OPTIONS line. It may be necessary to update your /etc/piaware.conf file to include the lines below. Refer to the PiAware Advanced Config page for more info. Once installed you can view the UAT map at http://your_ip/skyaware978
uat-receiver-host 127.0.0.1
uat-receiver-type sdr
ADBSExchange has a simple config script for the UAT addition. Once added you can view you map UAT map at http://your_ip/ax978.
sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/adsbxchange/adsbexchange-978/master/install.sh)"
sudo adsbexchange-978-set-location your_lat your_long
The FlightRadar24 add your data page has a UAT tab with instructions. Provided you are already sharing ADS-B 1090 data with them it is as simple as sudo fr24feed-signup-uat.
RadarBox will need a couple of lines added to /etc/rbfeeder.ini. These are discussed in a couple of forum post: MLAT and dump978 and RBFeeder on RPi config network connection to FlightFeeder 978 UAT.
[dump978]
dump978_enabled=true
dump978_port=30979
You may need to update /etc/collectd/collectd.conf so that graphs1090 will use and display the UAT data. In the module graphs1090 section add URL_978 "http://localhost/skyaware978". more information can be found in /etc/default/graphs1090.
Once it is all done these local links should work:
http://your_ip/tar1090
http://your_ip/dump1090
http://your_ip/graphs1090/
http://your_ip:8754/
http://your_ip:30053/map.html
http://your_ip/ax978
http://your_ip/skyaware978
These links to the aggregation sites should also work:
https://www.flightaware.com/adsb/stats/user/
https://www.adsbexchange.com/myip/
https://map.adsbexchange.com/mlat-map/
https://www.flightradar24.com/account/data-sharing
https://planefinder.net/account/receivers
https://www.airnavradar.com/stations/
https://airplanes.live/myfeed