Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add support for Colmi R02 ring - #6

Merged
saksham2001 merged 9 commits into
mainfrom
feature/colmi-r02-multi-wearable
Jun 20, 2026
Merged

saksham2001 merged 9 commits into
mainfrom
feature/colmi-r02-multi-wearable

Conversation

@saksham2001

Copy link
Copy Markdown
Owner

Summary

This PR turns PulseLoop from a single-ring app into a device-agnostic wearable platform and adds full Colmi R02 (Yawell) support alongside the existing jring. The changes made in the PR will also help in adding support for new wearables in the future. Most of the Colmi rings use the same hardware as the Colmi R02, so this PR should make PulseLoop fully compatible with R02/R06/R10 and partially compatible with other.

The information protocol for Colmi R02 was gathered from tahnok's colmi_r02_client and GadgetBridge.

Changes

  • Platform core (Wearables/): WearableCoordinator, WearableDriver, RingSyncEngine, WearableCapability, RingDeviceType. - - RingBLEClient is now driver-agnostic (coordinator registry, per-connection driver, multi-notify, framing seam, Forget); RingSyncCoordinator is a façade.
  • jring refactor: moved behind JringCoordinator/JringDriver/JringSyncEngine.
  • Colmi driver: ColmiProtocol (UUIDs/opcodes/16-byte checksum packet), ColmiEncoder, ColmiDecoder, ColmiDriver (dual notify channels + big-data reassembly), ColmiSyncEngine (7-stage history machine + realtime-HR keepalive).
  • New metrics: HRV, stress, body temperature, REM sleep MeasurementKind/SleepStage/MeasurementSource/events/persistence; Device.deviceType/capabilities (additive SwiftData migration).
  • Capability-driven UI: bespoke Vitals cards: stress zone gauge, HRV trend band, temperature range chart, gated by device capability (jring auto-hides what it lacks); REM in the hypnogram; clean device card with last-synced + Forget; device-neutral onboarding; Coach reads the new metrics.
  • Hidden diagnostics: removed visible Debug button / Settings entries / Vitals "CONFIDENCE" line; DebugView + raw-packet capture are now #if DEBUG-only; new structured WearableLog store + DiagnosticsSubscriber + Export diagnostics (.json) in Settings (about)

Testing

  • Debug and Release builds: Passing
  • New ColmiDecoderTests (checksum, big-data reassembly across split packets, battery, manual/realtime HR, live activity, sleep REM/awake, temp, SpO₂) and CapabilityGatingTests: Passing
  • Touched existing suites (RingDecoderTests, EventBridgeTests, DebugRepositoryTests, MetricsServiceTodayTests) — passing, confirming no jring regression.

TO DO

  • On device testing with the ring.

@saksham2001
saksham2001 merged commit 600c7a8 into main Jun 20, 2026
@saksham2001 saksham2001 linked an issue Jun 20, 2026 that may be closed by this pull request
This was referenced Jun 20, 2026
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.

Add support for Colmi R11

1 participant