Skip to content

Group data-downloader sensors by DBC CAN messages#72

Open
wfr-data-acquisition wants to merge 8 commits into
mainfrom
downloader-grouping
Open

Group data-downloader sensors by DBC CAN messages#72
wfr-data-acquisition wants to merge 8 commits into
mainfrom
downloader-grouping

Conversation

@wfr-data-acquisition
Copy link
Copy Markdown
Contributor

Summary

  • Adds a grouped sensor API that left-joins real TimescaleDB sensor columns with the DBC message tree, using the DBC transmitter node as the subsystem label.
  • Fetches the most recently committed team DBC from GitHub using the existing DBC token, with local file and no-DBC fallbacks.
  • Updates the data-downloader UI to show collapsible, colour-coded CAN message groups with subsystem badges and hex/decimal CAN IDs, plus grouped sensor select options.
  • Consolidates data-downloader environment docs into the top-level server/installer/.env.example.

Test plan

  • Rebuilt and restarted data-downloader-api and data-downloader-frontend with Docker Compose.
  • Verified /api/sensors/grouped returns grouped DBC data from GitHub.
  • Previewed the UI locally and fixed the flex row collapse issue; groups are expanded by default for Ctrl+F.
  • Checked frontend diagnostics for edited files; no actionable introduced lint issues.

…r coding

- GET /api/sensors/grouped: left-joins DB sensor names against the DBC
  message/signal tree; transmitter node (MOBO, INV, etc.) used as subsystem;
  graceful fallback when no DBC is configured.
- POST /api/dbc/refresh: bust in-memory DBC cache on demand.
- dbc_utils.py: auto-discovers alphabetically newest .dbc in GitHub repo
  (no GITHUB_DBC_PATH required); caches to DATA_DIR/dbc_cache.dbc;
  GITHUB_DBC_PATH accepted as optional pin; falls back to DBC_FILE_PATH.
- config.py: GITHUB_DBC_TOKEN/REPO/BRANCH/PATH and DBC_FILE_PATH settings.
- requirements.txt: cantools + requests.
- docker-compose.yml: DBC env vars wired into data-downloader-api.
- SensorGroupedGrid.tsx: collapsible groups, 8-hue subsystem palette
  (djb2-stable), subsystem + hex CAN ID badges, dark/light mode.
- App.tsx: parallel grouped fetch; grouped grid when DBC available,
  flat fallback otherwise; DBC source tag.
- data-download.tsx: sensor select uses optgroup per message.
- styles.css: message group layout classes.
@haoruizhou haoruizhou requested a review from Copilot June 4, 2026 19:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants