Skip to content

Plan data handling & persistence #2

@ebowwa

Description

@ebowwa

Proposed Issue: Data Handling & Persistence Strategy

Summary

  • Capture decisions and open questions around persisting ring metrics beyond the current in-memory model.
  • Document constraints from ring hardware (packet cadence, battery cost) and how they influence storage choices.
  • Define milestones for introducing optional persistence once experimentation stabilises.

Background

  • The SwiftUI app currently holds RingMetrics in memory only; no Core Data or external store is used.
  • We now have an expanded “Sensor Capabilities & Application Opportunities” section describing what data we may want to keep.
  • Legacy tooling (e.g., RingCLI, Home Assistant integrations) shows demand for historical logs and cross-device automations.

Goals

  1. Evaluate lightweight persistence mechanisms (Core Data, SQLite, files, CloudKit) suitable for iOS-first scope.
  2. Decide on data granularity to retain (raw packets vs. parsed RingMetricsUpdate events vs. aggregated summaries).
  3. Outline migration path that keeps experimentation friction low while enabling opt-in storage later.

Non-Goals (for now)

  • Shipping a full persistence layer in the current milestone.
  • Implementing background sync, multi-device sharing, or cloud services.
  • Guaranteeing compatibility with legacy firmware mods beyond our documented command set.

Proposed Tasks

  • Audit metrics that need historical storage vs. session-only visibility.
  • Spike Core Data model sketch for RingSession, RingSample, etc.; compare against alternatives.
  • Draft data-retention policy (sample rates, max history, export formats).
  • Identify testing strategy (unit tests for parsers, integration tests for persistence writes/reads).
  • Capture battery and performance implications of realtime streaming + storage.

References

  • COLMI_RINGS_COMPREHENSIVE_DOCUMENTATION.md — new sensor/application overview section.
  • ring/ring/RingResponseParser.swift — source of parsed RingMetricsUpdate events.
  • Legacy/ATC_RF03_Ring — demonstrates firmware tweaks that may affect data cadence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions