Artificial-Pancreas / iAPS

MIT License
180 stars 727 forks source link

TDD mismatch #527

Open MikePlante1 opened 9 months ago

MikePlante1 commented 9 months ago

Mismatching TDDs from yesterday: Apple Health Yesterday: 32.243 U Apple Health Basal + Bolus: 32.693 U Medtronic 722 pump: 34.50 U Nightscout: 35.3 U

I was running a 110-120% profile override for most of the day, no external insulin logged, no pump suspends/resumes

Running main 3.0.1 on an iPhone 14 Pro Max with iOS 17.3.1

pump history-24h-zoned.json was saved at 1am today, so I'm guessing it's missing the first hour of yesterday.

IMG_3716 tempImagefim0O9 IMG_3718

Screenshot 2024-02-13 at 12 25 41 AM

pumphistory-24h-zoned.json log_prev 6.txt

Jon-b-m commented 9 months ago

It's well known that the Nightscout TDD and basal count isn't accurate. It's tricky computing this amount accurately when you don't have the same data as the MDT or Omnipod pump has.

The TDD count in iAPS is very accurate, with all of the test I and others have done. This TDD count is not used for the Health Store integration though.

The Health integrations / and Apple Health app is using other code for this. I don't know the Apple code, but the Health Integration also has other issues, the most critical a rare fatal insulin writing bug, which is why I don't recommend the Health integration of insulin to be used currently.

Thanks for documenting this bug also 👍.

I need the health integration authors to look at this @DobbyWanKenoby and @avouspierre.