Skip to content

Comments

feat: implement MQTT publishing for lap data in LapController and SolarMQTTClient#273

Merged
dastine0308 merged 2 commits intomainfrom
TEL-318-Send-Lap-data-through-MQTT
Jan 31, 2026
Merged

feat: implement MQTT publishing for lap data in LapController and SolarMQTTClient#273
dastine0308 merged 2 commits intomainfrom
TEL-318-Send-Lap-data-through-MQTT

Conversation

@dastine0308
Copy link
Contributor

@dastine0308 dastine0308 commented Jan 17, 2026

Summary by CodeRabbit

  • New Features
    • Lap data is now broadcast in real time, published over MQTT for external integration, and persisted to the database for reliable storage and later analysis.

✏️ Tip: You can customize this high-level summary in your review settings.

image

@dastine0308 dastine0308 requested a review from a team as a code owner January 17, 2026 21:21
@vercel
Copy link

vercel bot commented Jan 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
helios-telemetry Ready Ready Preview, Comment Jan 31, 2026 6:58pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

Adds MQTT lap-data publishing: a new topic and publish method in the MQTT client, and an MQTT publish step in the LapController's handleLapData flow before database insertion.

Changes

Cohort / File(s) Summary
MQTT Topic Definition
packages/server/src/datasources/SolarMQTTClient/SolarMQTTClient.types.ts
Added lapdataTopic: "lapdata" to the exported topics object.
MQTT Client Publisher
packages/server/src/datasources/SolarMQTTClient/SolarMQTTClient.ts
Imported ILapData and added publishLapData(lapdata: ILapData) which publishes JSON.stringify(lapdata) to the lapdataTopic with error logging.
Lap Controller Integration
packages/server/src/controllers/LapController/LapController.ts
Inserted a call to the MQTT client's publishLapData in handleLapData so lap data is published over MQTT before being inserted into DynamoDB.

Sequence Diagram

sequenceDiagram
    participant LapController as LapController
    participant MQTTClient as SolarMQTTClient
    participant Broker as MQTT_Broker
    participant DB as DynamoDB

    LapController->>MQTTClient: publishLapData(lapdata)
    MQTTClient->>MQTTClient: JSON.stringify(lapdata)
    MQTTClient->>Broker: publish to "lapdata" topic
    Broker-->>MQTTClient: ack
    MQTTClient-->>LapController: return
    LapController->>DB: insert lap data
    DB-->>LapController: ack
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped a small packet into the night,
Published lap-times with a soft little byte,
Over MQTT the moments flew,
Now laps sing loud and records grew,
A rabbit cheered — "Data looks right!"

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: implementing MQTT publishing for lap data across LapController and SolarMQTTClient, which aligns with the file modifications shown in the summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch TEL-318-Send-Lap-data-through-MQTT

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

justin-phxm
justin-phxm previously approved these changes Jan 17, 2026
Copy link
Collaborator

@justin-phxm justin-phxm left a comment

Choose a reason for hiding this comment

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

Clean code 🔥

@dastine0308 dastine0308 requested a review from promatty January 31, 2026 18:18
Copy link
Member

@promatty promatty left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@justin-phxm justin-phxm left a comment

Choose a reason for hiding this comment

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

lgtm

@dastine0308 dastine0308 merged commit 3d802fa into main Jan 31, 2026
8 checks passed
@dastine0308 dastine0308 deleted the TEL-318-Send-Lap-data-through-MQTT branch January 31, 2026 20:29
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.

3 participants