github ilyakruchinin/SomnoTrace v4.0.0-beta1

pre-release5 hours ago

SomnoTrace v4.0.0-beta1

The SomnoBridge release. πŸŒ‰ SomnoTrace now pairs, provisions, time-syncs
and pulls therapy data through the Wi-Fi↔BLE bridge β€” the AirSense's SD
card never has to leave the machine.

✨ Highlights

  • πŸŒ‰ SomnoBridge integration β€” a complete BLE client (sb_ble,
    ~1.5k LoC): discovery, passkey pairing, bonded GATT ops over the
    framed protocol, streaming file pulls, and a /api/sb/op HTTP proxy
    that drives every bridge op from the portal.
  • πŸ• Authoritative UTC & drift correction β€” SomnoTrace anchors its
    NTP time on the bridge's monotonic clock with periodic exchanges,
    reads back the fitted drift on every sync pass, and applies the
    estimate when importing sessions β€” AS11 clock wander is corrected
    instead of silently skewing therapy data.
  • βš™οΈ "Configure SomnoBridge" dialog β€” card network picker (scrollable
    AP list, OPEN/SECURED badges, saved network), AS10/AS11 machine cards
    with the AS11 GMT-offset picker, an X close button, and an
    insecure-card flow: factory 88888888 and open cards are detected by
    a real probe-join, flagged with a warning, and can be re-secured
    in-place via EZSHARE_ADMIN β€” the bridge changes the card's own Wi-Fi
    password through its admin form and rejoins automatically.
  • πŸ“Š Bridge status in the portal β€” pairing state, card Wi-Fi,
    therapy-active and transfer-allowed indicators, last sync, and sync
    progress straight from the bridge.
  • πŸ“₯ Session augmentation β€” late-recovered stream files now merge
    into already-committed sessions instead of being discarded as
    duplicates; coverage is verified against the manifest and annotations
    are regenerated byte-identically.

πŸ› Fixes

  • πŸ—‚οΈ Duplicate recording folders β€” oximetry day labels are now a pure
    function of the recording's civil digits (ESP-local noon rule) and an
    existing recording_id under any day folder wins β€” DST/offset changes
    can no longer file one recording under two days.
  • πŸ” Uploader fingerprint ping-pong β€” duplicate recording_ids across
    day folders are deduplicated in reconcile (newest day wins) so two
    files can never take turns invalidating each other's uploads.
  • πŸ›‘ Retry storms β€” any unit that fails 5 uploads is parked and
    retried at most once a day, reviving automatically when its content
    changes. A local anomaly can never again become hours of HTTP 429s.
  • πŸ“± Logs tab scroll β€” narrow screens no longer open the log view at
    the oldest line of a page-long scrollback.

πŸ—οΈ Under the hood

  • sb_proto request/response framing with reassembly; BLE ops run off
    the NimBLE host task so provisioning never starves indications.
  • Transfer ledger coordination keeps already-downloaded card files from
    re-pulling β€” zero redundant transfers across reconnects.
  • edf_import events rendering extracted behind a byte-identical
    emit-to-file / emit-to-set abstraction for coverage checks.
  • AS11 BLE: connection handling improvements alongside the bridge path.

βœ… Testing

  • New sb_ble_test host suite: 153 checks covering pairing state
    machine, framing, reassembly and op dispatch.
  • somno_ml_worker survivor tests: guards, deadlines, SST checks,
    fragment grouping.
  • Full host suite: 31 targets, 0 failures, sanitizer-clean.

πŸ“š Docs

  • Windows 10/11 SMB share setup guide with screenshots (contributed).

Don't miss a new SomnoTrace release

NewReleases is sending notifications on new releases.