nightscout / AndroidAPS

Opensource automated insulin delivery system (closed loop)
https://wiki.aaps.app
GNU Affero General Public License v3.0
696 stars 1.7k forks source link

[3.1.0.3] Basal history incorrect when importing parameters after clean install #2061

Closed janvitos closed 2 years ago

janvitos commented 2 years ago

Hi,

Today, I did a clean install of AndroidAPS 3.1.0.3 and I noticed the basal history was incorrect after importing parameters.

Since I'm using SMB, the basal is much lower than with AMA. But after AndroidAPS restores all the settings and values either from xDrip+ or Nightscout (tried both), it also restores the full basal like if AMA was being used. This creates a major discrepancy in IOB.

When restoring settings on a fresh NSClient install, the basal history is correct (see attached screenshots below for comparison).

IOB on AndroidAPS is at 1.08 (wrong) while IOB on NSClient is at 0.37 (correct).

AndroidAPS Basal: https://imgur.com/a/pe8EYyn NSClient Basal: https://imgur.com/a/1J0hqzJ

MilosKozak commented 2 years ago

did it allign after some time?

janvitos commented 2 years ago

did it allign after some time?

No.

The new basal data that comes in is good, but the imported basal history remains wrong.

This is not an issue that happens often as we rarely have to reinstall / import parameters, but it is causing problems when we update AndroidAPS, for instance.

MilosKozak commented 2 years ago

yes, accepting TBR from NS is disabled in AAPS mode for safety reasons (it can be enabled only in engineering mode) Background: entering TRB in NS is very easy and accepting wrong data from NS could damage DB consistency