Skip to content

Dashboard

farzad edited this page Aug 19, 2026 · 1 revision

Dashboard

A read-only live web view at http://localhost:6278/dashboard (with mcp-can demo or server running) — signal values grouped by ECU message, and a scrolling feed of recent frames, updating roughly twice a second over Server-Sent Events.

MCP-CAN live dashboard showing grouped ECU signal values and a recent-frames feed

What it shows

  • Live Signals — every signal grouped under its ECU message (ABS_STATUS, AIRBAG_STATUS, BODY_STATUS, ENGINE_STATUS), with current value and unit. Choice-decoded signals show the human-readable name (FAULT_PRESENT, not 1).
  • Recent Frames — a scrolling feed of the latest raw frames by message name and arbitration ID.
  • Header stats: total frame count, distinct signal count, server uptime.

How it's implemented

  • GET /dashboard serves a single self-contained HTML page (server/templates/dashboard.html) — no build step, no external assets, works offline.
  • GET /dashboard/stream is the SSE endpoint the page subscribes to; it polls LiveState.snapshot() every 0.5s and pushes the result as a JSON event.
  • Backed by the same LiveState background listener that serves read_can_frames/filter_frames/monitor_signal/get_vehicle_snapshot — see Architecture. There's no separate polling loop for the dashboard.

Read-only

No controls to send frames — it's an observation surface only.

When it's empty

Like every other bus-round-trip feature in this project, the dashboard only shows data when a simulator shares this server process's virtual bus — i.e. mcp-can demo. Pointed at a bare mcp-can server with no simulator (or a simulator running as a separate process, on a platform where the virtual backend doesn't share cross-process), it just shows "waiting for CAN traffic." See Troubleshooting.

Float display rounding

Signal values are rounded to 3 decimal places for display (live_state.py::_display_value) — a raw scale/offset conversion (e.g. 58 * 0.4) routinely lands on an IEEE-754 neighbor like 23.200000000000003; harmless but not worth showing a human, and this doesn't pretend to more precision than the signal's scale factor actually carries.

Clone this wiki locally