Skip to content

feat(cot): OpenTAK Server TCP integration + entity type filter#113

Merged
d3mocide merged 2 commits into
mainfrom
claude/bold-darwin-oyz9mb
Jun 22, 2026
Merged

feat(cot): OpenTAK Server TCP integration + entity type filter#113
d3mocide merged 2 commits into
mainfrom
claude/bold-darwin-oyz9mb

Conversation

@d3mocide

Copy link
Copy Markdown
Owner

Summary

  • Switch emitter from UDP to TCP when COT_TAKSERVER_HOST is set. OpenTAK Server (OTS) has no UDP CoT listener — it only accepts CoT via TCP on port 8088. The emitter now opens a persistent TCP connection with exponential-backoff reconnect, matching the receiver's pattern.
  • Consolidate receiver configCOT_RECEIVE_HOST and COT_RECEIVE_PORT are removed. Both emitter and receiver connect to the same OTS endpoint (COT_TAKSERVER_HOST / COT_TAKSERVER_PORT). COT_RECEIVE_ENABLED remains as a simple boolean gate.
  • Add COT_ENTITY_TYPES filter — comma-separated list of entity types to emit. Empty (default) emits everything. Filtered at the Redis message level before any TCP write.
  • Echo loop guard — receiver now skips CoT events with UIDs prefixed VERTEX-, preventing OTS from echoing Vertex's own transmissions back as duplicate entities.

Config for OpenTAK Server

COT_ENABLED=true
COT_TAKSERVER_HOST=<ots-ip>
COT_TAKSERVER_PORT=8088        # OTS TCP CoT streaming port
COT_STALE_SECONDS=60
COT_RECEIVE_ENABLED=true

# Optional — leave blank to emit all types
COT_ENTITY_TYPES=aircraft,vessel,fire_incident

Entity types available for COT_ENTITY_TYPES

Type Source
aircraft ADS-B (Beast / OpenSky)
vessel AIS
aprs APRS packet radio
mesh_node Meshtastic / MeshCore
train Amtrak + GTFS-RT rail
fire_incident NIFC / fire.gov
stream_gauge USGS stream gauges
rf_sensor RTL-433
tak_client TAK field operators from OTS

Test plan

  • COT_TAKSERVER_HOST set: emitter log shows TCP connected to TAK server not UDP multicast
  • Entities appear in OTS web UI / connected ATAK clients
  • COT_ENTITY_TYPES=aircraft,vessel — only aircraft and vessel CoT reach OTS
  • COT_ENTITY_TYPES= (blank) — all entity types flow through
  • ATAK field operator positions appear on Vertex map as tak_client entities
  • No VERTEX- echo entities appear on Vertex map from OTS loopback
  • COT_TAKSERVER_HOST blank: emitter falls back to UDP multicast, ATAK devices on LAN receive CoT

🤖 Generated with Claude Code

https://claude.ai/code/session_01PswxT6xcRYioF1ZfgszgRi


Generated by Claude Code

claude added 2 commits June 22, 2026 21:49
Adds COT_ENTITY_TYPES env var (comma-separated list of entity_type strings).
When set, only matching entities are forwarded to the TAK server.
Empty (default) emits all types — no behaviour change for existing deployments.

Example: COT_ENTITY_TYPES=aircraft,vessel,fire_incident

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PswxT6xcRYioF1ZfgszgRi
@d3mocide d3mocide marked this pull request as ready for review June 22, 2026 22:08
@d3mocide d3mocide merged commit 7fad943 into main Jun 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants