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.gzBinary Format: Replaced massive ~160–230 MB raw CSVs with a compact, lossless multi-member gzip format (~10–14 MBper 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-channelSNTv3track.
💍 Ring & BLE Improvements
- 🚀 Gen2 (
OxyII) Auto-Push & Zero-Drop Capture:- Switched Live PPG mode to autonomous BLE push streaming (
0x10auto-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.
- Switched Live PPG mode to autonomous BLE push streaming (
- 🔧 Gen1 (
Oxy/Oxyfit) Support & Speedups:- Added
Oxyfitdiscovery handling, fast BLE link-interval negotiation (7.5–20 ms), andwrite-without-responsesupport for faster round-trips. - Burst-drains
0x1C150 Hz raw IR+Red PPG with graceful fallback to vitals-only on older Gen1 firmware lacking0x1C.
- Added
🛠️ Tooling, Docs & Testing
- 🐍 Python
.ppg.gzDecoder (scripts/ppg_decoder.py): DecodePPG1optical waveforms andACC13-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.mddocumenting the Gen1/Gen2 PPG & ACC protocols,.ppg.gzbinary format, andTHIRD-PARTY-NOTICES.mdupdates. - 🧪 Automated Host Tests: Added synthetic
ppg_writer_testand cross-languageppg_contract_testsuites covering lossless compression, discontinuities,ACC1chunks, and power-loss tail recovery.