Skip to content

Unable to retrieve RR intervals from Scosche Rhythm+2.0 or Rhythm24 #17

Open
@aidanwhelan

Description

@aidanwhelan

I'm working on a project that very simply connects to a Scosche heart rate monitor armband and returns RR intervals (as the library documentation offers). Using the Rhythm+ armband, I can get these intervals, however the same code returns empty lists when that same RR interval attribute is fetched using the Rhythm+2.0 or Rhythm24 armbands (both newer models). Because I can use the Adafruit BLE Heart Rate library to get the BPM from all three armbands, I figured they must all use the same standard BLE Heart Rate Service profile, but are there any adaptations I have to make to support the newer Scosche models?

For reference, this is the code I'm running:

import time

import adafruit_ble
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.standard.device_info import DeviceInfoService
from adafruit_ble_heart_rate import HeartRateService

ble = adafruit_ble.BLERadio()

hr_connection = None

while True:
    print("Scanning...")
    for adv in ble.start_scan(ProvideServicesAdvertisement):
        if HeartRateService in adv.services:
            print("Found a HeartRateService advertisement.")
            hr_connection = ble.connect(adv)
            print("Connected.")
            break

    ble.stop_scan()
    print("Stopped scan.")

    if hr_connection and hr_connection.connected:
        print("Fetch connection")
        if DeviceInfoService in hr_connection:
            dis = hr_connection[DeviceInfoService]
            try:
                manufacturer = dis.manufacturer
            except AttributeError:
                manufacturer = "(Manufacturer Not Specified)"
            try:
                model_number = dis.model_number
            except AttributeError:
                model_number = "(Model Number Not Specified)"
            print(f"Device: {manufacturer} {model_number}")
        else:
            print("No device information")
        hr_service = hr_connection[HeartRateService]
        print(f"Location: {hr_service.location}")
        while hr_connection.connected:
            try:
                print(hr_service.measurement_values.rr_intervals)
            except:
                print("No HR Value")
            time.sleep(1)

For the Rhythm+ armband, I can get integers for heart_rate and a list of integers for rr_intervals.
For the Rhythm+2.0 and Rhythm24, I can only get integers for heart_rate and an empty list for rr_intervals.
All three armbands return None for contact and energy_expended.

Curiously, the Scosche representatives claim that the Rhythm24 armband is capable of reporting RR intervals (in the Scosche companion app, there is a Heart Rate Variability mode).
Is it possible that these two newer armbands are returning empty RR Interval sequences just because the hardware doesn't support those measurements, or are there code changes I need to make to support the newer models?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions