Skip to content

v0.7.0

Pre-release
Pre-release

Choose a tag to compare

@ilyakruchinin ilyakruchinin released this 09 Aug 16:09
c3a6c0e

What's new since v0.6.5

Reliability & crash recovery

  • Session recovery after crashes: If the device reboots mid-therapy (power loss, crash, or watchdog reset), the current therapy session is now properly recovered and continues recording instead of being lost or split into fragments.
  • Orphaned file cleanup: Added file-system sync calls that commit SD card metadata immediately, preventing orphaned clusters and corrupt files after unexpected power-offs.
  • Crash diagnostics: Crash dumps are now reliably preserved across reboots — the bootloader no longer erases partial dumps, and a 2-second delay before reboot ensures the dump finishes writing to flash. On the next boot, the device logs what crashed and which task was responsible.
  • Interrupted therapy alerts: Fixed a bug where therapy interruption alerts wouldn't fire if the stop happened outside the configured alert window but therapy had started within it.

Upload system overhaul

  • Complete rewrite of upload state tracking: The upload scheduler has been rebuilt from scratch to correctly track which sessions have been uploaded to each destination (SMB share and/or SleepHQ). Each destination is tracked independently, so a failure on one doesn't block the other.
  • Real-time upload progress in the web portal: Upload status now updates live via WebSocket — no more clicking "Refresh" or waiting for the page to poll. You see "Uploading session 20250101…" animate in real time.
  • Pending count wording: The upload status line now says "file groups pending" instead of just "pending", making it clearer what's being counted.

Web portal improvements

  • Unified WebSocket: The portal now uses a single persistent WebSocket connection for all real-time data (logs, device status, upload progress, BLE state). This eliminates the 3-second HTTP polling that caused socket exhaustion and error in recv: 104 warnings in the logs.
  • Multi-device support: The WebSocket now supports up to 4 concurrent viewers. If a 5th device connects, the oldest connection is politely evicted with a notification rather than silently rejected.
  • BLE status without polling: BLE pairing state changes (scanning, connecting, paired, etc.) now arrive instantly via WebSocket push instead of being polled every 500ms. A 5-second fallback poll only activates if the WebSocket is disconnected.
  • Pause when backgrounded: When you switch away from the browser tab, the device stops pushing status and upload updates to save bandwidth and CPU. Everything resumes instantly when you come back.
  • Reconnect with backoff: If the WebSocket drops (e.g. device reboots after OTA), the portal now reconnects with exponential backoff (1s → 1.5s → 2.25s → … capped at 30s) instead of hammering the device every 2 seconds.
  • Mobile-friendly navigation: Tab bar now scrolls horizontally on narrow screens instead of cramming 5 buttons into 360px. Action buttons stack vertically on mobile.
  • Dashboard loading feedback: Each chart panel shows a shimmer animation while its data is loading, and a pulsing dot appears next to the SomnoTrace logo in the header so you always know data is being fetched regardless of scroll position.
  • Taller charts on desktop: On screens with 900px+ height, dashboard chart panels automatically increase from 200px to 240px for better use of space.
  • Auto theme follows your system: "Auto" theme mode now respects your OS dark/light setting via prefers-color-scheme instead of using a simple 8am–8pm clock heuristic. Switching your OS theme live updates the portal.
  • Accessibility: Tab buttons now have proper ARIA roles and selected state for screen readers.
  • Refreshed visual design: Updated colour palette (sky-blue primary instead of teal), simplified card styling (all cards now share a consistent primary-coloured left border), and removed per-section coloured borders in favour of a cleaner look. Warning and danger cards are still distinguished by yellow/red borders.
  • Settings tab cleanup: Display & Sound and Therapy Alerts sections are no longer hidden behind collapsible toggles — they're always visible. Alert enable/disable is now a proper toggle switch. File upload for OTA uses a styled "Choose File" button instead of the raw browser file input.

Stability fixes

  • System event stack increased: The sys_evt task stack was too small, causing a stack overflow crash when BLE streaming and WiFi connection events fired simultaneously. Increased from the ESP-IDF default (2304 bytes) to 4096 bytes.
  • Wi-Fi event handler memory leak fixed: Fixed a memory leak in the Wi-Fi event handler that could accumulate over reconnection cycles.
  • SD card write corruption fix: Fixed a silent data corruption bug where the SDMMC driver wrote zeros for multi-sector DMA writes from internal RAM buffers. EDF record buffers are now allocated in PSRAM to avoid this hardware quirk.
  • BLE notifications enabled: Enabled NimBLE GATT server role (even though the device is central-only) so that incoming BLE notifications from the AirSense 11 are properly dispatched instead of silently dropped at the ATT layer.

Other

  • Timezone applied earlier: Timezone is now set before BLE initialisation, ensuring session IDs use correct local time even when therapy starts during a mid-therapy reconnect.
  • flow.snt fallback: EDF generator now falls back to flow.snt if the primary signal file is missing.
  • Settings STR generation: Fixed a bug in settings session trace (STR) file generation.