Skip to content

KpG782/colmi-ring-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Colmi Ring Dashboard

A professional, real-time web dashboard for Colmi R02/R09 smart rings built with Next.js 16, React 19, and Web Bluetooth API. Monitor your health metrics including heart rate, SpO2, steps, battery, accelerometer data, and train custom gesture controls directly in your browser.

License Next.js React TypeScript

Features

Health Monitoring

  • Real-time Heart Rate - Continuous BPM tracking with status indicators
  • SpO2 Blood Oxygen - Blood oxygen saturation monitoring with visual feedback
  • Step Tracking - Daily steps, calories, and distance with live updates
  • Battery Monitoring - Real-time battery level with status alerts
  • Activity Analytics - Detailed 15-minute interval activity breakdown

Gesture Training & Motion Tracking

  • Accelerometer Visualization - Real-time 3-axis motion data with pitch, roll, and yaw
  • Gesture Recording - Record and save custom hand gestures
  • Pattern Recognition - AI-powered gesture matching with confidence scoring
  • Action Triggers - Set custom actions (messages, images, sounds, URLs) for detected gestures
  • Data Smoothing - Adjustable smoothing levels for stable gesture detection
  • Import/Export - Save and share gesture libraries

User Experience

  • Direct Bluetooth Connection - No backend or server required, pure Web Bluetooth API
  • Professional UI - Clean, modern interface following open-source design principles
  • Responsive Design - Optimized for desktop, tablet, and mobile
  • Dark Mode - Full dark mode support throughout the application
  • Tabbed Navigation - Organized tabs for Overview, Health, Activity, Sensors, Gestures, and Advanced settings

πŸš€ Quick Start

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn
  • A Colmi R02 or R09 smart ring
  • A Web Bluetooth compatible browser:
    • Chrome 56+
    • Edge 79+
    • Opera 43+
    • Chrome for Android 56+

Note: Web Bluetooth is not supported in Firefox or Safari.

Installation

  1. Clone the repository
git clone https://github.com/yourusername/colmi-ring-dashboard.git
cd colmi-ring-dashboard
  1. Install dependencies
npm install
# or
yarn install
  1. Run the development server
npm run dev
# or
yarn dev
  1. Open your browser

Navigate to http://localhost:3000

Usage

Getting Started

  1. Click "Connect to Ring" on the landing page
  2. Select your Colmi device from the Bluetooth pairing dialog (e.g., "R02_4101")
  3. Grant permissions when prompted
  4. View your dashboard - All metrics will start updating automatically

Health Monitoring

  • Heart Rate: Navigate to Health tab, click "Start Monitoring" for continuous tracking
  • SpO2: Click "Start SpO2" to begin blood oxygen monitoring
  • Battery: Click refresh icon to update battery level
  • Steps: Automatically synced on connection and updated in real-time
  • Activity: View 15-minute interval breakdown in the Activity tab

Gesture Training

  1. Navigate to Gestures tab
  2. Start Raw Data Mode to begin receiving accelerometer data
  3. Record a Gesture:
    • Click "Start Recording"
    • Perform your gesture (e.g., point up, tilt left, twist clockwise)
    • Click "Stop Recording" (aim for 30-50+ samples)
  4. Name and Save your gesture
  5. Add Actions (optional):
    • Click on a saved gesture to expand details
    • Select "Add Action" to configure triggers
    • Choose action type: Message, Image, Sound, or URL
    • Actions trigger when gesture is detected with 80%+ confidence
  6. Toggle Actions on/off using the Action Triggers switch
  7. Export/Import gestures for backup or sharing

Advanced Features

  • Data Smoothing: Adjust smoothing level (1-10) for stable gesture detection
  • Calibration: Use the calibrate button to set current position as zero reference
  • Emergency Stop: Stop all monitoring with one click (stops ring flashing)
  • Ring Reboot: Restart the ring device if needed

πŸ—οΈ Project Structure

