Skip to content

Commit 61f8147

Browse files
committed
Fix stale documentation across server, pecan, kvaser-bridge, and root docs
Audited docs against current code/config and corrected drift: sandbox docs still described the removed Cohere integration instead of MiniMax-M3 via the Anthropic-compatible API; several installer docs referenced services that no longer exist (startup-data-loader, timescaledb-explorer) or wrong env var names/ports/API routes (health-monitor, data-downloader, kvaser-bridge WS port, comms-setup path); root README referenced the removed pecan-bridge dir and was missing livestream/; car-simulate port docs and pecan's CAN log format decision doc were out of date with the shipped implementation.
1 parent c52733c commit 61f8147

16 files changed

Lines changed: 118 additions & 87 deletions

File tree

.hermes/plans/2026-05-21_124500-unified-health-endpoint.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Unified Health Endpoint
22

3+
> **Status: Implemented.** The `/health` endpoint exists (`universal-telemetry-software/src/status_server.py`), backed by `data.py` writing the health file, and the 8080 status page polls it every 2s (`universal-telemetry-software/status/index.html`). Documented in `universal-telemetry-software/README.md` and `deploy/MACBOOK_DEPLOY.md`. This plan is kept for historical context only.
4+
35
## Goal
46

57
Replace the three independent, semi-redundant health detection mechanisms in the telemetry stack with a single `/health` HTTP JSON endpoint that aggregates the authoritative state of every pipeline component. Surface it in the existing 8080 status page UI in place of the current WebSocket-derived indicators.

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,13 @@ Development and testing tools for simulating vehicle telemetry without physical
130130
- Example DBC (CAN database) file for message definitions
131131
- Docker Compose setups for isolated testing environments, including a dev/demo server configuration in `car-simulate/persistent-broadcast`
132132
133-
### CAN Adapter Bridges (`/kvaser-bridge`, `/pecan-bridge`)
133+
### CAN Adapter Bridge (`/kvaser-bridge`)
134134
135-
GUI adapters for Kvaser and PECAN CAN hardware interfaces. Used during bench testing when physical vehicle hardware is unavailable.
135+
GUI adapter that bridges a Kvaser CAN interface to the dashboard over WebSocket. Used during bench testing when physical vehicle hardware is unavailable.
136+
137+
### Livestream Overlay (`/livestream`)
138+
139+
OBS Browser Source overlay and setup notes for streaming telemetry alongside live race video. See `livestream/OBS-SETUP.md`.
136140
137141
### Flight Recorder (`/flight-recorder`)
138142
@@ -316,7 +320,7 @@ data-acquisition/
316320
│ └── slackbot/ # Slack bot
317321
├── secret-dbc/ # Git submodule: private DBC files (restricted)
318322
├── kvaser-bridge/ # Kvaser CAN adapter GUI
319-
├── pecan-bridge/ # PECAN CAN adapter
323+
├── livestream/ # OBS Browser Source overlay for race streams
320324
└── grafana-worker/ # Cloudflare Workers proxy for Grafana
321325
```
322326

car-simulate/persistent-broadcast/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ asyncio.run(connect())
153153

154154
## Data Format
155155

156-
The server broadcasts batches of 100 CAN messages at 5 Hz. Each message has the following format:
156+
The server broadcasts a mix of generators at different rates (accumulator at 10 Hz, standard-ID frames at 20 Hz, charger frames at 5 Hz), or replays a CSV file if `ENABLE_CSV=true`. Each message has the following format:
157157

158158
```json
159159
{
@@ -184,8 +184,8 @@ docker-compose up -d --build
184184

185185
## Port Configuration
186186

187-
- **8080**: WebSocket (ws://) - unencrypted
188-
- **8443**: Secure WebSocket (wss://) - encrypted
187+
- **9080**: WebSocket (ws://) - unencrypted
188+
- **9443**: Secure WebSocket (wss://) - encrypted
189189

190190
## Troubleshooting
191191

@@ -207,8 +207,8 @@ docker-compose up -d --build
207207

208208
You can customize the following variables in `docker-compose.yml`:
209209

210-
- `WS_PORT`: WebSocket port (default: 8080)
211-
- `WSS_PORT`: Secure WebSocket port (default: 8443)
210+
- `WS_PORT`: WebSocket port (default: 9080)
211+
- `WSS_PORT`: Secure WebSocket port (default: 9443)
212212
- `CSV_FILE`: Path to CSV data file
213213
- `SSL_CERT`: Path to SSL certificate
214214
- `SSL_KEY`: Path to SSL private key

kvaser-bridge/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,20 @@ python src/main.py
3333
A small window appears with:
3434
- **Channel** - select which Kvaser CAN channel to use
3535
- **Bitrate** - CAN bus bitrate (default 500k)
36-
- **WS URL** - WebSocket URL of the dashboard (default `ws://localhost:9080`)
36+
- **WS URL** - WebSocket URL of the dashboard (default `wss://127.0.0.1:9081`; TLS is on by default)
3737
- **Start/Stop Bridge** - toggle the connection
3838

3939
Click **Start Bridge** to begin streaming CAN frames to the dashboard.
4040

41+
### Trusting the certificate (first run)
42+
43+
The bridge serves a self-signed TLS certificate over `wss://`, so the browser dashboard will refuse the connection until that certificate is trusted:
44+
45+
- **Windows**: click **Trust Certificate (Automatic)** to install it into the current-user Root store (no admin rights needed; works for Chrome/Edge). Use **Manual…** instead for Firefox, or if the automatic install fails.
46+
- **Other platforms**: click **Trust Certificate** to open the bridge URL in the browser, then click through **Advanced → Proceed** and wait for the green "Certificate trusted" confirmation page.
47+
48+
Do this once per machine/browser before starting the bridge.
49+
4150
## Build (standalone binary)
4251

4352
```bash

pecan/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ npm run test:ui
193193

194194
#### Test Coverage
195195

196-
The test suite includes **42 tests** covering:
196+
The test suite covers:
197197

198198
- ✅ CAN log line parsing (CSV format)
199199
- ✅ CAN message decoding with DBC files

pecan/docs/CAN_LOG_FORMAT_DECISION.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# PECAN CAN Log Format Decision
22

3+
> **Status:** Phase 1 (PECAN CSV v1 machine columns) and Phase 4 (`.pecan` session container) are implemented — see `exportCsv()`/`exportPecanSession()` in `src/pages/Trace.tsx` and `src/utils/pecanSerializer.ts`/`src/utils/replayParser.ts`. The "Migration Note" and container `version` below are historical/outdated; the shipped container format is `version: 2` (`serializePecanV2`).
4+
35
## Decision Summary
46

57
Use a machine-readable raw frame format as the canonical PECAN replay format.

server/docs/comms-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Base Station RPI Car RPI
2424
### Base Station
2525

2626
```bash
27-
cd universal-telemetry-software
27+
cd universal-telemetry-software/deploy
2828
docker compose -f docker-compose.jitsi.yml up -d
2929
```
3030

@@ -36,7 +36,7 @@ Access: `http://<base-ip>:8000`
3636
# Set base station IP first
3737
export JITSI_URL=http://192.168.1.1:8000
3838

39-
cd universal-telemetry-software
39+
cd universal-telemetry-software/deploy
4040
docker compose -f docker-compose.jitsi.yml --profile car up -d car-jitsi-client
4141
```
4242

server/docs/containers/startup-data-loader.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Startup data loader
22

3+
> **Removed.** This service no longer exists in `server/installer/docker-compose.yml` and the `startup-data-loader/` directory it describes is gone. TimescaleDB now starts empty; use the `file-uploader` web UI (or the `data-downloader` scanner/API) to import CAN CSV archives. This doc is kept for historical reference only.
4+
35
The startup data loader seeds TimescaleDB with a small, deterministic dataset on first boot. It can also backfill additional files if you mount them into the container.
46

57
## Responsibilities

server/docs/docker-compose.md

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,39 @@ The `installer/docker-compose.yml` file orchestrates the complete DAQ telemetry
55
## High-level architecture
66

77
```text
8-
┌────────────┐ ┌────────────┐
9-
│ Startup │ │ TimescaleDB │
10-
│ data loader├───────────────────────────────▶│ + Explorer │
11-
└────────────┘ └────────────┘
12-
│ │
13-
│ ▼
14-
│ ┌─────────────────────┐
15-
│ │ Grafana dashboards │
16-
▼ └─────────────────────┘
17-
┌────────────┐ │
18-
│ File │ ▼
19-
│ uploader ├──────────────────────────────────▶│ Slack bot &
20-
└────────────┘ │ notifications
8+
┌──────────────┐ ┌───────────┐ ┌───────────────────┐
9+
│ File uploader│───▶│ │───▶│ Grafana dashboards │
10+
└──────────────┘ │ │ └───────────────────┘
11+
│ │
12+
┌──────────────┐ │ │ ┌───────────────────┐
13+
│ data-downloader ─┤ TimescaleDB├───▶│ grafana-bridge │
14+
│ (api/scanner/UI) │ │ │ (Pecan → Grafana) │
15+
└──────────────┘ │ │ └───────────────────┘
16+
│ │
17+
┌──────────────┐ │ │ ┌───────────────────┐
18+
│ sandbox + │────▶│ │ │ health-monitor │
19+
│ code-generator│ └───────────┘ │ (watches containers)│
20+
└──────────────┘ └───────────────────┘
21+
22+
┌──────────────┐ ┌──────────────┐
23+
│ slackbot │◀──▶│ code-generator│ (Slack `!agent` commands)
24+
└──────────────┘ └──────────────┘
25+
26+
┌──────────────┐
27+
│ lap-detector │ (disabled by default; opt in via --profile disabled)
28+
└──────────────┘
2129
```
2230

23-
All containers join the `datalink` bridge network, enabling them to communicate using Docker hostnames (for example `http://timescaledb:8181`).
31+
All containers join the `datalink` bridge network, enabling them to communicate using Docker hostnames (for example `http://timescaledb:5432`). The actual service list lives in `installer/docker-compose.yml`; see the [service catalogue in the installer README](../installer/README.md#service-catalogue) for ports and one-line descriptions of each service.
2432

2533
## Volumes
2634

2735
| Volume | Mounted by | Purpose |
2836
| --- | --- | --- |
2937
| `timescaledb-data` | `timescaledb` | Persists TimescaleDB metadata and stored telemetry. |
30-
| `timescaledb-explorer-db` | `timescaledb-explorer` | Keeps explorer UI preferences. |
3138
| `grafana-storage` | `grafana` | Stores dashboards, plugins, and Grafana state. |
39+
| `code-generator-chroma` | `code-generator` | Persists the ChromaDB RAG index used for code generation. |
40+
| `code-generator-cache` | `code-generator` | Persists the diskcache used to avoid re-generating identical requests. |
3241

3342
Remove volumes with `docker compose down -v` if you need a clean slate.
3443

@@ -42,14 +51,13 @@ The Slack bot relies on valid `SLACK_APP_TOKEN` and `SLACK_BOT_TOKEN` values. Le
4251

4352
## Health checks
4453

45-
- `timescaledb` exposes a TCP healthcheck on port 8181 to ensure the database is reachable before dependants start.
46-
- `startup-data-loader` waits an additional 5 seconds (`sleep 5`) to give TimescaleDB time to finish booting before loading the sample data.
54+
- `timescaledb` runs `pg_isready` against port 5432 to ensure the database is reachable before dependants start (`data-downloader-api` and `health-monitor` wait on `service_healthy`).
4755

4856
## Customisation tips
4957

5058
- Override exposed ports in `docker-compose.override.yml` if default host ports conflict with local services.
5159
- Drop in custom dashboards under `installer/grafana/dashboards/`—Grafana auto-imports JSON files at startup.
52-
- Swap the example dataset in `installer/startup-data-loader/data/` for real telemetry and update `example.dbc` to match your CAN specification.
60+
- Import real telemetry via the `file-uploader` web UI, and update `example.dbc` (or set `GITHUB_DBC_PATH`) to match your CAN specification.
5361

5462
## Useful commands
5563

@@ -59,7 +67,7 @@ cd installer
5967
docker compose config
6068

6169
# Tail logs for a specific service
62-
docker compose logs -f startup-data-loader
70+
docker compose logs -f code-generator
6371

6472
# Execute a shell inside the TimescaleDB container
6573
docker compose exec timescaledb /bin/sh

server/installer/LOCAL_STACK.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Local Stack — Offline Testing Guide
22

3+
> **Note:** This guide references `docker-compose.local.yml`, which does not currently exist in `server/installer/` (only `docker-compose.yml`, the full stack, is present). Create that override file yourself (scoping it to `timescaledb`, `grafana`, and `file-uploader`) before following the steps below, or run the equivalent `docker compose -f docker-compose.yml up -d timescaledb grafana file-uploader` against the full compose file instead.
4+
35
Minimal stack for testing without internet: TimescaleDB, Grafana, and file-uploader only.
46

57
## First-time setup (requires internet)

0 commit comments

Comments
 (0)