Skip to content

feat: node-to-server track posting via HTTP#3

Open
jonnyspicer wants to merge 12 commits into
mainfrom
feat/node-to-server-posting
Open

feat: node-to-server track posting via HTTP#3
jonnyspicer wants to merge 12 commits into
mainfrom
feat/node-to-server-posting

Conversation

@jonnyspicer

Copy link
Copy Markdown
Contributor

Summary

  • Adds server mode (--server flag) to tracker-host: an aiohttp HTTP server that receives track events from remote nodes via POST requests
  • Adds node_agent package (stdlib-only, no extra deps): runs retina-tracker locally on each Raspberry Pi and POSTs track events to the central server
  • Adds detection relay for staging/testing without a local blah2 instance
  • Wires existing GeolocatorInstance to server-mode NodeRegistry for optional server-side geolocation
  • Nodes self-register dynamically by pushing their blah2 config — no server pre-configuration needed

Closes #2

Architecture

Node (Raspberry Pi):
  blah2 → TCP → retina-tracker → stdout JSONL → node_agent → HTTP POST

Server:
  HTTP receive → NodeRegistry → OutputHandler (daily JSONL files)
                              → GeolocatorInstance (optional lat/lon/alt)

API Endpoints

Method Path Description
POST /api/node/{name}/config Register node, push radar config
POST /api/node/{name}/tracks Push track events (JSONL)
GET /api/nodes List registered nodes

Test plan

  • 44 unit tests passing (config, node_registry, server, node_agent, geolocator integration)
  • E2E verified with live data from radar3.retnode.com: 159 track events flowed through full pipeline
  • Deploy node_agent to a Pi with local blah2 running (no relay needed)
  • Test with geolocator enabled (requires retina-geolocator on server)

🤖 Generated with Claude Code

jehanazad and others added 12 commits February 16, 2026 00:52
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Python's default urllib User-Agent is blocked by Cloudflare Zero Trust.
Set User-Agent to retina-node-agent/1.0 on all outgoing HTTP requests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Post-review cleanup for Task 9: remove unused asyncio and field imports
from node_registry.py, add geolocator_enabled and geolocator_tcp_port_base
to config.yaml for discoverability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Send HTTP POSTS to central server (configurable in config.yml)

3 participants