SomnoTrace v1.4.1 Release Notes
This release brings significant improvements to historical CPAP settings tracking on SleepHQ/OSCAR, resolves authentication and pairing issues with newer Wellue O2 Ring models, prevents SleepHQ cloud upload timeout/cooldown issues, and adds timezone and DST edge-case protections.
🌟 Key Changes & Enhancements
💍 Wellue O2 Ring & O2 Ring S (Gen 1 & Gen 2) Fixes (Issue #177, Discussion #180)
- Little-Endian Timestamp Session Key Fix (commit
14bea1b): Corrected the byte-shifting logic in the OxyII auth key generation ((now >> (i * 8)) & 0xFF) for both Gen 2 (oximeter_oxyii.c) and Gen 1 legacy (oximeter_legacy.c) drivers. This fixes authentication rejection on newer hardware revisions such as the 2026 PO2 O2Ring-S (Issue #177, Discussion #180). - Serial & Firmware ASCII Guardrails (commit
3cc6105): Added strict printable ASCII validation during BLE pairing to reject un-decrypted or corrupt payloads, preventing invalid serial entries from polluting NVS storage. - Charging / Idle Loop Prevention (commit
bfaab55): Enhanced presence tracking (s_synced_this_idle) to stop repetitive sync attempts while the ring remains on its charger following a completed morning sync.
📈 Cumulative STR.edf & Accurate Daily Settings History (Issue #143)
- 365-Day Cumulative Retention: Extended
STR.edfretention from 30 days to a full 365 days (matching genuine ResMed AirSense 11 SD card behavior), backed safely by PSRAM with zero internal SRAM overhead. - Per-Day Settings Resolution & Permanent Anchor: Daily CPAP settings are now recorded alongside summary spools (
YYYYMMDD.settings.json) and backfilled from stream archives. The EDF header date is permanently anchored to the start of your archive, eliminating the rolling 30-day table distortion and resolving "Pressure: Unknown" glitches on SleepHQ and OSCAR.
☁️ SleepHQ Cloud Uploader Resilience (Issue #151)
- Auto-Reconnect on Stale Sockets: Implemented automatic TLS reconnection and session reset when Cloudflare/SleepHQ closes a keep-alive connection mid-upload.
- Eliminated False 60-Minute Cooldowns: Prevents broken sockets from cascading into false
"cannot open remote day"errors and locking the upload queue.
🕒 Timezone, DST & Noon-Day Edge Cases (Issue #183)
- DST Spring-Forward Resilience: Migrated fallback noon-day calculations to civil date arithmetic, ensuring therapy sessions occurring on 23-hour DST transition nights are mapped accurately.
- Authoritative Timezone Preservation: Protected settings-derived offsets from being overwritten by heuristic guesses in UTC+13 (New Zealand DST) and UTC+14 Pacific timezones.
- Automated Host Unit Tests: Added a standalone host unit test suite in
scripts/as11_time_test.cto verify timezone and noon-day calendar math across timezones.
❤️ Acknowledgements & Credits
Special thanks to the community members who helped test, report issues, and provide technical feedback for this release:
- @Plantucha for discovering and diagnosing the timestamp byte-shift bug in the OxyII auth handshake (#177) and providing comprehensive calendar edge-case analysis for timezone/DST handling (#183).
- @tonydatda for reporting pairing anomalies and testing with the new 2026 PO2 hardware revision (Discussion #180).
- @irfanguder for reporting and providing detailed logs for the SleepHQ upload cooldown issue (#151).