Polar H10 Integration

Polar H10 Integration

The Polar H10 chest strap is the gold standard for consumer heart rate monitoring. It provides beat-to-beat RR intervals via Bluetooth Low Energy, enabling high-precision HRV analysis.

How It Works

  1. Connect to the Polar H10 via Web Bluetooth in the browser (Chrome, Edge) or native BLE on mobile
  2. Subscribe to the Heart Rate Measurement characteristic (UUID 0x2A37)
  3. Extract heart rate and RR intervals from each notification
  4. Calculate HRV metrics (RMSSD, SDNN) from the RR intervals
  5. Send to Nefesh via POST /v1/ingest

Example: Web Bluetooth Connection

// Request Bluetooth device
const device = await navigator.bluetooth.requestDevice({
  filters: [{ services: ['heart_rate'] }]
});

// Connect and subscribe
const server = await device.gatt.connect();
const service = await server.getPrimaryService('heart_rate');
const char = await service.getCharacteristic('heart_rate_measurement');

char.addEventListener('characteristicvaluechanged', (event) => {
  const value = event.target.value;
  const hr = value.getUint8(1);
  // Extract RR intervals from bytes 2+ (16-bit little-endian, in 1/1024s)
  // Calculate RMSSD/SDNN from collected RR intervals
  // Send to Nefesh API
});

await char.startNotifications();

Sending to Nefesh

await fetch('https://api.nefesh.ai/v1/ingest', {
  method: 'POST',
  headers: {
    'X-Nefesh-Key': 'YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    session_id: 'your-session-id',
    timestamp: new Date().toISOString(),
    heart_rate: 74,
    rmssd: 42.5,
    sdnn: 51.3,
    source_device: 'polar_h10',
  }),
});

Recommended Update Frequency

Send data every 5-10 seconds. The Polar H10 sends HR notifications approximately once per second, but HRV metrics (RMSSD, SDNN) require a window of at least 5 seconds of RR intervals to be meaningful.

Browser Support

BrowserWeb Bluetooth
Chrome (desktop + Android)Supported
EdgeSupported
Safari / iOSNot supported — use native BLE
FirefoxNot supported