How reakt-sh/remote-control works
This repository is a research platform for remote train control, with train-side clients, a central server, and a browser operator interface. The principal workflow is operator commands routed through the server to a train client and its actuators, with sensor/video and telemetry data sent back for monitoring or recording. The implementation supports several protocol paths, including QUIC, WebSocket, MQTT, and WebRTC. Edges are limited to relationships visible in excerpts or the source index; README-level capabilities without shown wiring are marked unverified.
Main entry points: server_controller.py Connection routing · train_client.py Train control client · main.py Server application · LiveTrainView.vue Live control view
Components 25
Operator interface
- Live control view
web-client/src/views/LiveTrainView.vue - Recorded train view
web-client/src/views/RecordedTrainView.vue - Video handling
web-client/src/composables/useVideoPanel.js - Recording storage
web-client/src/scripts/dataStorage.js
Central server
- Server application
central-server/src/main.py - Control gateways
central-server/src/endpoints/remote_control_gateway.py - Train gateway
central-server/src/endpoints/train_gateway.py - Connection routing
central-server/src/server_controller.py - Train connections
central-server/src/managers/train_manager.py - Remote connections
central-server/src/managers/remote_control_manager.py - WebRTC sessions
central-server/src/managers/webrtc_manager.py - QUIC transport
central-server/src/quic_server.py - QUIC relay
central-server/src/managers/client_manager.py - MQTT bridge
central-server/src/mqtt_bridge.py - Telemetry store
central-server/src/influxdb.py
Train-side client
- Train client entry
train-client/src/main.py - Train control client
train-client/src/train_client.py - Client runtime
train-client/src/base_client.py - QUIC worker
train-client/src/network_worker_quic.py - Telemetry
train-client/src/telemetry.py
Sensors and media
- Camera capture
train-client/src/sensor/camera.py - Video source
train-client/src/sensor/file_processor.py - RTSP stream
train-client/src/sensor/rtsp_stream.py - Train actuators
train-client/src/motor_actuator.py
Other components
- Remote operator
Connections 33
- Remote operator → Live control view: operates
README.md - Live control view → Control gateways: sends commands
- Server application → Connection routing: starts
central-server/src/main.py - Server application → Control gateways: registers routes
central-server/src/main.py - Server application → Train gateway: registers routes
central-server/src/main.py - Server application → QUIC transport: starts
central-server/src/main.py - Server application → MQTT bridge: starts
central-server/src/main.py - Control gateways → Connection routing: uses
central-server/src/endpoints/remote_control_gateway.py - Train gateway → Connection routing: uses
central-server/src/endpoints/train_gateway.py - Connection routing → Train connections: delegates
central-server/src/server_controller.py - Connection routing → Remote connections: delegates
central-server/src/server_controller.py - Remote connections → WebRTC sessions: uses
central-server/src/managers/remote_control_manager.py - QUIC transport → QUIC relay: dispatches
central-server/src/quic_server.py - QUIC transport → Connection routing: uses
central-server/src/quic_server.py - QUIC relay → Connection routing: routes data
central-server/src/managers/client_manager.py - MQTT bridge → Telemetry store: writes telemetry
central-server/src/mqtt_bridge.py - Train client entry → Train control client: starts
train-client/src/main.py - Train client entry → Client runtime: starts
train-client/src/main.py - Train control client → Client runtime: inherits runtime
train-client/src/train_client.py - Client runtime → QUIC worker: uses
train-client/src/base_client.py - Client runtime → Telemetry: uses
train-client/src/base_client.py - Train control client → RTSP stream: constructs streams
train-client/src/train_client.py - Train control client → Camera capture: uses
train-client/src/train_client.py - Train control client → Train actuators: controls
- Train control client → Video source: uses
train-client/src/train_client.py - Camera capture → QUIC worker: sends video
- Telemetry → QUIC worker: sends measurements
- Control gateways → Train control client: routes commands
- QUIC worker → QUIC transport: exchanges data
README.md - Connection routing → Live control view: returns train data
- Live control view → Video handling: uses video
- Video handling → Recording storage: stores recordings
- Recorded train view → Recording storage: reads recordings