Skip to content

Colmi Ring 2 Pro support - #139

Open
foureight84 wants to merge 1 commit into
saksham2001:mainfrom
foureight84:feat/colmi-ring-2-pro
Open

foureight84 wants to merge 1 commit into
saksham2001:mainfrom
foureight84:feat/colmi-ring-2-pro

Conversation

@foureight84

Copy link
Copy Markdown
Contributor

Port of PulseLoopAndroid #100 (Colmi Ring 2 Pro support). The app builds and the full iOS test suite passes (1,156 tests). Nothing has been run against a real ring on iOS; the Android side is hardware-verified.

What's in the port:

  • Ring 2 Pro model: a catalog entry matching the exact name COLMI Ring 2 Pro, using QRing's product picture. Like QRing, it connects without OS pairing.
  • On-demand HRV, Stress and Temperature, using the same commands and settle rule as Android, including the temperature stop fix from the review. Only the final reading is saved, as one row. Temperature shows a decimal and follows the user's °C/°F setting. The measure buttons wrap at three per row, since this ring offers five.
  • Review fixes carried over:
    • The extra measurements only appear when the ring's own name identifies it as a Ring 2 Pro; picking it in the carousel isn't enough.
    • A measurement is refused during a workout, and stops if a workout starts partway through.
    • The new measurements use the plausibility ranges the app already applies to stored readings, rather than a second copy.
    • The per-vital state is held in one map.
  • Tests: the commands and frame decoding, the settle window, model matching, and the captured full-night sleep. iOS decodes that night correctly without changes: 404 minutes from 2:30, with the same light/deep/REM split.
  • Docs: a Ring 2 Pro section in docs/hardware/colmi.md.

Not ported, because iOS lacks what the Android change was built on:

  • The duplicate-row fix. iOS saves every streamed heart-rate and SpO₂ sample, not one settled reading, so there is nothing for that fix to attach to.
  • Naps. On this ring, any sleep of 3 hours or less is stored as a nap, and iOS never requests or reads naps. So short sleeps from a Ring 2 Pro won't show up on iOS. This is the gap most likely to be noticed.
  • Heart-rate stop command. iOS stops a heart-rate measurement with 0x69 02, where Android uses the official app's 0x6A. This predates PR Strava integration + shareable stat cards #100; I left it alone.

🤖 Generated with Claude Code

Port of PulseLoopAndroid saksham2001#100 (hardware-verified there; not yet run against
the ring on iOS).

- Catalog entry `COLMI Ring 2 Pro` (exact name, no serial suffix) with
  QRing's device art. GATT-only, like QRing.
- On-demand HRV / stress / temperature over `0x69` types 0a/08/0b, settled
  QRing's way: the last value, one second after the ring stops streaming
  (SpotVitalWindow, 75 s ceiling). Stop is `6a <type> <value> 00`, except
  temperature's fixed `6a 0b 00 00` (stopTemperatureCheck). The streamed
  values are not stored; the settled reading is published once.
- New capabilities manualStress / manualTemperature, granted per model
  (WearableModel.extraCapabilities) and only when the advertised name
  identifies that model, never from the carousel fallback.
- Refused during a workout, and aborted if one starts mid-run: `0x69`
  takes over the ring's only realtime engine.
- Measurement sheet gains Stress and Temperature (decimal, in the user's
  unit); the measure row wraps at three buttons.
- RingEventBridge.isPlausible is the one set of bands for both history
  and spot readings.
- Pins the Ring 2 Pro's captured full-night frame (404 min from 02:30);
  the existing decode handles it.

Not ported, because iOS lacks what the Android change built on: the
stop-ack gate reopen (iOS has no live-sample gate), and the nap test
(iOS has no `bc 3e` request/decode). See docs/hardware/colmi.md.

This branch has not been deployed

No deployments
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.

1 participant