Skip to content

Read information via Python from Colmi Smart Ring

Notifications You must be signed in to change notification settings

Lupin3000/ColmiSmartRing

Repository files navigation

Colmi Smart Ring - Python

Minimum requirements

Static Static Static

Installation

Tested with Colmi Smart Ring R06 (but should work with mostly all Colmi Smart Rings).

  1. Clone this repository
  2. Create Python virtualenv (recommended)
  3. Install required Python modules/packages (via requirements.txt)
# clone repository
$ git clone https://github.com/Lupin3000/ColmiSmartRing.git

# change into cloned directory
$ cd ColmiSmartRing/

# create virtualenv
$ python -m venv .venv

# activate virtual environment
$ .venv/bin/activate

# update pip (optional)
(.venv) $ pip3 install -U pip

# show content of requirements.txt (optional)
(.venv) $ cat requirements.txt

# install all modules/packages
(.venv) $ pip3 install -r requirements.txt

# list all modules/packages (optional)
(.venv) $ pip3 freeze

Scan for Colmi Smart Ring

To use all Python scripts, you need the BLE address of your Colmi Smart Ring!

# scan for smart ring address
(.venv) $ python3 ColmiRingScanner.py

Sometimes the scanner will not find the Colmi Smart Ring, please try again! If you found the Colmi Smart Ring and selected it. The Python script will create a new directory (config). Inside this newly created directory a new file is created (colmi_address.py) with two constants (RING_NAME and RING_ADDRESS). These constants are used later by all other Python scripts.

Read data from Colmi Smart Ring

Note: Sometimes the BLE connection will not be established on first run, just try the respective Python script again.

Accelerometer

This Python script will read and print continuously the data from accelerometer (X, Y, Z).

To stop the script and BLE connection press keys: [Ctrl] + [c].

# read accelerometer data 
(.venv) $ python3 ColmiRingAccelerometer.py

Real-time Heart Rate

This Python script will read max. 5 values and print the average data for heart-rate (bpm).

To stop the script and BLE connection press keys: [Ctrl] + [c].

# read heart rate data 
(.venv) $ python3 ColmiRingHeartRate.py

Real-time SpO2

This Python script will read max. 5 values and print the average data for SpO2 (%).

To stop the script and BLE connection press keys: [Ctrl] + [c].

# read SpO2 data 
(.venv) $ python3 ColmiRingSPO2.py

About

Read information via Python from Colmi Smart Ring

Topics

Resources

Stars

Watchers

Forks

Languages