{"id":18397056,"url":"https://github.com/idatum/adsb2mqtt","last_synced_at":"2025-10-28T00:05:31.269Z","repository":{"id":200872893,"uuid":"706420419","full_name":"idatum/adsb2mqtt","owner":"idatum","description":"Process ADS-B messages from dump1090 and build up full flight details from multiple messages; track flights within threshold in nautical miles; publish tracked flights to MQTT.","archived":false,"fork":false,"pushed_at":"2024-11-10T20:58:51.000Z","size":70,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T12:04:25.140Z","etag":null,"topics":["ads-b","adsb","dotnet","dump1090","dump1090-fa","mqtt","netbsd","tts"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idatum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-17T23:15:55.000Z","updated_at":"2024-11-10T20:58:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"b34ac84a-73a5-454d-9688-b4e00bd9a299","html_url":"https://github.com/idatum/adsb2mqtt","commit_stats":null,"previous_names":["idatum/adsb2mqtt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idatum%2Fadsb2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idatum%2Fadsb2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idatum%2Fadsb2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idatum%2Fadsb2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idatum","download_url":"https://codeload.github.com/idatum/adsb2mqtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595156,"owners_count":20963939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ads-b","adsb","dotnet","dump1090","dump1090-fa","mqtt","netbsd","tts"],"created_at":"2024-11-06T02:15:41.210Z","updated_at":"2025-10-28T00:05:26.249Z","avatar_url":"https://github.com/idatum.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adsb2mqtt\n* Receive ADS-B messages from dump1090 TCP BaseStation output (default port 30003).\n* Build up full flight details from multiple messages.\n* Track and publish to MQTT within threshold in nautical miles.\n\n## Usage\n**adsb2mqtt** has multiple settings you can set either direclty in appsettings.json or override with environment variables. I run it on a Docker container and use environment variables. See below for applications.\nSetting | Default | Description\n--- | --- | ---\nBEAST_HOST | localhost | dump1090 host\nBEAST_PORT | 30003 | dump1090 TCP BaseStation output port\nMQTT_SERVER | localhost | MQTT host\nMQTT_USE_TLS | false | Connect to MQTT using TLS (mqtts)\nMQTT_PORT | 1883 | MQTT port.\nMQTT_USERNAME | \u003cusername\u003e | MQTT user name\nMQTT_PASSWORD | \u003cpassword\u003e | MQTT password\nTOPIC_BASE | ADSB/flight | MQTT topic containing JSON payload\nLATITUDE | 47.9073 | Set to your latitude\nLONGITUDE | -122.2821 | Set to your longitude\nRADIUS_NM | 3.1 | Nautical mile radial distance threshold to publish flight\nAIRCRAFT_DB_PATH | /usr/share/dump1090-fa/html/db | [dump1090-fa flight database](https://github.com/flightaware/dump1090/tree/master/public_html/db)\n\nI've tested both local MQTT and remote MQTTS Mosquitto hosts. The included Dockerfile is for an AMD64 server but I've run this standalone on an RPi3. [Link](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script) to the .NET install script instructions, including for a Raspbery Pi running Linux.\n\n\nMy main application of **adsb2mqtt** is a seperate MQTT Python client that uses text-to-speech (TTS) to periodically translate the ADSB/flight payload to a wave file using [Microsoft Cognitive Services](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/text-to-speech). Many other TTS options exist. Then publish another MQTT topic with the payload containing the wave filename.\n\nAnother option is to generate the wave to a media directory accessible to [HA](https://github.com/home-assistant) and write an Automation to play the wave. I haven't played with HA's recent improvements for TTS though -- might be able to skip creating the wave file.\nOne other option is a simple mosquitto_sub client on NetBSD to play the wave file. Something roughly like this:\n```\n#!/bin/sh\n\nsubscribe_speech () {\n    mosquitto_sub -v -t \"ADSB/speech/wave\" -u username -P password -h localhost -p 1883 | while read msg\n    do\n        wave=$(echo $msg | awk '{print $2}')\n        curl --silent --output - -X POST -H \"Content-Type: text/plain\" --data \"${wave}\" \"http://host_serving_tts_wave\" | audioplay -d /dev/audio1\n    done\n}\n\nwhile true\ndo\n    subscribe_speech\n    sleep 5\ndone\n```\nUltimately, It's a simple pleasure to sit on your patio and hear the departure, airline, altitude (or whatever else you want), of planes you can spot flying over.\n\nI keep RADIUS_NM pretty short, basically I want to see the aircraft enough to roughly make out its type. You can also use an ICAO database to get the plane type. Where I live there's a route that planes fly within a 3nm radius usually under 5000ft MSL before landing at the nearby airport.\n\nYou don't need to set LATITUDE and LONGITUDE to your precise location (unlike with say dump1090-fa). Since I usually view planes on my porch looking North, I increase the LATITUDE a bit since my house blocks my view of planes approaching from the South.\n\n## NetBSD 10_RC on a Pine64 Rock64 running [dump1090-fa](https://github.com/flightaware/dump1090)\nI replaced an aging RPi3 running [piaware](https://github.com/flightaware/piaware) with a 4gb Rock64 running dump1090-fa. Here's a repo for getting this to run: [rtl-sdr-bsd](https://github.com/idatum/rtl-sdr-bsd). Here are more details of the overall project: [Experimenting with RTL-SDR on NetBSD 10](https://www.idatum.net/experimenting-with-rtl-sdr-on-netbsd-10.html).\n\n## FreeBSD 14 on the Rock64 running [dump1090-fa](https://github.com/flightaware/dump1090)\nI've since switched from NetBSD 10 to running FreeBSD 14 on the Rock64 device and this resulted in a more stable host for dump1090. It's mainly about better support for RTL-SDR generally with USB on FreeBSD. FreeBSD 14 also now supports .NET 8. \n\nRegardless of your O/S choice, adsb2mqtt should be able to connect to dump1090 and generate MQTT messages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidatum%2Fadsb2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidatum%2Fadsb2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidatum%2Fadsb2mqtt/lists"}