Repository navigation
Upload component replacement details instead of decoding raw data - #52
Conversation
Prime events now come from the replacement's primes, with their target and volume; a tubing replacement uploads a tubing prime. The payload carries the reason, fault code, previous stop time, insulin left, expiration and a componentId that hashes the component identifier with the user id, so lot and serial numbers are not uploaded. The raw data is no longer parsed.
Follows LoopKit dropping ReplaceableComponent.tubing.
Device identifiers are uploaded elsewhere already, so componentId is the pod's lot and sequence rather than a hash.
Claude ReviewI asked Claude to review as a set: LoopKit 703, OmnipodKit 244, TidepoolService PR 52 and NightscoutService PR 52. There were 2 findings among the 4 PR. I'm reporting the TidepoolService finding for Failed setups report primes that never happened. A pod that times out or is incompatible during pairing still uploads 2.6 U tubing and 0.5 U cannula primes to Tidepool. OmnipodKit should send no primes for these pods, and TidepoolService must not add its fallback cannula prime. |
The fallback cannula prime is for pump managers that send no details. A pod that faulted during setup reports no primes, and none should be uploaded.
|
Thanks @marionbarker, confirmed. loopandlearn/OmnipodKit#224 (68320b7) no longer sends primes for a pod that didn't complete setup. 51969a3 here uploads the fallback cannula prime only when the event has no |
Claude reviewClaude approves with latest commit. |
…omponent replacement - LoopKit to 4e2b9c50: pump events carry component replacement details (LoopKit/LoopKit#703) - OmnipodKit to 681d4cc: the pod change is described with a ComponentReplacement (loopandlearn/OmnipodKit#224) - TidepoolService to 71cc679: uploads the replacement details instead of decoding raw data (LoopKit/TidepoolService#52) - NightscoutService to 6952920: Site Change notes include the replacement reason (LoopKit/NightscoutService#52)
…outService, MinimedKit, MedtrumKit, LibreTransmitter and TrueTime.swift; add GlookoService (#595) * Bump Loop and OmnipodKit for watch plugin loading Loop: the watch app loads its CGM kit at run time (LoopKit/Loop#2693), and HealthKit authorization no longer blocks the main thread (LoopKit/Loop#2684). OmnipodKit: the watch can load OmnipodKit at run time (loopandlearn/OmnipodKit#225). * Bump G7SensorKit for run-time watch loading and early control notifications The watch loads G7SensorKit at run time (LoopKit/G7SensorKit#110), which the Loop watch app change in LoopKit/Loop#2693 depends on. Control notifications are enabled before authentication when eavesdropping (LoopKit/G7SensorKit#126). * Bump G7SensorKit to include run-time watch loading The previous bump stopped at LoopKit/G7SensorKit#126; next-dev's tip is LoopKit/G7SensorKit#110, which the Loop watch app change depends on. * Bump TrueTime.swift to ignore SIGPIPE on its sockets A write to a socket the server had closed raised SIGPIPE and killed Loop (LoopKit/TrueTime.swift#6). * Add GlookoService Adds Nutcasey/GlookoService at 459dc9d as a submodule, its project to the workspace and GlookoServiceKitPlugin to the LoopWorkspace scheme. * Bump G7SensorKit, LoopKit, Loop, TidepoolService and GlookoService - G7SensorKit to c86d9bb: a link that delivered a reading isn't a stopped session (#127), rescan after a 2 s sleep and connect when another app connects (#130), reissue the connect at power-on after a restore (#134), and a new sensor or code from the phone keeps the watch's session (#128) - LoopKit to bf8710f2: a device several controllers use can take a changed configuration in place (#706) - Loop to 60007b90: active services in the Issue Report (#2700) - TidepoolService to 365f124: pump component changes upload as reservoirChange and cannula prime events (#51) - GlookoService to 8349aa0: three alerts instead of twelve, localised text * Bump LoopKit, OmnipodKit, TidepoolService and NightscoutService for component replacement - LoopKit to 4e2b9c50: pump events carry component replacement details (LoopKit/LoopKit#703) - OmnipodKit to 681d4cc: the pod change is described with a ComponentReplacement (loopandlearn/OmnipodKit#224) - TidepoolService to 71cc679: uploads the replacement details instead of decoding raw data (LoopKit/TidepoolService#52) - NightscoutService to 6952920: Site Change notes include the replacement reason (LoopKit/NightscoutService#52) * update Glooko: Add Glooko regions: United States, Canada, Germany and France, improve logging * update Script/define_common to include GlookoService * fix: update Script/define_common for next-dev branches * Bump G7SensorKit for early setup from didConnect, the start-delay reconnect and the link hold LoopKit/G7SensorKit#135 and LoopKit/G7SensorKit#138. * Bump Loop, LoopKit, OmnipodKit, MinimedKit, MedtrumKit, G7SensorKit, LibreTransmitter and TrueTime.swift - Loop, LoopKit, OmnipodKit, MinimedKit and MedtrumKit: the watch shows the current pump reservoir level from pump status (LoopKit/Loop#2706, LoopKit/LoopKit#709, loopandlearn/OmnipodKit#230, LoopKit/MinimedKit#50, LoopKit/MedtrumKit#13) - Loop: reset the Presets icon when a restored preset expires (LoopKit/Loop#2685); watch layout moves up with Active Insulin first (LoopKit/Loop#2670) - LoopKit: the preset ISF preview gets a per-unit quantity (LoopKit/LoopKit#711) - G7SensorKit: a failed sensor shows as a row instead of its raw state name (LoopKit/G7SensorKit#142) - LibreTransmitter: glucose algorithm robustness (LoopKit/LibreTransmitter#66); Libre 2 EU sensors with the new patch info first byte pair (LoopKit/LibreTransmitter#67) - TrueTime.swift: iOS deployment target 15.0 (LoopKit/TrueTime.swift#4) --------- Co-authored-by: marionbarker <marionbarker@earthlink.net>
Requires LoopKit/LoopKit#703. Follows #51 and replaces its raw-data decoding with the explicit
ComponentReplacementon the pump event..pumpand.reservoirreplacements upload areservoirChange.primeper recorded prime, with its target and volume. Without details,.pumpand.infusionSetfall back to a cannula prime. The cannula prime keeps the existing datum id; other targets get a distinct id.componentIdcarries the component identifier, such as the pod's lot and sequence.