HOTAS Warthog — Internet Remote Control
Real-time remote control of hardware over the internet with a military-grade HOTAS joystick, MQTT, Raspberry Pi and WebRTC

The Challenge
Controlling physical hardware over the internet in real time — with the precision and responsiveness of a local wired connection. The goal was to let an operator sit at a desk with a Thrustmaster HOTAS Warthog A-10C (military-spec flight stick and throttle), and have every axis movement and button press travel across the internet to a Raspberry Pi driving motors on a remote device — with minimal latency, live video feedback, full telemetry, and a fail-safe system that guarantees the device stops immediately if communication is lost. The first target platform is a UGV (Unmanned Ground Vehicle), but the architecture is fully generic — anything controllable via GPIO, PWM, serial or I2C can be driven remotely with this system.

The Architecture
Three independent software components, each running on a different machine, communicating via MQTT over TLS: The RCS (Remote Control Station) runs on the operator's Linux PC. It reads the HOTAS via evdev (direct kernel-level input), normalizes all axes and buttons, and transmits control data at 50 Hz to the cloud. It also renders a desktop-native UI (React + Tailwind CSS inside pywebview) with four tabs: live video via WebRTC, real-time HOTAS mapping, telemetry gauges, and latency breakdown. The MQTT Broker (Mosquitto on a VPS) is the cloud rendezvous point — TLS-only, authenticated, with ACLs restricting each client to its exact topics. No plaintext, no anonymous connections. The Embedded Software on the Raspberry Pi receives control commands, runs a motor mixer (arcade or tank mode), applies acceleration ramps, and drives the hardware backend (GPIO PWM, PCA9685 for ESCs, or serial for PLCs — all pluggable via config). It also reads sensors at 1 Hz, publishes telemetry at 2 Hz, streams live video via WebRTC using aiortc + Pi Camera Module 3 NoIR, and runs a safety watchdog checking operator presence 10 times per second. Both the RCS and embedded software follow the same ROS2-inspired architecture: independent nodes communicating exclusively through an internal pub/sub bus, with a thread-safe StateManager and a Launcher handling ordered startup/shutdown.

The Operator Interface
The operator UI is a React 19 + Tailwind CSS 4 application served inside a native desktop window via pywebview. The design language is "Industrial Brutalism" — inspired by Lockheed Martin operations terminals. Near-black background, zero border-radius, JetBrains Mono typography, CRT effects with scanlines and noise. Gold accent, green for OK, red for alerts. Four tabs give the operator full situational awareness: • CONTROL — live video feed from the vehicle camera via WebRTC, with crosshair, tactical reticle, and a HUD sidebar showing latency, link status, and arm state. • MAPPING — full HOTAS visualization with XY pads and all buttons updating in real time at 50 Hz. • TELEMETRY — gauges for speed, battery voltage, motor temperature, GPS coordinates, with sparkline history charts. • LATENCY — complete RTT breakdown with jitter, packet loss metrics, and SVG sparklines.




Safety & Communication
The safety system is the most critical aspect of the project. If communication drops — unstable internet, PC shutdown, anything — the device must stop immediately. No margin for uncontrolled movement. The RCS sends a heartbeat every second, separate from control commands. The Pi monitors heartbeat age 10 times per second. If 3 seconds pass without a heartbeat, an emergency relay activates on GPIO, physically locking the motors while a software ramp brings all outputs to zero in half a second. The design is fail-safe by hardware: if the Raspberry Pi loses power, GPIOs float, the relay engages, motors lock. The system starts disarmed and only arms upon receiving the first operator heartbeat. Recovery is automatic when communication resumes. The three components communicate over eleven MQTT topics on TLS port 8883. Control and heartbeat use QoS 0 (latency over delivery guarantee at 50 Hz — losing one packet is invisible, the next arrives in 20ms). Telemetry and WebRTC signaling use QoS 1. A dedicated ping/pong mechanism where the Pi echoes immediately (bypassing internal bus) allows the RCS to calculate RTT, jitter and packet loss with precision.
Results
A production-grade remote control system that turns a military HOTAS joystick into a real-time internet controller for any hardware platform. Three independently deployable software components — operator station, cloud broker, and embedded controller — communicating securely over MQTT/TLS with WebRTC live video. Key metrics: 50 Hz control loop, sub-second latency over public internet, 3-second fail-safe timeout with hardware-level motor lockout, live 720p video at 30 fps via TURN relay, and a complete test suite (32 + 36 + 6 tests across the three projects). The entire system was developed using a monorepo with Git submodules and specialized AI agents per component, with a shared interface contract as single source of truth — enabling parallel development with full interface consistency.