Skip to content

Repository files navigation

ring-motion

Status: WIP. The recognizer doesn't fully work yet — I'm still iterating on the algorithm. Templates auto-trim to motion events and the energy gate kills most still-ring false positives, but detection reliability isn't where I want it. See docs/ML.md for the current pipeline and the open items at the end of that file.

Teach a Colmi R02 smart ring to recognize your own motions — record an activity a handful of times, then it logs every time you do it again. Runs entirely in the browser. No cloud.

What it does

  1. Connects to a Colmi R02 (with the modded rt02r-low-latency firmware) over Web Bluetooth and streams its accelerometer at ~50 Hz.
  2. Lets you record 1–30 examples of any movement and name it ("rakaat", "knock", "double-tap", anything).
  3. Detects that movement live using Dynamic Time Warping against your recorded templates — no training, no GPU, no server.
  4. Appends each detection to an on-screen log with a count badge and a soft chime.

POC scope. The recognizer is whole-activity DTW with banded fast-path and lower-bound pruning. See docs/ML.md for the full pipeline once that doc lands.

Requirements

  • A Colmi R02 flashed with the low-latency firmware. The factory firmware streams at ~1 Hz, which is far too slow. Follow docs/FIRMWARE.md (once it lands) or the flasher at https://nosh118.github.io/colmi-ring-tools.
  • A browser with Web Bluetooth. That means Chrome / Edge / Brave on desktop or Android. iOS Safari does not have Web Bluetooth — for iPhone, use Bluefy.
  • HTTPS or localhost. Web Bluetooth refuses to run on plain HTTP.
  • Node 20+ for development.

Quick start (dev)

npm install
npm run dev

Open http://localhost:5173, click Pair, pick your ring.

Tech

  • Vite + TypeScript, vanilla DOM (no framework). Keeps the surface area tiny so the same code can move into a Capacitor native wrapper later.
  • IndexedDB (via idb-keyval) for templates — everything stays on-device.
  • uPlot for live charts.
  • Banded DTW + LB_Keogh, pure TypeScript with Float32Array.

Privacy

Templates, settings, and detection events live in your browser's IndexedDB. No network requests are made by this app to any third party.

Acknowledgements

The Web Bluetooth scaffolding and accelerometer packet decoder are adapted from Nosh118/colmi-ring-tools. See LICENSES.md.

License

MIT — see LICENSE.

About

WIP web POC: teach a Colmi R02 smart ring to recognize your own motions via few-shot DTW. Records 1-30 examples, then detects them live. Algorithm still under iteration.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages