nightscout / AndroidAPS

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

RC3 / BYODA calibration / red triangle still there #1199

Closed robertrub closed 2 years ago

robertrub commented 2 years ago

AndroidAPS_LOG_1642575888700.log.zip

Look at logs at around 7:30

@MilosKozak You had modified rhe code for this problem but it is still there. I'm calibrating G6/BYODA 4 minutes after last reading and I get a double in the BGs and rhe red triangle.

Screenshot_20220119-073639_AndroidAPS.jpg Screenshot_20220119-073656_AndroidAPS.jpg

MilosKozak commented 2 years ago

i fixed it for G5. I'll check your G6 logs if it's the same

MilosKozak commented 2 years ago
07:30:46.643 [main] D/DATABASE: [DataReceiver.onReceive():29]: onReceive com.dexcom.cgm.EXTERNAL_BROADCAST Bundle{ sensorInsertionTime => 1641909055; senorInsertionTime => 1641909055; meters => Bundle[mParcelledData.dataSize=2764]; glucoseValues => Bundle[mParcelledData.dataSize=44124]; packageName => com.dexcom.g6.region3.mgdl; sensorType => G6; }Bundle
07:30:47.323 [pool-15-thread-3] D/DATABASE: [DexcomPlugin$DexcomWorker.doWork():185]: Inserted calibration TherapyEvent(id=1484, version=0, dateCreated=1642573847284, isValid=true, referenceId=null, interfaceIDs_backing=null, timestamp=1642573844000, utcOffset=3600000, duration=0, type=FINGER_STICK_BG_VALUE, note=null, enteredBy=null, glucose=104.0, glucoseType=null, glucoseUnit=MGDL)
07:30:47.334 [RxCachedThreadScheduler-86] D/CORE: [UserEntryLogger$log$2.invoke():45]: USER ENTRY: CALIBRATION Dexcom  [Timestamp(value=16425738 44000), TherapyEventType(value=FINGER_STICK_BG_VALUE), Mgdl(value=104.0)]
07:30:53.096 [main] D/DATABASE: [DataReceiver.onReceive():29]: onReceive com.dexcom.cgm.EXTERNAL_BROADCAST Bundle{ sensorInsertionTime => 1641909055; senorInsertionTime => 1641909055; meters => Bundle[mParcelledData.dataSize=2764]; glucoseValues => Bundle[mParcelledData.dataSize=44428]; packageName => com.dexcom.g6.region3.mgdl; sensorType => G6; }Bundle
07:30:53.590 [RxCachedThreadScheduler-59] D/DATABASE: [CompatDBHelper.dbChangeDisposable$lambda-18():35]: Firing EventNewBg GlucoseValue(id=31423, version=0, dateCreated=1642573853572, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=null, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573851000, utcOffset=3600000, raw=null, value=107.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:53.591 [RxCachedThreadScheduler-59] D/DATABASE: [CompatDBHelper.dbChangeDisposable$lambda-18():40]: Firing EventNewHistoryData GlucoseValue(id=31423, version=0, dateCreated=1642573853572, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=null, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573851000, utcOffset=3600000, raw=null, value=107.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:53.592 [pool-15-thread-2] D/DATABASE: [DexcomPlugin$DexcomWorker.doWork():160]: Inserted bg GlucoseValue(id=31422, version=0, dateCreated=1642573853571, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=null, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573843000, utcOffset=3600000, raw=null, value=108.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:53.593 [pool-15-thread-2] D/DATABASE: [DexcomPlugin$DexcomWorker.doWork():160]: Inserted bg GlucoseValue(id=31423, version=0, dateCreated=1642573853572, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=null, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573851000, utcOffset=3600000, raw=null, value=107.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:53.593 [pool-15-thread-2] D/DATABASE: [DexcomPlugin$DexcomWorker.doWork():164]: Updated bg GlucoseValue(id=31419, version=2, dateCreated=1642573853564, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7af0a6cb3b9000415cd9c, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573542000, utcOffset=3600000, raw=null, value=109.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
GlucoseValue(id=31423, version=0, dateCreated=1642573853572, isValid=true, referenceId=null, interfaceIDs_backing=null, timestamp=1642573851000, utcOffset=3600000, raw=null, value=107.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
GlucoseValue(id=31422, version=0, dateCreated=1642573853571, isValid=true, referenceId=null, interfaceIDs_backing=null, timestamp=1642573843000, utcOffset=3600000, raw=null, value=108.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:55.644 [RxCachedThreadScheduler-56] D/NSCLIENT: [NSClientPlugin.onStart$lambda-5():124]: DBUPDATE entries Sent PairGlucoseValue 61e7af0a6cb3b9000415cd9c {"device":"AndroidAPS-DexcomG6","date":1642573542000,"dateString":"2022-01-19T06:25:42.000Z","isValid":true,"sgv":109,"direction":"Flat","type":"sgv"}31420/31423
07:30:57.664 [RxCachedThreadScheduler-56] D/NSCLIENT: [NSClientPlugin.onStart$lambda-5():124]: DBADD entries Sent PairGlucoseValue {"device":"AndroidAPS-DexcomG6","date":1642573843000,"dateString":"2022-01-19T06:30:43.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv"} 31421/31423
07:30:58.832 [RxCachedThreadScheduler-59] D/DATABASE: [CompatDBHelper.dbChangeDisposable$lambda-18():35]: Firing EventNewBg GlucoseValue(id=31422, version=1, dateCreated=1642573858821, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7b0216cb3b9000415cda2, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573843000, utcOffset=3600000, raw=null, value=108.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:58.833 [RxCachedThreadScheduler-59] D/DATABASE: [CompatDBHelper.dbChangeDisposable$lambda-18():40]: Firing EventNewHistoryData GlucoseValue(id=31422, version=1, dateCreated=1642573858821, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7b0216cb3b9000415cda2, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573843000, utcOffset=3600000, raw=null, value=108.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:58.835 [RxCachedThreadScheduler-59] D/DATABASE: [NSClientAddAckWorker.doWork$lambda-3():76]: Updated ns id of GlucoseValue GlucoseValue(id=31422, version=0, dateCreated=1642573853571, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7b0216cb3b9000415cda2, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573843000, utcOffset=3600000, raw=null, value=108.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:58.845 [RxCachedThreadScheduler-56] D/NSCLIENT: [NSClientPlugin.onStart$lambda-5():124]: DBADD entries Sent PairGlucoseValue {"device":"AndroidAPS-DexcomG6","date":1642573851000,"dateString":"2022-01-19T06:30:51.000Z","isValid":true,"sgv":107,"direction":"Flat","type":"sgv"} 31422/31424
07:30:59.550 [RxCachedThreadScheduler-71] D/DATABASE: [CompatDBHelper.dbChangeDisposable$lambda-18():35]: Firing EventNewBg GlucoseValue(id=31423, version=1, dateCreated=1642573859529, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7b0226cb3b9000415cda4, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573851000, utcOffset=3600000, raw=null, value=107.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:59.552 [RxCachedThreadScheduler-71] D/DATABASE: [CompatDBHelper.dbChangeDisposable$lambda-18():40]: Firing EventNewHistoryData GlucoseValue(id=31423, version=1, dateCreated=1642573859529, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7b0226cb3b9000415cda4, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573851000, utcOffset=3600000, raw=null, value=107.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
07:30:59.555 [RxCachedThreadScheduler-71] D/DATABASE: [NSClientAddAckWorker.doWork$lambda-3():76]: Updated ns id of GlucoseValue GlucoseValue(id=31423, version=0, dateCreated=1642573853572, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7b0226cb3b9000415cda4, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573851000, utcOffset=3600000, raw=null, value=107.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
GlucoseValue(id=31423, version=1, dateCreated=1642573859529, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7b0226cb3b9000415cda4, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573851000, utcOffset=3600000, raw=null, value=107.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
GlucoseValue(id=31422, version=1, dateCreated=1642573858821, isValid=true, referenceId=null, interfaceIDs_backing=InterfaceIDs(nightscoutSystemId=null, nightscoutId=61e7b0216cb3b9000415cda2, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1642573843000, utcOffset=3600000, raw=null, value=108.0, trendArrow=FLAT, noise=null, sourceSensor=DEXCOM_G6_NATIVE)
MilosKozak commented 2 years ago

i'd need one more example. It's not so straightforward like G5

robertrub commented 2 years ago

OK, I'll need to change my sensor tomorrow. I'll try to calibrate >4 min and see if it triggers. Will post logs here.

robertrub commented 2 years ago

@MilosKozak I tested at 3 min and 4 min after last BG but didn't get a double BG... Next time, I'll test just when 4 becomes 5 and see if I get the red triangle. Will give more info here.

robertrub commented 2 years ago

@MilosKozak

It happened again. I think that I was around 4.5 min past last BG.

Screenshot_20220124-192203_AndroidAPS.jpg

Strangely, the GitHub app doesn't let me add the log file. I'll add via the web interface...

AndroidAPS_LOG_1643048483321.log.zip

MilosKozak commented 2 years ago

1st try https://github.com/nightscout/AndroidAPS/commit/1aa4f7452c58630c66dd4b56e6b4967341557700

MilosKozak commented 2 years ago

disabled BOYDA calibration button https://github.com/nightscout/AndroidAPS/commit/74daf2e7845c2568f1329208bc628eae2b5e8b6a

robertrub commented 2 years ago

@MilosKozak Sorry but your first try didn't solve the problem.

Entered calibration directly in BYODA maybe 15-20 seconds before BYODA reads the BG from the transmitter. I got the double BGs in AAPS. Screenshot_20220125-193145_AndroidAPS.jpg Screenshot_20220125-193200_AndroidAPS.jpg

FYI, the ligne highlighted in RED is the "normal" reading and the one just above is the calibration value.

If it helps, the real timing was calibration followed by a "normal" reading but in AAPS, the order is reversed. "Normal" reading was registered first and the calibration BG was noted later.

Look at the logs around 19:29 to 19:31

AndroidAPS_LOG_1643135529010.log.zip

MilosKozak commented 2 years ago

2nd try https://github.com/nightscout/AndroidAPS/commit/900c5db0dc71c63ddef5e93586fbcd9b58588375

robertrub commented 2 years ago

@MilosKozak Seems like the 2nd try is the good one :) Just tested at 12 sec before new BG read and didn't have a double in AAPS As you can see, the 92 (which is the "real blood" test result) arrived and stayed at +6 minutes and (I suppose) the BG via the transmitter at +5 min was deleted :) Screenshot_20220128-191707_AndroidAPS.jpg Great job, tnx. Leave this issue open for a couple of days so that I can test some more and add if needed. AndroidAPS_LOG_1643394450867.log.zip

vanelsberg commented 2 years ago

Did not see this problem, tested anyway. Did 6 calibrations using BYODA v1.9 (not started from AAPS) within 4-5 min: no "red triangle". Tested OK!