An airplane tracking bot that supplies users with data from a dump1090 datasource.
Read more about my setup on my blog: https://tyler.nien.house/2019/06/whats-that-plane-i-hear-telegram1090/
- Install
dump1090- FlightAware's fork of it is available through their official Raspbian repo. You can follow the instructions on their site, skipping the PiAware installation and going straight to the dump1090-fa installation. The great thing about the FlightAware fork is it automatically runs at boot and provides a nice web UI to check your data. - Install Node.js 10 or newer - If the required version isn't included in Raspbian's default repos, you many need to either get it directly from the Node.js website, from NodeSource's binary packages, or using nvm.
- Clone this repo to a convenient location -
git clone https://github.com/flakeparadigm/telegram1090.git - Prepare the configuration - copy
config.json.exampletoconfig.jsonand updated the values where necessary. Primarily the home lat/lon and telegram token. - Run the bot in the foreground -
npm startin the repo directory.
- Build the TypeScript code for direct use with Node -
npm run buildin the repo directory. - Prepare the systemd service unit file by copying
telegram1090.service.exampleand updating theUser,Environment=PATHandWorkingDirectorylines. - Copy or symlink this updated file -
sudo ln -s telegram1090.service /lib/systemd/system/telegram1090.service - Test the service to make sure it's working:
- Trigger a systemd reload of services for new/changed service files -
sudo systemctl daemon-reload - Try to start the service -
sudo systemctl start telegram1090 - Check the status of the service -
sudo systemctl status telegram1090 - Check the logs -
journalctl -fn 20
- Trigger a systemd reload of services for new/changed service files -
- Enable the service
sudo systemctl enable telegram1090 - Reboot and check check the status of the service to ensure it started up properly
- Disable the service -
sudo systemctl disable telegram1090 - Remove the service unit file -
sudo rm /lib/systemd/system/telegram1090.service
If updates are availble, simply git pull origin to update your local repo, run npm run build, and restart the service sudo systemctl restart telegram1090 or reboot.
After you have the service running, you'll need to start a Telegram chat with the bot and subscribe to the notifications using the subscribe command.
Subscribes you to the notification messages and must be done before the bot is able to send you any messages. The service saves any subscribed chats to a file perioditcally, so it should be able to maintain the chats between restarts.
Removes your subscription to the notification messages. After running this command you should no longer receive any messages from this bot.
Respons to you with your current subscription status without changing it.
- How Flightradar24 (and other similar sites) works. https://habr.com/en/post/440596/
- Introduction to ADS-B.
https://www.icao.int/APAC/Meetings/2012_SEA_BOB_ADSB_WG8/SP01_AUS - ADS-B Basics.pdf(Copy and paste this including the spaces. Their site has some struggles with escape characters in URLs) - Telegram Bots. https://core.telegram.org/bots
- Creating systemd services. https://www.linode.com/docs/quick-answers/linux/start-service-at-boot/