github ilyakruchinin/SomnoTrace v4.1.0-beta1

one hour ago

SomnoTrace v4.1.0-beta1 Changelog (since v4.0.6)

✨ Highlights

  • 🔴 Live PPG Recording for Both Gen1 & Gen2 Rings: Capture full 150 Hz lossless dual-wavelength (IR + Red) raw optical PPG from both Gen1 (e.g., Oxyfit) and Gen2 (e.g., O2 Ring S / SHQO2Pro) rings right from the Web UI Recording Mode selector.
  • ⚡ Live-Only Sessions (No Post-Session Ring Downloads): When Live PPG Recording is enabled, SomnoTrace now builds your overnight vitals directly from the live stream as soon as you take the ring off — completely skipping post-session file transfers from the ring. Ideal for Gen1 rings with 4-hour memory caps or rings without onboard storage (Standard download mode remains unchanged).
  • 🗜️ New Lossless .ppg.gz Binary Format: Replaced massive ~160–230 MB raw CSVs with a compact, lossless multi-member gzip format (~10–14 MB per night) that is crash-resilient (each ~5 s chunk is an independent gzip member) and seamlessly resumes across mid-night toilet breaks or BLE drops (30-minute resume window).
  • 🧭 3-Axis Accelerometer Capture (Gen2) & Live Perfusion Index (PI%): Gen2 rings now stream 3-axis (X, Y, Z) accelerometer data alongside 150 Hz PPG, and both Gen1 and Gen2 live sessions now calculate 1 Hz optical Perfusion Index (PI%) into a backwards-compatible 6-channel SNTv3 track.

💍 Ring & BLE Improvements

  • 🚀 Gen2 (OxyII) Auto-Push & Zero-Drop Capture:
    • Switched Live PPG mode to autonomous BLE push streaming (0x10 auto-stream for vitals, 150 Hz PPG, and 3-axis ACC) with automatic fallback to burst-drained polling if a firmware doesn't push.
    • Fixed Gen2 raw PPG packet parsing and multi-packet FIFO draining — eliminating the ~32% sample drop seen when polling once per second.
  • 🔧 Gen1 (Oxy / Oxyfit) Support & Speedups:
    • Added Oxyfit discovery handling, fast BLE link-interval negotiation (7.5–20 ms), and write-without-response support for faster round-trips.
    • Burst-drains 0x1C 150 Hz raw IR+Red PPG with graceful fallback to vitals-only on older Gen1 firmware lacking 0x1C.

🛠️ Tooling, Docs & Testing

  • 🐍 Python .ppg.gz Decoder (scripts/ppg_decoder.py): Decode PPG1 optical waveforms and ACC1 3-axis accelerometer streams to CSV or JSON summaries, with built-in recovery for truncated tails.
  • 📖 Protocol & Format Spec: Added spec/0017-live-ppg-recording-and-format.md documenting the Gen1/Gen2 PPG & ACC protocols, .ppg.gz binary format, and THIRD-PARTY-NOTICES.md updates.
  • 🧪 Automated Host Tests: Added synthetic ppg_writer_test and cross-language ppg_contract_test suites covering lossless compression, discontinuities, ACC1 chunks, and power-loss tail recovery.

Don't miss a new SomnoTrace release

NewReleases is sending notifications on new releases.