Skip to content

Coms Webhook

joeherwig edited this page Jul 22, 2026 · 1 revision

Coms Webhook & WebSocket Feed

JoinFS can broadcast live aircraft telemetry to external tools over a local WebSocket feed, and separately notify a webhook URL whenever a pilot's COM1/COM2 frequency changes (e.g. to drive automatic TeamSpeak/Discord channel switching). This page documents both, implemented in WebSocketServer.cs and WebhookService.cs.

Both services now run in every build configuration (FS2024, FS2020, FSX, P3D, XPLANE, CONSOLE) — they used to be CONSOLE-only, but are just background listeners/HTTP calls with no dependency on the console vs. GUI split, so they run alongside the normal GUI too.

Enabling it

Both services are off by default and only start when their command-line flags are passed:

JoinFS-FS2024.exe -websocket -websocketport 8765 -websocketlog -comswebhookuri https://your-endpoint -comswebhookmethod PUT
Flag Effect
-websocket Starts the WebSocket server broadcasting aircraft data
-websocketport <port> WebSocket server port (default 8765)
-websocketlog Logs WebSocket connections/events and webhook calls to the monitor
-comswebhookuri <uri> Enables the COM webhook, POSTing/PUTting changes to this URI
-comswebhookmethod <POST|PUT|PATCH|GET> HTTP method used for the webhook call (default PUT)

These are plain command-line flags, not persisted settings — there's no Settings-dialog UI for them, so they need to be passed each launch (e.g. via a shortcut).

If you want to see it in action, you can use an online websocket tester like https://webhook.site/ and start the JoinFS instance pointing to the URL you were given for testing.

WebSocket feed

Connect to ws://<host>:<port>/ws/. Whenever an aircraft's reported state changes, JoinFS sends:

{
  "type": "aircraft_update",
  "aircraft": [
    {
      "callsign": "DLH123", "nickname": "...", "guid": "...",
      "registration": "DAIZQ", "icaoAirline": "DLH", "flightNumber": "123",
      "altitude": 35000, "speed": 450.2, "heading": 270,
      "latitude": 50.123456, "longitude": 8.123456,
      "com1": "118.500", "com2": "121.500", "squawk": "1200",
      "icaoType": "A20N", "livery": "Lufthansa", "from": "EDDF", "to": "EGLL",
      "rules": "IFR", "route": "...", "remarks": "...",
      "gear": 0, "flaps": 0.0,
      "lights": { "nav": 1, "beacon": 1, "landing": 0, "taxi": 0, "strobe": 1 },
      "engines": { "eng1Running": true, "eng2Running": true, "eng3Running": false, "eng4Running": false },
      "rotorRpm": 0.0
    }
  ]
}

Only aircraft whose snapshot actually changed since the last tick are included (plus each aircraft once, the first time it's seen). If -whazzup-public is also set, global hub users are broadcast the same way (with a reduced field set — no gear/lights/engine data, since hub users aren't backed by a live variableSet).

See Flight Plan & SimBrief Import for where registration/icaoAirline/flightNumber/the flight-plan fields come from and how to set them.

COM webhook

When -comswebhookuri is set, every time a tracked aircraft's COM1 or COM2 changes, JoinFS sends a request to that URI with:

{ "comsupdate": [ { "callsign": "DLH123", "nickname": "...", "com1": "118.500", "com2": "121.500" } ] }

Only changed aircraft are included per call, and only after they've been seen once already (no notification fires just for an aircraft newly appearing).

COM1/COM2 formatting note

COM1/COM2 are read from the com active frequency:1/:2 variables and formatted as "F3" MHz strings (e.g. "118.500"), supporting 8.33 kHz channel spacing. Older JoinFS peers that still transmit the legacy BCD-encoded integer frequency (pre-8.33 kHz support) are handled via a fallback (GetInteger(...) / 100f), so mixed-version sessions still report a frequency instead of coming back empty.

Clone this wiki locally