SomnoTrace v4.0.2
A focused reliability and polish release that hardens O2 Ring Live PPG edge cases and fixes several subtle Bluetooth, import, and cloud-upload issues spotted in overnight logs. π οΈβ¨
π O2 Ring (Gen2) & Live PPG
- Fixed off-finger session pull after Live PPG recording: Resolved a BLE connection timeout when transitioning from live PPG streaming to pulling the full ring file. SomnoTrace now avoids duplicate MTU negotiation on the active link and cleanly reconnects once if the link drops before falling back to live-metrics conversion. π‘
- Automatic upgrade when the real ring file arrives later: If the ring dies right before download (triggering a synthetic live-metrics fallback) and is later charged, SomnoTrace now automatically replaces or retires the fallback once the real
.binfile is pulled from the ring β preventing duplicates and letting stricter cloud backends import the authentic file. π - Resilient handling of mid-session battery loss & reboots: If the ring abruptly loses power mid-night without signalling off-finger, SomnoTrace now automatically finalizes, scores, and uploads the recorded live session after the 30-minute resume window expires instead of keeping it stranded or discarding it on the next wear. Interrupted sessions also survive a SomnoTrace reboot or OTA update via boot-time recovery. π
- Smoother toilet breaks: Added a 12-second off-finger debounce during Live PPG so quick hand-washing or loose-finger blips don't split the night into fragments, and disabled the 2-minute reconnect curfew while resuming an active session so returning from out-of-range BLE dropouts reconnects promptly. πΆββοΈ
- Smarter ring clock sync & recovery: File downloads now continue cleanly even if Wi-Fi/NTP is temporarily unavailable, and recordings captured right after a 0%-battery RTC reset (e.g.
2000-01-01or2020-01-01) automatically recover their real start time from SomnoTrace's clock instead of failing or filing under the wrong year. β±οΈ - Safer unpairing, mode switching, and memory headroom: Fixed concurrency races when unpairing or switching oximeter mode during an active Live PPG session, moved 4 KB of BLE transmit buffers off the
ox_pulltask stack into PSRAM, and reported BLE link drops accurately instead of a misleadingserial mismatch (got '')warning. π‘οΈ
βοΈ Cloud Uploads
- No more CPAP upload delays from rejected oximetry/stage files: When a cloud backend permanently rejects a single oximetry or sleep-stage file (such as an unrecognised format), that file is now parked immediately instead of putting the whole backend into repeated cooldowns and delaying morning CPAP uploads. Account/auth/tier errors (like
401/402/403) still surface normally. π
π₯ CPAP Import & Export
- Eliminated duplicate morning
STR.edfrebuilds: Fixed a bug whereSTR.edfwas rebuilt twice in a row after a morning SomnoBridge import, cutting export time in half and preventingupload lease busycontention across SMB, SleepHQ, and AeriVue. β‘ - Stopped unnecessary 5-minute importer wakeups: When a retained
STR.edfis already in its 1-hour retry backoff and no new session files have arrived, SomnoBridge sync passes no longer wake the import worker every 5 minutes. - Preserved compact drift summaries on large sessions: Session manifests that exceed the size budget because of verbose SomnoBridge drift records now compact the drift summary in place (while keeping the full record in the sidecar file) instead of dropping it with a warning.
- Easier troubleshooting for conflicting
STR.edfdays: Warnings about conflicting or unreadable session identity now log the specific date involved.
π Web Portal
- Cleaner WebSocket handling: Added proper handling for WebSocket
PING/PONGandCLOSEcontrol frames and quieted expected warning spam when browser tabs close or disconnect abruptly. π§Ή