colmi-ring-dashboard/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ layout.tsx               # Root layout
β”‚   β”œβ”€β”€ page.tsx                 # Home page
β”‚   └── globals.css              # Global styles
β”œβ”€β”€ components/                   # React components
β”‚   β”œβ”€β”€ AccelerometerCard.tsx    # 3-axis motion visualization
β”‚   β”œβ”€β”€ ActivityCard.tsx         # Activity tracking and analytics
β”‚   β”œβ”€β”€ BatteryCard.tsx          # Battery level monitoring
β”‚   β”œβ”€β”€ ConnectionAlert.tsx      # Connection status alerts
β”‚   β”œβ”€β”€ ConnectionStatusCard.tsx # Detailed connection info
β”‚   β”œβ”€β”€ DailyStepsCard.tsx       # 15-minute interval breakdown
β”‚   β”œβ”€β”€ DashboardHeader.tsx      # Main dashboard header
β”‚   β”œβ”€β”€ DataDashboard.tsx        # Main dashboard component
β”‚   β”œβ”€β”€ DataQualityCard.tsx      # Data quality metrics
β”‚   β”œβ”€β”€ DebugInfo.tsx            # Debug information panel
β”‚   β”œβ”€β”€ GestureTrainer.tsx       # Gesture recording & recognition
β”‚   β”œβ”€β”€ HeartRateCard.tsx        # Heart rate monitoring
β”‚   β”œβ”€β”€ LiveStepsCard.tsx        # Real-time step updates
β”‚   β”œβ”€β”€ RingConnector.tsx        # Bluetooth connection UI
β”‚   β”œβ”€β”€ SpO2Card.tsx             # Blood oxygen monitoring
β”‚   β”œβ”€β”€ StatusFooter.tsx         # Dashboard footer
β”‚   β”œβ”€β”€ StepsCard.tsx            # Step counter display
β”‚   β”œβ”€β”€ Tabs.tsx                 # Tab navigation component
β”‚   └── index.ts                 # Component exports
β”œβ”€β”€ lib/                         # Core library code
β”‚   β”œβ”€β”€ colmi-ring-service.ts   # Bluetooth service implementation
β”‚   β”œβ”€β”€ constants.ts             # Protocol constants and commands
β”‚   β”œβ”€β”€ types.ts                 # TypeScript type definitions
β”‚   └── index.ts
β”œβ”€β”€ public/                      # Static assets
β”œβ”€β”€ .gitignore                   # Git ignore rules
β”œβ”€β”€ CODE_OF_CONDUCT.md          # Community guidelines
β”œβ”€β”€ CONTRIBUTING.md             # Contribution guidelines
β”œβ”€β”€ LICENSE                      # MIT License
β”œβ”€β”€ next.config.ts              # Next.js configuration
β”œβ”€β”€ package.json                # Dependencies and scripts
β”œβ”€β”€ postcss.config.mjs          # PostCSS configuration
β”œβ”€β”€ README.md                   # This file
└── tsconfig.json               # TypeScript configuration

Tech Stack

Key Features in Detail

Gesture Training System

The gesture training system allows you to:

  1. Record gestures by capturing raw accelerometer data in real-time
  2. Analyze patterns with automatic averaging and range calculation
  3. Match gestures using Euclidean distance algorithms with confidence scoring
  4. Trigger actions when gestures are detected (80%+ confidence threshold)
  5. Persist data with automatic localStorage saving and JSON import/export

Use Cases:

  • Quick actions (e.g., tilt left to open a URL)
  • Accessibility shortcuts
  • Silent notifications
  • Custom alert systems
  • Prototype development for wearable interactions

Accelerometer Visualization

  • Pitch (X-axis): Forward/backward hand tilt
  • Roll (Y-axis): Left/right hand tilt
  • Yaw (Z-axis): Clockwise/counter-clockwise wrist twist
  • G-Force Display: Real-time gravity force on each axis
  • Motion History: Visual graph of last 20 readings per axis
  • Calibration: Set any position as zero reference point

πŸ”§ Development

Available Scripts

# Start development server
npm run dev

# Build for production
npm run build

# Start production server
npm run start

# Run linter
npm run lint

Environment Variables

No environment variables required! This app runs entirely in the browser.

πŸ“± Browser Compatibility

Browser Support Notes
Chrome βœ… Yes Full support (56+)
Edge βœ… Yes Full support (79+)
Opera βœ… Yes Full support (43+)
Firefox ❌ No Web Bluetooth not supported
Safari ❌ No Web Bluetooth not supported
Chrome Android βœ… Yes Full support (56+)

🀝 Contributing

Contributions are welcome! Please read our Contributing Guidelines and Code of Conduct before submitting a PR.

How to Contribute

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • @atc1441 - For reverse engineering the Colmi protocol
  • colmi_r02_client - Python client that inspired this project
  • Colmi - For creating these amazing smart rings

πŸ› Known Issues

  • Web Bluetooth requires HTTPS in production (works with localhost in development)
  • Some browsers may require manual Bluetooth pairing before connection
  • Connection stability may vary based on browser and device

πŸ“š Related Projects

πŸ“§ Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Read the documentation in the docs/ folder
  3. Open a new issue with detailed information

Roadmap

Completed βœ…

  • Gesture training and recognition system
  • Accelerometer visualization with pitch/roll/yaw
  • Data export (JSON for gestures)
  • Real-time step tracking with live updates
  • Professional UI with dark mode
  • SpO2 monitoring
  • Action triggers for gestures

Planned πŸš€

  • Add automated tests (Jest, React Testing Library)
  • Historical data storage with IndexedDB
  • CSV export for health metrics
  • Create Progressive Web App (PWA)
  • Add more chart visualizations (trends, comparisons)
  • Support for additional Colmi models (R06, etc.)
  • Multi-language support (i18n)
  • Cloud sync for gesture libraries
  • Advanced gesture analytics
  • Gesture collision detection

About

A professional, real-time web dashboard for Colmi R02/R09 smart rings built with Next.js 16, React 19, and Web Bluetooth API. Monitor your health metrics including heart rate, SpO2, steps, battery, accelerometer data, and train custom gesture controls directly in your browser.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors