github ilyakruchinin/SomnoTrace v4.0.4

one hour ago

🌙 SomnoTrace v4.0.4 (since v4.0.3)

Focused bug-fix release resolving AirSense 10 (AS10) EDF import issues (#357) and hardening SomnoBridge BLE communication.

🐛 Fixes

  • AirSense 10 sessions failing to import (or importing breathing data only):
    • ⏱️ Tolerate AS10 EDF header timestamp lag: AirSense 10 machines commonly write the EDF header start time 1–2 seconds (occasionally slightly more under SD card stalls) after creating the filename. SomnoTrace now allows up to ±5 seconds of header-to-filename skew during machine identity verification while still rejecting mismatched or renamed files.
    • 🧩 Keep split AS10 waveform files together: On AS10, PLD and SAD filenames are frequently stamped 1 second after BRP for the same session. Restored the 2-second intra-session clustering window (and late-arrival augmentation matching) so BRP, PLD, and SAD stay grouped into one complete session instead of getting skipped or split into breathing-only sessions.
    • 🔄 Automatic recovery on upgrade: Bumped the staged-import cache marker so previously skipped AS10 days sitting in IMPORT/ are automatically re-evaluated and imported after updating—no manual cleanup required.
  • 📡 Ignore stale BLE control responses: Guarded SomnoBridge JSON response reassembly against unsolicited or stale request IDs so late duplicate STREAM_END frames can never interrupt or time out an active LIST_DIRECTORY or GET_DRIFT request.

🧪 Testing

  • Added regression tests covering AS10 header timestamp skew (+1..3 s accepted, >5 s rejected), 1-second BRP/PLD/SAD stem splits, late +1 s waveform augmentation, upgrade re-evaluation of cached v2 .import_state markers, and exact-stem SA2/SAD duplicate rejection.

Don't miss a new SomnoTrace release

NewReleases is sending notifications on new releases.