Skip to content

aeon-lab/PolarH10-LSL-Streamer

Repository files navigation

Polar H10 to LSL Streamer

A Kivy-based GUI application for streaming Polar H10 sensor data (ECG, HR, RR-interval, and 3-axis accelerometer) to Lab Streaming Layer (LSL) with AEON lab compatibility modifications.

Overview

This application creates a unified LSL outlet with six channels from Polar H10 data:

  • Channel 0: ECG (µV)
  • Channel 1: Heart Rate (bpm)
  • Channel 2: RR-interval (ms)
  • Channel 3: Accelerometer X (mG)
  • Channel 4: Accelerometer Y (mG)
  • Channel 5: Accelerometer Z (mG)

Version History

AEON Lab Modifications

  • PolarGUIv3_AEON_MR&LA.py: Latest version with modifications by Md Mijanur Rahman of AEON lab for Realtime LSL Dashboard compatibility fixes.
  • PolarGUIv2_AEON_LA.py: Modified by Luis Alarcon of AEON lab for internal LSL compatibility.

Original Version

Key Features

  • Real-time Data Streaming: Streams multiple data types simultaneously through a single LSL outlet
  • BLE Connectivity: Automatically discovers and connects to Polar H10 devices
  • User-friendly GUI: Simple interface for device scanning and connection management
  • AEON Dashboard Compatibility: Modified channel labeling and data handling for seamless integration with AEON lab's realtime monitoring dashboard

Compatibility Fixes

The latest version (v3) includes several important compatibility improvements:

  1. Channel Labeling: Uses 'label' instead of 'name' for LSL channel metadata to ensure compatibility with AEON's dashboard
  2. NaN Handling: Replaces NaN values with zeros to prevent dashboard display issues
  3. Consistent Sampling: Uses ECG rate (130 Hz) as nominal rate for all channels
  4. Default Values: Initializes with reasonable defaults to maintain data stream continuity

Requirements

  • Python 3.7+
  • Kivy
  • Bleak (BLE library)
  • pylsl (Lab Streaming Layer)
  • Polar H10 Heart Rate Sensor

Installation

pip install kivy bleak pylsl

About

PolarH10 LSL Streamer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published