diff --git a/.gitignore b/.gitignore index 4b311a1123..d9e995910d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ app/.classpath app/.settings/org.eclipse.buildship.core.prefs wear/.classpath wear/.settings/org.eclipse.buildship.core.prefs +app/nsclient/* +app/nsclient2/* +app/pumpcontrol/* diff --git a/.idea/dictionaries/project_dictionary.xml b/.idea/dictionaries/project_dictionary.xml index 79a1572acb..2e08ebd897 100644 --- a/.idea/dictionaries/project_dictionary.xml +++ b/.idea/dictionaries/project_dictionary.xml @@ -3,9 +3,11 @@ aaps abcdef + accu acked actionstring aidex + alarmack allowednumbers androidaps autosens @@ -26,11 +28,15 @@ carbsreq careportal cellnovo + chek + clearalarm crashlytics danar danars dataset datasets + dbadd + dbupdate devicestatus devicestatuses devslope @@ -39,12 +45,14 @@ diaconn enteredby enteredinsulin + eopatch eveningoutpost eversense extendedbolus fileprovider firebase glimp + glunovo gson hmac iage @@ -79,12 +87,14 @@ pred profileswitch pumpbtcomm + pumpcontrol quickwizard readstatus realduration refresheventsfromnightscout rileylink roboelectric + rozman sgvs shortgramm sitechange @@ -108,7 +118,8 @@ tirs totp tunedays - uart + uart + urgentalarm wizzardpage xdrip xstream diff --git a/app/build.gradle b/app/build.gradle index 9d2b1a8d80..f7513468c6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -97,12 +97,6 @@ def allCommitted = { -> return stringBuilder.toString().isEmpty() } -tasks.matching { it instanceof Test }.all { - testLogging.events = ["failed", "skipped", "started"] - // testLogging.events = ["failed", "skipped", "started", "standard_out"] use to display stdout in travis - testLogging.exceptionFormat = "full" -} - android { namespace 'info.nightscout.androidaps' @@ -111,7 +105,7 @@ android { defaultConfig { multiDexEnabled true versionCode 1500 - version "3.0.0.2-dev-n" + version "3.1.0.3-dev-a" buildConfigField "String", "VERSION", '"' + version + '"' buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"' buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"' diff --git a/app/src/main/assets/OpenAPSSMBDynamicISF/determine-basal.js b/app/src/main/assets/OpenAPSSMBDynamicISF/determine-basal.js index 2944f6077f..f3ff906aac 100644 --- a/app/src/main/assets/OpenAPSSMBDynamicISF/determine-basal.js +++ b/app/src/main/assets/OpenAPSSMBDynamicISF/determine-basal.js @@ -203,206 +203,97 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ // 80 mg/dL with low_temptarget_lowers_sensitivity would give 1.5x basal, but is limited to autosens_max (1.2x by default) } + //********************************************************************************* + //** Start of Dynamic ISF code for predictions ** + //********************************************************************************* - var profile_sens = round(profile.sens,1) - var sens = profile.sens; + console.error("---------------------------------------------------------"); + console.error( " Dynamic ISF version Beta 1.6.5 "); + console.error("---------------------------------------------------------"); - var now = new Date().getHours(); - if (now < 1){ - now = 1;} - else { - console.error("Time now is "+now+"; "); - } - //********************************************************************************* - //** Start of Dynamic ISF code for predictions ** - //********************************************************************************* + var variable_sens = profile.variable_sens; + var TDD = profile.TDD; + var insulinDivisor = profile.insulinDivisor; - console.error("---------------------------------------------------------"); - console.error( " Dynamic ISF version Beta 1.6.4 "); - console.error("---------------------------------------------------------"); + //********************************************************************************* + //** End of Dynamic ISF code for predictions ** + //********************************************************************************* - if (meal_data.TDDAIMI7){ - var tdd7 = meal_data.TDDAIMI7; - } - else{ - var tdd7 = ((basal * 12)*100)/21; - } - console.error("7-day average TDD is: " +tdd7+ "; "); - - if (meal_data.TDDLast24){ - var tdd_24 = meal_data.TDDLast24; - } - else { - var tdd_24 = (( basal * 24 ) * 2.8); - } - - if (meal_data.TDDPUMP){ - var tdd_pump = ( (meal_data.TDDPUMP / now ) * 24); - } - else { - var tdd_pump = (( basal * 24 ) * 2.8); - } - console.log("Rolling TDD for last 24 hours is: "+tdd_24+"; "); - - /*var tdd_pump_now = meal_data.TDDPUMP; - var tdd_pump = ( tdd_pump_now / (now / 24));*/ - //var TDD = (tdd7 * 0.4) + (tdd_pump * 0.6); - - var tdd1 = meal_data.TDDAIMI1; - var tdd_4 = meal_data.TDDLast4; - var tdd8to4 = meal_data.TDD4to8; - var tdd_last8_wt = ( ( ( 1.4 * tdd_4) + ( 0.6 * tdd8to4) ) * 3 ); - - console.error("Rolling 8 hours weight average: "+tdd_last8_wt+"; "); - console.error("1-day average TDD is: "+tdd1+"; "); - console.error("7-day average TDD is: " +tdd7+ "; "); - - //TDD = ( tdd_last8_wt * 0.6) + ( tdd7 * 0.4 ); - - var TDD = ( tdd_last8_wt * 0.33 ) + ( tdd7 * 0.34 ) + (tdd1 * 0.33); - console.log("TDD = " +TDD+ " using average of 7-day, 1-day and weighted 8hr average"); - - - //var ins_val = 75; - var insulin = profile.insulinType; - console.log("Insulin Peak = "+profile.insulinPeak+"; "); - //console.log("Initial insulin value for ISF: "+ins_val+"; "); - //console.log("Current value for insulin: "+insulin+"; "); - - var ins_val; - if (profile.insulinPeak > 65) { // lyumjev peak: 45 - ins_val = 55; - } else if (profile.insulinPeak > 50 ){ // ultra rapid peak: 55 - ins_val = 65; + if ( high_temptarget_raises_sensitivity && profile.temptargetSet && target_bg > normalTarget + || profile.low_temptarget_lowers_sensitivity && profile.temptargetSet && target_bg < normalTarget ) { + // w/ target 100, temp target 110 = .89, 120 = 0.8, 140 = 0.67, 160 = .57, and 200 = .44 + // e.g.: Sensitivity ratio set to 0.8 based on temp target of 120; Adjusting basal from 1.65 to 1.35; ISF from 58.9 to 73.6 + //sensitivityRatio = 2/(2+(target_bg-normalTarget)/40); + var c = halfBasalTarget - normalTarget; + sensitivityRatio = c/(c+target_bg-normalTarget); + // limit sensitivityRatio to profile.autosens_max (1.2x by default) + sensitivityRatio = Math.min(sensitivityRatio, profile.autosens_max); + sensitivityRatio = round(sensitivityRatio,2); + console.log("Sensitivity ratio set to "+sensitivityRatio+" based on temp target of "+target_bg+"; "); + } else if (typeof autosens_data !== 'undefined' && autosens_data) { + sensitivityRatio = autosens_data.ratio; + console.log("Autosens ratio: "+sensitivityRatio+"; "); + } + if (sensitivityRatio) { + basal = profile.current_basal * sensitivityRatio; + basal = round_basal(basal, profile); + if (basal !== profile_current_basal) { + console.log("Adjusting basal from "+profile_current_basal+" to "+basal+"; "); } else { - ins_val = 75; // rapid peak: 75 + console.log("Basal unchanged: "+basal+"; "); } - console.log("For "+profile.insulinType+" (insulin peak: "+profile.insulinPeak+") divisor is: "+ins_val+"; "); + } - console.log("Insulin value for ISF based on profile: "+ins_val+"; "); - - var dynISFadjust = profile.DynISFAdjust; - dynISFadjust = ( dynISFadjust / 100 ); - TDD = ( dynISFadjust * TDD ); - - var variable_sens = 1800 / ( TDD * (Math.log(( bg / ins_val ) + 1 ) ) ); - - variable_sens = round(variable_sens,1); - - - if (dynISFadjust > 1 ) { - console.log("TDD adjustment factor is: " +dynISFadjust+"; "); - console.log("TDD adjusted to "+TDD+" using adjustment factor of "+dynISFadjust+"; "); - console.log("Current sensitivity for predictions is " +variable_sens+" based on current bg"); - } - else if (dynISFadjust < 1 ){ - console.log("TDD adjustment factor is: " +dynISFadjust+"; "); - console.log("TDD adjusted to "+TDD+" using adjustment factor of "+dynISFadjust+"; "); - console.log("Current sensitivity for predictions is " +variable_sens+" based on current bg"); - } else { - console.log("Current sensitivity for predictions is " +variable_sens+" based on current bg"); - } - sens = variable_sens; - - //********************************************************************************* - //** End of Dynamic ISF code for predictions ** - //********************************************************************************* - - - if ( high_temptarget_raises_sensitivity && profile.temptargetSet && target_bg > normalTarget || profile.low_temptarget_lowers_sensitivity && profile.temptargetSet && target_bg < normalTarget ) { - // w/ target 100, temp target 110 = .89, 120 = 0.8, 140 = 0.67, 160 = .57, and 200 = .44 - // e.g.: Sensitivity ratio set to 0.8 based on temp target of 120; Adjusting basal from 1.65 to 1.35; ISF from 58.9 to 73.6 - //sensitivityRatio = 2/(2+(target_bg-normalTarget)/40); - var c = halfBasalTarget - normalTarget; - sensitivityRatio = c/(c+target_bg-normalTarget); - // limit sensitivityRatio to profile.autosens_max (1.2x by default) - sensitivityRatio = Math.min(sensitivityRatio, profile.autosens_max); - sensitivityRatio = round(sensitivityRatio,2); - console.log("Sensitivity ratio set to "+sensitivityRatio+" based on temp target of "+target_bg+"; "); - sens = sens / sensitivityRatio ; - sens = round(sens, 1); - console.log("ISF from "+variable_sens+" to "+sens+ "due to temp target; "); - } - else { - sensitivityRatio = ( meal_data.TDD24 / tdd7 ); - } - if (sensitivityRatio > 1) { - sensitivityRatio = Math.min(sensitivityRatio, profile.autosens_max); - sensitivityRatio = round(sensitivityRatio,2); - console.log("Sensitivity ratio: "+sensitivityRatio+"; "); - } - else if( sensitivityRatio < 1) { - sensitivityRatio = Math.max(sensitivityRatio, profile.autosens_min); - sensitivityRatio = round(sensitivityRatio,2); - console.log("Sensitivity ratio: "+sensitivityRatio+"; "); - } - else { - console.log("Sensitivity ratio: "+sensitivityRatio+"; "); - } - - - if (sensitivityRatio && profile.openapsama_useautosens === true) { - basal = profile.current_basal * sensitivityRatio; - basal = round_basal(basal, profile); - if (basal !== profile_current_basal) { - console.log("Adjusting basal from "+profile_current_basal+" to "+basal+"; "); + // adjust min, max, and target BG for sensitivity, such that 50% increase in ISF raises target from 100 to 120 + if (profile.temptargetSet) { + //console.log("Temp Target set, not adjusting with autosens; "); + } else if (typeof autosens_data !== 'undefined' && autosens_data) { + if ( profile.sensitivity_raises_target && autosens_data.ratio < 1 || profile.resistance_lowers_target && autosens_data.ratio > 1 ) { + // with a target of 100, default 0.7-1.2 autosens min/max range would allow a 93-117 target range + min_bg = round((min_bg - 60) / autosens_data.ratio) + 60; + max_bg = round((max_bg - 60) / autosens_data.ratio) + 60; + var new_target_bg = round((target_bg - 60) / autosens_data.ratio) + 60; + // don't allow target_bg below 80 + new_target_bg = Math.max(80, new_target_bg); + if (target_bg === new_target_bg) { + console.log("target_bg unchanged: "+new_target_bg+"; "); } else { - console.log("Autosens disabled. Basal unchanged: "+basal+"; "); + console.log("target_bg from "+target_bg+" to "+new_target_bg+"; "); } + target_bg = new_target_bg; } + } - // adjust min, max, and target BG for sensitivity, such that 50% increase in ISF raises target from 100 to 120 - if (profile.temptargetSet) { - //console.log("Temp Target set, not adjusting with autosens; "); - } else { - if ( profile.sensitivity_raises_target && sensitivityRatio < 1 && profile.openapsama_useautosens === true || profile.resistance_lowers_target && sensitivityRatio > 1 && profile.openapsama_useautosens === true) { - // with a target of 100, default 0.7-1.2 autosens min/max range would allow a 93-117 target range - min_bg = round((min_bg - 60) / sensitivityRatio) + 60; - max_bg = round((max_bg - 60) / sensitivityRatio) + 60; - var new_target_bg = round((target_bg - 60) / sensitivityRatio) + 60; - // don't allow target_bg below 80 - new_target_bg = Math.max(80, new_target_bg); - if (target_bg === new_target_bg) { - console.log("target_bg unchanged: "+new_target_bg+"; "); - } else { - console.log("target_bg from "+target_bg+" to "+new_target_bg+"; "); - } - target_bg = new_target_bg; - } - } + if (typeof iob_data === 'undefined' ) { + rT.error ='Error: iob_data undefined. '; + return rT; + } + var iobArray = iob_data; + if (typeof(iob_data.length) && iob_data.length > 1) { + iob_data = iobArray[0]; + //console.error(JSON.stringify(iob_data[0])); + } - if (typeof iob_data === 'undefined' ) { - rT.error ='Error: iob_data undefined. '; - return rT; - } + if (typeof iob_data.activity === 'undefined' || typeof iob_data.iob === 'undefined' ) { + rT.error ='Error: iob_data missing some property. '; + return rT; + } - var iobArray = iob_data; - if (typeof(iob_data.length) && iob_data.length > 1) { - iob_data = iobArray[0]; - //console.error(JSON.stringify(iob_data[0])); - } + var tick; - if (typeof iob_data.activity === 'undefined' || typeof iob_data.iob === 'undefined' ) { - rT.error ='Error: iob_data missing some property. '; - return rT; - } + if (glucose_status.delta > -0.5) { + tick = "+" + round(glucose_status.delta,0); + } else { + tick = round(glucose_status.delta,0); + } + //var minDelta = Math.min(glucose_status.delta, glucose_status.short_avgdelta, glucose_status.long_avgdelta); + var minDelta = Math.min(glucose_status.delta, glucose_status.short_avgdelta); + var minAvgDelta = Math.min(glucose_status.short_avgdelta, glucose_status.long_avgdelta); + var maxDelta = Math.max(glucose_status.delta, glucose_status.short_avgdelta, glucose_status.long_avgdelta); - var tick; - - if (glucose_status.delta > -0.5) { - tick = "+" + round(glucose_status.delta,0); - } else { - tick = round(glucose_status.delta,0); - } - //var minDelta = Math.min(glucose_status.delta, glucose_status.short_avgdelta, glucose_status.long_avgdelta); - var minDelta = Math.min(glucose_status.delta, glucose_status.short_avgdelta); - var minAvgDelta = Math.min(glucose_status.short_avgdelta, glucose_status.long_avgdelta); - var maxDelta = Math.max(glucose_status.delta, glucose_status.short_avgdelta, glucose_status.long_avgdelta); - - - console.error("; CR:",profile.carb_ratio); + var sens = variable_sens // compare currenttemp to iob_data.lastTemp and cancel temp if they don't match var lastTempAge; @@ -413,7 +304,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ } //console.error("currenttemp:",currenttemp,"lastTemp:",JSON.stringify(iob_data.lastTemp),"lastTempAge:",lastTempAge,"m"); var tempModulus = (lastTempAge + currenttemp.duration) % 30; - console.error("currenttemp:",currenttemp,"lastTempAge:",lastTempAge,"m","tempModulus:",tempModulus,"m"); + console.error("currenttemp:",round(currenttemp.rate,2),"lastTempAge:",lastTempAge,"m","tempModulus:",tempModulus,"m"); rT.temp = 'absolute'; rT.deliverAt = deliverAt; if ( microBolusAllowed && currenttemp && iob_data.lastTemp && currenttemp.rate !== iob_data.lastTemp.rate && lastTempAge > 10 && currenttemp.duration ) { @@ -822,37 +713,38 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ console.error("UAM Impact:",uci,"mg/dL per 5m; UAM Duration:",UAMduration,"hours"); - console.log("EventualBG is" +eventualBG+" ;"); - - if (bg > target_bg && glucose_status.delta < 3 && glucose_status.delta > -3 && glucose_status.short_avgdelta > -3 && glucose_status.short_avgdelta < 3 && eventualBG > target_bg && eventualBG < bg ) { - var future_sens = ( 1800 / (Math.log((((eventualBG * 0.5) + (bg * 0.5))/ins_val)+1)*TDD)); - //var future_sens_old = ( 277700 / (TDD * ((bg * 0.5) + (eventualBG * 0.5 )))); - console.log("Future state sensitivity is " +future_sens+" based on eventual and current bg due to flat glucose level above target"); - rT.reason += "Dosing sensitivity: " +future_sens+" using eventual BG;"; - } - - else if( glucose_status.delta > 0 && eventualBG > target_bg ) { - var future_sens = ( 1800 / (Math.log((bg/ins_val)+1)*TDD)); - //var future_sens_old = ( 277700 / (TDD * bg)); - console.log("Future state sensitivity is " +future_sens+" using current bg due to small delta or variation"); - rT.reason += "Dosing sensitivity: " +future_sens+" using current BG;"; - } - - else { - var future_sens = ( 1800 / (Math.log((eventualBG/ins_val)+1)*TDD)); - //var future_sens_old = ( 277700 / (TDD * eventualBG)); - console.log("Future state sensitivity is " +future_sens+" based on eventual bg due to -ve delta"); - rT.reason += "Dosing sensitivity: " +future_sens+" using eventual BG;"; - } - future_sens = round(future_sens,1); - - + console.log("EventualBG is" +eventualBG+" ;"); minIOBPredBG = Math.max(39,minIOBPredBG); minCOBPredBG = Math.max(39,minCOBPredBG); minUAMPredBG = Math.max(39,minUAMPredBG); minPredBG = round(minIOBPredBG); + var fSensBG = Math.min(minPredBG,bg); + + if (bg > target_bg && glucose_status.delta < 3 && glucose_status.delta > -3 && glucose_status.short_avgdelta > -3 && glucose_status.short_avgdelta < 3 && eventualBG > target_bg && eventualBG < bg ) { + var future_sens = ( 1800 / (Math.log((((fSensBG * 0.5) + (bg * 0.5))/insulinDivisor)+1)*TDD)); + //var future_sens_old = ( 277700 / (TDD * ((bg * 0.5) + (eventualBG * 0.5 )))); + console.log("Future state sensitivity is " +future_sens+" based on eventual and current bg due to flat glucose level above target"); + rT.reason += "Dosing sensitivity: " +future_sens+" using eventual BG;"; + } + + else if( glucose_status.delta > 0 && eventualBG > target_bg || eventualBG > bg) { + var future_sens = ( 1800 / (Math.log((bg/insulinDivisor)+1)*TDD)); + //var future_sens_old = ( 277700 / (TDD * bg)); + console.log("Future state sensitivity is " +future_sens+" using current bg due to small delta or variation"); + rT.reason += "Dosing sensitivity: " +future_sens+" using current BG;"; + } + + else { + var future_sens = ( 1800 / (Math.log((fSensBG/insulinDivisor)+1)*TDD)); + //var future_sens_old = ( 277700 / (TDD * eventualBG)); + console.log("Future state sensitivity is " +future_sens+" based on eventual bg due to -ve delta"); + rT.reason += "Dosing sensitivity: " +future_sens+" using eventual BG;"; + } + future_sens = round(future_sens,1); + + var fractionCarbsLeft = meal_data.mealCOB/meal_data.carbs; // if we have COB and UAM is enabled, average both if ( minUAMPredBG < 999 && minCOBPredBG < 999 ) { @@ -1075,25 +967,22 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ } } - - - // calculate 30m low-temp required to get projected BG up to target - // multiply by 2 to low-temp faster for increased hypo safety - - var insulinReq = 2 * Math.min(0, (eventualBG - target_bg) / future_sens); - insulinReq = round( insulinReq , 2); - // calculate naiveInsulinReq based on naive_eventualBG - var naiveInsulinReq = Math.min(0, (naive_eventualBG - target_bg) / sens); - naiveInsulinReq = round( naiveInsulinReq , 2); - if (minDelta < 0 && minDelta > expectedDelta) { - // if we're barely falling, newinsulinReq should be barely negative - var newinsulinReq = round(( insulinReq * (minDelta / expectedDelta) ), 2); - //console.error("Increasing insulinReq from " + insulinReq + " to " + newinsulinReq); - insulinReq = newinsulinReq; - } - // rate required to deliver insulinReq less insulin over 30m: - var rate = basal + (2 * insulinReq); - rate = round_basal(rate, profile); + // calculate 30m low-temp required to get projected BG up to target + // multiply by 2 to low-temp faster for increased hypo safety + var insulinReq = 2 * Math.min(0, (eventualBG - target_bg) / future_sens); + insulinReq = round( insulinReq , 2); + // calculate naiveInsulinReq based on naive_eventualBG + var naiveInsulinReq = Math.min(0, (naive_eventualBG - target_bg) / sens); + naiveInsulinReq = round( naiveInsulinReq , 2); + if (minDelta < 0 && minDelta > expectedDelta) { + // if we're barely falling, newinsulinReq should be barely negative + var newinsulinReq = round(( insulinReq * (minDelta / expectedDelta) ), 2); + //console.error("Increasing insulinReq from " + insulinReq + " to " + newinsulinReq); + insulinReq = newinsulinReq; + } + // rate required to deliver insulinReq less insulin over 30m: + var rate = basal + (2 * insulinReq); + rate = round_basal(rate, profile); // if required temp < existing temp basal var insulinScheduled = currenttemp.duration * (currenttemp.rate - basal) / 60; @@ -1181,14 +1070,14 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ } } else { // otherwise, calculate 30m high-temp required to get projected BG down to target - // insulinReq is the additional insulin required to get minPredBG down to target_bg - //console.error(minPredBG,eventualBG); - insulinReq = round( (Math.min(minPredBG,eventualBG) - target_bg) / future_sens, 2); - // if that would put us over max_iob, then reduce accordingly - if (insulinReq > max_iob-iob_data.iob) { - rT.reason += "max_iob " + max_iob + ", "; - insulinReq = max_iob-iob_data.iob; - } + // insulinReq is the additional insulin required to get minPredBG down to target_bg + //console.error(minPredBG,eventualBG); + insulinReq = round( (Math.min(minPredBG,eventualBG) - target_bg) / future_sens, 2); + // if that would put us over max_iob, then reduce accordingly + if (insulinReq > max_iob-iob_data.iob) { + rT.reason += "max_iob " + max_iob + ", "; + insulinReq = max_iob-iob_data.iob; + } // rate required to deliver insulinReq more insulin over 30m: rate = basal + (2 * insulinReq); @@ -1314,4 +1203,4 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ }; -module.exports = determine_basal; \ No newline at end of file +module.exports = determine_basal; diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.kt b/app/src/main/java/info/nightscout/androidaps/MainApp.kt index bc201bf3c8..62468ebbd9 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.kt @@ -80,7 +80,7 @@ class MainApp : DaggerApplication() { @Inject lateinit var uel: UserEntryLogger @Inject lateinit var alarmSoundServiceHelper: AlarmSoundServiceHelper @Inject lateinit var notificationStore: NotificationStore - @Inject lateinit var processLifecycleListener: ProcessLifecycleListener + @Inject lateinit var processLifecycleListener: Provider @Inject lateinit var profileSwitchPlugin: ThemeSwitcherPlugin @Inject lateinit var localAlertUtils: LocalAlertUtils @Inject lateinit var rh: Provider @@ -94,7 +94,6 @@ class MainApp : DaggerApplication() { RxDogTag.install() setRxErrorHandler() LocaleHelper.update(this) - ProcessLifecycleOwner.get().lifecycle.addObserver(processLifecycleListener) var gitRemote: String? = BuildConfig.REMOTE var commitHash: String? = BuildConfig.HEAD @@ -151,6 +150,7 @@ class MainApp : DaggerApplication() { localAlertUtils.preSnoozeAlarms() doMigrations() uel.log(UserEntry.Action.START_AAPS, UserEntry.Sources.Aaps) + ProcessLifecycleOwner.get().lifecycle.addObserver(processLifecycleListener.get()) // schedule widget update refreshWidget = Runnable { diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt index 20bed45c84..73547e31c2 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt @@ -12,7 +12,7 @@ import com.google.android.material.datepicker.MaterialDatePicker import com.jjoe64.graphview.GraphView import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.androidaps.database.AppRepository +import info.nightscout.androidaps.activities.fragments.HistoryBrowserData import info.nightscout.androidaps.databinding.ActivityHistorybrowseBinding import info.nightscout.androidaps.events.EventAutosensCalculationFinished import info.nightscout.androidaps.events.EventCustomCalculationFinished @@ -21,27 +21,18 @@ import info.nightscout.androidaps.events.EventScale import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.extensions.toVisibilityKeepSpace import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.interfaces.Config -import info.nightscout.androidaps.interfaces.Loop -import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus -import info.nightscout.androidaps.plugins.general.overview.OverviewData +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.plugins.general.overview.OverviewMenus import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewGraph import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData -import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress -import info.nightscout.androidaps.receivers.DataWorker import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.Translator -import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.workflow.CalculationWorkflow import info.nightscout.shared.logging.LTag -import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.* @@ -50,23 +41,16 @@ import kotlin.math.min class HistoryBrowseActivity : NoSplashAppCompatActivity() { + @Inject lateinit var historyBrowserData: HistoryBrowserData @Inject lateinit var injector: HasAndroidInjector @Inject lateinit var aapsSchedulers: AapsSchedulers - @Inject lateinit var sp: SP - @Inject lateinit var profileFunction: ProfileFunction @Inject lateinit var defaultValueHelper: DefaultValueHelper @Inject lateinit var activePlugin: ActivePlugin @Inject lateinit var buildHelper: BuildHelper - @Inject lateinit var repository: AppRepository @Inject lateinit var fabricPrivacy: FabricPrivacy @Inject lateinit var overviewMenus: OverviewMenus @Inject lateinit var dateUtil: DateUtil - @Inject lateinit var config: Config - @Inject lateinit var loop: Loop - @Inject lateinit var nsDeviceStatus: NSDeviceStatus - @Inject lateinit var translator: Translator @Inject lateinit var context: Context - @Inject lateinit var dataWorker: DataWorker @Inject lateinit var calculationWorkflow: CalculationWorkflow private val disposable = CompositeDisposable() @@ -78,9 +62,6 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { private var rangeToDisplay = 24 // for graph // private var start: Long = 0 - private lateinit var iobCobCalculator: IobCobCalculatorPlugin - private lateinit var overviewData: OverviewData - private lateinit var binding: ActivityHistorybrowseBinding private var destroyed = false @@ -89,42 +70,12 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { binding = ActivityHistorybrowseBinding.inflate(layoutInflater) setContentView(binding.root) - // We don't want to use injected singletons but own instance working on top of different data - overviewData = - OverviewData( - aapsLogger, - rh, - dateUtil, - sp, - activePlugin, - defaultValueHelper, - profileFunction, - repository, - fabricPrivacy - ) - iobCobCalculator = - IobCobCalculatorPlugin( - injector, - aapsLogger, - aapsSchedulers, - rxBus, - sp, - rh, - profileFunction, - activePlugin, - fabricPrivacy, - dateUtil, - repository, - overviewData, - calculationWorkflow - ) - binding.left.setOnClickListener { - adjustTimeRange(overviewData.fromTime - T.hours(rangeToDisplay.toLong()).msecs()) + adjustTimeRange(historyBrowserData.overviewData.fromTime - T.hours(rangeToDisplay.toLong()).msecs()) loadAll("onClickLeft") } binding.right.setOnClickListener { - adjustTimeRange(overviewData.fromTime + T.hours(rangeToDisplay.toLong()).msecs()) + adjustTimeRange(historyBrowserData.overviewData.fromTime + T.hours(rangeToDisplay.toLong()).msecs()) loadAll("onClickRight") } binding.end.setOnClickListener { @@ -138,7 +89,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { } binding.zoom.setOnLongClickListener { Calendar.getInstance().also { calendar -> - calendar.timeInMillis = overviewData.fromTime + calendar.timeInMillis = historyBrowserData.overviewData.fromTime calendar[Calendar.MILLISECOND] = 0 calendar[Calendar.SECOND] = 0 calendar[Calendar.MINUTE] = 0 @@ -151,13 +102,13 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { binding.date.setOnClickListener { MaterialDatePicker.Builder.datePicker() - .setSelection(dateUtil.timeStampToUtcDateMillis(overviewData.fromTime)) + .setSelection(dateUtil.timeStampToUtcDateMillis(historyBrowserData.overviewData.fromTime)) .setTheme(R.style.DatePicker) .build() .apply { addOnPositiveButtonClickListener { selection -> - setTime(dateUtil.mergeUtcDateToTimestamp(overviewData.fromTime, selection)) - binding.date.text = dateUtil.dateAndTimeString(overviewData.fromTime) + setTime(dateUtil.mergeUtcDateToTimestamp(historyBrowserData.overviewData.fromTime, selection)) + binding.date.text = dateUtil.dateAndTimeString(historyBrowserData.overviewData.fromTime) loadAll("onClickDate") } } @@ -180,8 +131,8 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { prepareGraphsIfNeeded(overviewMenus.setting.size) savedInstanceState?.let { bundle -> rangeToDisplay = bundle.getInt("rangeToDisplay", 0) - overviewData.fromTime = bundle.getLong("start", 0) - overviewData.toTime = bundle.getLong("end", 0) + historyBrowserData.overviewData.fromTime = bundle.getLong("start", 0) + historyBrowserData.overviewData.toTime = bundle.getLong("end", 0) } } @@ -220,11 +171,11 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { .observeOn(aapsSchedulers.main) .subscribe({ rangeToDisplay = it.hours - setTime(overviewData.fromTime) + setTime(historyBrowserData.overviewData.fromTime) loadAll("rangeChange") }, fabricPrivacy::logException) - - if (overviewData.fromTime == 0L) { + updateCalcProgress(100) + if (historyBrowserData.overviewData.fromTime == 0L) { // set start of current day setTime(dateUtil.now()) loadAll("onResume") @@ -236,8 +187,8 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { override fun onSaveInstanceState(outState: Bundle) { super.onSaveInstanceState(outState) outState.putInt("rangeToDisplay", rangeToDisplay) - outState.putLong("start", overviewData.fromTime) - outState.putLong("end", overviewData.toTime) + outState.putLong("start", historyBrowserData.overviewData.fromTime) + outState.putLong("end", historyBrowserData.overviewData.toTime) } private fun prepareGraphsIfNeeded(numOfGraphs: Int) { @@ -293,18 +244,18 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { } private fun adjustTimeRange(start: Long) { - overviewData.fromTime = start - overviewData.toTime = overviewData.fromTime + T.hours(rangeToDisplay.toLong()).msecs() - overviewData.endTime = overviewData.toTime + historyBrowserData.overviewData.fromTime = start + historyBrowserData.overviewData.toTime = historyBrowserData.overviewData.fromTime + T.hours(rangeToDisplay.toLong()).msecs() + historyBrowserData.overviewData.endTime = historyBrowserData.overviewData.toTime } private fun runCalculation(from: String) { calculationWorkflow.runCalculation( CalculationWorkflow.HISTORY_CALCULATION, - iobCobCalculator, - overviewData, + historyBrowserData.iobCobCalculator, + historyBrowserData.overviewData, from, - overviewData.toTime, + historyBrowserData.overviewData.toTime, bgDataReload = true, limitDataToOldestAvailable = false, cause = EventCustomCalculationFinished(), @@ -325,7 +276,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { } private fun updateDate() { - binding.date.text = dateUtil.dateAndTimeString(overviewData.fromTime) + binding.date.text = dateUtil.dateAndTimeString(historyBrowserData.overviewData.fromTime) binding.zoom.text = rangeToDisplay.toString() } @@ -337,9 +288,9 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { updateDate() val pump = activePlugin.activePump - val graphData = GraphData(injector, binding.bgGraph, overviewData) + val graphData = GraphData(injector, binding.bgGraph, historyBrowserData.overviewData) val menuChartSettings = overviewMenus.setting - graphData.addInRangeArea(overviewData.fromTime, overviewData.endTime, defaultValueHelper.determineLowLine(), defaultValueHelper.determineHighLine()) + graphData.addInRangeArea(historyBrowserData.overviewData.fromTime, historyBrowserData.overviewData.endTime, defaultValueHelper.determineLowLine(), defaultValueHelper.determineHighLine()) graphData.addBgReadings(menuChartSettings[0][OverviewMenus.CharType.PRE.ordinal], context) if (buildHelper.isDev()) graphData.addBucketedData() graphData.addTreatments(context) @@ -355,7 +306,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { // set manual x bounds to have nice steps graphData.setNumVerticalLabels() - graphData.formatAxis(overviewData.fromTime, overviewData.endTime) + graphData.formatAxis(historyBrowserData.overviewData.fromTime, historyBrowserData.overviewData.endTime) graphData.performUpdate() @@ -365,7 +316,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { val now = System.currentTimeMillis() for (g in 0 until min(secondaryGraphs.size, menuChartSettings.size + 1)) { - val secondGraphData = GraphData(injector, secondaryGraphs[g], overviewData) + val secondGraphData = GraphData(injector, secondaryGraphs[g], historyBrowserData.overviewData) var useABSForScale = false var useIobForScale = false var useCobForScale = false @@ -393,7 +344,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { if (menuChartSettings[g + 1][OverviewMenus.CharType.DEVSLOPE.ordinal] && buildHelper.isDev()) secondGraphData.addDeviationSlope(useDSForScale, 1.0) // set manual x bounds to have nice steps - secondGraphData.formatAxis(overviewData.fromTime, overviewData.endTime) + secondGraphData.formatAxis(historyBrowserData.overviewData.fromTime, historyBrowserData.overviewData.endTime) secondGraphData.addNowLine(now) secondaryGraphsData.add(secondGraphData) } diff --git a/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt b/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt index ccd6b6f484..8da9192724 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt @@ -49,6 +49,7 @@ import info.nightscout.androidaps.utils.alertDialogs.OKDialog.show import info.nightscout.androidaps.utils.protection.PasswordCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.ProtectionType.* import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.aps.openAPSSMBDynamicISF.OpenAPSSMBDynamicISFPlugin import info.nightscout.shared.SafeParse import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject @@ -79,6 +80,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang @Inject lateinit var nsClientPlugin: NSClientPlugin @Inject lateinit var openAPSAMAPlugin: OpenAPSAMAPlugin @Inject lateinit var openAPSSMBPlugin: OpenAPSSMBPlugin + @Inject lateinit var openAPSSMBDynamicISFPlugin: OpenAPSSMBDynamicISFPlugin @Inject lateinit var safetyPlugin: SafetyPlugin @Inject lateinit var sensitivityAAPSPlugin: SensitivityAAPSPlugin @Inject lateinit var sensitivityOref1Plugin: SensitivityOref1Plugin @@ -171,6 +173,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang addPreferencesFromResourceIfEnabled(loopPlugin, rootKey, config.APS) addPreferencesFromResourceIfEnabled(openAPSAMAPlugin, rootKey, config.APS) addPreferencesFromResourceIfEnabled(openAPSSMBPlugin, rootKey, config.APS) + addPreferencesFromResourceIfEnabled(openAPSSMBDynamicISFPlugin, rootKey, config.APS) addPreferencesFromResourceIfEnabled(sensitivityAAPSPlugin, rootKey) addPreferencesFromResourceIfEnabled(sensitivityWeightedAveragePlugin, rootKey) addPreferencesFromResourceIfEnabled(sensitivityOref1Plugin, rootKey) @@ -350,7 +353,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang } } if (pref is EditTextPreference) { - if (pref.getKey().contains("password") || pref.getKey().contains("pin") || pref.getKey().contains("secret")) { + if (pref.getKey().contains("password") || pref.getKey().contains("pin") || pref.getKey().contains("secret") || pref.getKey().contains("token")) { pref.setSummary("******") } else if (pref.text != null) { pref.dialogMessage = pref.dialogMessage diff --git a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt index 60f0f5006a..7725617e88 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt @@ -2,9 +2,9 @@ package info.nightscout.androidaps.activities import android.content.Context import android.os.Bundle -import android.text.Editable -import android.text.TextWatcher +import android.view.Menu import android.view.MenuItem +import androidx.appcompat.widget.SearchView import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceScreen import info.nightscout.androidaps.R @@ -15,6 +15,7 @@ class PreferencesActivity : NoSplashAppCompatActivity(), PreferenceFragmentCompa private var preferenceId = 0 private var myPreferenceFragment: MyPreferenceFragment? = null + private var searchView: SearchView? = null private lateinit var binding: ActivityPreferencesBinding @@ -24,15 +25,6 @@ class PreferencesActivity : NoSplashAppCompatActivity(), PreferenceFragmentCompa binding = ActivityPreferencesBinding.inflate(layoutInflater) setContentView(binding.root) - binding.prefFilter.addTextChangedListener(object : TextWatcher { - override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {} - override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { - filterPreferences() - } - - override fun afterTextChanged(s: Editable) {} - }) - title = rh.gs(R.string.nav_preferences) supportActionBar?.setDisplayHomeAsUpEnabled(true) supportActionBar?.setDisplayShowHomeEnabled(true) @@ -40,12 +32,29 @@ class PreferencesActivity : NoSplashAppCompatActivity(), PreferenceFragmentCompa preferenceId = intent.getIntExtra("id", -1) myPreferenceFragment?.arguments = Bundle().also { it.putInt("id", preferenceId) - it.putString("filter", binding.prefFilter.text.toString()) } if (savedInstanceState == null) supportFragmentManager.beginTransaction().replace(R.id.frame_layout, myPreferenceFragment!!).commit() } + override fun onCreateOptionsMenu(menu: Menu): Boolean { + menuInflater.inflate(R.menu.menu_preferences, menu) + val searchItem = menu.findItem(R.id.menu_search) + searchView = searchItem.actionView as SearchView + searchView?.setOnQueryTextListener(object : SearchView.OnQueryTextListener { + + override fun onQueryTextChange(newText: String): Boolean { + myPreferenceFragment?.setFilter(newText) + return false + } + + override fun onQueryTextSubmit(query: String): Boolean { + return false + } + }) + return super.onCreateOptionsMenu(menu) + } + override fun onPreferenceStartScreen(caller: PreferenceFragmentCompat, pref: PreferenceScreen): Boolean { val fragment = MyPreferenceFragment() fragment.arguments = Bundle().also { @@ -60,10 +69,6 @@ class PreferencesActivity : NoSplashAppCompatActivity(), PreferenceFragmentCompa super.attachBaseContext(LocaleHelper.wrap(newBase)) } - private fun filterPreferences() { - myPreferenceFragment?.setFilter(binding.prefFilter.text.toString()) - } - override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { android.R.id.home -> { diff --git a/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt index 81563f0944..dcba11d059 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt @@ -1,13 +1,13 @@ package info.nightscout.androidaps.activities import android.annotation.SuppressLint -import android.content.res.ColorStateList import android.os.Bundle import android.text.Editable import android.text.TextWatcher -import android.view.Menu -import android.widget.PopupMenu +import android.widget.ArrayAdapter import android.widget.TextView +import com.google.android.material.tabs.TabLayout +import com.google.common.collect.Lists import info.nightscout.androidaps.R import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.data.PureProfile @@ -18,7 +18,6 @@ import info.nightscout.androidaps.dialogs.ProfileViewerDialog import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin import info.nightscout.androidaps.plugins.profile.local.events.EventLocalProfileChanged import info.nightscout.androidaps.utils.DateUtil @@ -72,61 +71,49 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() { binding = ActivityProfilehelperBinding.inflate(layoutInflater) setContentView(binding.root) - binding.menu1.setOnClickListener { - switchTab(0, typeSelected[0]) - } - binding.menu2.setOnClickListener { - switchTab(1, typeSelected[1]) - } + binding.tabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener { + override fun onTabSelected(tab: TabLayout.Tab) { + switchTab(tab.position, typeSelected[tab.position]) + } - binding.profileType.setOnClickListener { - PopupMenu(this, binding.profileType).apply { - menuInflater.inflate(R.menu.menu_profilehelper, menu) - setOnMenuItemClickListener { item -> - binding.profileType.setText(item.title) - when (item.itemId) { - R.id.menu_default -> switchTab(tabSelected, ProfileType.MOTOL_DEFAULT) - R.id.menu_default_dpv -> switchTab(tabSelected, ProfileType.DPV_DEFAULT) - R.id.menu_current -> switchTab(tabSelected, ProfileType.CURRENT) - R.id.menu_available -> switchTab(tabSelected, ProfileType.AVAILABLE_PROFILE) - R.id.menu_profileswitch -> switchTab(tabSelected, ProfileType.PROFILE_SWITCH) - } - true - } - show() + override fun onTabUnselected(tab: TabLayout.Tab) {} + override fun onTabReselected(tab: TabLayout.Tab) {} + }) + + val profileTypeList = Lists.newArrayList( + rh.gs(R.string.motoldefaultprofile), + rh.gs(R.string.dpvdefaultprofile), + rh.gs(R.string.currentprofile), + rh.gs(R.string.availableprofile), + rh.gs(R.string.careportal_profileswitch) + ) + binding.profileType.setAdapter(ArrayAdapter(this, R.layout.spinner_centered, profileTypeList)) + + binding.profileType.setOnItemClickListener { _, _, _, _ -> + when (binding.profileType.text.toString()) { + rh.gs(R.string.motoldefaultprofile) -> switchTab(tabSelected, ProfileType.MOTOL_DEFAULT) + rh.gs(R.string.dpvdefaultprofile) -> switchTab(tabSelected, ProfileType.DPV_DEFAULT) + rh.gs(R.string.currentprofile) -> switchTab(tabSelected, ProfileType.CURRENT) + rh.gs(R.string.availableprofile) -> switchTab(tabSelected, ProfileType.AVAILABLE_PROFILE) + rh.gs(R.string.careportal_profileswitch) -> switchTab(tabSelected, ProfileType.PROFILE_SWITCH) } } // Active profile profileList = activePlugin.activeProfileSource.profile?.getProfileList() ?: ArrayList() - binding.availableProfileList.setOnClickListener { - PopupMenu(this, binding.availableProfileList).apply { - var order = 0 - for (name in profileList) menu.add(Menu.NONE, order, order++, name) - setOnMenuItemClickListener { item -> - binding.availableProfileList.setText(item.title) - profileUsed[tabSelected] = item.itemId - true - } - show() - } + binding.availableProfileList.setAdapter(ArrayAdapter(this, R.layout.spinner_centered, profileList)) + binding.availableProfileList.setOnItemClickListener { _, _, index, _ -> + profileUsed[tabSelected] = index } // Profile switch profileSwitch = repository.getEffectiveProfileSwitchDataFromTime(dateUtil.now() - T.months(2).msecs(), true).blockingGet() - binding.profileswitchList.setOnClickListener { - PopupMenu(this, binding.profileswitchList).apply { - var order = 0 - for (name in profileSwitch) menu.add(Menu.NONE, order, order++, name.originalCustomizedName) - setOnMenuItemClickListener { item -> - binding.profileswitchList.setText(item.title) - profileSwitchUsed[tabSelected] = item.itemId - true - } - show() - } + val profileswitchListNames = profileSwitch.map { it.originalCustomizedName } + binding.profileswitchList.setAdapter(ArrayAdapter(this, R.layout.spinner_centered, profileswitchListNames)) + binding.profileswitchList.setOnItemClickListener { _, _, index, _ -> + profileSwitchUsed[tabSelected] = index } // Default profile @@ -250,7 +237,7 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() { } private fun getProfile(age: Double, tdd: Double, weight: Double, basalPct: Double, tab: Int): PureProfile? = - try { // profile must not exist + try { // Profile must not exist when (typeSelected[tab]) { ProfileType.MOTOL_DEFAULT -> defaultProfile.profile(age, tdd, weight, profileFunction.getUnits()) ProfileType.DPV_DEFAULT -> defaultProfileDPV.profile(age, tdd, basalPct, profileFunction.getUnits()) @@ -279,15 +266,13 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() { } private fun switchTab(tab: Int, newContent: ProfileType, storeOld: Boolean = true) { - setBackgroundColorOnSelected(tab) // Store values for selected tab. listBox values are stored on selection change if (storeOld) storeValues() tabSelected = tab typeSelected[tabSelected] = newContent - binding.profileTypeTitle.defaultHintTextColor = ColorStateList.valueOf(rh.gac( this, if (tab == 0) R.attr.helperProfileColor else R.attr.examinedProfileColor)) - // show new content + // Show new content binding.profileType.setText( when (typeSelected[tabSelected]) { ProfileType.MOTOL_DEFAULT -> rh.gs(R.string.motoldefaultprofile) @@ -295,28 +280,27 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() { ProfileType.CURRENT -> rh.gs(R.string.currentprofile) ProfileType.AVAILABLE_PROFILE -> rh.gs(R.string.availableprofile) ProfileType.PROFILE_SWITCH -> rh.gs(R.string.careportal_profileswitch) - } + }, + false ) binding.defaultProfile.visibility = (newContent == ProfileType.MOTOL_DEFAULT || newContent == ProfileType.DPV_DEFAULT).toVisibility() binding.currentProfile.visibility = (newContent == ProfileType.CURRENT).toVisibility() binding.availableProfile.visibility = (newContent == ProfileType.AVAILABLE_PROFILE).toVisibility() binding.profileSwitch.visibility = (newContent == ProfileType.PROFILE_SWITCH).toVisibility() - // restore selected values + // Restore selected values binding.age.value = ageUsed[tabSelected] binding.weight.value = weightUsed[tabSelected] binding.tdd.value = tddUsed[tabSelected] binding.basalPctFromTdd.value = pctUsed[tabSelected] binding.basalPctFromTddRow.visibility = (newContent == ProfileType.DPV_DEFAULT).toVisibility() - if (profileList.isNotEmpty()) - binding.availableProfileList.setText(profileList[profileUsed[tabSelected]].toString()) - if (profileSwitch.isNotEmpty()) - binding.profileswitchList.setText(profileSwitch[profileSwitchUsed[tabSelected]].originalCustomizedName) + if (profileList.isNotEmpty()) { + binding.availableProfileList.setText(profileList[profileUsed[tabSelected]].toString(), false) + } + if (profileSwitch.isNotEmpty()) { + binding.profileswitchList.setText(profileSwitch[profileSwitchUsed[tabSelected]].originalCustomizedName, false) + } } - private fun setBackgroundColorOnSelected(tab: Int) { - binding.menu1.setBackgroundColor(rh.gac(this, if (tab == 1) R.attr.defaultBackground else R.attr.helperProfileColor)) - binding.menu2.setBackgroundColor(rh.gac(this, if (tab == 0) R.attr.defaultBackground else R.attr.examinedProfileColor)) - } } diff --git a/app/src/main/java/info/nightscout/androidaps/activities/fragments/HistoryBrowserData.kt b/app/src/main/java/info/nightscout/androidaps/activities/fragments/HistoryBrowserData.kt new file mode 100644 index 0000000000..2fba78b07c --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/activities/fragments/HistoryBrowserData.kt @@ -0,0 +1,72 @@ +package info.nightscout.androidaps.activities.fragments + +import dagger.android.HasAndroidInjector +import info.nightscout.androidaps.database.AppRepository +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.plugins.general.overview.OverviewData +import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin +import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.androidaps.utils.DefaultValueHelper +import info.nightscout.androidaps.utils.FabricPrivacy +import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.androidaps.workflow.CalculationWorkflow +import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.sharedPreferences.SP +import javax.inject.Inject +import javax.inject.Singleton + +@Singleton +class HistoryBrowserData @Inject constructor( + injector: HasAndroidInjector, + aapsSchedulers: AapsSchedulers, + rxBus: RxBus, + aapsLogger: AAPSLogger, + rh: ResourceHelper, + dateUtil: DateUtil, + sp: SP, + activePlugin: ActivePlugin, + defaultValueHelper: DefaultValueHelper, + profileFunction: ProfileFunction, + repository: AppRepository, + fabricPrivacy: FabricPrivacy, + calculationWorkflow: CalculationWorkflow +) { + + var iobCobCalculator: IobCobCalculatorPlugin + var overviewData: OverviewData + + init { + // We don't want to use injected singletons but own instance working on top of different data + overviewData = + OverviewData( + aapsLogger, + rh, + dateUtil, + sp, + activePlugin, + defaultValueHelper, + profileFunction, + repository, + fabricPrivacy + ) + iobCobCalculator = + IobCobCalculatorPlugin( + injector, + aapsLogger, + aapsSchedulers, + rxBus, + sp, + rh, + profileFunction, + activePlugin, + fabricPrivacy, + dateUtil, + repository, + overviewData, + calculationWorkflow + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt index cd9eedaeb5..ff3d0c778a 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt @@ -56,9 +56,9 @@ class CarbsDialog : DialogFragmentWithDate() { companion object { - private const val FAV1_DEFAULT = 5 - private const val FAV2_DEFAULT = 10 - private const val FAV3_DEFAULT = 20 + const val FAV1_DEFAULT = 5 + const val FAV2_DEFAULT = 10 + const val FAV3_DEFAULT = 20 } private var queryingProtection = false @@ -143,7 +143,7 @@ class CarbsDialog : DialogFragmentWithDate() { ) val plus1text = toSignedString(sp.getInt(R.string.key_carbs_button_increment_1, FAV1_DEFAULT)) binding.plus1.text = plus1text - binding.plus1.contentDescription = rh.gs(R.string.treatments_wizard_carbs_label) + " " + plus1text + binding.plus1.contentDescription = rh.gs(R.string.treatments_wizard_carbs_label) + " " + plus1text binding.plus1.setOnClickListener { binding.carbs.value = max( 0.0, binding.carbs.value @@ -155,7 +155,7 @@ class CarbsDialog : DialogFragmentWithDate() { val plus2text = toSignedString(sp.getInt(R.string.key_carbs_button_increment_2, FAV2_DEFAULT)) binding.plus2.text = plus2text - binding.plus2.contentDescription = rh.gs(R.string.treatments_wizard_carbs_label) + " " + plus2text + binding.plus2.contentDescription = rh.gs(R.string.treatments_wizard_carbs_label) + " " + plus2text binding.plus2.setOnClickListener { binding.carbs.value = max( 0.0, binding.carbs.value @@ -166,7 +166,7 @@ class CarbsDialog : DialogFragmentWithDate() { } val plus3text = toSignedString(sp.getInt(R.string.key_carbs_button_increment_3, FAV3_DEFAULT)) binding.plus3.text = plus3text - binding.plus2.contentDescription = rh.gs(R.string.treatments_wizard_carbs_label) + " " + plus3text + binding.plus2.contentDescription = rh.gs(R.string.treatments_wizard_carbs_label) + " " + plus3text binding.plus3.setOnClickListener { binding.carbs.value = max( 0.0, binding.carbs.value @@ -179,7 +179,7 @@ class CarbsDialog : DialogFragmentWithDate() { setOnValueChangedListener { eventTime: Long -> run { val timeOffset = ((eventTime - eventTimeOriginal) / (1000 * 60)).toDouble() - binding.time.value = timeOffset + if (_binding != null) binding.time.value = timeOffset } } @@ -250,7 +250,8 @@ class CarbsDialog : DialogFragmentWithDate() { val hypoSelected = binding.hypoTt.isChecked if (hypoSelected) actions.add( - rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(hypoTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, hypoTTDuration) + ")").formatColor( context, + rh.gs(R.string.temptargetshort) + ": " + (DecimalFormatter.to1Decimal(hypoTT) + " " + unitLabel + " (" + rh.gs(R.string.format_mins, hypoTTDuration) + ")").formatColor( + context, rh, R.attr.tempTargetConfirmation ) @@ -258,7 +259,7 @@ class CarbsDialog : DialogFragmentWithDate() { val timeOffset = binding.time.value.toInt() if (useAlarm && carbs > 0 && timeOffset > 0) - actions.add(rh.gs(R.string.alarminxmin, timeOffset).formatColor(context , rh, R.attr.infoColor)) + actions.add(rh.gs(R.string.alarminxmin, timeOffset).formatColor(context, rh, R.attr.infoColor)) val duration = binding.duration.value.toInt() if (duration > 0) actions.add(rh.gs(R.string.duration) + ": " + duration + rh.gs(R.string.shorthour)) @@ -385,7 +386,7 @@ class CarbsDialog : DialogFragmentWithDate() { override fun onResume() { super.onResume() - if(!queryingProtection) { + if (!queryingProtection) { queryingProtection = true activity?.let { activity -> val cancelFail = { diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt index 9efb110a4f..7c45fe99ee 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt @@ -58,9 +58,9 @@ class InsulinDialog : DialogFragmentWithDate() { companion object { - private const val PLUS1_DEFAULT = 0.5 - private const val PLUS2_DEFAULT = 1.0 - private const val PLUS3_DEFAULT = 2.0 + const val PLUS1_DEFAULT = 0.5 + const val PLUS2_DEFAULT = 1.0 + const val PLUS3_DEFAULT = 2.0 } private var queryingProtection = false diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt index 8af683bcdb..9c8fe4ba91 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt @@ -345,6 +345,7 @@ class WizardDialog : DaggerDialogFragment() { val basalIob = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round() runOnUiThread { + _binding ?: return@runOnUiThread if (carbsPassedIntoWizard != 0.0) { binding.carbsInput.value = carbsPassedIntoWizard } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt index d5a33606eb..234735a214 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt @@ -22,6 +22,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.stats.TddCalculator import info.nightscout.shared.SafeParse import info.nightscout.shared.logging.AAPSLogger @@ -36,6 +37,7 @@ import java.io.IOException import java.lang.reflect.InvocationTargetException import java.nio.charset.StandardCharsets import javax.inject.Inject +import kotlin.math.ln class DetermineBasalAdapterSMBDynamicISFJS internal constructor(private val scriptReader: ScriptReader, private val injector: HasAndroidInjector) : DetermineBasalAdapterInterface { @@ -194,10 +196,6 @@ class DetermineBasalAdapterSMBDynamicISFJS internal constructor(private val scri this.profile.put("current_basal_safety_multiplier", sp.getDouble(R.string.key_openapsama_current_basal_safety_multiplier, 4.0)) this.profile.put("lgsThreshold", Profile.toMgdl(sp.getDouble(R.string.key_lgs_threshold, 65.0))) - val insulin = activePlugin.activeInsulin - val insulinType = insulin.friendlyName - val insulinPeak = insulin.peak - //mProfile.put("high_temptarget_raises_sensitivity", SP.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity)); this.profile.put("high_temptarget_raises_sensitivity", sp.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity)) //mProfile.put("low_temptarget_lowers_sensitivity", SP.getBoolean(R.string.key_low_temptarget_lowers_sensitivity, SMBDefaults.low_temptarget_lowers_sensitivity)); @@ -227,9 +225,6 @@ class DetermineBasalAdapterSMBDynamicISFJS internal constructor(private val scri this.profile.put("enableSMB_after_carbs", smbEnabled && sp.getBoolean(R.string.key_enableSMB_after_carbs, false) && advancedFiltering) this.profile.put("maxSMBBasalMinutes", sp.getInt(R.string.key_smbmaxminutes, SMBDefaults.maxSMBBasalMinutes)) this.profile.put("maxUAMSMBBasalMinutes", sp.getInt(R.string.key_uamsmbmaxminutes, SMBDefaults.maxUAMSMBBasalMinutes)) - this.profile.put("DynISFAdjust", SafeParse.stringToDouble(sp.getString(R.string.key_DynISFAdjust, "100"))) - this.profile.put("insulinType", insulinType) - this.profile.put("insulinPeak", insulinPeak) this.profile.put("maxUAMSMBBasalMinutes", sp.getInt(R.string.key_uamsmbmaxminutes, SMBDefaults.maxUAMSMBBasalMinutes)) //set the min SMB amount to be the amount set by the pump. this.profile.put("bolus_increment", pumpBolusStep) @@ -237,8 +232,7 @@ class DetermineBasalAdapterSMBDynamicISFJS internal constructor(private val scri this.profile.put("current_basal", basalRate) this.profile.put("temptargetSet", tempTargetSet) this.profile.put("autosens_max", SafeParse.stringToDouble(sp.getString(R.string.key_openapsama_autosens_max, "1.2"))) - this.profile.put("autosens_min", SafeParse.stringToDouble(sp.getString(R.string.key_openapsama_autosens_min, "0.8"))) - this.profile.put("openapsama_useautosens", sp.getBoolean(R.string.key_openapsama_useautosens, false)) + this.profile.put("autosens_min", SafeParse.stringToDouble(sp.getString(R.string.key_openapsama_autosens_min, "0.7"))) //set the min SMB amount to be the amount set by the pump. if (profileFunction.getUnits() == GlucoseUnit.MMOL) { this.profile.put("out_units", "mmol/L") @@ -270,19 +264,53 @@ class DetermineBasalAdapterSMBDynamicISFJS internal constructor(private val scri this.mealData.put("lastBolusTime", mealData.lastBolusTime) this.mealData.put("lastCarbTime", mealData.lastCarbTime) - this.mealData.put("TDDAIMI1", tddCalculator.averageTDD(tddCalculator.calculate(1))?.totalAmount) - this.mealData.put("TDDAIMI7", tddCalculator.averageTDD(tddCalculator.calculate(7))?.totalAmount) - this.mealData.put("TDDLast4", tddCalculator.calculateDaily(-4, 0).totalAmount) - this.mealData.put("TDD4to8", tddCalculator.calculateDaily(-8, -4).totalAmount) - this.mealData.put("TDD24", tddCalculator.calculateDaily(-24, 0).totalAmount) + val tdd1D = tddCalculator.averageTDD(tddCalculator.calculate(1))?.totalAmount + val tdd7D = tddCalculator.averageTDD(tddCalculator.calculate(7))?.totalAmount + val tddLast24H = tddCalculator.calculateDaily(-24, 0).totalAmount + val tddLast4H = tddCalculator.calculateDaily(-4, 0).totalAmount + val tddLast8to4H = tddCalculator.calculateDaily(-8, -4).totalAmount + val tddWeightedFromLast8H = ((1.4 * tddLast4H) + (0.6 * tddLast8to4H)) * 3 +// console.error("Rolling 8 hours weight average: " + tdd_last8_wt + "; "); +// console.error("1-day average TDD is: " + tdd1 + "; "); +// console.error("7-day average TDD is: " + tdd7 + "; "); + var tdd = + if (tdd1D != null && tdd7D != null) (tddWeightedFromLast8H * 0.33) + (tdd7D * 0.34) + (tdd1D * 0.33) + else tddWeightedFromLast8H +// console.log("TDD = " + TDD + " using average of 7-day, 1-day and weighted 8hr average"); - if (constraintChecker.isAutosensModeEnabled().value()) { - autosensData.put("ratio", autosensDataRatio) - } else { - autosensData.put("ratio", 1.0) +// console.log("Insulin Peak = " + insulin.peak + "; "); + + val insulin = activePlugin.activeInsulin + val insulinDivisor = when { + insulin.peak > 65 -> 55 // lyumjev peak: 45 + insulin.peak > 50 -> 65 // ultra rapid peak: 55 + else -> 75 // rapid peak: 75 } +// console.log("For " + insulin.friendlyName + " (insulin peak: " + insulin.peak + ") insulin divisor is: " + ins_val + "; "); + + val dynISFadjust = SafeParse.stringToDouble(sp.getString(R.string.key_DynISFAdjust, "100")) / 100.0 + tdd *= dynISFadjust + + var variableSensitivity = 1800 / (tdd * (ln((glucoseStatus.glucose / insulinDivisor) + 1))) + variableSensitivity = Round.roundTo(variableSensitivity, 0.1) + + if (dynISFadjust != 1.0) { +// console.log("TDD adjusted to " + TDD + " using adjustment factor of " + dynISFadjust + "; "); + } +// console.log("Current sensitivity for predictions is " + variable_sens + " based on current bg"); + + this.profile.put("variable_sens", variableSensitivity) + this.profile.put("insulinDivisor", insulinDivisor) + this.profile.put("TDD", tdd) + + + if (sp.getBoolean(R.string.key_adjust_sensitivity, false) && tdd7D != null) + autosensData.put("ratio", tddLast24H / tdd7D) + else + autosensData.put("ratio", 1.0) + this.microBolusAllowed = microBolusAllowed smbAlwaysAllowed = advancedFiltering currentTime = now diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt index f3978aacf1..ea2d85eeaa 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt @@ -68,6 +68,7 @@ class OpenAPSSMBDynamicISFPlugin @Inject constructor( .shortName(R.string.dynisf_shortname) .preferencesId(R.xml.pref_openapssmbdynamicisf) .setDefault(false) + .showInList(buildHelper.isEngineeringMode() && buildHelper.isDev()) } override fun specialEnableCondition(): Boolean = buildHelper.isEngineeringMode() && buildHelper.isDev() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/objectives/Objective2.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/objectives/Objective2.kt index b32fab8e96..4c79036f9b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/objectives/Objective2.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/objectives/Objective2.kt @@ -178,6 +178,21 @@ class Objective2(injector: HasAndroidInjector) : Objective(injector, "exam", R.s .option(Option(R.string.iob_negiob, true)) .option(Option(R.string.iob_posiob, true)) ) + tasks.add(ExamTask(this, R.string.cob_label, R.string.cob_question, "cob1") + .option(Option(R.string.cob_longer, true)) + .option(Option(R.string.cob_shorter, false)) + .option(Option(R.string.cob_no_effect, false)) + ) + tasks.add(ExamTask(this, R.string.cob_label, R.string.cob2_question, "cob2") + .option(Option(R.string.cob2_longer, false)) + .option(Option(R.string.cob2_shorter, true)) + .option(Option(R.string.cob2_no_effect, false)) + ) + tasks.add(ExamTask(this, R.string.cob_label, R.string.cob3_question, "cob3") + .option(Option(R.string.cob3_longer, false)) + .option(Option(R.string.cob3_shorter, false)) + .option(Option(R.string.cob3_no_effect, true)) + ) tasks.add(ExamTask(this, R.string.breadgrams_label, R.string.blank, "breadgrams") .option(Option(R.string.breadgrams_grams, true)) .option(Option(R.string.breadgrams_exchange, false)) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt index 92002eab4d..ff3fc89a4a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt @@ -312,7 +312,7 @@ class ActionsFragment : DaggerFragment() { for (customAction in customActions) { if (!customAction.isEnabled) continue - val btn = SingleClickButton(currentContext, null, android.R.attr.buttonStyle) + val btn = SingleClickButton(currentContext, null, R.attr.customBtnStyle) btn.text = rh.gs(customAction.name) val layoutParams = LinearLayout.LayoutParams( diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotuneFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotuneFragment.kt index 2b467cb500..6ad3b9e04e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotuneFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotuneFragment.kt @@ -18,37 +18,37 @@ import dagger.android.HasAndroidInjector import dagger.android.support.DaggerFragment import info.nightscout.androidaps.Constants import info.nightscout.androidaps.R +import info.nightscout.androidaps.data.LocalInsulin +import info.nightscout.androidaps.data.ProfileSealed +import info.nightscout.androidaps.database.entities.UserEntry +import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.databinding.AutotuneFragmentBinding import info.nightscout.androidaps.dialogs.ProfileViewerDialog +import info.nightscout.androidaps.extensions.runOnUiThread +import info.nightscout.androidaps.extensions.toVisibility +import info.nightscout.androidaps.interfaces.* +import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.autotune.data.ATProfile import info.nightscout.androidaps.plugins.general.autotune.events.EventAutotuneUpdateGui import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin import info.nightscout.androidaps.plugins.profile.local.events.EventLocalProfileChanged -import info.nightscout.androidaps.data.LocalInsulin -import info.nightscout.androidaps.data.ProfileSealed -import info.nightscout.androidaps.database.entities.UserEntry -import info.nightscout.androidaps.database.entities.ValueWithUnit -import info.nightscout.androidaps.extensions.runOnUiThread -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.MidnightTime import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.alertDialogs.OKDialog.showConfirmation +import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.shared.SafeParse import info.nightscout.shared.sharedPreferences.SP -import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONObject -//import org.slf4j.LoggerFactory import java.text.DecimalFormat -import java.util.* import javax.inject.Inject class AutotuneFragment : DaggerFragment() { + @Inject lateinit var profileFunction: ProfileFunction @Inject lateinit var autotunePlugin: AutotunePlugin @Inject lateinit var autotuneFS: AutotuneFS @@ -61,13 +61,16 @@ class AutotuneFragment : DaggerFragment() { @Inject lateinit var rh: ResourceHelper @Inject lateinit var rxBus: RxBus @Inject lateinit var injector: HasAndroidInjector + @Inject lateinit var aapsSchedulers: AapsSchedulers private var disposable: CompositeDisposable = CompositeDisposable() + //private val log = LoggerFactory.getLogger(AutotunePlugin::class.java) private var _binding: AutotuneFragmentBinding? = null private lateinit var profileStore: ProfileStore private var profileName = "" - private lateinit var profile: ATProfile + private var profile: ATProfile? = null + // This property is only valid between onCreateView and // onDestroyView. private val binding get() = _binding!! @@ -88,15 +91,15 @@ class AutotuneFragment : DaggerFragment() { profileStore = activePlugin.activeProfileSource.profile ?: ProfileStore(injector, JSONObject(), dateUtil) profileName = if (binding.profileList.text.toString() == rh.gs(R.string.active)) "" else binding.profileList.text.toString() profileFunction.getProfile()?.let { currentProfile -> - profile = ATProfile(profileStore.getSpecificProfile(profileName)?.let { ProfileSealed.Pure(it) } ?:currentProfile, LocalInsulin(""), injector) + profile = ATProfile(profileStore.getSpecificProfile(profileName)?.let { ProfileSealed.Pure(it) } ?: currentProfile, LocalInsulin(""), injector) } binding.tuneDays.setParams( savedInstanceState?.getDouble("tunedays") - ?: defaultValue, 1.0, 30.0, 1.0, DecimalFormat("0"), false, null, textWatcher) + ?: defaultValue, 1.0, 30.0, 1.0, DecimalFormat("0"), false, null, textWatcher + ) binding.autotuneRun.setOnClickListener { val daysBack = SafeParse.stringToInt(binding.tuneDays.text) - autotunePlugin.calculationRunning = true autotunePlugin.lastNbDays = daysBack.toString() log("Run Autotune $profileName, $daysBack days") Thread { @@ -105,14 +108,14 @@ class AutotuneFragment : DaggerFragment() { updateGui() } binding.profileList.onItemClickListener = AdapterView.OnItemClickListener { _, _, _, _ -> - if (!autotunePlugin.calculationRunning) - { + if (!autotunePlugin.calculationRunning) { profileName = if (binding.profileList.text.toString() == rh.gs(R.string.active)) "" else binding.profileList.text.toString() profileFunction.getProfile()?.let { currentProfile -> - profile = ATProfile(profileStore.getSpecificProfile(profileName)?.let { ProfileSealed.Pure(it) } ?:currentProfile, LocalInsulin(""), injector) + profile = ATProfile(profileStore.getSpecificProfile(profileName)?.let { ProfileSealed.Pure(it) } ?: currentProfile, LocalInsulin(""), injector) } autotunePlugin.selectedProfile = profileName resetParam() + binding.tuneDays.value = autotunePlugin.lastNbDays.toDouble() } updateGui() } @@ -120,10 +123,10 @@ class AutotuneFragment : DaggerFragment() { binding.autotuneCopylocal.setOnClickListener { val localName = rh.gs(R.string.autotune_tunedprofile_name) + " " + dateUtil.dateAndTimeString(autotunePlugin.lastRun) val circadian = sp.getBoolean(R.string.key_autotune_circadian_ic_isf, false) - autotunePlugin.tunedProfile?.let { tunedProfile -> + autotunePlugin.tunedProfile?.let { tunedProfile -> showConfirmation(requireContext(), rh.gs(R.string.autotune_copy_localprofile_button), - rh.gs(R.string.autotune_copy_local_profile_message) + "\n" + localName + " " + dateUtil.dateAndTimeString(autotunePlugin.lastRun), + rh.gs(R.string.autotune_copy_local_profile_message) + "\n" + localName, Runnable { localProfilePlugin.addProfile(localProfilePlugin.copyFrom(tunedProfile.getProfile(circadian), localName)) rxBus.send(EventLocalProfileChanged()) @@ -204,13 +207,13 @@ class AutotuneFragment : DaggerFragment() { binding.autotuneCompare.setOnClickListener { val pumpProfile = autotunePlugin.pumpProfile val circadian = sp.getBoolean(R.string.key_autotune_circadian_ic_isf, false) - val tunedprofile = if (circadian) autotunePlugin.tunedProfile?.circadianProfile else autotunePlugin.tunedProfile?.profile + val tunedProfile = if (circadian) autotunePlugin.tunedProfile?.circadianProfile else autotunePlugin.tunedProfile?.profile ProfileViewerDialog().also { pvd -> pvd.arguments = Bundle().also { it.putLong("time", dateUtil.now()) it.putInt("mode", ProfileViewerDialog.Mode.PROFILE_COMPARE.ordinal) it.putString("customProfile", pumpProfile.profile.toPureNsJson(dateUtil).toString()) - it.putString("customProfile2", tunedprofile?.toPureNsJson(dateUtil).toString()) + it.putString("customProfile2", tunedProfile?.toPureNsJson(dateUtil).toString()) it.putString("customProfileUnits", profileFunction.getUnits().asText) it.putString("customProfileName", pumpProfile.profilename + "\n" + rh.gs(R.string.autotune_tunedprofile_name)) } @@ -270,11 +273,10 @@ class AutotuneFragment : DaggerFragment() { super.onResume() disposable += rxBus .toObservable(EventAutotuneUpdateGui::class.java) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe({ - updateGui() - }, { fabricPrivacy.logException(it) }) + .observeOn(aapsSchedulers.main) + .subscribe({ updateGui() }, fabricPrivacy::logException) checkNewDay() + binding.tuneDays.value = autotunePlugin.lastNbDays.toDouble() updateGui() } @@ -287,11 +289,10 @@ class AutotuneFragment : DaggerFragment() { @Synchronized private fun updateGui() { _binding ?: return - binding.tuneDays.value = autotunePlugin.lastNbDays.toDouble() profileStore = activePlugin.activeProfileSource.profile ?: ProfileStore(injector, JSONObject(), dateUtil) profileName = if (binding.profileList.text.toString() == rh.gs(R.string.active)) "" else binding.profileList.text.toString() profileFunction.getProfile()?.let { currentProfile -> - profile = ATProfile(profileStore.getSpecificProfile(profileName)?.let { ProfileSealed.Pure(it) } ?:currentProfile, LocalInsulin(""), injector) + profile = ATProfile(profileStore.getSpecificProfile(profileName)?.let { ProfileSealed.Pure(it) } ?: currentProfile, LocalInsulin(""), injector) } val profileList: ArrayList = profileStore.getProfileList() profileList.add(0, rh.gs(R.string.active)) @@ -315,17 +316,18 @@ class AutotuneFragment : DaggerFragment() { autotunePlugin.calculationRunning -> { binding.tuneWarning.text = rh.gs(R.string.autotune_warning_during_run) } + autotunePlugin.lastRunSuccess -> { - binding.autotuneCopylocal.visibility = View.VISIBLE - binding.autotuneUpdateProfile.visibility = autotunePlugin.updateButtonVisibility - binding.autotuneRevertProfile.visibility = if (autotunePlugin.updateButtonVisibility == View.VISIBLE) View.GONE else View.VISIBLE - binding.autotuneProfileswitch.visibility = View.VISIBLE - binding.tuneWarning.text = rh.gs(R.string.autotune_warning_after_run) + binding.autotuneCopylocal.visibility = View.VISIBLE + binding.autotuneUpdateProfile.visibility = autotunePlugin.updateButtonVisibility + binding.autotuneRevertProfile.visibility = if (autotunePlugin.updateButtonVisibility == View.VISIBLE) View.GONE else View.VISIBLE + binding.autotuneProfileswitch.visibility = View.VISIBLE + binding.tuneWarning.text = rh.gs(R.string.autotune_warning_after_run) binding.autotuneCompare.visibility = View.VISIBLE } + else -> { - if (profile.isValid) - binding.autotuneRun.visibility = View.VISIBLE + binding.autotuneRun.visibility = (profile?.isValid == true).toVisibility() binding.autotuneCheckInputProfile.visibility = View.VISIBLE } } @@ -335,10 +337,9 @@ class AutotuneFragment : DaggerFragment() { private fun checkNewDay() { val runToday = autotunePlugin.lastRun > MidnightTime.calc(dateUtil.now() - autotunePlugin.autotuneStartHour * 3600 * 1000L) + autotunePlugin.autotuneStartHour * 3600 * 1000L - if (runToday && autotunePlugin.result != "") - { + if (runToday && autotunePlugin.result != "") { binding.tuneWarning.text = rh.gs(R.string.autotune_warning_after_run) - } else if (!runToday || autotunePlugin.result.isEmpty()) { //if new day reinit result, default days, warning and button's visibility + } else if (!runToday || autotunePlugin.result.isEmpty()) { //if new day re-init result, default days, warning and button's visibility resetParam(!runToday) } } @@ -348,17 +349,18 @@ class AutotuneFragment : DaggerFragment() { var nl = "" if (profileFunction.getProfile() == null) { warning = rh.gs(R.string.profileswitch_ismissing) - return warning + return warning } profileFunction.getProfile()?.let { currentProfile -> - profile = ATProfile(profileStore.getSpecificProfile(profileName)?.let { ProfileSealed.Pure(it) } ?:currentProfile, LocalInsulin(""), injector) - if (!profile.isValid) return rh.gs(R.string.autotune_profile_invalid) - if (profile.icSize > 1) { - warning += nl + rh.gs(R.string.autotune_ic_warning, profile.icSize, profile.ic) - nl = "\n" - } - if (profile.isfSize > 1) { - warning += nl + rh.gs(R.string.autotune_isf_warning, profile.isfSize, Profile.fromMgdlToUnits(profile.isf, profileFunction.getUnits()), profileFunction.getUnits().asText) + profile = ATProfile(profileStore.getSpecificProfile(profileName)?.let { ProfileSealed.Pure(it) } ?: currentProfile, LocalInsulin(""), injector).also { profile -> + if (!profile.isValid) return rh.gs(R.string.autotune_profile_invalid) + if (profile.icSize > 1) { + warning += nl + rh.gs(R.string.autotune_ic_warning, profile.icSize, profile.ic) + nl = "\n" + } + if (profile.isfSize > 1) { + warning += nl + rh.gs(R.string.autotune_isf_warning, profile.isfSize, Profile.fromMgdlToUnits(profile.isf, profileFunction.getUnits()), profileFunction.getUnits().asText) + } } } return warning @@ -376,18 +378,23 @@ class AutotuneFragment : DaggerFragment() { } private val textWatcher = object : TextWatcher { - override fun afterTextChanged(s: Editable) { updateGui() } + override fun afterTextChanged(s: Editable) { + updateGui() + } + override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {} override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { if (binding.tuneDays.text.isNotEmpty()) { try { if (autotunePlugin.calculationRunning) binding.tuneDays.value = autotunePlugin.lastNbDays.toDouble() - if (binding.tuneDays.value != autotunePlugin.lastNbDays.toDouble()) { + if (binding.tuneDays.text != autotunePlugin.lastNbDays) { autotunePlugin.lastNbDays = binding.tuneDays.text resetParam(false) } - } catch (e:Exception) { } + } catch (e: Exception) { + fabricPrivacy.logException(e) + } } } } @@ -469,7 +476,7 @@ class AutotuneFragment : DaggerFragment() { } } - private fun toTableRowHeader(basal:Boolean = false): TableRow = + private fun toTableRowHeader(basal: Boolean = false): TableRow = TableRow(context).also { header -> val lp = TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT).apply { weight = 1f } header.layoutParams = TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT).apply { gravity = Gravity.CENTER_HORIZONTAL } @@ -500,7 +507,7 @@ class AutotuneFragment : DaggerFragment() { }) } - private fun toTableRowValue(hour: String, inputValue: Double, tunedValue: Double, format:String = "%.3f", missing: String = ""): TableRow = + private fun toTableRowValue(hour: String, inputValue: Double, tunedValue: Double, format: String = "%.3f", missing: String = ""): TableRow = TableRow(context).also { row -> val percentValue = Round.roundTo(tunedValue / inputValue * 100 - 100, 1.0).toInt().toString() + "%" val lp = TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT).apply { weight = 1f } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotuneIob.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotuneIob.kt index 13079e418c..6b29491848 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotuneIob.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotuneIob.kt @@ -2,34 +2,34 @@ package info.nightscout.androidaps.plugins.general.autotune import info.nightscout.androidaps.Constants import info.nightscout.androidaps.R -import info.nightscout.androidaps.data.* +import info.nightscout.androidaps.data.IobTotal +import info.nightscout.androidaps.data.LocalInsulin import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.embedments.InterfaceIDs -import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.database.entities.* import info.nightscout.androidaps.extensions.durationInMinutes import info.nightscout.androidaps.extensions.iobCalc import info.nightscout.androidaps.extensions.toJson import info.nightscout.androidaps.extensions.toTemporaryBasal +import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.plugins.general.autotune.data.ATProfile import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONObject -import org.slf4j.LoggerFactory import java.util.* import javax.inject.Inject import javax.inject.Singleton import kotlin.math.ceil -import kotlin.math.roundToInt @Singleton -class AutotuneIob @Inject constructor( +open class AutotuneIob @Inject constructor( private val aapsLogger: AAPSLogger, private val repository: AppRepository, private val profileFunction: ProfileFunction, @@ -39,12 +39,12 @@ class AutotuneIob @Inject constructor( private val autotuneFS: AutotuneFS ) { - private val nsTreatments = ArrayList() + private var nsTreatments = ArrayList() private var dia: Double = Constants.defaultDIA - var boluses: MutableList = ArrayList() + var boluses: ArrayList = ArrayList() var meals = ArrayList() lateinit var glucose: List // newest at index 0 - private lateinit var tempBasals: MutableList + private lateinit var tempBasals: ArrayList var startBG: Long = 0 var endBG: Long = 0 private fun range(): Long = (60 * 60 * 1000L * dia + T.hours(2).msecs()).toLong() @@ -59,24 +59,38 @@ class AutotuneIob @Inject constructor( initializeTreatmentData(from - range(), to) initializeTempBasalData(from - range(), to, tunedProfile) initializeExtendedBolusData(from - range(), to, tunedProfile) - Collections.sort(tempBasals) { o1: TemporaryBasal, o2: TemporaryBasal -> (o2.timestamp - o1.timestamp).toInt() } - // Without Neutral TBR, Autotune Web will ignore iob for periods without TBR running - addNeutralTempBasal(from - range(), to, tunedProfile) - Collections.sort(nsTreatments) { o1: NsTreatment, o2: NsTreatment -> (o2.date - o1.date).toInt() } - Collections.sort(boluses) { o1: Bolus, o2: Bolus -> (o2.timestamp - o1.timestamp).toInt() } - log.debug("D/AutotunePlugin: Nb Treatments: " + nsTreatments.size + " Nb meals: " + meals.size) + sortTempBasal() + addNeutralTempBasal(from - range(), to, tunedProfile) // Without Neutral TBR, Autotune Web will ignore iob for periods without TBR running + sortNsTreatments() + sortBoluses() + aapsLogger.debug(LTag.AUTOTUNE, "Nb Treatments: " + nsTreatments.size + " Nb meals: " + meals.size) + } + + @Synchronized + private fun sortTempBasal() { + tempBasals = ArrayList(tempBasals.toList().sortedWith { o1: TemporaryBasal, o2: TemporaryBasal -> (o2.timestamp - o1.timestamp).toInt() }) + } + + @Synchronized + private fun sortNsTreatments() { + nsTreatments = ArrayList(nsTreatments.toList().sortedWith { o1: NsTreatment, o2: NsTreatment -> (o2.date - o1.date).toInt() }) + } + + @Synchronized + private fun sortBoluses() { + boluses = ArrayList(boluses.toList().sortedWith { o1: Bolus, o2: Bolus -> (o2.timestamp - o1.timestamp).toInt() }) } private fun initializeBgreadings(from: Long, to: Long) { - glucose = repository.compatGetBgReadingsDataFromTime(from, to, false).blockingGet(); + glucose = repository.compatGetBgReadingsDataFromTime(from, to, false).blockingGet() } //nsTreatment is used only for export data, meals is used in AutotunePrep private fun initializeTreatmentData(from: Long, to: Long) { - val oldestBgDate = if (glucose.size > 0) glucose[glucose.size - 1].timestamp else from - log.debug("AutotunePlugin Check BG date: BG Size: " + glucose.size + " OldestBG: " + dateUtil.dateAndTimeAndSecondsString(oldestBgDate) + " to: " + dateUtil.dateAndTimeAndSecondsString(to)) + val oldestBgDate = if (glucose.isNotEmpty()) glucose[glucose.size - 1].timestamp else from + aapsLogger.debug(LTag.AUTOTUNE, "Check BG date: BG Size: " + glucose.size + " OldestBG: " + dateUtil.dateAndTimeAndSecondsString(oldestBgDate) + " to: " + dateUtil.dateAndTimeAndSecondsString(to)) val tmpCarbs = repository.getCarbsDataFromTimeToTimeExpanded(from, to, false).blockingGet() - log.debug("AutotunePlugin Nb treatments after query: " + tmpCarbs.size) + aapsLogger.debug(LTag.AUTOTUNE, "Nb treatments after query: " + tmpCarbs.size) meals.clear() boluses.clear() var nbCarbs = 0 @@ -146,6 +160,7 @@ class AutotuneIob @Inject constructor( // addNeutralTempBasal will add a fake neutral TBR (100%) to have correct basal rate in exported file for periods without TBR running // to be able to compare results between oref0 algo and aaps + @Synchronized private fun addNeutralTempBasal(from: Long, to: Long, tunedProfile: ATProfile) { var previousStart = to for (i in tempBasals.indices) { @@ -180,6 +195,7 @@ class AutotuneIob @Inject constructor( // toSplittedTimestampTB will split all TBR across hours in different TBR with correct absolute value to be sure to have correct basal rate // even if profile rate is not the same + @Synchronized private fun toSplittedTimestampTB(tb: TemporaryBasal, tunedProfile: ATProfile) { var splittedTimestamp = tb.timestamp val cutInMilliSec = T.mins(60).msecs() //30 min to compare with oref0, 60 min to improve accuracy @@ -217,7 +233,7 @@ class AutotuneIob @Inject constructor( tempBasals.add(newtb) nsTreatments.add(NsTreatment(newtb)) splittedTimestamp += durationFilled - splittedDuration = splittedDuration - durationFilled + splittedDuration -= durationFilled val profile = profileFunction.getProfile(newtb.timestamp) ?:continue boluses.addAll(convertToBoluses(newtb, profile, tunedProfile.profile)) // required for correct iob calculation with oref0 algo } @@ -225,7 +241,7 @@ class AutotuneIob @Inject constructor( } } - fun getIOB(time: Long, localInsulin: LocalInsulin): IobTotal { + open fun getIOB(time: Long, localInsulin: LocalInsulin): IobTotal { val bolusIob = getCalculationToTimeTreatments(time, localInsulin).round() return bolusIob } @@ -295,7 +311,7 @@ class AutotuneIob @Inject constructor( return result } - + @Synchronized fun glucoseToJSON(): String { val glucoseJson = JSONArray() for (bgreading in glucose) @@ -303,6 +319,7 @@ class AutotuneIob @Inject constructor( return glucoseJson.toString(2) } + @Synchronized fun bolusesToJSON(): String { val bolusesJson = JSONArray() for (bolus in boluses) @@ -310,6 +327,7 @@ class AutotuneIob @Inject constructor( return bolusesJson.toString(2) } + @Synchronized fun nsHistoryToJSON(): String { val json = JSONArray() for (t in nsTreatments) { @@ -363,9 +381,11 @@ class AutotuneIob @Inject constructor( } } TherapyEvent.Type.COMBO_BOLUS -> - extendedBolus?.let { - val profile = profileFunction.getProfile(it.timestamp) - it.toJson(true, profile!!, dateUtil) + extendedBolus?.let { ebr -> + val profile = profileFunction.getProfile(ebr.timestamp) + profile?.let { + ebr.toJson(true, it, dateUtil) + } } TherapyEvent.Type.CORRECTION_BOLUS -> bolusTreatment?.toJson(true, dateUtil) TherapyEvent.Type.CARBS_CORRECTION -> carbsTreatment?.toJson(true, dateUtil) @@ -377,8 +397,4 @@ class AutotuneIob @Inject constructor( private fun log(message: String) { autotuneFS.atLog("[iob] $message") } - - companion object { - private val log = LoggerFactory.getLogger(AutotunePlugin::class.java) - } } \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePlugin.kt index 5f926c28c5..38c9781de6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePlugin.kt @@ -22,6 +22,7 @@ import info.nightscout.androidaps.utils.MidnightTime import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject @@ -60,12 +61,13 @@ class AutotunePlugin @Inject constructor( .pluginName(R.string.autotune) .shortName(R.string.autotune_shortname) .preferencesId(R.xml.pref_autotune) + .showInList(buildHelper.isEngineeringMode() && buildHelper.isDev()) .description(R.string.autotune_description), aapsLogger, resourceHelper, injector ), Autotune { @Volatile override var lastRunSuccess: Boolean = false @Volatile var result: String = "" - @Volatile var calculationRunning: Boolean = false + @Volatile override var calculationRunning: Boolean = false @Volatile var lastRun: Long = 0 @Volatile var selectedProfile = "" @Volatile var lastNbDays: String = "" @@ -76,21 +78,34 @@ class AutotunePlugin @Inject constructor( private lateinit var profile: Profile val autotuneStartHour: Int = 4 - override fun aapsAutotune(daysBack: Int, autoSwitch: Boolean, profileToTune: String): String { + override fun aapsAutotune(daysBack: Int, autoSwitch: Boolean, profileToTune: String) { + lastRunSuccess = false + if (calculationRunning) { + aapsLogger.debug(LTag.AUTOMATION, "Autotune run detected, Autotune Run Cancelled") + return + } + calculationRunning = true tunedProfile = null updateButtonVisibility = View.GONE - lastRunSuccess = false var logResult = "" result = "" if (profileFunction.getProfile() == null) { result = rh.gs(R.string.profileswitch_ismissing) - return result + rxBus.send(EventAutotuneUpdateGui()) + calculationRunning = false + return } val detailedLog = sp.getBoolean(R.string.key_autotune_additional_log, false) calculationRunning = true lastNbDays = "" + daysBack lastRun = dateUtil.now() - val profileStore = activePlugin.activeProfileSource.profile ?: return rh.gs(R.string.profileswitch_ismissing) + val profileStore = activePlugin.activeProfileSource.profile + if (profileStore == null) { + result = rh.gs(R.string.profileswitch_ismissing) + rxBus.send(EventAutotuneUpdateGui()) + calculationRunning = false + return + } selectedProfile = if (profileToTune.isEmpty()) profileFunction.getProfileName() else profileToTune profileFunction.getProfile()?.let { currentProfile -> profile = profileStore.getSpecificProfile(profileToTune)?.let { ProfileSealed.Pure(it) } ?: currentProfile @@ -144,11 +159,11 @@ class AutotunePlugin @Inject constructor( if (tunedProfile == null) { result = rh.gs(R.string.autotune_error) log("TunedProfile is null on day ${i + 1}") - calculationRunning = false - rxBus.send(EventAutotuneUpdateGui()) autotuneFS.exportResult(result) autotuneFS.exportLogAndZip(lastRun) - return result + rxBus.send(EventAutotuneUpdateGui()) + calculationRunning = false + return } } result = rh.gs(R.string.autotune_result, dateUtil.dateAndTimeString(lastRun)) @@ -193,13 +208,16 @@ class AutotunePlugin @Inject constructor( } tunedProfile?.let { - lastRunSuccess = true saveLastRun() + lastRunSuccess = true rxBus.send(EventAutotuneUpdateGui()) calculationRunning = false - return result + return } - return rh.gs(R.string.autotune_error) + result = rh.gs(R.string.autotune_error) + rxBus.send(EventAutotuneUpdateGui()) + calculationRunning = false + return } private fun showResults(tunedProfile: ATProfile?, pumpProfile: ATProfile): String { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePrep.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePrep.kt index 9e0b5d704f..63617e908e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePrep.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePrep.kt @@ -10,6 +10,8 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.MidnightTime import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T +import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP import java.util.* import javax.inject.Inject @@ -17,6 +19,7 @@ import javax.inject.Singleton @Singleton class AutotunePrep @Inject constructor( + private val aapsLogger: AAPSLogger, private val sp: SP, private val dateUtil: DateUtil, private val autotuneFS: AutotuneFS, @@ -146,6 +149,7 @@ class AutotunePrep @Inject constructor( } } if (glucose.size == 0 || glucoseData.size == 0 ) { + //aapsLogger.debug(LTag.AUTOTUNE, "No BG value received") if (verbose) log("No BG value received") return null @@ -159,11 +163,13 @@ class AutotunePrep @Inject constructor( //val boluses = 0 //val maxCarbs = 0 if (treatments.size == 0) { + //aapsLogger.debug(LTag.AUTOTUNE, "No Carbs entries") if (verbose) log("No Carbs entries") //return null } if (autotuneIob.boluses.size == 0) { + //aapsLogger.debug(LTag.AUTOTUNE, "No treatment received") if (verbose) log("No treatment received") return null @@ -253,6 +259,7 @@ class AutotunePrep @Inject constructor( } avgDelta = (bg - bucketedData[i + 4].value) / 4 } else { + //aapsLogger.debug(LTag.AUTOTUNE, "Could not find glucose data") if (verbose) log("Could not find glucose data") } @@ -302,7 +309,7 @@ class AutotunePrep @Inject constructor( // Then, calculate carb absorption for that 5m interval using the deviation. if (mealCOB > 0) { - val ci = Math.max(deviation, sp.getDouble("openapsama_min_5m_carbimpact", 3.0)) + val ci = Math.max(deviation, sp.getDouble(R.string.key_openapsama_min_5m_carbimpact, 3.0)) val absorbed = ci * tunedprofile.ic / sens // Store the COB, and use it as the starting point for the next data point. mealCOB = Math.max(0.0, mealCOB - absorbed) @@ -320,8 +327,9 @@ class AutotunePrep @Inject constructor( crInitialIOB = iob.iob crInitialBG = glucoseDatum.value crInitialCarbTime = glucoseDatum.date + //aapsLogger.debug(LTag.AUTOTUNE, "CRInitialIOB: $crInitialIOB CRInitialBG: $crInitialBG CRInitialCarbTime: ${dateUtil.toISOString(crInitialCarbTime)}") if (verbose) - log("CRInitialIOB: " + crInitialIOB + " CRInitialBG: " + crInitialBG + " CRInitialCarbTime: " + dateUtil.toISOString(crInitialCarbTime)) + log("CRInitialIOB: $crInitialIOB CRInitialBG: $crInitialBG CRInitialCarbTime: ${dateUtil.toISOString(crInitialCarbTime)}") } // keep calculatingCR as long as we have COB or enough IOB if (mealCOB > 0 && i > 1) { @@ -333,8 +341,9 @@ class AutotunePrep @Inject constructor( val crEndIOB = iob.iob val crEndBG = glucoseDatum.value val crEndTime = glucoseDatum.date + //aapsLogger.debug(LTag.AUTOTUNE, "CREndIOB: $crEndIOB CREndBG: $crEndBG CREndTime: ${dateUtil.toISOString(crEndTime)}") if (verbose) - log("CREndIOB: " + crEndIOB + " CREndBG: " + crEndBG + " CREndTime: " + dateUtil.toISOString(crEndTime)) + log("CREndIOB: $crEndIOB CREndBG: $crEndBG CREndTime: ${dateUtil.toISOString(crEndTime)}") val crDatum = CRDatum(dateUtil) crDatum.crInitialBG = crInitialBG crDatum.crInitialIOB = crInitialIOB @@ -349,6 +358,7 @@ class AutotunePrep @Inject constructor( //log.debug(CREndTime - CRInitialCarbTime, CRElapsedMinutes); if (CRElapsedMinutes < 60 || i == 1 && mealCOB > 0) { + //aapsLogger.debug(LTag.AUTOTUNE, "Ignoring $CRElapsedMinutes m CR period.") if (verbose) log("Ignoring $CRElapsedMinutes m CR period.") } else { @@ -378,8 +388,9 @@ class AutotunePrep @Inject constructor( //log.debug(type); if (type != "csf") { glucoseDatum.mealAbsorption = "start" + //aapsLogger.debug(LTag.AUTOTUNE, "${glucoseDatum.mealAbsorption} carb absorption") if (verbose) - log(glucoseDatum.mealAbsorption + " carb absorption") + log("${glucoseDatum.mealAbsorption} carb absorption") } type = "csf" glucoseDatum.mealCarbs = mealCarbs.toInt() @@ -389,8 +400,9 @@ class AutotunePrep @Inject constructor( // check previous "type" value, and if it was csf, set a mealAbsorption end flag if (type == "csf") { csfGlucoseData[csfGlucoseData.size - 1].mealAbsorption = "end" + //aapsLogger.debug(LTag.AUTOTUNE, "${csfGlucoseData[csfGlucoseData.size - 1].mealAbsorption} carb absorption") if (verbose) - log(csfGlucoseData[csfGlucoseData.size - 1].mealAbsorption + " carb absorption") + log("${csfGlucoseData[csfGlucoseData.size - 1].mealAbsorption} carb absorption") } if (iob.iob > 2 * currentBasal || deviation > 6 || uam) { uam = if (deviation > 0) { @@ -400,6 +412,7 @@ class AutotunePrep @Inject constructor( } if (type != "uam") { glucoseDatum.uamAbsorption = "start" + //aapsLogger.debug(LTag.AUTOTUNE, "${glucoseDatum.uamAbsorption} unannnounced meal absorption") if (verbose) log(glucoseDatum.uamAbsorption + " unannnounced meal absorption") } @@ -407,6 +420,7 @@ class AutotunePrep @Inject constructor( uamGlucoseData.add(glucoseDatum) } else { if (type == "uam") { + //aapsLogger.debug(LTag.AUTOTUNE, "end unannounced meal absorption") if (verbose) log("end unannounced meal absorption") } @@ -433,8 +447,10 @@ class AutotunePrep @Inject constructor( } } // debug line to print out all the things + //aapsLogger.debug(LTag.AUTOTUNE, "${(if (absorbing) 1 else 0)} mealCOB: ${Round.roundTo(mealCOB, 0.1)} mealCarbs: ${Math.round(mealCarbs)} basalBGI: ${Round.roundTo(basalBGI, 0.1)} BGI: ${Round.roundTo(BGI, 0.1)} IOB: ${iob.iob} Activity: ${iob.activity} at ${dateUtil.timeStringWithSeconds(BGTime)} dev: $deviation avgDelta: $avgDelta $type") if (verbose) - log((if (absorbing) 1 else 0).toString() + " mealCOB: " + Round.roundTo(mealCOB, 0.1) + " mealCarbs: " + Math.round(mealCarbs) + " basalBGI: " + Round.roundTo(basalBGI, 0.1) + " BGI: " + Round.roundTo(BGI, 0.1) + " IOB: " + iob.iob+ " Activity: " + iob.activity + " at " + dateUtil.timeStringWithSeconds(BGTime) + " dev: " + deviation + " avgDelta: " + avgDelta + " " + type) + log("${(if (absorbing) 1 else 0)} mealCOB: ${Round.roundTo(mealCOB, 0.1)} mealCarbs: ${Math.round(mealCarbs)} basalBGI: ${Round.roundTo(basalBGI, 0.1)} BGI: ${Round + .roundTo(BGI, 0.1)} IOB: ${iob.iob} Activity: ${iob.activity} at ${dateUtil.timeStringWithSeconds(BGTime)} dev: $deviation avgDelta: $avgDelta $type") } //**************************************************************************************************************************************** @@ -449,16 +465,20 @@ class AutotunePrep @Inject constructor( val UAMLength = uamGlucoseData.size var basalLength = basalGlucoseData.size if (sp.getBoolean(R.string.key_autotune_categorize_uam_as_basal, false)) { + //aapsLogger.debug(LTag.AUTOTUNE, "Categorizing all UAM data as basal.") if (verbose) log("Categorizing all UAM data as basal.") basalGlucoseData.addAll(uamGlucoseData) } else if (CSFLength > 12) { + //aapsLogger.debug(LTag.AUTOTUNE, "Found at least 1h of carb: assuming meals were announced, and categorizing UAM data as basal.") if (verbose) log("Found at least 1h of carb: assuming meals were announced, and categorizing UAM data as basal.") basalGlucoseData.addAll(uamGlucoseData) } else { if (2 * basalLength < UAMLength) { //log.debug(basalGlucoseData, UAMGlucoseData); + //aapsLogger.debug(LTag.AUTOTUNE, "Warning: too many deviations categorized as UnAnnounced Meals") + //aapsLogger.debug(LTag.AUTOTUNE, "Adding $UAMLength UAM deviations to $basalLength basal ones") if (verbose) { log("Warning: too many deviations categorized as UnAnnounced Meals") log("Adding $UAMLength UAM deviations to $basalLength basal ones") @@ -473,10 +493,12 @@ class AutotunePrep @Inject constructor( } //log.debug(newBasalGlucose); basalGlucoseData = newBasalGlucose + //aapsLogger.debug(LTag.AUTOTUNE, "and selecting the lowest 50%, leaving ${basalGlucoseData.size} basal+UAM ones") if (verbose) - log("and selecting the lowest 50%, leaving " + basalGlucoseData.size + " basal+UAM ones") + log("and selecting the lowest 50%, leaving ${basalGlucoseData.size} basal+UAM ones") } if (2 * ISFLength < UAMLength) { + //aapsLogger.debug(LTag.AUTOTUNE, "Adding $UAMLength UAM deviations to $ISFLength ISF ones") if (verbose) log("Adding $UAMLength UAM deviations to $ISFLength ISF ones") isfGlucoseData.addAll(uamGlucoseData) @@ -488,14 +510,17 @@ class AutotunePrep @Inject constructor( } //console.error(newISFGlucose); isfGlucoseData = newISFGlucose + //aapsLogger.debug(LTag.AUTOTUNE, "and selecting the lowest 50%, leaving ${isfGlucoseData.size} ISF+UAM ones") if (verbose) - log("and selecting the lowest 50%, leaving " + isfGlucoseData.size + " ISF+UAM ones") + log("and selecting the lowest 50%, leaving ${isfGlucoseData.size} ISF+UAM ones") //log.error(ISFGlucoseData.length, UAMLength); } } basalLength = basalGlucoseData.size ISFLength = isfGlucoseData.size if (4 * basalLength + ISFLength < CSFLength && ISFLength < 10) { + //aapsLogger.debug(LTag.AUTOTUNE, "Warning: too many deviations categorized as meals") + //aapsLogger.debug(LTag.AUTOTUNE, "Adding $CSFLength CSF deviations to $ISFLength ISF ones") if (verbose) { log("Warning: too many deviations categorized as meals") //log.debug("Adding",CSFLength,"CSF deviations to",basalLength,"basal ones"); @@ -507,8 +532,9 @@ class AutotunePrep @Inject constructor( } // categorize.js Lines 437-444 + //aapsLogger.debug(LTag.AUTOTUNE, "CRData: ${crData.size} CSFGlucoseData: ${csfGlucoseData.size} ISFGlucoseData: ${isfGlucoseData.size} BasalGlucoseData: ${basalGlucoseData.size}") if (verbose) - log("CRData: " + crData.size + " CSFGlucoseData: " + csfGlucoseData.size + " ISFGlucoseData: " + isfGlucoseData.size + " BasalGlucoseData: " + basalGlucoseData.size) + log("CRData: ${crData.size} CSFGlucoseData: ${csfGlucoseData.size} ISFGlucoseData: ${isfGlucoseData.size} BasalGlucoseData: ${basalGlucoseData.size}") return PreppedGlucose(autotuneIob.startBG, crData, csfGlucoseData, isfGlucoseData, basalGlucoseData, dateUtil) } @@ -516,6 +542,7 @@ class AutotunePrep @Inject constructor( //dosed.js full private fun dosed(start: Long, end: Long, treatments: List): Double { var insulinDosed = 0.0 + //aapsLogger.debug(LTag.AUTOTUNE, "No treatments to process.") if (treatments.size == 0) { log("No treatments to process.") return 0.0 diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt index 6e6e0ab684..25a75d17ce 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt @@ -5,6 +5,7 @@ import android.bluetooth.BluetoothManager import android.content.Context import android.content.Intent import android.content.pm.PackageManager +import android.os.Build import android.provider.Settings import androidx.annotation.StringRes import androidx.appcompat.app.AppCompatActivity @@ -113,7 +114,7 @@ class ImportExportPrefsImpl @Inject constructor( val n1 = Settings.System.getString(context.contentResolver, "bluetooth_name") val n2 = Settings.Secure.getString(context.contentResolver, "bluetooth_name") val n3 = try { - if (ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter?.name } else null } catch (e: Exception){ diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt index d114f19847..6f0b64bc6d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt @@ -207,8 +207,8 @@ class OverviewData @Inject constructor( * IOB, COB */ - fun bolusIob(iobCobCalculator: IobCobCalculator): IobTotal = iobCobCalculator.calculateIobFromBolus().round(fabricPrivacy) - fun basalIob(iobCobCalculator: IobCobCalculator): IobTotal = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round(fabricPrivacy) + fun bolusIob(iobCobCalculator: IobCobCalculator): IobTotal = iobCobCalculator.calculateIobFromBolus().round() + fun basalIob(iobCobCalculator: IobCobCalculator): IobTotal = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round() fun cobInfo(iobCobCalculator: IobCobCalculator): CobInfo = iobCobCalculator.getCobInfo(true, "Overview COB") val lastCarbsTime: Long diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 4374fd0c05..54a2bbcb40 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -51,7 +51,11 @@ import info.nightscout.androidaps.plugins.constraints.bgQualityCheck.BgQualityCh import info.nightscout.androidaps.plugins.general.automation.AutomationPlugin import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity -import info.nightscout.androidaps.plugins.general.overview.events.* +import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewCalcProgress +import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewGraph +import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewIobCob +import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewNotification +import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewSensitivity import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider @@ -66,7 +70,6 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.TrendCalculator import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.ui.SingleClickButton @@ -117,7 +120,6 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList @Inject lateinit var repository: AppRepository @Inject lateinit var glucoseStatusProvider: GlucoseStatusProvider @Inject lateinit var overviewData: OverviewData - @Inject lateinit var overviewPlugin: OverviewPlugin @Inject lateinit var automationPlugin: AutomationPlugin @Inject lateinit var bgQualityCheckPlugin: BgQualityCheckPlugin @@ -236,10 +238,6 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList .debounce(1L, TimeUnit.SECONDS) .observeOn(aapsSchedulers.main) .subscribe({ updateGraph() }, fabricPrivacy::logException) - disposable += activePlugin.activeOverview.overviewBus - .toObservable(EventUpdateOverviewPumpStatus::class.java) - .observeOn(aapsSchedulers.main) - .subscribe({ updatePumpStatus() }, fabricPrivacy::logException) disposable += activePlugin.activeOverview.overviewBus .toObservable(EventUpdateOverviewNotification::class.java) .observeOn(aapsSchedulers.main) @@ -308,7 +306,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList } handler.postDelayed(refreshLoop, 60 * 1000L) - refreshAll() + handler.post { refreshAll() } updatePumpStatus() updateCalcProgress() } @@ -418,7 +416,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList uel.log(Action.ACCEPTS_TEMP_BASAL, Sources.Overview) (context?.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager?)?.cancel(Constants.notificationID) rxBus.send(EventMobileToWear(EventData.CancelNotification(dateUtil.now()))) - Thread { loop.acceptChangeRequest() }.run() + Thread { loop.acceptChangeRequest() }.start() binding.buttonsLayout.acceptTempButton.visibility = View.GONE }) }) @@ -583,7 +581,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList for (event in events) if (event.isEnabled && event.trigger.shouldRun()) context?.let { context -> - SingleClickButton(context).also { + SingleClickButton(context, null, R.attr.customBtnStyle).also { it.setTextColor(rh.gac(context, R.attr.treatmentButton)) it.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10f) it.layoutParams = LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 0.5f).also { l -> @@ -828,7 +826,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList } } - fun updateProfile() { + private fun updateProfile() { val profile = profileFunction.getProfile() runOnUiThread { _binding ?: return@runOnUiThread @@ -886,7 +884,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList } } - fun updateTime() { + private fun updateTime() { _binding ?: return binding.infoLayout.time.text = dateUtil.timeString(dateUtil.now()) // Status lights @@ -916,7 +914,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList ) } - fun updateIobCob() { + private fun updateIobCob() { val iobText = overviewData.iobText(iobCobCalculator) val iobDialogText = overviewData.iobDialogText(iobCobCalculator) val displayText = overviewData.cobInfo(iobCobCalculator).displayText(rh, dateUtil, buildHelper.isEngineeringMode()) @@ -1000,6 +998,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList val pump = activePlugin.activePump val graphData = GraphData(injector, binding.graphsLayout.bgGraph, overviewData) val menuChartSettings = overviewMenus.setting + if (menuChartSettings.isEmpty()) return graphData.addInRangeArea(overviewData.fromTime, overviewData.endTime, defaultValueHelper.determineLowLine(), defaultValueHelper.determineHighLine()) graphData.addBgReadings(menuChartSettings[0][OverviewMenus.CharType.PRE.ordinal], context) if (buildHelper.isDev()) graphData.addBucketedData() @@ -1085,7 +1084,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList private fun updateSensitivity() { _binding ?: return - if (sp.getBoolean(R.string.key_openapsama_useautosens, false) && constraintChecker.isAutosensModeEnabled().value()) { + if (constraintChecker.isAutosensModeEnabled().value()) { binding.infoLayout.sensitivityIcon.setImageResource(R.drawable.ic_swap_vert_black_48dp_green) } else { binding.infoLayout.sensitivityIcon.setImageResource(R.drawable.ic_x_swap_vert) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt index e388adb8bf..2431dc5f61 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt @@ -69,14 +69,16 @@ class OverviewMenus @Inject constructor( private var _setting: MutableList> = ArrayList() val setting: List> - get() = _setting.toMutableList() // implicitly does a list copy + @Synchronized get() = _setting.toMutableList() // implicitly does a list copy + @Synchronized private fun storeGraphConfig() { val sts = Gson().toJson(_setting) sp.putString(R.string.key_graphconfig, sts) aapsLogger.debug(sts) } + @Synchronized fun loadGraphConfig() { val sts = sp.getString(R.string.key_graphconfig, "") if (sts.isNotEmpty()) { @@ -115,7 +117,7 @@ class OverviewMenus @Inject constructor( val used = arrayListOf() for (g in 0 until numOfGraphs) { - if (g != 0 && g < numOfGraphs) { + if (g != 0) { val dividerItem = popup.menu.add(Menu.NONE, g, Menu.NONE, "------- ${rh.gs(R.string.graph_menu_divider_header)} $g -------") dividerItem.isCheckable = true dividerItem.isChecked = true @@ -134,8 +136,8 @@ class OverviewMenus @Inject constructor( val item = popup.menu.add(Menu.NONE, m.ordinal + 100 * (g + 1), Menu.NONE, rh.gs(m.nameId)) val title = item.title val s = SpannableString(" $title ") - s.setSpan(ForegroundColorSpan(rh.gac(context, m.attrTextId)), 0, s.length, 0) - s.setSpan(BackgroundColorSpan(rh.gac(context, m.attrId)), 0, s.length, 0) + s.setSpan(ForegroundColorSpan(rh.gac(m.attrTextId)), 0, s.length, 0) + s.setSpan(BackgroundColorSpan(rh.gac(m.attrId)), 0, s.length, 0) item.title = s item.isCheckable = true item.isChecked = settingsCopy[g][m.ordinal] @@ -150,36 +152,38 @@ class OverviewMenus @Inject constructor( } popup.setOnMenuItemClickListener { - try { - // id < 100 graph header - divider 1, 2, 3 ..... - when { - it.itemId == SCALE_ID -> { - // do nothing, submenu - } + synchronized(this) { + try { + // id < 100 graph header - divider 1, 2, 3 ..... + when { + it.itemId == SCALE_ID -> { + // do nothing, submenu + } - it.itemId > SCALE_ID && it.itemId < SCALE_ID + 100 -> { - val hours = it.itemId - SCALE_ID // 6,12,.... - rxBus.send(EventScale(hours)) - } + it.itemId > SCALE_ID && it.itemId < SCALE_ID + 100 -> { + val hours = it.itemId - SCALE_ID // 6,12,.... + rxBus.send(EventScale(hours)) + } - it.itemId == numOfGraphs -> { - // add new empty - _setting.add(Array(CharType.values().size) { false }) - } + it.itemId == numOfGraphs -> { + // add new empty + _setting.add(Array(CharType.values().size) { false }) + } - it.itemId < 100 -> { - // remove graph - _setting.removeAt(it.itemId) - } + it.itemId < 100 -> { + // remove graph + _setting.removeAt(it.itemId) + } - else -> { - val graphNumber = it.itemId / 100 - 1 - val item = it.itemId % 100 - _setting[graphNumber][item] = !it.isChecked + else -> { + val graphNumber = it.itemId / 100 - 1 + val item = it.itemId % 100 + _setting[graphNumber][item] = !it.isChecked + } } + } catch (exception: Exception) { + fabricPrivacy.logException(exception) } - } catch (exception: Exception) { - fabricPrivacy.logException(exception) } storeGraphConfig() setupChartMenu(context, chartButton) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt index 50bf49c812..58b2de95d6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt @@ -6,11 +6,7 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.extensions.* -import info.nightscout.androidaps.interfaces.Config -import info.nightscout.androidaps.interfaces.Overview -import info.nightscout.androidaps.interfaces.PluginBase -import info.nightscout.androidaps.interfaces.PluginDescription -import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.* import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification @@ -21,7 +17,6 @@ import info.nightscout.androidaps.plugins.general.overview.graphExtensions.Scale import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.shared.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP @@ -175,46 +170,4 @@ class OverviewPlugin @Inject constructor( .storeDouble(R.string.key_statuslights_bat_critical, sp, rh) .storeInt(R.string.key_boluswizard_percentage, sp, rh) } -/* - @Volatile - var runningRefresh = false - override fun refreshLoop(from: String) { - if (runningRefresh) return - runningRefresh = true - overviewBus.send(EventUpdateOverviewNotification(from)) - loadIobCobResults(from) - overviewBus.send(EventUpdateOverviewProfile(from)) - overviewBus.send(EventUpdateOverviewBg(from)) - overviewBus.send(EventUpdateOverviewTime(from)) - overviewBus.send(EventUpdateOverviewTemporaryBasal(from)) - overviewBus.send(EventUpdateOverviewExtendedBolus(from)) - overviewBus.send(EventUpdateOverviewTemporaryTarget(from)) - loadAsData(from) - overviewData.preparePredictions(from) - overviewData.prepareBasalData(from) - overviewData.prepareTemporaryTargetData(from) - overviewData.prepareTreatmentsData(from) - overviewData.prepareIobAutosensData(from) - overviewBus.send(EventUpdateOverviewGraph(from)) - overviewBus.send(EventUpdateOverviewIobCob(from)) - aapsLogger.debug(LTag.UI, "refreshLoop finished") - runningRefresh = false - } - - @Suppress("SameParameterValue") - private fun loadAll(from: String) { - loadBg(from) - loadProfile(from) - loadTemporaryTarget(from) - loadIobCobResults(from) - loadAsData(from) - overviewData.prepareBasalData(from) - overviewData.prepareTemporaryTargetData(from) - overviewData.prepareTreatmentsData(from) -// prepareIobAutosensData(from) -// preparePredictions(from) - overviewBus.send(EventUpdateOverviewGraph(from)) - aapsLogger.debug(LTag.UI, "loadAll finished") - } -*/ } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewPumpStatus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewPumpStatus.kt deleted file mode 100644 index 30ad6b7507..0000000000 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewPumpStatus.kt +++ /dev/null @@ -1,5 +0,0 @@ -package info.nightscout.androidaps.plugins.general.overview.events - -import info.nightscout.androidaps.events.Event - -class EventUpdateOverviewPumpStatus(val from: String) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt index 61f0558009..e705b0b8bb 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt @@ -1,7 +1,6 @@ package info.nightscout.androidaps.plugins.general.wear import android.content.Context -import android.content.Intent import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.events.EventAutosensCalculationFinished @@ -10,14 +9,14 @@ import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.general.wear.wearintegration.DataHandlerMobile -import info.nightscout.androidaps.plugins.general.wear.wearintegration.DataLayerListenerServiceMobile +import info.nightscout.androidaps.plugins.general.wear.wearintegration.DataLayerListenerServiceMobileHelper import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.shared.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP @@ -37,7 +36,8 @@ class WearPlugin @Inject constructor( private val fabricPrivacy: FabricPrivacy, private val rxBus: RxBus, private val context: Context, - private val dataHandlerMobile: DataHandlerMobile + private val dataHandlerMobile: DataHandlerMobile, + val dataLayerListenerServiceMobileHelper: DataLayerListenerServiceMobileHelper ) : PluginBase( PluginDescription() @@ -57,7 +57,7 @@ class WearPlugin @Inject constructor( override fun onStart() { super.onStart() - context.startService(Intent(context, DataLayerListenerServiceMobile::class.java)) + dataLayerListenerServiceMobileHelper.startService(context) disposable += rxBus .toObservable(EventDismissBolusProgressIfRunning::class.java) .observeOn(aapsSchedulers.io) @@ -94,6 +94,6 @@ class WearPlugin @Inject constructor( override fun onStop() { disposable.clear() super.onStop() - context.stopService(Intent(context, DataLayerListenerServiceMobile::class.java)) + dataLayerListenerServiceMobileHelper.stopService(context) } } \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt index cb21aeb5ba..64623dbf12 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt @@ -12,6 +12,8 @@ import info.nightscout.androidaps.database.entities.* import info.nightscout.androidaps.database.interfaces.end import info.nightscout.androidaps.database.transactions.CancelCurrentTemporaryTargetIfAnyTransaction import info.nightscout.androidaps.database.transactions.InsertAndCancelCurrentTemporaryTargetTransaction +import info.nightscout.androidaps.dialogs.CarbsDialog +import info.nightscout.androidaps.dialogs.InsulinDialog import info.nightscout.androidaps.events.EventMobileToWear import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.toStringShort @@ -27,6 +29,7 @@ import info.nightscout.androidaps.plugins.general.overview.graphExtensions.Gluco import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.receivers.ReceiverStatusStore +import info.nightscout.androidaps.services.AlarmSoundServiceHelper import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.wizard.BolusWizard @@ -73,7 +76,8 @@ class DataHandlerMobile @Inject constructor( private val uel: UserEntryLogger, private val activePlugin: ActivePlugin, private val commandQueue: CommandQueue, - private val fabricPrivacy: FabricPrivacy + private val fabricPrivacy: FabricPrivacy, + private val alarmSoundServiceHelper: AlarmSoundServiceHelper ) { private val disposable = CompositeDisposable() @@ -260,6 +264,20 @@ class DataHandlerMobile @Inject constructor( } lastBolusWizard = null }, fabricPrivacy::logException) + disposable += rxBus + .toObservable(EventData.SnoozeAlert::class.java) + .observeOn(aapsSchedulers.io) + .subscribe({ + aapsLogger.debug(LTag.WEAR, "SnoozeAlert received $it from ${it.sourceNodeId}") + alarmSoundServiceHelper.stopService(context, "Muted from wear") + }, fabricPrivacy::logException) + disposable += rxBus + .toObservable(EventData.WearException::class.java) + .observeOn(aapsSchedulers.io) + .subscribe({ + aapsLogger.debug(LTag.WEAR, "WearException received $it from ${it.sourceNodeId}") + fabricPrivacy.logWearException(it) + }, fabricPrivacy::logException) } private fun handleTddStatus() { @@ -463,7 +481,7 @@ class DataHandlerMobile @Inject constructor( } private fun handleECarbsPreCheck(command: EventData.ActionECarbsPreCheck) { - val startTimeStamp = System.currentTimeMillis() + T.hours(command.carbsTimeShift.toLong()).msecs() + val startTimeStamp = System.currentTimeMillis() + T.mins(command.carbsTimeShift.toLong()).msecs() val carbsAfterConstraints = constraintChecker.applyCarbsConstraints(Constraint(command.carbs)).value() var message = rh.gs(R.string.carbs) + ": " + carbsAfterConstraints + "g" + "\n" + rh.gs(R.string.time) + ": " + dateUtil.timeString(startTimeStamp) + @@ -685,7 +703,11 @@ class DataHandlerMobile @Inject constructor( unitsMgdl = profileFunction.getUnits() == GlucoseUnit.MGDL, bolusPercentage = sp.getInt(R.string.key_boluswizard_percentage, 100), maxCarbs = sp.getInt(R.string.key_treatmentssafety_maxcarbs, 48), - maxBolus = sp.getDouble(R.string.key_treatmentssafety_maxbolus, 3.0) + maxBolus = sp.getDouble(R.string.key_treatmentssafety_maxbolus, 3.0), + insulinButtonIncrement1 = sp.getDouble(R.string.key_insulin_button_increment_1, InsulinDialog.PLUS1_DEFAULT), + insulinButtonIncrement2 = sp.getDouble(R.string.key_insulin_button_increment_2, InsulinDialog.PLUS2_DEFAULT), + carbsButtonIncrement1 = sp.getInt(R.string.key_carbs_button_increment_1, CarbsDialog.FAV1_DEFAULT), + carbsButtonIncrement2 = sp.getInt(R.string.key_carbs_button_increment_2, CarbsDialog.FAV2_DEFAULT) ) ) ) @@ -1176,4 +1198,4 @@ class DataHandlerMobile @Inject constructor( @Synchronized private fun sendError(errorMessage: String) { rxBus.send(EventMobileToWear(EventData.ConfirmAction(rh.gs(R.string.error), errorMessage, returnCommand = EventData.Error(dateUtil.now())))) // ignore return path } -} \ No newline at end of file +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt index ed1ac23bdb..1a3cd7f601 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt @@ -1,5 +1,6 @@ package info.nightscout.androidaps.plugins.general.wear.wearintegration +import android.os.Binder import android.os.Handler import android.os.HandlerThread import com.google.android.gms.tasks.Tasks @@ -8,21 +9,14 @@ import dagger.android.AndroidInjection import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.events.EventMobileToWear -import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.interfaces.Config -import info.nightscout.androidaps.interfaces.IobCobCalculator -import info.nightscout.androidaps.interfaces.Loop -import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.* import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus import info.nightscout.androidaps.plugins.general.wear.WearPlugin import info.nightscout.androidaps.plugins.general.wear.events.EventWearUpdateGui import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.utils.DefaultValueHelper -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.androidaps.utils.wizard.QuickWizard import info.nightscout.shared.logging.AAPSLogger import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP @@ -43,9 +37,7 @@ class DataLayerListenerServiceMobile : WearableListenerService() { @Inject lateinit var loop: Loop @Inject lateinit var wearPlugin: WearPlugin @Inject lateinit var sp: SP - @Inject lateinit var quickWizard: QuickWizard @Inject lateinit var config: Config - @Inject lateinit var nsDeviceStatus: NSDeviceStatus @Inject lateinit var receiverStatusStore: ReceiverStatusStore @Inject lateinit var repository: AppRepository @Inject lateinit var defaultValueHelper: DefaultValueHelper @@ -53,6 +45,11 @@ class DataLayerListenerServiceMobile : WearableListenerService() { @Inject lateinit var rxBus: RxBus @Inject lateinit var aapsSchedulers: AapsSchedulers + inner class LocalBinder : Binder() { + + fun getService(): DataLayerListenerServiceMobile = this@DataLayerListenerServiceMobile + } + private val dataClient by lazy { Wearable.getDataClient(this) } private val messageClient by lazy { Wearable.getMessageClient(this) } private val capabilityClient by lazy { Wearable.getCapabilityClient(this) } @@ -116,7 +113,7 @@ class DataLayerListenerServiceMobile : WearableListenerService() { if (wearPlugin.isEnabled()) { when (messageEvent.path) { rxPath -> { - aapsLogger.debug(LTag.WEAR, "onMessageReceived: ${String(messageEvent.data)}") + aapsLogger.debug(LTag.WEAR, "onMessageReceived rxPath: ${String(messageEvent.data)}") val command = EventData.deserialize(String(messageEvent.data)) rxBus.send(command.also { it.sourceNodeId = messageEvent.sourceNodeId }) } @@ -134,7 +131,7 @@ class DataLayerListenerServiceMobile : WearableListenerService() { aapsLogger.debug(LTag.WEAR, "Nodes: ${capabilityInfo.nodes.joinToString(", ") { it.displayName + "(" + it.id + ")" }}") val bestNode = pickBestNodeId(capabilityInfo.nodes) transcriptionNodeId = bestNode?.id - wearPlugin.connectedDevice = bestNode?.displayName ?: "---" + wearPlugin.connectedDevice = bestNode?.displayName ?: rh.gs(R.string.no_watch_connected) rxBus.send(EventWearUpdateGui()) aapsLogger.debug(LTag.WEAR, "Selected node: ${bestNode?.displayName} $transcriptionNodeId") rxBus.send(EventMobileToWear(EventData.ActionPing(System.currentTimeMillis()))) @@ -203,4 +200,4 @@ class DataLayerListenerServiceMobile : WearableListenerService() { const val WEAR_CAPABILITY = "androidaps_wear" } -} \ No newline at end of file +} diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobileHelper.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobileHelper.kt new file mode 100644 index 0000000000..941e04eb53 --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobileHelper.kt @@ -0,0 +1,62 @@ +package info.nightscout.androidaps.plugins.general.wear.wearintegration + +import android.content.ComponentName +import android.content.Context +import android.content.Intent +import android.content.ServiceConnection +import android.os.IBinder +import info.nightscout.androidaps.interfaces.NotificationHolder +import javax.inject.Inject +import javax.inject.Singleton + +/* + This code replaces following + val alarm = Intent(context, DataLayerListenerServiceMobile::class.java) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) context.startForegroundService(alarm) else context.startService(alarm) + + it fails randomly with error + Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e317f7e u0 info.nightscout.nsclient/info.nightscout.androidaps.services.DataLayerListenerServiceMobile} + + */ +@Singleton +class DataLayerListenerServiceMobileHelper @Inject constructor( + private val notificationHolder: NotificationHolder +) { + + fun startService(context: Context) { + val connection = object : ServiceConnection { + override fun onServiceConnected(name: ComponentName?, service: IBinder?) { + // The binder of the service that returns the instance that is created. + val binder: DataLayerListenerServiceMobile.LocalBinder = service as DataLayerListenerServiceMobile.LocalBinder + + val dataLayerListenerServiceMobile: DataLayerListenerServiceMobile = binder.getService() + + context.startForegroundService(Intent(context, DataLayerListenerServiceMobile::class.java)) + + // This is the key: Without waiting Android Framework to call this method + // inside Service.onCreate(), immediately call here to post the notification. + dataLayerListenerServiceMobile.startForeground(notificationHolder.notificationID, notificationHolder.notification) + + // Release the connection to prevent leaks. + context.unbindService(this) + } + + override fun onServiceDisconnected(name: ComponentName?) { + } + } + + try { + context.bindService(Intent(context, DataLayerListenerServiceMobile::class.java), connection, Context.BIND_AUTO_CREATE) + } catch (ignored: RuntimeException) { + // This is probably a broadcast receiver context even though we are calling getApplicationContext(). + // Just call startForegroundService instead since we cannot bind a service to a + // broadcast receiver context. The service also have to call startForeground in + // this case. + context.startForegroundService(Intent(context, DataLayerListenerServiceMobile::class.java)) + } + } + + fun stopService(context: Context) { + context.stopService(Intent(context, DataLayerListenerServiceMobile::class.java)) + } +} \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/xdripStatusline/StatusLinePlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/xdripStatusline/StatusLinePlugin.kt index 1c54ea4feb..e0106a49d5 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/xdripStatusline/StatusLinePlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/xdripStatusline/StatusLinePlugin.kt @@ -8,12 +8,11 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.events.* import info.nightscout.androidaps.extensions.toStringShort import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign @@ -123,8 +122,8 @@ class StatusLinePlugin @Inject constructor( status += activeTemp.toStringShort() + " " } //IOB - val bolusIob = iobCobCalculator.calculateIobFromBolus().round(fabricPrivacy) - val basalIob = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round(fabricPrivacy) + val bolusIob = iobCobCalculator.calculateIobFromBolus().round() + val basalIob = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round() status += DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U" if (sp.getBoolean(R.string.key_xdripstatus_detailediob, true)) { status += ("(" diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinLyumjevPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinLyumjevPlugin.kt index 4ca7c6f91e..e13bb47b6f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinLyumjevPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinLyumjevPlugin.kt @@ -8,6 +8,7 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.utils.HardLimits import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton @@ -19,8 +20,9 @@ class InsulinLyumjevPlugin @Inject constructor( profileFunction: ProfileFunction, rxBus: RxBus, aapsLogger: AAPSLogger, - config: Config -) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config) { + config: Config, + hardLimits: HardLimits +) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { override val id get(): Insulin.InsulinType = Insulin.InsulinType.OREF_LYUMJEV override val friendlyName get(): String = rh.gs(R.string.lyumjev) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefBasePlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefBasePlugin.kt index a13f3e467e..f84d23f531 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefBasePlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefBasePlugin.kt @@ -6,12 +6,12 @@ import info.nightscout.androidaps.data.Iob import info.nightscout.androidaps.database.embedments.InsulinConfiguration import info.nightscout.androidaps.database.entities.Bolus import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.shared.logging.AAPSLogger import kotlin.math.exp import kotlin.math.pow @@ -27,7 +27,8 @@ abstract class InsulinOrefBasePlugin( val profileFunction: ProfileFunction, val rxBus: RxBus, aapsLogger: AAPSLogger, - config: Config + config: Config, + val hardLimits: HardLimits ) : PluginBase( PluginDescription() .mainType(PluginType.INSULIN) @@ -43,18 +44,18 @@ abstract class InsulinOrefBasePlugin( override val dia get(): Double { val dia = userDefinedDia - return if (dia >= MIN_DIA) { + return if (dia >= hardLimits.minDia()) { dia } else { sendShortDiaNotification(dia) - MIN_DIA + hardLimits.minDia() } } open fun sendShortDiaNotification(dia: Double) { if (System.currentTimeMillis() - lastWarned > 60 * 1000) { lastWarned = System.currentTimeMillis() - val notification = Notification(Notification.SHORT_DIA, String.format(notificationPattern, dia, MIN_DIA), Notification.URGENT) + val notification = Notification(Notification.SHORT_DIA, String.format(notificationPattern, dia, hardLimits.minDia()), Notification.URGENT) rxBus.send(EventNewNotification(notification)) } } @@ -65,12 +66,13 @@ abstract class InsulinOrefBasePlugin( open val userDefinedDia: Double get() { val profile = profileFunction.getProfile() - return profile?.dia ?: MIN_DIA + return profile?.dia ?: hardLimits.minDia() } override fun iobCalcForTreatment(bolus: Bolus, time: Long, dia: Double): Iob { + assert(dia != 0.0) + assert(peak != 0) val result = Iob() - val peak = peak if (bolus.amount != 0.0) { val bolusTime = bolus.timestamp val t = (time - bolusTime) / 1000.0 / 60.0 @@ -80,9 +82,9 @@ abstract class InsulinOrefBasePlugin( if (t < td) { val tau = tp * (1 - tp / td) / (1 - 2 * tp / td) val a = 2 * tau / td - val S = 1 / (1 - a + (1 + a) * exp(-td / tau)) - result.activityContrib = bolus.amount * (S / tau.pow(2.0)) * t * (1 - t / td) * exp(-t / tau) - result.iobContrib = bolus.amount * (1 - S * (1 - a) * ((t.pow(2.0) / (tau * td * (1 - a)) - t / tau - 1) * Math.exp(-t / tau) + 1)) + val s = 1 / (1 - a + (1 + a) * exp(-td / tau)) + result.activityContrib = bolus.amount * (s / tau.pow(2.0)) * t * (1 - t / td) * exp(-t / tau) + result.iobContrib = bolus.amount * (1 - s * (1 - a) * ((t.pow(2.0) / (tau * td * (1 - a)) - t / tau - 1) * exp(-t / tau) + 1)) } } return result @@ -95,17 +97,12 @@ abstract class InsulinOrefBasePlugin( get(): String { var comment = commentStandardText() val userDia = userDefinedDia - if (userDia < MIN_DIA) { - comment += "\n" + rh.gs(R.string.dia_too_short, userDia, MIN_DIA) + if (userDia < hardLimits.minDia()) { + comment += "\n" + rh.gs(R.string.dia_too_short, userDia, hardLimits.minDia()) } return comment } - override abstract val peak: Int + abstract override val peak: Int abstract fun commentStandardText(): String - - companion object { - - const val MIN_DIA = 5.0 - } } \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefFreePeakPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefFreePeakPlugin.kt index c9588c493b..3b3150cca7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefFreePeakPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefFreePeakPlugin.kt @@ -10,6 +10,7 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.utils.HardLimits import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import javax.inject.Inject @@ -26,8 +27,9 @@ class InsulinOrefFreePeakPlugin @Inject constructor( profileFunction: ProfileFunction, rxBus: RxBus, aapsLogger: AAPSLogger, - config: Config -) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config) { + config: Config, + hardLimits: HardLimits +) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { override val id get(): Insulin.InsulinType = Insulin.InsulinType.OREF_FREE_PEAK diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefRapidActingPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefRapidActingPlugin.kt index 8abb4619cc..76bceef9f2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefRapidActingPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefRapidActingPlugin.kt @@ -8,6 +8,7 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.utils.HardLimits import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton @@ -22,8 +23,9 @@ class InsulinOrefRapidActingPlugin @Inject constructor( profileFunction: ProfileFunction, rxBus: RxBus, aapsLogger: AAPSLogger, - config: Config -) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config) { + config: Config, + hardLimits: HardLimits +) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { override val id get(): Insulin.InsulinType = Insulin.InsulinType.OREF_RAPID_ACTING override val friendlyName get(): String = rh.gs(R.string.rapid_acting_oref) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt index 4f944b4674..631d495943 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt @@ -8,6 +8,7 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.utils.HardLimits import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton @@ -22,8 +23,9 @@ class InsulinOrefUltraRapidActingPlugin @Inject constructor( profileFunction: ProfileFunction, rxBus: RxBus, aapsLogger: AAPSLogger, - config: Config -) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config) { + config: Config, + hardLimits: HardLimits +) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { override val id get(): Insulin.InsulinType = Insulin.InsulinType.OREF_ULTRA_RAPID_ACTING override val friendlyName get(): String = rh.gs(R.string.ultrarapid_oref) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt index 00fa1dd6dd..30c05b1f32 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt @@ -481,6 +481,7 @@ class IobCobCalculatorPlugin @Inject constructor( val profile = profileFunction.getProfile() ?: return total val dia = profile.dia val divisor = sp.getDouble(R.string.key_openapsama_bolussnooze_dia_divisor, 2.0) + assert(divisor > 0) val boluses = repository.getBolusesDataFromTime(toTime - range(), true).blockingGet() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt index 4d157a874a..12f240b1e3 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt @@ -97,11 +97,11 @@ class IobCobOref1Worker( val bucketedData = ads.bucketedData val autosensDataTable = ads.autosensDataTable if (bucketedData == null || bucketedData.size < 3) { - aapsLogger.debug(LTag.AUTOSENS, "Aborting calculation thread (No bucketed data available): ${data.from}") + aapsLogger.debug(LTag.AUTOSENS, {"Aborting calculation thread (No bucketed data available): ${data.from}"}) return Result.success(workDataOf("Error" to "Aborting calculation thread (No bucketed data available): ${data.from}")) } val prevDataTime = ads.roundUpTime(bucketedData[bucketedData.size - 3].timestamp) - aapsLogger.debug(LTag.AUTOSENS, "Prev data time: " + dateUtil.dateAndTimeString(prevDataTime)) + aapsLogger.debug(LTag.AUTOSENS, {"Prev data time: " + dateUtil.dateAndTimeString(prevDataTime)}) var previous = autosensDataTable[prevDataTime] // start from oldest to be able sub cob for (i in bucketedData.size - 4 downTo 0) { @@ -156,15 +156,15 @@ class IobCobOref1Worker( val hourAgoData = ads.getAutosensDataAtTime(hourAgo) if (hourAgoData != null) { val initialIndex = autosensDataTable.indexOfKey(hourAgoData.time) - aapsLogger.debug(LTag.AUTOSENS, ">>>>> bucketed_data.size()=" + bucketedData.size + " i=" + i + " hourAgoData=" + hourAgoData.toString()) + aapsLogger.debug(LTag.AUTOSENS, { ">>>>> bucketed_data.size()=" + bucketedData.size + " i=" + i + " hourAgoData=" + hourAgoData.toString()}) var past = 1 try { while (past < 12) { val ad = autosensDataTable.valueAt(initialIndex + past) - aapsLogger.debug(LTag.AUTOSENS, ">>>>> past=" + past + " ad=" + ad?.toString()) + aapsLogger.debug(LTag.AUTOSENS, {">>>>> past=" + past + " ad=" + ad?.toString()}) if (ad == null) { - aapsLogger.debug(LTag.AUTOSENS, autosensDataTable.toString()) - aapsLogger.debug(LTag.AUTOSENS, bucketedData.toString()) + aapsLogger.debug(LTag.AUTOSENS, {autosensDataTable.toString()}) + aapsLogger.debug(LTag.AUTOSENS, {bucketedData.toString()}) //aapsLogger.debug(LTag.AUTOSENS, iobCobCalculatorPlugin.getBgReadingsDataTable().toString()) val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.sendlogfiles), Notification.LOW) rxBus.send(EventNewNotification(notification)) @@ -319,14 +319,12 @@ class IobCobOref1Worker( if (bgTime < dateUtil.now()) autosensDataTable.put(bgTime, autosensData) aapsLogger.debug( LTag.AUTOSENS, - "Running detectSensitivity from: " + dateUtil.dateAndTimeString(oldestTimeWithData) + " to: " + dateUtil.dateAndTimeString(bgTime) + " lastDataTime:" + ads.lastDataTime( - dateUtil - ) + {"Running detectSensitivity from: " + dateUtil.dateAndTimeString(oldestTimeWithData) + " to: " + dateUtil.dateAndTimeString(bgTime) + " lastDataTime:" + ads.lastDataTime(dateUtil)} ) val sensitivity = activePlugin.activeSensitivity.detectSensitivity(ads, oldestTimeWithData, bgTime) aapsLogger.debug(LTag.AUTOSENS, "Sensitivity result: $sensitivity") autosensData.autosensResult = sensitivity - aapsLogger.debug(LTag.AUTOSENS, autosensData.toString()) + aapsLogger.debug(LTag.AUTOSENS, {autosensData.toString()}) } data.iobCobCalculator.ads = ads Thread { @@ -335,7 +333,7 @@ class IobCobOref1Worker( }.start() } finally { rxBus.send(EventIobCalculationProgress(CalculationWorkflow.ProgressData.IOB_COB_OREF, 100, data.cause)) - aapsLogger.debug(LTag.AUTOSENS, "AUTOSENSDATA thread ended: ${data.from}") + aapsLogger.debug(LTag.AUTOSENS, {"AUTOSENSDATA thread ended: ${data.from}"}) profiler.log(LTag.AUTOSENS, "IobCobOref1Thread", start) } return Result.success() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/profile/local/LocalProfileFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/profile/local/LocalProfileFragment.kt index 7e0e29fc8f..a68d6ee25a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/profile/local/LocalProfileFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/profile/local/LocalProfileFragment.kt @@ -23,6 +23,7 @@ import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.profile.local.events.EventLocalProfileChanged @@ -52,6 +53,7 @@ class LocalProfileFragment : DaggerFragment() { @Inject lateinit var activePlugin: ActivePlugin @Inject lateinit var fabricPrivacy: FabricPrivacy @Inject lateinit var localProfilePlugin: LocalProfilePlugin + @Inject lateinit var profileFunction: ProfileFunction @Inject lateinit var hardLimits: HardLimits @Inject lateinit var protectionCheck: ProtectionCheck @Inject lateinit var dateUtil: DateUtil @@ -117,6 +119,11 @@ class LocalProfileFragment : DaggerFragment() { }) binding.diaLabel.labelFor = binding.dia.editTextId binding.unlock.setOnClickListener { queryProtection() } + + val profiles = localProfilePlugin.profile?.getProfileList() ?: ArrayList() + val activeProfile = profileFunction.getProfileName() + val profileIndex = profiles.indexOf(activeProfile) + localProfilePlugin.currentProfileIndex = if (profileIndex >= 0) profileIndex else 0 } fun build() { @@ -387,13 +394,14 @@ class LocalProfileFragment : DaggerFragment() { private fun processVisibility(position: Int) { binding.diaPlaceholder.visibility = (position == 0).toVisibility() - binding.ic.visibility = (position == 1).toVisibility() - binding.isf.visibility = (position == 2).toVisibility() - binding.basal.visibility = (position == 3).toVisibility() - binding.target.visibility = (position == 4).toVisibility() + binding.ic.visibility = (position == 1).toVisibility() + binding.isf.visibility = (position == 2).toVisibility() + binding.basal.visibility = (position == 3).toVisibility() + binding.target.visibility = (position == 4).toVisibility() } private fun updateProtectedUi() { + _binding ?: return val isLocked = protectionCheck.isLocked(ProtectionCheck.Protection.PREFERENCES) binding.mainLayout.visibility = isLocked.not().toVisibility() binding.unlock.visibility = isLocked.toVisibility() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/GlunovoPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/GlunovoPlugin.kt index 239a317781..6a02daa322 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/GlunovoPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/GlunovoPlugin.kt @@ -89,80 +89,84 @@ class GlunovoPlugin @Inject constructor( private fun handleNewData() { if (!isEnabled()) return - context.contentResolver.query(contentUri, null, null, null, null)?.let { cr -> - val glucoseValues = mutableListOf() - val calibrations = mutableListOf() - cr.moveToFirst() + try { + context.contentResolver.query(contentUri, null, null, null, null)?.let { cr -> + val glucoseValues = mutableListOf() + val calibrations = mutableListOf() + cr.moveToFirst() - while (!cr.isAfterLast) { - val timestamp = cr.getLong(0) - val value = cr.getDouble(1) //value in mmol/l... - val curr = cr.getDouble(2) + while (!cr.isAfterLast) { + val timestamp = cr.getLong(0) + val value = cr.getDouble(1) //value in mmol/l... + val curr = cr.getDouble(2) - // bypass already processed - if (timestamp < sp.getLong(R.string.key_last_processed_glunovo_timestamp, 0L)) { - cr.moveToNext() - continue - } + // bypass already processed + if (timestamp < sp.getLong(R.string.key_last_processed_glunovo_timestamp, 0L)) { + cr.moveToNext() + continue + } - if (timestamp > dateUtil.now() || timestamp == 0L) { - aapsLogger.error(LTag.BGSOURCE, "Error in received data date/time $timestamp") - cr.moveToNext() - continue - } + if (timestamp > dateUtil.now() || timestamp == 0L) { + aapsLogger.error(LTag.BGSOURCE, "Error in received data date/time $timestamp") + cr.moveToNext() + continue + } - if (value < 2 || value > 25) { - aapsLogger.error(LTag.BGSOURCE, "Error in received data value (value out of bounds) $value") - cr.moveToNext() - continue - } + if (value < 2 || value > 25) { + aapsLogger.error(LTag.BGSOURCE, "Error in received data value (value out of bounds) $value") + cr.moveToNext() + continue + } - if (curr != 0.0) - glucoseValues += CgmSourceTransaction.TransactionGlucoseValue( - timestamp = timestamp, - value = value * Constants.MMOLL_TO_MGDL, - raw = 0.0, - noise = null, - trendArrow = GlucoseValue.TrendArrow.NONE, - sourceSensor = GlucoseValue.SourceSensor.GLUNOVO_NATIVE - ) - else - calibrations.add( - CgmSourceTransaction.Calibration( + if (curr != 0.0) + glucoseValues += CgmSourceTransaction.TransactionGlucoseValue( timestamp = timestamp, - value = value, - glucoseUnit = TherapyEvent.GlucoseUnit.MMOL + value = value * Constants.MMOLL_TO_MGDL, + raw = 0.0, + noise = null, + trendArrow = GlucoseValue.TrendArrow.NONE, + sourceSensor = GlucoseValue.SourceSensor.GLUNOVO_NATIVE ) - ) - sp.putLong(R.string.key_last_processed_glunovo_timestamp, timestamp) - cr.moveToNext() - } - cr.close() + else + calibrations.add( + CgmSourceTransaction.Calibration( + timestamp = timestamp, + value = value, + glucoseUnit = TherapyEvent.GlucoseUnit.MMOL + ) + ) + sp.putLong(R.string.key_last_processed_glunovo_timestamp, timestamp) + cr.moveToNext() + } + cr.close() - if (glucoseValues.isNotEmpty() || calibrations.isNotEmpty()) - repository.runTransactionForResult(CgmSourceTransaction(glucoseValues, calibrations, null)) - .doOnError { - aapsLogger.error(LTag.DATABASE, "Error while saving values from Glunovo App", it) - } - .blockingGet() - .also { savedValues -> - savedValues.inserted.forEach { - xDripBroadcast.send(it) - aapsLogger.debug(LTag.DATABASE, "Inserted bg $it") + if (glucoseValues.isNotEmpty() || calibrations.isNotEmpty()) + repository.runTransactionForResult(CgmSourceTransaction(glucoseValues, calibrations, null)) + .doOnError { + aapsLogger.error(LTag.DATABASE, "Error while saving values from Glunovo App", it) } - savedValues.calibrationsInserted.forEach { calibration -> - calibration.glucose?.let { glucosevalue -> - uel.log( - UserEntry.Action.CALIBRATION, - UserEntry.Sources.Dexcom, - ValueWithUnit.Timestamp(calibration.timestamp), - ValueWithUnit.TherapyEventType(calibration.type), - ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString) - ) + .blockingGet() + .also { savedValues -> + savedValues.inserted.forEach { + xDripBroadcast.send(it) + aapsLogger.debug(LTag.DATABASE, "Inserted bg $it") + } + savedValues.calibrationsInserted.forEach { calibration -> + calibration.glucose?.let { glucosevalue -> + uel.log( + UserEntry.Action.CALIBRATION, + UserEntry.Sources.Dexcom, + ValueWithUnit.Timestamp(calibration.timestamp), + ValueWithUnit.TherapyEventType(calibration.type), + ValueWithUnit.fromGlucoseUnit(glucosevalue, calibration.glucoseUnit.toString) + ) + } + aapsLogger.debug(LTag.DATABASE, "Inserted calibration $calibration") } - aapsLogger.debug(LTag.DATABASE, "Inserted calibration $calibration") } - } + } + } catch (e: SecurityException) { + aapsLogger.error(LTag.CORE, "Exception", e) } } diff --git a/app/src/main/java/info/nightscout/androidaps/queue/CommandQueueImplementation.kt b/app/src/main/java/info/nightscout/androidaps/queue/CommandQueueImplementation.kt index e08da60f0f..f8ba452203 100644 --- a/app/src/main/java/info/nightscout/androidaps/queue/CommandQueueImplementation.kt +++ b/app/src/main/java/info/nightscout/androidaps/queue/CommandQueueImplementation.kt @@ -46,6 +46,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import io.reactivex.rxjava3.kotlin.subscribeBy import java.util.* +import java.util.concurrent.TimeUnit import javax.inject.Inject import javax.inject.Singleton @@ -81,6 +82,7 @@ class CommandQueueImplementation @Inject constructor( disposable += rxBus .toObservable(EventProfileSwitchChanged::class.java) .observeOn(aapsSchedulers.io) + .throttleLatest(3L, TimeUnit.SECONDS) .subscribe({ if (config.NSCLIENT) { // Effective profileswitch should be synced over NS, do not create EffectiveProfileSwitch here return@subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/utils/AndroidPermission.kt b/app/src/main/java/info/nightscout/androidaps/utils/AndroidPermission.kt index 6262e552bc..cea1f8bb35 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/AndroidPermission.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/AndroidPermission.kt @@ -2,7 +2,6 @@ package info.nightscout.androidaps.utils import android.Manifest import android.annotation.SuppressLint -import android.annotation.TargetApi import android.bluetooth.BluetoothAdapter import android.content.ActivityNotFoundException import android.content.Context @@ -51,12 +50,20 @@ class AndroidPermission @Inject constructor( } if (test) { if (activity is DaggerAppCompatActivityWithResult) - activity.requestMultiplePermissions.launch(permissions) + try { + activity.requestMultiplePermissions.launch(permissions) + } catch (ignored: IllegalStateException) { + ToastUtils.errorToast(activity, rh.gs(R.string.error_asking_for_permissions)) + } } if (testBattery) { try { if (activity is DaggerAppCompatActivityWithResult) - activity.callForBatteryOptimization.launch(null) + try { + activity.callForBatteryOptimization.launch(null) + } catch (ignored: IllegalStateException) { + ToastUtils.errorToast(activity, rh.gs(R.string.error_asking_for_permissions)) + } } catch (e: ActivityNotFoundException) { permissionBatteryOptimizationFailed = true OKDialog.show(activity, rh.gs(R.string.permission), rh.gs(R.string.alert_dialog_permission_battery_optimization_failed)) { activity.recreate() } @@ -95,13 +102,14 @@ class AndroidPermission @Inject constructor( } } + @SuppressLint("MissingPermission") @Synchronized fun notifyForBtConnectPermission(activity: FragmentActivity) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { // Manifest.permission.BLUETOOTH_CONNECT - if (permissionNotGranted(activity, "android.permission.BLUETOOTH_CONNECT") || permissionNotGranted(activity, "android.permission.BLUETOOTH_SCAN")) { + if (permissionNotGranted(activity, Manifest.permission.BLUETOOTH_CONNECT) || permissionNotGranted(activity, Manifest.permission.BLUETOOTH_SCAN)) { val notification = NotificationWithAction(injector, Notification.PERMISSION_BT, rh.gs(R.string.needconnectpermission), Notification.URGENT) - notification.action(R.string.request) { askForPermission(activity, arrayOf("android.permission.BLUETOOTH_SCAN", "android.permission.BLUETOOTH_CONNECT")) } + notification.action(R.string.request) { askForPermission(activity, arrayOf(Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT)) } rxBus.send(EventNewNotification(notification)) } else { activity.startActivity(Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)) @@ -145,8 +153,10 @@ class AndroidPermission @Inject constructor( if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) { // Show alert dialog to the user saying a separate permission is needed // Launch the settings activity if the user prefers - val intent = Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, - Uri.parse("package:" + activity.packageName)) + val intent = Intent( + Settings.ACTION_MANAGE_OVERLAY_PERMISSION, + Uri.parse("package:" + activity.packageName) + ) activity.startActivity(intent) } } diff --git a/app/src/main/java/info/nightscout/androidaps/utils/stats/TddCalculator.kt b/app/src/main/java/info/nightscout/androidaps/utils/stats/TddCalculator.kt index e07e492e9a..f9b7ba509a 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/stats/TddCalculator.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/stats/TddCalculator.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.utils.stats -import android.annotation.SuppressLint import android.content.Context import android.graphics.Typeface import android.util.LongSparseArray @@ -99,9 +98,19 @@ class TddCalculator @Inject constructor( return result } + fun calculateToday(): TotalDailyDose { + var startTime = MidnightTime.calc(dateUtil.now()) + val endTime = dateUtil.now() + return calculate(startTime, endTime) + } + fun calculateDaily(startHours: Long, endHours: Long): TotalDailyDose { val startTime = dateUtil.now() + T.hours(hour = startHours).msecs() val endTime = dateUtil.now() + T.hours(hour = endHours).msecs() + return calculate(startTime, endTime) + } + + fun calculate(startTime: Long, endTime: Long): TotalDailyDose { val tdd = TotalDailyDose(timestamp = startTime) repository.getBolusesDataFromTimeToTime(startTime, endTime, true).blockingGet() .filter { it.type != Bolus.Type.PRIMING } @@ -147,10 +156,10 @@ class TddCalculator @Inject constructor( return totalTdd } - @SuppressLint("SetTextI18n") fun stats(context: Context): TableLayout { val tdds = calculate(7) val averageTdd = averageTDD(tdds) + val todayTdd = calculateToday() val lp = TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT) return TableLayout(context).also { layout -> layout.layoutParams = TableLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f) @@ -172,6 +181,13 @@ class TddCalculator @Inject constructor( }) layout.addView(averageTdd.toTableRow(context, rh, tdds.size(), includeCarbs = true)) } + layout.addView(TextView(context).apply { + text = rh.gs(R.string.today) + setTypeface(typeface, Typeface.BOLD) + gravity = Gravity.CENTER_HORIZONTAL + setTextAppearance(android.R.style.TextAppearance_Material_Medium) + }) + layout.addView(todayTdd.toTableRow(context, rh, dateUtil, includeCarbs = true)) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/info/nightscout/androidaps/utils/ui/TimeListEdit.java b/app/src/main/java/info/nightscout/androidaps/utils/ui/TimeListEdit.java index 437bb3cbd2..e1645c907f 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/ui/TimeListEdit.java +++ b/app/src/main/java/info/nightscout/androidaps/utils/ui/TimeListEdit.java @@ -182,7 +182,7 @@ public class TimeListEdit { numberPickers1[position].setTextWatcher(new TextWatcher() { @Override public void afterTextChanged(Editable s) { - Double value1 = SafeParse.INSTANCE.stringToDouble(numberPickers1[position].getText()); + Double value1 = SafeParse.INSTANCE.stringToDouble(numberPickers1[position].getText(), 0.0); Double value2 = value2(position); if (data2 != null && value1 > value2) { value2 = value1; @@ -209,7 +209,7 @@ public class TimeListEdit { @Override public void afterTextChanged(Editable s) { Double value1 = value1(position); - Double value2 = SafeParse.INSTANCE.stringToDouble(numberPickers2[position].getText()); + Double value2 = SafeParse.INSTANCE.stringToDouble(numberPickers2[position].getText(), 0.0); if (data2 != null && value2 < value1) { value1 = value2; numberPickers1[position].setValue(value1); diff --git a/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt b/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt index 6a5a5acf54..449af8dd64 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt @@ -443,12 +443,7 @@ class BolusWizard @Inject constructor( commandQueue.tempBasalPercent(0, 120, true, profile, PumpSync.TemporaryBasalType.NORMAL, object : Callback() { override fun run() { if (!result.success) { - val i = Intent(ctx, ErrorHelperActivity::class.java) - i.putExtra(ErrorHelperActivity.SOUND_ID, R.raw.boluserror) - i.putExtra(ErrorHelperActivity.STATUS, result.comment) - i.putExtra(ErrorHelperActivity.TITLE, rh.gs(R.string.tempbasaldeliveryerror)) - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - ctx.startActivity(i) + ErrorHelperActivity.runAlarm(ctx, result.comment, rh.gs(R.string.tempbasaldeliveryerror), R.raw.boluserror) } } }) diff --git a/app/src/main/java/info/nightscout/androidaps/widget/Widget.kt b/app/src/main/java/info/nightscout/androidaps/widget/Widget.kt index b4a2cbcd29..3d8c1e62cd 100644 --- a/app/src/main/java/info/nightscout/androidaps/widget/Widget.kt +++ b/app/src/main/java/info/nightscout/androidaps/widget/Widget.kt @@ -204,7 +204,7 @@ class Widget : AppWidgetProvider() { } } - fun updateProfile(views: RemoteViews) { + private fun updateProfile(views: RemoteViews) { val profileTextColor = profileFunction.getProfile()?.let { if (it is ProfileSealed.EPS) { @@ -226,7 +226,7 @@ class Widget : AppWidgetProvider() { } private fun updateSensitivity(views: RemoteViews) { - if (sp.getBoolean(R.string.key_openapsama_useautosens, false) && constraintChecker.isAutosensModeEnabled().value()) + if (constraintChecker.isAutosensModeEnabled().value()) views.setImageViewResource(R.id.sensitivity_icon, R.drawable.ic_swap_vert_black_48dp_green) else views.setImageViewResource(R.id.sensitivity_icon, R.drawable.ic_x_swap_vert) @@ -256,7 +256,7 @@ class Widget : AppWidgetProvider() { internal fun updateWidget(context: Context) { context.sendBroadcast(Intent().also { - it.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, AppWidgetManager.getInstance(context).getAppWidgetIds(ComponentName(context, Widget::class.java))) + it.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, AppWidgetManager.getInstance(context)?.getAppWidgetIds(ComponentName(context, Widget::class.java))) it.action = AppWidgetManager.ACTION_APPWIDGET_UPDATE }) } \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_sort.xml b/app/src/main/res/drawable/ic_sort.xml index 4b1317ac20..8ff707c8ca 100644 --- a/app/src/main/res/drawable/ic_sort.xml +++ b/app/src/main/res/drawable/ic_sort.xml @@ -2,7 +2,6 @@ android:width="24dp" android:height="24dp" android:autoMirrored="true" - android:tint="#FFFFFF" android:viewportWidth="24" android:viewportHeight="24"> - - - + android:layout_height="300dp"> - + diff --git a/app/src/main/res/layout/activity_preferences.xml b/app/src/main/res/layout/activity_preferences.xml index 2ff946628a..ae72eaf113 100644 --- a/app/src/main/res/layout/activity_preferences.xml +++ b/app/src/main/res/layout/activity_preferences.xml @@ -5,28 +5,6 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - - - - - + android:layout_marginBottom="10dp"> - - - + + android:hint="@string/profiletype" + android:paddingHorizontal="5dp"> - + android:inputType="none" /> @@ -206,21 +192,18 @@ android:orientation="vertical"> + android:hint="@string/selected_profile" + android:paddingHorizontal="5dp"> - + android:inputType="none" /> @@ -233,21 +216,19 @@ android:orientation="vertical"> + android:hint="@string/careportal_profileswitch" + android:paddingHorizontal="5dp"> - + + android:inputType="none" /> diff --git a/app/src/main/res/layout/overview_graphs_layout.xml b/app/src/main/res/layout/overview_graphs_layout.xml index 70bcfa678e..d1e35bb237 100644 --- a/app/src/main/res/layout/overview_graphs_layout.xml +++ b/app/src/main/res/layout/overview_graphs_layout.xml @@ -22,6 +22,7 @@ android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentEnd="true" + android:layout_marginEnd="3dp" android:contentDescription="@string/chart_menu" android:paddingTop="5dp" app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" /> diff --git a/app/src/main/res/layout/wear_fragment.xml b/app/src/main/res/layout/wear_fragment.xml index 2bcbb389ac..5c6dd20d9a 100644 --- a/app/src/main/res/layout/wear_fragment.xml +++ b/app/src/main/res/layout/wear_fragment.xml @@ -13,7 +13,7 @@ android:gravity="center_vertical|center_horizontal" android:paddingTop="10dp" android:paddingBottom="10dp" - android:text="---" + android:text="@string/no_watch_connected" android:textAppearance="@style/TextAppearance.AppCompat.Medium" tools:ignore="HardcodedText" /> diff --git a/app/src/main/res/menu/menu_preferences.xml b/app/src/main/res/menu/menu_preferences.xml new file mode 100644 index 0000000000..cb7da0d8fc --- /dev/null +++ b/app/src/main/res/menu/menu_preferences.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/app/src/main/res/menu/menu_profilehelper.xml b/app/src/main/res/menu/menu_profilehelper.xml deleted file mode 100644 index ca6e6cb9fc..0000000000 --- a/app/src/main/res/menu/menu_profilehelper.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values-ca-rES/exam.xml b/app/src/main/res/values-ca-rES/exam.xml index e954253896..1d7fce44c7 100644 --- a/app/src/main/res/values-ca-rES/exam.xml +++ b/app/src/main/res/values-ca-rES/exam.xml @@ -134,7 +134,6 @@ Lliurar un bolus amb part de la insulina que falta utilitzant una jeringa/ploma o el menú d\'encebat. No fer res i permetre que AndroidAPS corregeixi els possibles valors alts de glucèmia que es produeixin. Insulina \"a bord\" (IOB) - Marqueu totes les respostes correctes. El valor d\'IOB es veu afectat per les basals temporals lliurades. Una basal temporal alta no serà lliurada si la glucèmia està per sota de l\'objectiu. Un valor d\'IOB positiu durant un període de temps important suggereix resistència a la insulina o àpats no anunciats. diff --git a/app/src/main/res/values-cs-rCZ/exam.xml b/app/src/main/res/values-cs-rCZ/exam.xml index 674f46bec9..095314b067 100644 --- a/app/src/main/res/values-cs-rCZ/exam.xml +++ b/app/src/main/res/values-cs-rCZ/exam.xml @@ -136,8 +136,20 @@ Porovnat hodnoty v AndroidAPS s hodnotami v historii pumpy (pokud to pumpa podporuje). Pošlete bolus na vypočtený „chybějící“ inzulín buď injekční stříkačkou nebo perem nebo pomocí plnění na pumpě. Neudělejte nic a dovolte AndroidAPS opravit jakoukoliv výslednou vysokou hladinu glukózy v krvi. + Zbývající sacharidy (COB) + Jak změna hodnoty citlivosti ovlivňuje výpočet COB? + Zvýšení hodnoty citlivosti prodlouží dobu absorpce sacharidů + Zvýšení hodnoty citlivosti zkrátí dobu absorpce sacharidů + Zvýšení citlivosti neovlivní vypočtenou absorpci sacharidů + Jak změna inzulíno-sacharidového poměru ovlivňuje výpočet COB? + Zvýšení hodnoty inzulíno-sacharidového poměru prodlouží dobu absorpce sacharidů + Zvýšení hodnoty inzulíno-sacharidového poměru zkrátí dobu absorpce sacharidů + Zvýšení inzulíno-sacharidového poměru neovlivní vypočtenou absorpci sacharidů + Jak procentuální změna profilu ovlivňuje výpočet COB? + Nastavením profilu na 150 % dojde k prodloužení doby absorpce sacharidů + Nastavením profilu na 150 % dojde ke zkrácení doby absorpce sacharidů + Nastavení profilu na 150% neovlivní vypočtenou absorpci sacharidů Aktivní inzulín (IOB) - Zatrhněte všechny správné odpovědi. Hodnota IOB je ovlivněna vydanými dočasnými bazály. Vysoký dočasný bazál nebude spuštěn, pokud je Vaše glykémie nižší než cíl. Negativní IOB po značnou dobu bez cvičení naznačuje, že váš profil je příliš \"silný\" a ve vašem profilu je potřeba méně inzulínu. diff --git a/app/src/main/res/values-cs-rCZ/strings.xml b/app/src/main/res/values-cs-rCZ/strings.xml index 5fbe88be2f..fb04bdbec9 100644 --- a/app/src/main/res/values-cs-rCZ/strings.xml +++ b/app/src/main/res/values-cs-rCZ/strings.xml @@ -433,8 +433,8 @@ Povolení odesílaní OpenAPS SMB Dynamická ISF - Korekční faktor pro DynamicISF v %% - Korekční faktor pro DynamicISF. Pro agresivnější korekční dávky nastavte hodnoty větší než 100%%, a pro méně agresivní korekce menší než 100%%. + Korekční faktor pro DynamicISF v % + Korekční faktor pro DynamicISF. Pro agresivnější korekční dávky nastavte hodnoty vyšší než 100 %, pro méně agresivní korekce nižší než 100 %. Povolit UAM Povolit SMB Použít super mikro bolusy místo dočasných bazálů pro zrychlení účinku @@ -645,7 +645,6 @@ Pro oznámení vyžaduje aplikace oprávnění systémového okna Aplikace potřebuje oprávnění k přístupu k poloze kvůli skenování BT a WiFi identifikaci Aby bylo možné nahrávat logy a exportovat nastavení, je nutné pro aplikaci povolit oprávnění přístupu k úložišti - Aplikace potřebuje oprávnění bluetooth Požadavek Otevřít menu Zavřít menu @@ -1037,10 +1036,13 @@ pouze na hodinkách pouze na telefonu úchyt pro přetažení + Hledat GlucoRx Aidex Aidex Přijímat hodnoty glykémie ze senzoru GlucoRx Aidex. Zablokováno možností nabíjení Zablokováno možností připojení + (Žádné hodinky nejsou připojeny) + Chyba žádosti o oprávnění diff --git a/app/src/main/res/values-da-rDK/exam.xml b/app/src/main/res/values-da-rDK/exam.xml index 31dc1e91d2..75e3579ca8 100644 --- a/app/src/main/res/values-da-rDK/exam.xml +++ b/app/src/main/res/values-da-rDK/exam.xml @@ -123,6 +123,7 @@ Notering af kanyleskift vil nulstille Autosens ratio tilbage til 100%. Nogle af plugin mulighederne har konfigurerbare tidsintervaller, der kan indstilles af brugeren. https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html + https://androidaps.readthedocs.io/en/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens Kulhydrat indtastningsfejl Hvad gør du, hvis du har lavet en forkert kulhydrat indtastning? Slet den forkerte indtastning i Behandlinger og indtast korrekte nye kulhydrat værdier. @@ -135,8 +136,20 @@ Sammenlign værdier i AndroidAPS og pumpehistorik (hvis pumpen understøtter dette). Bolus en del af din beregnede \"glemte\" insulin med enten sprøjter / pen eller brug af en kanylefyldning. Gør ingenting og tillad AndroidAPS at rette op på højt blodsukker. + Kulhydrater om bord (COB) + Hvordan ændring af ISF værdi påvirker COB beregning? + Ved øget ISF, vil kulhydrater være længere tid om at absorberes + Ved øget ISF, vil kulhydrater være kortere tid om at absorberes + Øget ISF vil ikke påvirke absorbering af beregnet kulhydrat + Hvordan ændring af IC værdi påvirker COB beregning? + Ved øget IC, vil kulhydrater være længere tid om at absorberes + Ved øget IC, vil kulhydrater være kortere tid om at absorberes + Øget IC vil ikke påvirke absorbering af beregnet kulhydrat + Hvordan skift af profil procent påvirker COB beregning? + Ved indstilling af profil til 150%, vil kulhydrater være længere tid om at absorberes + Ved indstilling af profil til 150%, vil kulhydrater være kortere tid om at absorberes + Ved indstilling af profil til 150%, påvirkes absorbering af beregnet kulhydrat ikke Insulin om bord (IOB) - Tjek alle de korrekte svar. IOB-værdi påvirkes af midlertidige basaler. Høj midlertidlig basal vil ikke blive givet, når dit blodsukker er under målet. Negative IOB i en længere periode uden motion tyder på, at din profil er for stærk, og at der er behov for mindre insulin i dine indstillinger. diff --git a/app/src/main/res/values-da-rDK/strings.xml b/app/src/main/res/values-da-rDK/strings.xml index c906acf229..bcf53355b6 100644 --- a/app/src/main/res/values-da-rDK/strings.xml +++ b/app/src/main/res/values-da-rDK/strings.xml @@ -6,6 +6,7 @@ Behandlings sikkerhed Maks tilladt bolus [IE] Maks tilladte kulhydrater [g] + BS under værdi for LGS grænse %1$s indstillinger Indstillinger Opdater behandlinger fra NS @@ -432,14 +433,15 @@ Aktiver lokale udsendelser. OpenAPS SMB Dynamisk ISF - DynamicISF-justeringsfaktor %% - Justeringsfaktor for Dynamisk ISF. Indstil mere end 100%% for mere aggressive korrektionsdoser og mindre end 100%% for mindre aggressive korrektioner. + DynamiskISF-justeringsfaktor % + Justeringsfaktor for DynamiskISF. Indstil mere end 100% for mere aggressive korrektionsdoser og mindre end 100% for mindre aggressive korrektioner. Aktiver UAM Aktiver SMB Brug Super Mikro Boluser i stedet for midlertidig basal for hurtigere handling Detektering af uanmeldte måltider IOB Kurve Peak-Tid Spidstidspunkt [min] + Top Free-Peak Oref Rapid-Acting Oref Ultra-Rapid Oref @@ -591,6 +593,7 @@ Denne værdi kaldes Max IOB i OpenAPS kontekst\nOpenAPS vil ikke tilføje mere insulin, hvis den aktuelle IOB er større end denne værdi Måltid max absorptionstid [h] Tid hvor ethvert måltid betragtes som absorberet. Resterende kulhydrater vil blive afskåret. + BS værdi under hvilken insulin er suspenderet. Standard værdi bruger standard målmodel. Bruger kan indstille værdi mellem 60 mg/dl (3,3 mmol/l) og 100 mg/dl (5,5 mmol/l). Værdier under 65/3,6 resulterer i brug af standardmodel Vis notefelt i behandlingsdialoger Næste Forrige @@ -603,7 +606,11 @@ Anden kulhydratstigning Tredje kulhydratstigning CGM + Brug mobilforbindelse + Brug Wi-Fi-forbindelse WiFi SSID + Under opladning + På batteri Indstillinger for forbindelse Tilladte SSID\'er (semikolon separeret) Tillad forbindelse i roaming @@ -638,7 +645,6 @@ Applikationen mangler system vindues tilladelse til notifikationer Applikationen mangler lokations tilladelse til BT scanning og WIFI identifikation Applikationen mangler lagerstyrings tilladelse for at gemme logfiler og exporteringsindstillinger - Applikationen kræver tilladelse til bluetooth Anmod Åbn navigation Luk navigation @@ -678,6 +684,8 @@ En behandling (insulin: %1$.2f, kulhydrater: %2$d, kl: %3$s) kunne ikke tilføjes til behandlinger. Tjek og tilføj venligst en note manuelt efter behov. eCarbs: %1$d g (%2$d h), forsinkelse: %3$d m Ingen tilgængelige autosens data + Logfiler + Diverse Log indstillinger Nulstil til standardindstillinger NSClient funktionsfejl. Overvej NS og NSClient genstart. @@ -770,6 +778,11 @@ Ugyldig angivelse af % Gennemsnit Tid i målområde + Dags TIR + Nat TIR + Detaljerede 14 dage + SD: %1$s + HbA1c: Aktivitetsovervågning Ønsker du at nulstille aktivitetsstatistik? Statistikker @@ -956,7 +969,7 @@ Max-BS udenfor området! Midlertidigt mål:\nMin: %1$s\nMax: %2$s\nVarighed: %3$s Midlertigt mål:\nMål: %1$s\nVarighed: %2$s - Midlertigt mål:\Grund: %1$s\nMål: %2$s\nVarighed: %3$s + Midlertigt mål:\nGrund: %1$s\nMål: %2$s\nVarighed: %3$s Hurtigguide: %1$s\nInsulin: %2$.2fE\nKH: %3$dg Guide:\nInsulin: %1$.2fE\nKH: %2$dg Vis post på enhed: @@ -965,9 +978,11 @@ Ingen aktiv profil angivet! Ukendt COB! BG læsning mangler eller nylig app genstart? KH begrænsninger overtrådt! + Beregner (IC: %1$.1f, ISF: %2$.1f) Kulhydrater: %1$.2fE COB: %1$.0fg %2$.2fE BS: %1$.2fE + IOB: %1$.2fE Superbolus: %1$.2fE 15\' trend: %1$.2fE Procent: %1$.2fE x %2$d%% ≈ %3$.2fE @@ -994,6 +1009,10 @@ %1$d valgt Sortér Dialog annulleret + Meget lav + Lav + Høj + Meget høj Under Inden for området Over @@ -1002,6 +1021,12 @@ AndroidAPS widget Indstil gennemsigtighed Loop status + Graf skala + Profil 1 + Profil 2 + Log ind + Fjern alle + Nulstil start QR-kode til opsætning af engangs kodeord Åbn indstillinger indstil KH alarm @@ -1011,8 +1036,12 @@ kun på ur kun på telefon træk og slip håndtering + Søg GlucoRx Aidex Aidex Modtag BG-værdier fra GlucoRx Aidex CGMS. + Blokeret af opladningsmuligheder + Blokeret af forbindelsesmuligheder + (Intet ur forbundet) diff --git a/app/src/main/res/values-de-rDE/exam.xml b/app/src/main/res/values-de-rDE/exam.xml index 2037d190da..224325bbe7 100644 --- a/app/src/main/res/values-de-rDE/exam.xml +++ b/app/src/main/res/values-de-rDE/exam.xml @@ -104,9 +104,11 @@ Wo kannst Du nach Hilfe für AndroidAPS suchen? Du kannst in der AndroidAPS-Facebook-Gruppe um Rat bitten. Du solltest die AndroidAPS-Dokumentation lesen (und wiederholt lesen). + Im Discord Channel AndroidAPS kannst Du bei technischen Problemen oder Fragestellungen um Hilfe bitten. Du solltest Deine Diabetesklinik / Deinen Diabetologen fragen. https://androidaps.readthedocs.io/en/latest/CROWDIN/de/Installing-AndroidAPS/Update-to-new-version.html#problembehandlung https://www.facebook.com/groups/loopedDE/ + https://discord.gg/4fQUWHZ4Mw Insulin-Plugins Welches Insulin kann mit dem Ultra-Rapid-Oref-Plugin verwendet werden? Fiasp® @@ -121,6 +123,7 @@ Das Protokollieren eines Kanülenwechsels setzt das Autosens Verhältnis wieder auf 100% zurück. Einige der Plugin-Optionen haben konfigurierbare Zeiträume, die vom Benutzer eingestellt werden können. https://androidaps.readthedocs.io/en/latest/CROWDIN/de/Configuration/Sensitivity-detection-and-COB.html + https://androidaps.readthedocs.io/de/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens Fehler bei der KH-Eingabe Was sollst Du tun, wenn Du einen falschen KH-Eintrag gemacht hast? Lösche die falsche Eingabe in der Behandlung und gib den richtigen neuen Kohlehydratwert ein. @@ -133,8 +136,20 @@ Vergleiche die Werte der Historie in AAPS und Deiner Pumpe (wenn die Pumpe diese Funktion bietet). Gib einen Teil-Bolus des \'nicht erhaltenen\' Insulins mit Spritze / Pen oder durch Befüllen der Kanüle. Unternimm nichts und lass AndroidAPS die entstehenden hohen Glukosewerte korrigieren. + KH an Board (COB) + Wie beeinflusst das Ändern des ISF-Wertes die COB-Berechnung? + Steigende ISF absorbiert Kohlenhydrate länger + Steigende ISF absorbiert Kohlenhydrate kürzer + Steigende ISF verändert die Dauer für die Kohlenhydrataufnahme nicht + Wie beeinflusst das Ändern des ISF-Wertes die COB-Berechnung? + Steigende IC absorbiert Kohlenhydrate länger + Steigende IC absorbiert Kohlenhydrate kürzer + Steigende IC verändert die Zeit für die Kohlenhydrataufnahme nicht + Wie beeinflusst die Änderung des Profil-Prozentsatzes die COB-Berechnung? + Die Einstellung des Profils auf 150% verlängert die Zeit für Kohlenhydrataufnahme + Die Einstellung des Profils auf 150% verkürzt die Zeit für Kohlenhydrataufnahme + Die Einstellung des Profils auf 150% verändert die Zeit für die Kohlenhydrataufnahme nicht Aktives Insulin (IOB) - Kreuze alle richtigen Antworten an. IOB wird von den abgegebenen temporären Basalraten beeinflusst. Eine hohe temporäre Basalrate wird nicht abgegeben, wenn der BZ unterhalb des Zielwerts liegt. Ein negativer IOB über einen längeren Zeitraum bei fehlender Bewegung deutet darauf hin, dass Dein Profil zu stark ist und weniger Insulin in Deinen Einstellungen benötigt wird. diff --git a/app/src/main/res/values-de-rDE/strings.xml b/app/src/main/res/values-de-rDE/strings.xml index 0ccb861169..19396b422b 100644 --- a/app/src/main/res/values-de-rDE/strings.xml +++ b/app/src/main/res/values-de-rDE/strings.xml @@ -6,6 +6,7 @@ Sicherheitseinstellungen der Behandlungen Max. erlaubter Bolus [IE] Max. erlaubte Kohlenhydrate [g] + BG-Pegel, unterhalb dessen die Aussetzung wegen niedriger Glukoseaussetzung eintritt %1$s-Einstellungen Einstellungen Behandlungen von NS aktualisieren @@ -25,6 +26,7 @@ Synchronisiert deine Daten mit Nightscout Stand des Algorithmus in 2017 Der aktuellste Algorithmus für erfahrene Nutzer + Neuester Algorithmus für fortgeschrittene Benutzer mit dynamischer/automatischer ISF Zeigt den aktuellen Status deines Loops und Schaltflächen für die geläufigsten Aktionen an Zeigt eine fortlaufende Benachrichtigung mit einer kurzen Übersicht darüber, was dein Loop derzeit tut Definiere ein Profil, was auch offline verfügbar ist. @@ -264,6 +266,7 @@ KONF LOOP OAPS + DYNISF LP HOME VP @@ -430,12 +433,15 @@ Aktiviere lokale Broadcasts OpenAPS SMB Dynamischer ISF + DynamicISF Anpassungsfaktor % + Anpassungsfaktor für DynamicISF. Stelle mehr als 100 % für aggressivere Korrekturdosen ein, und weniger als 100 % für weniger aggressive Korrekturen. Aktiviere UAM Aktiviere SMB Benutze Super-Mikro-Boli anstelle von temporären Basalraten, um eine schnellere Wirkung zu erreichen. Erkennung von unangekündigten Mahlzeiten Wirkungshoch der IOB-Kurve Wirkungshoch [min] + Gipfel Free-Peak Oref Rapid-Acting Oref Ultra-Rapid Oref @@ -497,6 +503,7 @@ Nur negative COB Berechnung Temporäres Ziel Berechnung + Prozentuale Berechnung Loop aktiviert APS ausgewählt Nightscout-Client hat Schreibrechte @@ -586,6 +593,7 @@ Diesen Wert nennt OpenAPS MaxIOB.\nSolange dieser Wert überschritten wird, wird AndroidAPS kein Insulin abgeben. Maximale Dauer der Essens-Resorption [h] Zeit, nach der jede Mahlzeit mit Sicherheit absorbiert ist. Verbleibende Kohlenhydrate werden danach nicht mehr berücksichtigt. + Der BG-Wert, unter dem die Insulinzuführung ausgesetzt wird. Der Standardwert verwendet das Standard-Zielmodell. Der Benutzer kann einen Wert zwischen 60mg/dl (3.3 mmol/l) und 100mg/dl (5.5mmol/l) setzen. Werte unterhalb 65/3.6 führen zur Verwendung des Standardmodells Zeige Feld für Notizen in den Behandlungsdialogen Weiter Zurück @@ -598,7 +606,11 @@ Zweite KH-Erhöhung Dritte KH-Erhöhung CGM + Mobilfunkverbindung verwenden + WLAN Verbindung verwenden WLAN SSID + Während des Ladevorgangs + Bei Batteriebetrieb Verbindungs-Einstellungen Erlaubte SSIDs (durch Semikolon getrennt) Erlaube Verbindung bei Roaming @@ -633,7 +645,6 @@ Die App benötigt die Systemberechtigung für App-Benachrichtigungen Die App benötigt die Berechtigung für den Standort, um Bluetooth und WLAN nutzen zu können Die App benötigt Zugriffsrechte für den Speicher um Log-Dateien zu sichern und die Einstellungen zu exportieren. - App benötigt Bluetooth-Berechtigung Anfordern Menü öffnen Menü schließen @@ -655,7 +666,10 @@ Empfindlichkeit erhöht den Zielwert Wenn eine höhere Empfindlichkeit festgestellt wird, wird der Glukose-Zielwert erhöht. \"AndroidAPS gestartet\" Ereignisse löschen + Zeige Ungültige + Verstecke Ungültige Objekte entfernen + Einträge sortieren Gespeicherte Einstellungen gefunden WARNUNG: Wenn Du eine echte Pumpe aktivierst und anschließt, kopiert AndroidAPS die Basaleinstellungen vom aktiven Profil zur Pumpe (und behält sie bei). Die Einstellungen in der Pumpe werden hierbei überschrieben. Wenn Du Dir nicht sicher bist oder die Basaleinstellungen in der Pumpe nicht überschreiben möchten, drücke \"Abbrechen\" und vollziehe den Wechsel zur Pumpe später. Behandlungsdaten unvollständig @@ -670,6 +684,8 @@ Der Eintrag (Insulin: %1$.2f, Kohlenhydrate: %2$d, um: %3$s) konnte nicht als Behandlung gespeichert werden. Bitte überprüfe die aktuelle Liste und füge, falls notwendig, den Datensatz manuell hinzu. eCarbs: %1$d g (%2$d h), Verzögerung: %3$d m Keine Autosens-Daten verfügbar + Log Dateien + Verschiedenes Log-Einstellungen Auf Standardwerte zurücksetzen NSClient Störung. Ziehe einen Neustart von NS und NSClient in Betracht. @@ -763,6 +779,11 @@ Unerwartetes Verhalten. Ungültige % Eingabe Durchschnitt TIR + Tages TIR + Nacht TIR + Detaillierte 14 Tage + SD: %1$s + HbA1c: Aktivitätsmonitor Willst Du die Aktivitätsstatistik zurücksetzen? Statistiken @@ -803,6 +824,7 @@ Unerwartetes Verhalten. Installiere auf jedem Follower-Phone eine Authenticator-App, die RFC 6238 TOTP-Token unterstützt. Beliebte kostenlose Apps sind:\n Authy\n Google Authenticator\n LastPass Authenticator\n FreeOTP Authenticator Wenn Du den Authentifikator zurücksetzt werden alle bestehenden Authentifikatoren ungültig. Du musst sie dann neu einrichten! Predictions (Vorhersagen) + Behandlungen Steigung der Abweichung Autorisierung fehlgeschlagen Gesamtinsulin @@ -872,6 +894,8 @@ Unerwartetes Verhalten. Profilwechsel akzeptieren, die in NS oder NSClient eingegeben wurden APS Offline-Ereignisse empfangen APS Offline-Ereignisse akzeptieren, die über NS oder NSClient eingegeben wurden + TBR und EB empfangen + Akzeptiere TBR und EB, die von einer anderen Instanz eingegeben wurden Insulin abrufen Insulin akzeptieren, das in NS oder NSClient eingegeben wurden Kohlenhydrate abrufen @@ -890,9 +914,11 @@ Unerwartetes Verhalten. Fehler in ISF-Werten %s ausführen? Ungültiges Profil %1$s wurde von NS nicht akzeptiert + Ansicht Fehler Hochladen verlangsamen Status BZ-Daten + BG-Werte entfernen Kanülenalter Alter Patchpumpe Patch-Pumpe @@ -930,7 +956,46 @@ Unerwartetes Verhalten. aktuelles Profil löschen neu zur Liste hinzufügen + Wähle das dunkle, helle oder das Systemdesign + App Farbschema + Dunkles Design + Helles Design + Systemdesign verwenden + Temp-Target unbekannte Voreinstellung: %1$s + Ausführung des Temp-Targets abbrechen? + Verschiedene Einheiten werden auf Uhr und Telefon verwendet! + Zero-Temp-Target - abbrechen des laufenden Temp-Targets? + Min-BG ist außerhalb des Bereichs! + Max-BG ist außerhalb des Bereichs! + Temptarget:\nMin: %1$s\nMax: %2$s\nDauer: %3$s + Temptarget:\nTarget: %1$s\nDauer: %2$s + Temp-Target:\nGrund: %1$s\nTarget: %2$s\nDauer: %3$s + QuickWizard: %1$s\nInsulin: %2$.2fU\nCarbs: %3$dg + Calc. Wizard:\nInsulin: %1$.2fU\nCarbs: %2$dg + Zeige Eintrag auf dem Gerät: + Ausgewählter Quickwizard nicht mehr verfügbar, bitte aktualisiere die Kachel + Kein aktueller BG liegt als Basis zur Berechnung vor! + Kein aktives Profil gesetzt! + Unbekannter COB! BG-Wert fehlt oder wurde App vor kurzem neu gestartet? + Die Kohlenhydrateinschränkung wurde überschritten! + Calc (IC: %1$.1f, ISF: %2$.1f) + Kohlenhydrate: %1$.2fU + COB: %1$.0fg %2$.2fU + BZ: %1$.2fU + IOB: %1$.2fU + Superbolus: %1$.2fU + 15\' Trend: %1$.2fU + Prozent: %1$.2fU x %2$d%% ≈ %3$.2fU + Verletzung der Bolusbeschränkung!\nKann %1$.2fU nicht abgeben + TempT: %1$s + %1$s zu %2$s + Keine Pumpe verfügbar! + Unbekannter Actionbefehl: + Prozentsatz + Standardwert der Anwendung + Zeige ungültige / gelöschte Einträge + Verberge ungültige / gelöschte Einträge Profil zum Bearbeiten auswählen Aktualisiere von Nightscout Ausgewähltes Objekt löschen @@ -939,8 +1004,46 @@ Unerwartetes Verhalten. Temporäre Ziele Kohlenhydrate & Bolus Sind Sie sicher, dass Sie diese(s) %1$d Element(e) löschen möchten? + Keine Datensätze verfügbar + Verberge Loop + Zeige Loop an %1$d ausgewählt Sortieren + Dialog abgebrochen + Sehr niedrig + Niedrig + Hoch + Sehr hoch + Unter + Im Zielbereich + Über + Zeige Loop Datensätze + Verberge Loop Datensätze + AndroidAPS Widget + Deckkraft konfigurieren + Loop Status + Diagrammskala + Profil 1 + Profil 2 Login + Alle entfernen + Start zurücksetzen + QR Code für einmaliges Passwort einrichten + Einstellungen öffnen + setze Alarm für KH Timer + Alle + Smartphone + Smartwatch + nur auf Uhr + nur auf Telefon + Drag and Drop Handle + Suche + GlucoRx Aidex + Aidex + Erhalte BG-Werte von GlucoRx Aidex CGMS. + Blockiert durch Ladeoptionen + Blockiert durch Verbindungsoptionen + (keine Uhr verbunden) + Fehler beim Anfordern der Erlaubnis diff --git a/app/src/main/res/values-es-rES/exam.xml b/app/src/main/res/values-es-rES/exam.xml index d4ca2b6d4a..a8cc55b822 100644 --- a/app/src/main/res/values-es-rES/exam.xml +++ b/app/src/main/res/values-es-rES/exam.xml @@ -136,8 +136,20 @@ Comparar valores en AndroidAPS con el historial de la bomba (si la bomba lo soporta). Bolo una proporción de la insulina calculada “perdida” por jeringa/pluma o usando menú de llenado. No haga nada y permite que AndroidAPS corrija cualquier nivel alto de glucosa en la sangre resultante. + Carbohidratos activos (COB) + ¿Cómo afecta el cambio del valor ISF al cálculo de COB? + Incrementar el ISF hará que los carbohidratos se absorban más lentamente + Incrementar el ISF hará que los carbohidratos se absorban más rápidamente + Incrementar el ISF no afectará la absorción calculada de carbohidratos + ¿Cómo afecta cambiar los valores de IC a los cálculos de COB? + Incrementar el IC hará que los carbohidratos se absorban más lentamente + Incrementar el IC hará que los carbohidratos se absorban más rápidamente + Incrementar el IC no afectará la absorción calculada de carbohidratos + ¿Cómo afecta el cambio de porcentaje del perfil al cálculo de los COB? + Establecer el perfil a 150% hará que los carbohidratos se absorban más lentamente + Establecer el perfil a 150% hará que los carbohidratos se absorban más rápidamente + Establecer el perfil a 150% no afectará la absorción calculada de carbohidratos Insulina a bordo (IOB) - Marca todas las respuestas correctas. El valor del IOB se ve afectado por las bases temporales ejecutadas. No se dará alta tasa basal temporal cuando su nivel de azúcar en sangre esté por debajo del objetivo. El IOB negativo durante un período sustancial en ausencia de ejercicio sugiere que tu perfil es demasiado fuerte y que se necesita menos insulina en tus ajustes. diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 0f21604eb6..7f18165931 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -433,8 +433,8 @@ Habilitar la emisión de mensajes localmente. OpenAPS SMB ISF Dinámico - Factor de ajuste de ISF Dinámico % - Porcentaje del factor de ajuste de ISF Dinámico\nValor predeterminado: 100\nEstablecer valores por encima del 100%% para que el algoritmo aplique correcciones más agresivas y valores por debajo del 100%% para correcciones menos agresivas. + Factor de ajuste de ISF Dinámico % + Porcentaje del factor de ajuste de ISF Dinámico\nValor predeterminado: 100\nEstablecer valores por encima del 100% para que el algoritmo aplique correcciones más agresivas y valores por debajo del 100% para correcciones menos agresivas. Activar UAM Activar SMB Usar microbolos en lugar de basales temporales, para corregir más rápidamente @@ -645,7 +645,6 @@ La aplicación necesita permisos del sistema para poder mostrarse sobre otras aplicaciones, para las notificaciones La aplicación necesita permiso de ubicación para poder buscar dispositivos Bluetooth y redes WiFi La aplicación necesita permiso de almacenamiento para poder almacenar archivos de registro y valores de exportación - La aplicación necesita permiso de bluetooth Solicitar Abrir navegación Cerrar navegación @@ -970,7 +969,7 @@ ¡Glucosa máxima fuera de rango! Objetivo temporal:\nMin: %1$s\nMax: %2$s\nDuración: %3$s Objetivo temporal:\nObjetivo: %1$s\nDuración: %2$s - ObjetivoTemporal:\Razón: %1$s\nObjetivo: %2$s\nDuración: %3$s + ObjetivoTemporal:\nRazón: %1$s\nObjetivo: %2$s\nDuración: %3$s Asistente Rápido: %1$s\nInsulina: %2$.2fU\nCarbohidratos: %3$dg Calc. Asistente:\nInsulina: %1$.2fU\nCarbohidratos: %2$dg Mostrar entrada en dispositivo: @@ -1037,10 +1036,12 @@ Sólo en reloj Sólo en teléfono Arrastrar y soltar + Buscar GlucoRx Aidex Aidex Recibir los valores de glucosa de GlucoRx Aidex CGMS Bloqueado por opciones de carga Bloqueado por opciones de conectividad + (Ningún reloj conectado) diff --git a/app/src/main/res/values-fr-rFR/exam.xml b/app/src/main/res/values-fr-rFR/exam.xml index bab13d862d..3fec7d38da 100644 --- a/app/src/main/res/values-fr-rFR/exam.xml +++ b/app/src/main/res/values-fr-rFR/exam.xml @@ -136,8 +136,20 @@ Comparer les valeurs dans l\'historique d\'AndroidAPS et de la pompe (si la pompe le permet). Faites un bolus du montant de votre insuline calculée « manquante » soit par seringue / stylo ou en utilisant un amorçage. Ne faites rien et laissez AndroidAPS corriger tout taux élevé de glycémie qui en résulte. + Glucides Actifs (GA) + Comment le changement de la SI impacte le calcul des GA ? + Augmenter la SI rendra l\'absorption des glucides plus longue + L\'augmentation de la SI réduira le temps d\'absorption des glucides + L\'augmentation de la SI n\'affectera pas les calculs de l\'absorption des glucides + Comment le changement de G/I impacte le calcul des GA ? + L\'augmentation de G/I rendra l\'absorption des glucides plus longue + L\'augmentation de G/I réduira le temps d\'absorption des glucides + L\'augmentation de G/I n\'impactera pas l\'absorption des glucides calculés + Comment le changement du pourcentage de profil impacte le calcul des GA ? + Définir le profil à 150% rendra l\'absorption des glucides plus longue + Définir le profil à 150% réduira le temps d\'absorption des glucides + Définir le profil à 150% n\'impactera pas le calcul de l\'absorption des glucides Insuline Active (IA) - Sélectionnez toutes les bonnes réponses. La valeur de l\'IA est impactée par les débits de basal temporaires émis. Une basale temp haute ne sera pas donnée quand votre glycémie est en dessous de la cible. Une IA négative pendant une période significative en l\'absence d\'exercice indique que votre profil est trop fort et qu\'il faut moins d\'insuline dans vos paramètres. diff --git a/app/src/main/res/values-fr-rFR/strings.xml b/app/src/main/res/values-fr-rFR/strings.xml index e160225133..7cf9ae415d 100644 --- a/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/src/main/res/values-fr-rFR/strings.xml @@ -434,8 +434,8 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S Activer les transmissions locales OpenAPS SMB SI dynamique - Facteur d\'ajustement SI dynamique %% - Facteur d\'ajustement pour SI dynamique. Définissez plus de 100 %% pour des corrections plus agressives et moins de 100 %% pour des corrections moins agressives. + Facteur d\'ajustement Si dynamique % + Facteur d\'ajustement pour Si dynamique. Définissez plus de 100 % pour des corrections plus agressives et moins de 100 % pour des corrections moins agressives. Activer RNS Activer SMB Utiliser les Super Micro Bolus au lieu des débits de base temporaires pour une action rapide @@ -646,7 +646,6 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S L\'application a besoin de l\'autorisation d\'accès à la fenêtre système pour les notifications L\'application a besoin de l\'autorisation de localisation pour l\'analyse BT et l\'identification WiFi L\'application a besoin d\'une autorisation de stockage pour pouvoir stocker les fichiers journaux et les paramètres d\'exportation - L\'application a besoin de l\'autorisation Bluetooth Demande Ouvrir navigation Fermer navigation @@ -970,7 +969,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S Gly maxi hors limite! Cible temporaire:\nMin: %1$s\nMax : %2$s\nDurée : %3$s Cible temporaire:\nCible: %1$s\nDurée: %2$s - Cible temporaire:\nRaison: %1$s\nCible : %2$s\nDurée : %3$s + Cible temp:\nRaison: %1$s\nCible : %2$s\nDurée : %3$s Assistant: %1$s\nInsuline : %2$.2fU\nGlucides : %3$dg Assistant Calc :\nInsuline : %1$.2fU\nGlucides : %2$dg Afficher l\'entrée sur l\'appareil : @@ -1037,10 +1036,13 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S seulement sur la montre uniquement sur le téléphone glissez déposez ici + Chercher GlucoRx Aidex Aidex Recevoir les valeurs de glycémie du MGC GlucoRx Aidex. Bloqué par les options de recharge Bloqué par les options de connectivité + (Pas de montre connectée) + Erreur lors de la demande des autorisations diff --git a/app/src/main/res/values-it-rIT/exam.xml b/app/src/main/res/values-it-rIT/exam.xml index 3f3d10cbfa..93738aef2c 100644 --- a/app/src/main/res/values-it-rIT/exam.xml +++ b/app/src/main/res/values-it-rIT/exam.xml @@ -123,6 +123,7 @@ La registrazione di un cambio cannula ripristinerà il rapporto Autosens al 100%. Alcune opzioni del plugin hanno intervalli di tempo configurabili che possono essere impostati dall\'utente. https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html + https://androidaps.readthedocs.io/en/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens Errori inserimento CHO Cosa dovresti fare se hai fatto un inserimento non corretto di carboidrati? Eliminare nei Trattamenti l\'inserimento non corretto e immettere il nuovo valore CHO. @@ -135,8 +136,20 @@ Compara i valori in AndroidAPS con lo storico micro (se supportato). Erogare un bolo con parte della tua insulina calcolata \"mancante\" usando una siringa/penna o la funzione caricamento. Non fare nulla e permettere ad AndroidAPS di correggere eventuali glicemie alte. + CHO attivi (COB) + In che modo la modifica del valore ISF influisce sul calcolo dei COB? + L\'aumento di ISF richiederà un tempo maggiore per l\'assorbimento dei CHO + L\'aumento di ISF richiederà un tempo minore per l\'assorbimento dei CHO + L\'aumento di ISF non influirà sull\'assorbimento calcolato dei CHO + In che modo la modifica del valore IC influisce sul calcolo dei COB? + L\'aumento di IC richiederà un tempo maggiore per l\'assorbimento dei CHO + L\'aumento di IC richiederà un tempo minore per l\'assorbimento dei CHO + L\'aumento di IC non influirà sull\'assorbimento calcolato dei CHO + In che modo la modifica della percentuale profilo influisce sul calcolo dei COB? + Impostare il profilo al 150% richiederà un tempo maggiore per l\'assorbimento dei CHO + Impostare il profilo al 150% richiederà un tempo minore per l\'assorbimento dei CHO + Impostare il profilo al 150% non influirà sull\'assorbimento calcolato dei CHO Insulina attiva (IOB) - Seleziona tutte le risposte corrette. Il valore IOB è influenzato dalle basali temporanee emesse. Non verrà emessa una basale temporanea alta quando la tua glicemia è al di sotto del target. IOB negativo per un periodo considerevole in assenza di esercizio fisico suggerisce che il tuo profilo è troppo incisivo e che è necessaria meno insulina nelle tue impostazioni. diff --git a/app/src/main/res/values-it-rIT/strings.xml b/app/src/main/res/values-it-rIT/strings.xml index eb81d05f9f..191d76f1b6 100644 --- a/app/src/main/res/values-it-rIT/strings.xml +++ b/app/src/main/res/values-it-rIT/strings.xml @@ -6,6 +6,7 @@ Sicurezza trattamenti Max bolo consentito [U] Max CHO consentiti [g] + Glicemia sotto la quale si attiva la sospensione per glicemia bassa %1$s Preferenze Preferenze Aggiorna trattamenti da NS @@ -432,14 +433,15 @@ Abilita trasmissioni locali OpenAPS SMB ISF Dinamico - %% fattore di regolazione ISF dinamico - Fattore di regolazione per ISF dinamico. Imposta più del 100%% per correzioni più aggressive, meno del 100%% per correzioni meno aggressive. + Fattore di regolazione per ISF Dinamico (%) + Fattore di regolazione per ISF Dinamico. Imposta più del 100% per dosi di correzione più aggressive e meno del 100% per correzioni meno aggressive. Abilita UAM Abilita SMB Usa super-micro-boli al posto della basale temporanea per un\'azione più veloce Rilevamento dei pasti non annunciati Tempo picco Curva IOB Tempo del picco [min] + Picco Free-Peak Oref Rapid-Acting Oref Ultra-Rapid Oref @@ -591,6 +593,7 @@ Questo valore è chiamato Max IOB nel contesto OpenAPS\nOpenAPS non aggiungerà ulteriore insulina se IOB corrente è maggiore di questo valore Max tempo assorbimento pasto [h] Tempo entro il quale ogni pasto si considera assorbito. Eventuali carboidrati rimanenti verranno tagliati fuori. + Glicemia sotto la quale l\'erogazione d\'insulina è sospesa. Il valore predefinito utilizza il modello target standard. L\'utente può impostare un valore compreso tra 60 mg/dl (3.3mmol/l) e 100mg/dl (5.5mmol/l). Con valori inferiori a 65/3.6 viene usato il modello predefinito Finestre tratt.nto: mostra campo note Avanti Indietro @@ -603,7 +606,11 @@ Secondo incremento di CHO Terzo incremento di CHO CGM + Usa connessione cellulare + Usa connessione WiFi WiFi SSID + Durante la ricarica + Utilizzo batteria Impostazioni connessione SSID ammessi (separati da punto e virgola) Consenti connessione in roaming @@ -638,7 +645,6 @@ L\'applicazione richiede l\'autorizzazione \"finestra di sistema\" per le notifiche L\'applicazione richiede l\'accesso alla posizione per la scansione bluetooth e l\'identificazione WiFi L\'applicazione richiede l\'accesso alla memoria per memorizzare i file di log ed esportare le impostazioni - L\'applicazione richiede l\'autorizzazione bluetooth Richiesta Apri navigazione Chiudi navigazione @@ -678,6 +684,8 @@ Un trattamento (insulina: %1$.2f, carboidrati: %2$d, a: %3$s) non può essere aggiunto ai trattamenti. Controlla e aggiungi il record necessario. eCarbs: %1$d g (%2$d h), ritardo: %3$d m Nessun dato autosens disponibile + File di log + Miscellanea Impostazioni Log Ripristina valori predefiniti Malfunzionamento NSClient. Considera il riavvio di NS e NSClient. @@ -770,6 +778,11 @@ Inserimento % non valido Media TIR + TIR giorno + TIR notte + Dettaglio 14 giorni + SD: %1$s + HbA1c: Monitor attività Vuoi resettare le statistiche sull\'attività? Statistiche @@ -956,7 +969,7 @@ Max-BG fuori range! Temptarget:\nMin: %1$s\nMax: %2$s\nDurata: %3$s Temptarget:\nTarget: %1$s\nDurata: %2$s - Temptarget:\Motivo: %1$s\nTarget: %2$s\nDurata: %3$s + Temptarget:\nMotivo: %1$s\nTarget: %2$s\nDurata: %3$s QuickWizard: %1$s\nInsulina: %2$.2fU\nCHO: %3$dg Calc. Wizard:\nInsulina: %1$.2fU\nCHO: %2$dg Mostra voce sul dispositivo: @@ -965,9 +978,11 @@ Nessun profilo attivo! Valore COB sconosciuto! Lettura BG mancante o recente riavvio dell\'app? Violazione vincolo CHO! + Calc (IC: %1$.1f, ISF: %2$.1f) CHO: %1$.2fU COB: %1$.0fg %2$.2fU BG: %1$.2fU + IOB: %1$.2fU Superbolo: %1$.2fU Trend di 15\': %1$.2fU Percentuale: %1$.2fU x %2$d%% ≈ %3$.2fU @@ -994,6 +1009,10 @@ %1$d selezionati Ordina Finestra di dialogo cancellata + Molto basso + Basso + Alto + Molto alto Sotto In range Sopra @@ -1001,6 +1020,13 @@ Nascondi record di loop Widget di AndroidAPS Configura opacità + Stato loop + Scala del grafico + Profilo 1 + Profilo 2 + Login + Rimuovi tutto + Avvio reset Codice QR per configurare OTP apri impostazioni imposta allarme timer CHO @@ -1010,8 +1036,12 @@ solo su smartwatch solo su telefono trascina e rilascia + Cerca GlucoRx Aidex GlucoRx Aidex Ricevi valori glicemia da CGM GlucoRx Aidex. + Bloccato dalle opzioni di ricarica + Bloccato dalle opzioni di connettività + (Nessuno smartwatch connesso) diff --git a/app/src/main/res/values-iw-rIL/exam.xml b/app/src/main/res/values-iw-rIL/exam.xml index ef3818b091..3e03a6e498 100644 --- a/app/src/main/res/values-iw-rIL/exam.xml +++ b/app/src/main/res/values-iw-rIL/exam.xml @@ -123,6 +123,7 @@ רישום החלפת צינורית יאפס את היחס של Autosens בחזרה ל-100%. חלק מאפשרויות התוסף כוללות טווחי זמן הניתנים להגדרה ע\"י המשתמש. https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html + https://androidaps.readthedocs.io/en/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens שגיאות רישום פחמימות מה לעשות אם טעיתם ברישום הפחמימות? מחקו את הרשומה השגויה בטיפולים וציינו את ערך הפחמימות הנכון. @@ -135,8 +136,20 @@ השוו את הרשומות שב-AndroidAPS עם היסטוריית המשאבה (אם המשאבה תומכת בכך). מזריקים בולוס על חלק מהאינסולין המחושב \"שחסר\" עם מזרק\\עט או באמצעות תיחול (Prime). לא לעשות דבר ולאפשר ל-AndroidAPS לתקן כל רמת סוכר גבוהה. + פחמ\' פעילות + איך שינויים ביחס התיקון משפיעים על חישוב הפחמימות הפעילות? + הגדלת ערך יחס התיקון תגרום להארכת משך ספיגת הפחמימות + הגדלת ערך יחס התיקון תגרום לקיצור משך ספיגת הפחמימות + הגדלת ערך יחס התיקון לא תשפיע על חישוב ספיגת הפחמימות + איך שינויים ביחס הפחמימות משפיעים על חישוב הפחמימות הפעילות? + הגדלת ערך יחס הפחמימות תגרום להארכת משך ספיגת הפחמימות + הגדלת ערך יחס הפחמימות תגרום לקיצור משך ספיגת הפחמימות + הגדלת ערך יחס הפחמימות לא תשפיע על חישוב ספיגת הפחמימות + איך שינויים באחוזי הפרופיל משפיעים על חישוב הפחמימות הפעילות? + הגדרת 150% פרופיל תגרום להארכת משך ספיגת הפחמימות + הגדרת 150% פרופיל תגרום לקיצור משך ספיגת הפחמימות + הגדרת 150% פרופיל לא תשפיע על חישוב משך ספיגת הפחמימות אינסולין פעיל בגוף (IOB) - סמנו את כל התשובות הנכונות. ערך האינסולין הפעיל (IOB) מושפע ממינונים בזאליים זמניים שסופקו. מינון בזאלי גבוה לא יינתן כאשר רמת הסוכר נמוכה מערך המטרה. אינסולין פעיל שלילי לאורך זמן בו לא נעשית פעילות מצביע על כך שהפרופיל חזק מדי, נדרש פחות אינסולין ויש להגדיר זאת בפרופיל. diff --git a/app/src/main/res/values-iw-rIL/strings.xml b/app/src/main/res/values-iw-rIL/strings.xml index df974a2eec..536056923b 100644 --- a/app/src/main/res/values-iw-rIL/strings.xml +++ b/app/src/main/res/values-iw-rIL/strings.xml @@ -6,6 +6,7 @@ בטיחות טיפולים בולוס מקסימלי מותר [U] מקסימום פחמימות מותר [g] + רמת הסוכר נמוכה מסף ההשהיה עקב סוכר נמוך העדפות %1$s העדפות רענן טיפול מ-Nightscout @@ -432,14 +433,15 @@ אפשר שידורים מקומיים. OpenAPS SMB רגישות דינאמית - כיוונון פקטור הרגישות הדינאמית %% - כיוונון פקטור הרגישות הדינאמית. קבעו יותר מ-100%% לקבלת תיקונים אגרסיביים יותר ופחות מ-100%% לקבלת תיקונים עדינים יותר. + כיוונון פקטור הרגישות הדינאמית % + כיוונון פקטור הרגישות הדינאמית. הגדירו יותר מ-100% לקבלת תיקונים אגרסיביים יותר ופחות מ-100% לקבלת תיקונים עדינים יותר. הפעלת UAM אפשר SMB השתמש בסופר מיקרו בולוסים במקום בבזאלי זמני לפעילות מהירה יותר זיהוי של ארוחות לא מוכרזות שעת שיא של עקומת IOB זמן שיא [min] + שיא Oref שיא חופשי Oref אינסולין מהיר Oref אינסולין אולטרה מהיר @@ -591,6 +593,7 @@ ב-OpenAPS ערך זה נקרא מקסימום אינסולין פעיל (maxIOB). \nלא יוזרק עוד אינסולין אם כמות האינסולין הפעיל הנוכחי גדול מערך זה זמן ספיגה מקסימלי של הארוחה [h] משך זמן בו כל ארוחה תחשב כנספגה. לא תהיה התחשבות בפחמימות שנותרו. + ערך הסוכר שמתחתיו מושעה הזרקת אינסולין. ערך ברירת המחדל משתמש במודל מטרה סטנדרטי. המשתמש יכול להגדיר ערך בין 60 ל-100 מג\"\\ד\"ל. ערכים מתחת ל-65 מביאים לשימוש במודל ברירת המחדל הצגת שדות הערות בתיבות דו-שיח של טיפול הבא הקודם @@ -603,7 +606,11 @@ תוספת פחמימות שניה תוספת פחמימות שלישית סנסור + השתמש באינטרנט סלולרי + השתמש בחיבור WiFi WiFi SSID + בזמן טעינה + משתמש בסוללה הגדרות חיבור SSID מורשים (מופרדים בנקודה-פסיק) אפשר חיבור בנדידה @@ -638,7 +645,6 @@ האפליקציה צריכה הרשאת מערכת של חלונות לצורך התראות דרושה הרשאת מיקום עבור סריקת בלוטות\' וזיהוי WiFi דרושה הרשאת אחסון כדי שתוכלו לאחסן קובצי יומן והגדרות יצוא. - האפליקציה צריכה הרשאה לבלוטות\' בקשה פתח ניווט סגור ניווט @@ -770,6 +776,11 @@ רשומת אחוזים לא חוקית ממוצע זמן בטווח + זמן בטווח ביום + זמן בטווח בלילה + פירוט 14 יום + סטיית תקן: %1$s + HbA1c: מוניטור פעילות האם ברצונכם לאפס את הסטטיסטיקות הפעילות? סטטיסטיקה @@ -880,6 +891,8 @@ קבלת החלפות פרופיל שהוגדרו בנייטסקאוט או ב-NSClient אחזר אירועים לא מקוונים קבל אירועים לא מקוונים שנרשמו דרך נייטסקאוט או NSClient + קבל מינון בזאלי זמני ובולוס מושהה + קבל מינוני בזאלי זמני ובולוסים מושהים שהופעלו ממכשיר עוקב קבלת אינסולין קבלת אינסולין שהוזן באמצעות נייטסקאוט או NSClient (הוא לא מוזרק, רק מחושב רק כאינסולין פעיל) קבלת פחמימות @@ -946,12 +959,34 @@ ערכת נושא בהירה השתמש בערכת הנושא של המכשיר + מבטל ערך מטרה זמני נוכחי + יחידות המידה שונות בין הטלפון והשעון! + ערך הסוכר המינימלי מחוץ לטווח! + ערך הסוכר המקסימלי מחוץ לטווח! + ע\' מטרה זמני:\nמינ\': %1$s\nמקס\': %2$s\nמשך: %3$s + ע\' מטרה זמני:\nמטרה: %1$s\n משך: %2$s + ע\' מטרה זמני:\nסיבה: %1$s\nמטרה: %2$s\nמשך: %3$s + אשף מהיר: %1$s\n אינס\': %2$.2f יח\'\nפחמ\': %3$d גר\' + מחשבון: %1$s\n אינס\': %2$.2f יח\'\nפחמ\': %3$d גר\' + הצג רשומה על המכשיר: + האשף המהיר שנבחר אינו זמין, נא לרענן את האריח + אין נתוני סוכר לביסוס חישוב! + לא הופעל פרופיל! + הפחמימות הפעילות לא ידועות! חסרות קריאות סוכר או שאותחל היישום לאחרונה? הפרת מגבלות פחמימה! + מחשבון (IC: %1$.1f, ISF: %2$.1f) פחמ\': %1$.2f יח\' פחמ\': %1$.0f גר\' %2$.2f יח\' סוכר: %1$.2f יח\' + אינ\' פעיל: %1$.2f יח\' סופר בולוס: %1$.2f יח\' מגמת 15 דק\': %1$.2f יח\' + אחוזים: %1$.2f יח\' x %2$d%% ≈ %3$.2f יח\' + הופעלה מגבלת אינסולין!\nלא ניתן להזריק %1$.2f יח\' + ע\' מטרה זמני: %1$s + %1$s ל-%2$s + המשאבה אינה זמינה! + פקודה לא ידועה: אחוזים ברירת המחדל של היישום הצג רשומות מבוטלות\\מחוקות @@ -970,6 +1005,10 @@ %1$d נבחרו מיין דו-שיח בוטל + נמוך מאוד + נמוך + גבוה + גבוה מאוד מתחת בטווח מעל @@ -977,14 +1016,28 @@ החבא רשומות לולאה ווידג\'ט AndroidAPS הגדרת אטימות + סטטוס הלולאה קנה מידה של הגרף + פרופיל 1 + פרופיל 2 + התחברות + הסר הכל + אתחל התחלה + ברקוד QR ליצירת סיסמה חד פעמית + פתח הגדרות + הגדרת אזעקה טיימר פחמימות + הכול טלפון שעון על השעון בלבד על הטלפון בלבד ידית גרירה + חיפוש GlucoRx Aidex Aidex קבלת נתוני סוכר מחיישני GlucoRx Aidex. + חסום ע\"י הגדרות טעינה + חסום ע\"י הגדרות חיבור + (השעון לא מחובר) diff --git a/app/src/main/res/values-ko-rKR/exam.xml b/app/src/main/res/values-ko-rKR/exam.xml index 8aaf183241..89ae40d8dc 100644 --- a/app/src/main/res/values-ko-rKR/exam.xml +++ b/app/src/main/res/values-ko-rKR/exam.xml @@ -134,7 +134,6 @@ \"주입되지 않은\" 인슐린양을 계산하여 시린지/펜 또는 prime 기능을 사용하여 인슐린을 주입합니다. 특별한 조치를 취하지 않고, AndroidAPS가 결과적으로 높은 혈당 정도를 조정할 수 있도록 합니다. 활성 인슐린 (IOB) - 올바른 답변을 모두 체크하세요. IOB 값은 실행된 임시 basal의 영향을 받습니다. 혈당이 목표보다 낮을 경우 높은 임시 basal은 실행되지 않습니다. 운동 없이도 음수의 IOB (마이너스 IOB) 구간이 많을 경우, 프로파일이 너무 강한 것이며 인슐린 양을 적게 설정해야 합니다. diff --git a/app/src/main/res/values-lt-rLT/exam.xml b/app/src/main/res/values-lt-rLT/exam.xml index 9e5bb2cb09..dc3d8612f4 100644 --- a/app/src/main/res/values-lt-rLT/exam.xml +++ b/app/src/main/res/values-lt-rLT/exam.xml @@ -134,7 +134,6 @@ Susileisti trūkstamą insulino kiekį švirkštu ar naudojantis infuzinės sistemos užpildymo funkcija. Nieko nedaryti ir leisti AndroidAPS koreguoti padidėjusį gliukozės kiekį kraujyje. Aktyvus insulinas organizme (AIO) - Pasirinkite visus teisingus atsakymus. AIO reikšmei įtakos turi nustatyta laikina valandinė bazė. Padidinta laikina bazė nebus nustatyta, jei kraujo glikemija yra žemiau nustatyto tikslo. Jei ilgą laiką stebima neigiama AIO reikšmė ir nėra fizinio aktyvumo, tai rodo, kad jūsų nustatymai yra per „agresyvūs“ ir kad jums reikia mažiau insulino nei nustatyta. diff --git a/app/src/main/res/values-lt-rLT/strings.xml b/app/src/main/res/values-lt-rLT/strings.xml index 211286d69f..dcf41407e5 100644 --- a/app/src/main/res/values-lt-rLT/strings.xml +++ b/app/src/main/res/values-lt-rLT/strings.xml @@ -631,7 +631,6 @@ Norint gauti pranešimus, programai reikalingas sisteminio lango leidimas Programai reikia vietos nustatymo leidimo, kad būtų galima naudoti Bluetooth ir WiFi Aplikacijai reikia leidimo prieigai prie saugyklos, kad galėtų išsaugoti žurnalo įrašus ir eksportavimo nustatymus - Programai reikalinga Bluetooth prieigos teisė Užklausa Atidaryti meniu Uždaryti meniu @@ -894,6 +893,7 @@ Negalimas + Rūšiuoti Prisijungti diff --git a/app/src/main/res/values-nl-rNL/exam.xml b/app/src/main/res/values-nl-rNL/exam.xml index 8e8c00900e..e871ace199 100644 --- a/app/src/main/res/values-nl-rNL/exam.xml +++ b/app/src/main/res/values-nl-rNL/exam.xml @@ -123,6 +123,7 @@ Het vastleggen van een canulewissel zet de Autosens-ratio terug naar 100%. Sommige van de plugins hebben configureerbare tijdbereiken die kunnen worden ingesteld door de gebruiker. https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Configuration/Sensitivity-detection-and-COB.html + https://androidaps.readthedocs.io/nl/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens Koolhydraatinvoerfouten Wat moet u doen als u een onjuiste hoeveelheid koolhydraten hebt ingevoerd? Verwijder het onjuiste record in Behandelingen en voer de juiste koolhydraten opnieuw in. @@ -136,7 +137,6 @@ Bolus een deel van je berekende \'gemiste\' insuline door een injectiespuit/pen of door de uitvulfunctie te gebruiken. Doe niets en laat AndroidAPS de resulterende hoge bloedglucosespiegel corrigeren. Insuline aan boord (IOB) - Selecteer alle juiste antwoorden. De IOB-waarde wordt beïnvloed door eerdere tijdelijke basaalstanden. Een hoge tijdelijke basaal zal niet worden ingesteld wanneer je bloedsuiker onder het streefdoel ligt. Negatieve IOB voor een aanzienlijke periode vrij van inspanning, suggereert dat je profiel te hoog is ingesteld, dus dat er minder insuline nodig is. diff --git a/app/src/main/res/values-nl-rNL/strings.xml b/app/src/main/res/values-nl-rNL/strings.xml index dc28fa97db..d9a282aaf0 100644 --- a/app/src/main/res/values-nl-rNL/strings.xml +++ b/app/src/main/res/values-nl-rNL/strings.xml @@ -6,6 +6,7 @@ Behandelingen veiligheid Max toegestane bolus [E] Max toegestane koolhydraten [g] + BG niveau waarbij lage glucose onderbreking wordt geactiveerd %1$s Instellingen Instellingen Haal behandelingen op van NS @@ -432,8 +433,8 @@ Activeer locaal delen. OpenAPS SMB Dynamische ISF - Dynamische ISF aanpassingsfactor %% - Aanpassingsfactor voor Dynamische ISF. Stel meer dan 100%% in voor een agressievere correctie dosis en minder dan 100%% voor minder agressieve correcties. + Dynamische Isf aanpassingsfactor % + Aanpassingsfactor voor DynamicISF. Stel meer dan 100% in voor een agressievere correctie en minder dan 100% voor minder agressieve correctie. Activeer UAM Activeer SMB SMB in plaats van tijdelijke basalen voor snellere reactie @@ -592,6 +593,7 @@ Deze waarde heet MAX IOB in OpenAPS context\nOpenAPS zal geen extra insuline toedienen als de actuele IOB onderstaande waarde overschreden heeft Maximum maaltijd absorptie tijd [uur] Tijdspanne waarbinnen elke maaltijd volledig is opgenomen. Resterende KH worden niet mee gerekend. + BG waarde waarbij insuline afgifte wordt onderbroken. De standaard waarde gebruikt het standaard doelmodel. Gebruiker kan waarde instellen tussen 60 mg/dl (3.3 mmol/l) en 100mg/dl(5.6mmol/l). Waarden lager dan 65/3.6 resulteren in gebruik van het standaard model Toon notities veld in behandeling dialoogvensters Volgende Vorige @@ -604,7 +606,11 @@ Tweede koolhydraten increment Derde koolhydraten increment CGM + Mobiele verbinding gebruiken + Gebruik WiFi verbinding WiFi SSID + Tijdens opladen + Op batterij Verbindings instellingen Toegelaten SSIDs (gescheiden door puntkomma) Sta verbinding tijdens roaming toe @@ -639,7 +645,6 @@ Toepassing vereist systeemvenstermachtiging voor meldingen App heeft locatie toestemming nodig voor Bluetooth scan en WiFi identificatie Applicatie heeft toestemming nodig om log bestanden op te slaan en instellingen te exporteren - Applicatie heeft Bluetooth toestemming nodig Verzoek Open navigatie Sluit navigatie @@ -679,6 +684,8 @@ Een Behandeling (insuline: %1$.2f, koolhydraten: %2$d, in: %3$s) niet konden worden toegevoegd aan Behandelingen. Gelieve te controleren en handmatig een record toe te voegen indien nodig. eCarbs: %1$d g (%2$d h), vertraging: %3$d m Geen autosens-gegevens beschikbaar + Logbestanden + Overige Log instellingen Terug naar standaardinstellingen NSClient werkt niet goed. Overweg een herstart van NS en NSClient. @@ -771,6 +778,11 @@ Ongeldig % invoer Gemiddelde TIR + TIR overdag + TIR s\'nachts + 14 dagen details + SD: %1$s + HbA1c: Activiteitsmonitor Wil je de activiteitenstatistieken resetten? Statistieken @@ -957,7 +969,7 @@ Max BG buiten bereik! Tijdelijk streefdoel:\nMin: %1$s\nMax: %2$s\nDuur: %3$s Tijdelijk streefdoel:\nDoel: %1$s\nDuur: %2$s - Tijdelijk streefdoel:\Reden: %1$s\nDoel: %2$s\nDuur: %3$s + Tijdelijk streefdoel:\nReden: %1$s\nDoel: %2$s\nDuur: %3$s QuickWizard: %1$s\nInsuline: %2$.2fE\nKoolhy.: %3$dg Reken. Wizard:\nInsuline: %1$.2fE\nKoolhy.: %2$dg Toon invoer op apparaat: @@ -997,6 +1009,10 @@ %1$d geselecteerd Sorteren Dialoog geannuleerd + Zeer laag + Laag + Hoog + Zeer hoog Onder Binnen bereik Boven @@ -1004,6 +1020,7 @@ Verberg loop records AndroidAPS widget Configureer transparantie + Loop status Grafiek schaal Profiel 1 Profiel 2 @@ -1023,4 +1040,6 @@ GlucoRx Aidex Aidex Ontvang BG waarden van GlucoRx Aidex CGMS. + Geblokkeerd door oplaad instellingen + Geblokkeerd door verbindings instellingen diff --git a/app/src/main/res/values-no-rNO/exam.xml b/app/src/main/res/values-no-rNO/exam.xml index 087dc7d9be..d2de2e7b0f 100644 --- a/app/src/main/res/values-no-rNO/exam.xml +++ b/app/src/main/res/values-no-rNO/exam.xml @@ -136,8 +136,20 @@ Sammenlign verdiene i AndroidAPS og pumpehistorikken (hvis pumpen støtter dette). Gi en bolus med en del av det insulinet du mangler enten med penn eller ved å bruke prime funksjonen. Ikke gjør noe og la AndroidAPS korrigere eventuelle høye blodsukkerverdier. + Karbohydrater ombord (COB) + Hvordan vil endring av ISF-verdi påvirke COB-beregning? + Økning av ISF gjør at karbohydrater absorberes over lengre tid + Økning av ISF gjør at karbohydrater absorberes over kortere tid + Økning av ISF påvirker ikke beregningen av absorbering av karbohydrater + Hvordan vil endring av IC-verdi påvirke COB-beregning? + Økning av IC gjør at karbohydrater absorberes over lengre tid + Økning av IC gjør at karbohydrater absorberes over kortere tid + Økning av IC påvirker ikke beregningen av absorbering av karbohydrater + Hvordan vil endring av profil-prosent påvirke COB-beregning? + Ved å sette profilen til 150% vil karbohydrater absorberes over lengre tid + Ved å sette profilen til 150% vil karbohydrater absorberes over kortere tid + Ved å sette profilen til 150% påvirkes ikke beregningen av absorbering av karbohydrater Aktivt insulin (IOB) - Marker alle riktige svar. IOB verdi påvirkes av midlertidige temp basaler. Høy temp basal vil ikke bli gitt når ditt blodsukker er under målverdi. Negativ IOB i en lengre periode selv om du ikke trener tyder på at profilen din gir for mye insulin og kanskje bør reduseres i innstillingene. diff --git a/app/src/main/res/values-no-rNO/strings.xml b/app/src/main/res/values-no-rNO/strings.xml index 7e12b4f62e..33056310d2 100644 --- a/app/src/main/res/values-no-rNO/strings.xml +++ b/app/src/main/res/values-no-rNO/strings.xml @@ -6,7 +6,8 @@ Sikkerhet ved behandlinger Maks tillat bolus [U] Maks tillat karbo [g] - %1$s innstillinger + Insulintilførsel stoppes når BS er under denne terskelverdien + %1$s Innstillinger Innstillinger Oppdater behandlinger fra NS Nullstill databasene @@ -14,12 +15,12 @@ Avslutt Det ser ikke ut som mobilen støtter registrering av apper som unntas fra batterioptimalisering - du kan oppleve ytelsesproblemer. Knapper for rask tilgang til ofte brukte funksjoner - Brukt for innstilling av aktive plugin + Brukes for innstilling av aktive plugins Opplæringsprogram - Viser forhåndsinnstillinger for mat som er definert i Nightscout - Innstillinger for Humalog og NovoRapid / NovoLog insulin + Viser forhåndsinnstillinger for mat fra Nightscout + Innstillinger for Humalog og NovoRapid / NovoLog Innstillinger for Fiasp - Insulin innstillinger for Lyumjev + Innstillinger for Lyumjev Lar deg stille inn tidspunktet for toppen av insulinvirkningen. Bør bare benyttes av erfarne brukere Aktiver eller deaktiver hendelsen som trigger loop. Synkroniserer dine data med Nightscout @@ -31,17 +32,17 @@ Definer en profil som er tilgjengelig offline. Integrasjon mot pumper som ikke støttes av AndroidAPS (åpen loop) Sensitiviteten beregnes på samme måte som i Oref0, men du kan angi hvor mye av historikken som skal tas med i beregningen. Minimum opptak av karbohydrater beregnes ut fra maks karbohydratopptak angitt i dine innstillinger. - Sensitivitet beregnes fra 8t og 24t historiske dat (velger alltid det resultatet som gir høyest insulinsensitivitet. Karbohydrater som ikke er absorbert blir avsluttet etter tiden som er angitt i innstillinger. Plugin beregner også UAM. + Sensitivitet beregnes fra 8t og 24t historiske data (velger alltid det resultatet som gir høyest insulinsensitivitet). Karbohydrater (som ikke er absorbert) blir avsluttet etter tiden som er angitt i innstillinger. Plugin beregner også UAM. Sensitivitet beregnes som en vektet gjennomsnittsverdi av avvikene. Ferske avvik har høyere vekting. Minimum opptak av karbohydrater beregnes ut fra maks opptakstid for karbohydrater angitt i dine innstillinger. Denne algoritmen er den raskeste for å justere endringer i sensitivitet. - Motta BS verdier fra den modifiserte Eversense appen. - Motta BS verdier fra Glimp. - Motta BS verdier fra 600SeriesAndroidUploader. - Last ned BS verdier fra Nightscout - Motta BS verdier fra xDrip+. + Motta BS-verdier fra den modifiserte Eversense-appen. + Motta BS-verdier fra Glimp. + Motta BS-verdier fra 600SeriesAndroidUploader. + Last ned BS-verdier fra Nightscout + Motta BS-verdier fra xDrip+. Lagre data om alle behandlinger som er utført - Monitorer og kontroller AndroidAPS med din WearOS klokke. + Overvåke og styre AndroidAPS med din WearOS-klokke. Vis informasjon om loop på din xDrip+ urskive. - Fjernstyr AndroidAPS med SMS kommandoer. + Fjernstyre AndroidAPS med SMS-kommandoer. Insulin: Karbo: IOB: @@ -69,7 +70,7 @@ Måltidsdata Resultat Resultat: %1$s %2$s - Ingen BS data tilgjengelig + Ingen BS-data tilgjengelig Forespørsel Delta Delta: @@ -82,7 +83,7 @@ Profil Hvilken profil bør AndroidAPS bruke? APS - Hvilken APS algoritme skal brukes for administrasjon av behandlinger? + Hvilken algoritme skal APS benytte for behandlinger? Generelt Det er noen generelle plugins som kan være nyttige. Hvilke begrensninger brukes? @@ -91,12 +92,12 @@ Bruk dette for å aktivere AndroidAPS loop integrasjon. APS Etter behandling av begrensninger - Temp Basal satt av pumpen + Temp basal satt av pumpen INGEN APS ER VALGT ELLER HAR LEVERT RESULTAT Sikkerhet Plugin er deaktivert Brudd på begrensninger - Er registrert en feil med bolus leveransen. Sjekk manuelt om den er levert og hvor mye! + Det er registrert en feil med bolus-leveransen. Sjekk manuelt om den er levert og hvor mye Aksepter ny temp basal: Behandling Kalkulator @@ -104,24 +105,24 @@ Bolus: Basal: Endre dine inndata! - BS kilde + BS-kilde Hvor skal AndroidAPS hente sine data fra? xDrip+ APS modus - Lukket loop - Åpen loop - Stopp hvis lavt BS + Lukket Loop + Åpen Loop + Stopp ved lavt BS Loop er deaktivert Ny anbefaling tilgjengelig Karbo forslag Versjonen av Nightscout støttes ikke Basal IOB - Bolus begrensning utført - Karbohydrat begrensning utført + Bolus-begrensning utført + Karbohydrat-begrensning utført Annet Meter Sensor - Karbo tid + Karbo-tid Varighet Profil Glukosetype @@ -129,7 +130,7 @@ Forlenget bolus Nightscout versjon: Mangler %1$d g - Innstillinger lagret + Innstillinger er eksportert Brukeroppføringer er eksportert Eksporter innstillinger til Importer innstillinger fra @@ -162,27 +163,27 @@ JEG FORSTÅR OG GODTAR Lagre Les inn profil på nytt - SMS tjeneste + SMS-tjeneste Godkjente mobilnumre +XXXXXXXXXX;+YYYYYYYYYY For å levere bolus på %1$.2fE, svar med kode %2$s For å levere måltidsbolus på %1$.2fE, svar med kode %2$s For å sette Temp Target på %1$s, svar med kode %2$s For å avbryte Temp Target, svar med kode %1$s - For å deaktivere fjernstyring via SMS meldinger, svar med kode %1$s.\n\nHusk at du vil kunne reaktivere den igjen kun fra AAPS master telefon. - Fjernstyring via SMS meldinger er stanset. For å reaktivere, bruk AAPS på master telefonen. + For å deaktivere fjernstyring via SMS-meldinger, svar med kode %1$s.\n\nHusk at du vil kunne reaktivere den igjen kun fra AAPS hovedtelefon. + Fjernstyring via SMS-meldinger er stanset. For å reaktivere, bruk AAPS på hovedtelefonen. For å sende kalibrering %1$.2f, svar med kode %2$s Bolus mislyktes Minimum antall minutter som må forløpe mellom en fjernstyrt bolus og den neste Minimum antall minutter mellom en fjernstyrt bolus og neste - For din egen sikkerhet, for å endre denne innstillingen må du legge til minst 2 telefonnumre. + For din egen sikkerhet, må du legge til minst 2 telefonnumre for å endre denne innstillingen. Skal levere %1$.2f E - Bolus %1$.2f E levert vellykket - Måltidsbolus %1$.2f E levert vellykket - Temp target på %1$s er satt for %2$d minutter - Temp target på %1$s for %2$d minutter ble vellykket definert - Temp Target ble vellykket avbrutt - Tillat fjernstyring via SMS meldinger + Bolus på %1$.2f E er levert + Måltidsbolus på %1$.2f E er levert + Temp target på %1$s er satt i %2$d minutter + Temp target på %1$s i %2$d minutter ble lagret + Temp Target ble fjernet + Tillat fjernstyring via SMS-meldinger Loop har blitt deaktivert Loop har blitt aktivert Loop er aktivert @@ -192,7 +193,7 @@ Pumpe frakoblet Pumpen tilkoblet igjen Fjernstyringskommando er ikke tillatt - Fjernstyrings bolus er ikke tilgjengelig. Prøv igjen senere. + Fjernstyringsbolus er ikke tilgjengelig. Prøv igjen senere. For å starte basal %1$.2f E/t i %2$d minutter, svar med kode %3$s For å bytte profil til %1$s %2$d%%, svar med kode %3$s For å starte forlenget bolus %1$.2f E i %2$d minutter, svar med kode %3$s @@ -226,9 +227,9 @@ Måltid Korreksjon Handlinger - (FARLIG Å DEAKTIVERE) Kun NS opplast + (FARLIG Å DEAKTIVERE) Kun NS opplasting Kun NS opplasting (deaktivert sync). Ikke effektiv på SGV med mindre en lokal kilde som xDrip+ er valgt. Ikke effektiv på Profiler mens NS-Profiler brukes.\n!!! ADVARSEL !!! Deaktivering av dette alternativet kan føre til funksjonsfeil og overdosering av insulin hvis noen av dine komponenter (AAPS, NS, xDrip+) er feil konfigurert. Observer at data som vises i AAPS samsvarer med pumpestatus! - Pumpen ikke initialisert! + Pumpen er ikke startet! Prime/fylling Kontroller at mengden samsvarer med spesifikasjonen for slangesettet ditt! Standardverdier for påfyll/prime @@ -245,8 +246,8 @@ Klokke Send alle data på nytt Åpne Innstillinger på klokken - Basal rate - Basal verdi under minimum. Profilen settes ikke! + Basalrate + Basalverdi under minimum. Profilen settes ikke! BS: Siste BS: MM640G @@ -256,11 +257,11 @@ Profil OpenAPS AMA Liste med %1$d elementer.\nFaktisk verdi: - Autosens data + Autosens-data Script feilsøking Bruk Autosens funksjon Gjenoppfrisk fra NS - Slett behandlinger i fremtiden + Slett fremtidige behandlinger ACT KONF LOOP @@ -281,12 +282,12 @@ Standardverdi: 4 Dette er en viktig OpenAPS sikkerhetsbegrensning. Dette begrenser dine temp basal til max 4 ganger din nåværende basal dose, uansett hva som er maks basal i pumpen. Dette er for å unngå at man setter farlige høye maks basal doser uten at man har forstått algoritmene. Når du taket i denne begrensningen bør du i stedet fokusere på å endre andre innstillinger. Standardverdi: 1.2\nDetta er en multiplikatorbegrensning for autosens (og snart autotune) som begrenser at autosens ikke kan øke med mer enn 20%%, som dermed begrenser hvor mye autosens kan justere opp dine basaler, hvor mye ISK kan reduseres og hvor lavt BS målverdi kan settes. Standardverdi: 0.7\nDette er en multiplikatorbegrensning for autosens sikkerhet. Den begrenser autosens til å redusere basalverdier, og øke isulinssensitivitet (ISF) og BS mål med ikke mer enn enn 30%. - Autosens justerer også BS målverdier - Standard verdi: sann\nGir autosens tillatelse til å justere BS mål, i tillegg til ISF og basaler. - Standard verdi: 2\nBolus snooze er aktivt etter at du har gitt en måltidsbolus slik at loop ikke skal forsøke å sette lav-temp når du nettopp har spist. I dette eksempelet brukesg standardverdi på 2, så med en 3 timers DIA vil bolus snooze begrensning gradvis forsvinne etter 1.5 timer (3DIA / 2). Bolus snooze brukes ikke hvis SMB er aktivert. - Standardverdi er: 3.0 (AMA) eller 8.0 (SMB). Dette er grunninnstillingen for KH opptak per 5 minutt. Den påvirker hvor raskt COB skal reduseres, og benyttes i beregning av fremtidig BS kurve når BS enten synker eller øker mer enn forventet. Standardverdi er 3mg/dl/5 min. + Autosens justerer også BS-målverdier + Standard verdi: sann\nGir autosens tillatelse til å justere BS-mål, i tillegg til ISF og basaler. + Standard verdi: 2\nBolus-snooze er aktivt etter at du har gitt en måltidsbolus slik at loop ikke skal forsøke å sette lav-temp når du nettopp har spist. I dette eksempelet brukes standardverdi på 2, så med en 3 timers DIA vil bolus-snoozebegrensning gradvis forsvinne etter 1.5 timer (3DIA / 2). Bolus-snooze brukes ikke hvis SMB er aktivert. + Standardverdi er: 3.0 (AMA) eller 8.0 (SMB). Dette er grunninnstillingen for KH-opptak per 5 minutt. Den påvirker hvor raskt COB skal reduseres, og benyttes i beregning av fremtidig BS-kurve når BS enten synker eller øker mer enn forventet. Standardverdi er 3mg/dl/5 min. Advarsel!\nNormalt vil du ikke trenge å endre verdiene under. Vennligst TRYKK HER og LES teksten for å være sikker på at du FORSTÅR konsekvensene før du gjør endringer. - Ugyldig SMS mobilnummer + Ugyldig mobilnummer for SMS Kalibrering xDrip+ ikke installert Kalibrering er sendt til xDrip+ @@ -294,7 +295,7 @@ xDrip+ tar ikke imot kalibreringer Pumpen er pauset Utfører - Virtuelle pumpe innstillinger + Innstillinger for virtuell pumpe Last opp status til Nightscout NSClient NSCI @@ -304,40 +305,40 @@ NSClient Nightscout URL Oppgi din Nightscout URL - Nightscout API secret - Nightscout API secret - Oppgi NS API secret (min 12 tegn) + Nightscout API-nøkkel + Nightscout API-nøkkel + Oppgi NS API-nøkkel (min 12 tegn) Lever nå Tøm kø Vis kø Kø: Status: Tøm logg - NSCLIENT har ingen skriverettighet. Feil API secret? - Klokke innstillinger + NSCLIENT har ingen skriverettighet. Feil API-nøkkel? + Klokkeinnstillinger Vis detaljert IOB - Vis IOB med bolus och basal IOB på klokke - mislykket - sjekk telefonen + Splitt IOB til bolus- og basal-IOB på klokken + feilet - sjekk telefonen n/a - Pasient type + Pasienttype Barn Tenåring Voksen - Insulin resistent voksen + Insulinresistent voksen Graviditet - Velg pasientens type for oppsett av sikkerhetsgrenser - Pasientens navn + Velg pasienttype for oppsett av sikkerhetsgrenser + Pasientnavn Angi pasientnavn eller kallenavn for å kunne skille mellom flere oppsett Bruker Glimp - %1$s behøver å omgå batterispare funksjonene for å fungere tilfredsstillende + %1$s behøver å omgå batterisparefunksjonene for å fungere tilfredsstillende Loop pauset Pauset (%1$d m) Pause loop i 1t Pause loop i 2t Pause loop i 3t Pause loop i 10t - Frakoble pumpe + Koble fra pumpen Koble fra pumpen i 15 min Koble fra pumpen i 30 min Koble fra pumpen i 1t @@ -350,36 +351,36 @@ 3 timer 10 timer Gjenoppta - Tilkoble pumpen + Koble til pumpen Feil varighet Loop er pauset Loop gjenopptatt 15 min trend COB Superbolus - Logg app start til NS - Avslutter appen for at innstillinger skal tas i bruk. + Logg app-start til NS + Avslutter appen for å aktivere innstillinger. Hvilken type insulin bruker du? Novorapid, Novolog, Humalog Fiasp INS Aktiver superbolus i veiviser - Aktiver superbolus funksjonen i wizard. Ikke aktiver denne før du vet hvordan den fungerer. DEN KAN LEDE TIL EN OVERDOSERING AV INSULIN HVIS DEN BRUKES BLINDT! - Vis statusindikatorer på hjem skjermen - OBS: alder slangesett [h] - Advarsel: alder slangesett [h] - OBS: alder insulin [h] - Advarsel: alder insulin [h] - OBS: alder CGM [h] - Advarsel: alder CGM [h] - Nivå for når batterivarsel skal gis [%] - Nivå for når kritisk batteriadvarsel skal gis [%] - Nivå for når batterivarsel for pumpe skal gis [h] - Nivå for når kritisk batteriadvarsel for pumpe skal gis [h] - OBS: nivå insulinreservoar [U] - Advarsel: nivå insulinreservoar [U] - Nivå for når batterivarsel for pumpe skal gis [%] - Nivå for når kritisk batteriadvarsel for pumpe skal gis [%] + Aktiver superbolus-funksjonen i veiviseren. Ikke aktiver denne før du vet hvordan den fungerer. DEN KAN LEDE TIL EN OVERDOSERING AV INSULIN HVIS DEN BRUKES BLINDT! + Vis statusindikatorer på hjem-skjermen + Terskel for advarsel, alder på slangesett [h] + Terskel for kritisk alder på slangesett [h] + Terskel for advarsel, alder på insulin [h] + Terskel for kritisk alder på insulin [h] + Terskel for advarsel, alder på CGM [h] + Terskel for kritisk alder på CGM [h] + Terskel for advarsel, batterinivå for sensor [%] + Terskel for kritisk batterinivå for sensor [%] + Terskel for advarsel, batterialder for pumpe [h] + Terskel for kritisk batterialder for pumpe [h] + Terskel for advarsel, insulinreservoar [U] + Terskel for kritisk insulinreservoar [U] + Terskel for advarsel, batterinivå for pumpe [%] + Terskel for kritisk batterinivå for pumpe [%] PROGN BAS DEV @@ -388,8 +389,8 @@ ABS DEVSLOPE Om - Mangler SMS tillatelse - Mangler app tillatelse til telefon + Mangler SMS-tillatelse + Appen mangler tilgang til telefonstatus xDrip+ Status (klokke) xDrip+ Statuslinje (klokke) xds @@ -399,47 +400,47 @@ Gjør profilbytte Sensor Insulin - Pumpe batteri + Pumpebatteri alder: nivå: - Alarm valg - Opprett varsler fra NS alarmer - Opprett varsler fra NS meldinger - Ingen data advarsel [min] - Kritisk mangel på data advarsel [min] + Alarmvalg + Opprett varsler fra NS-alarmer + Opprett varsler fra NS-meldinger + Advarsel ved manglende data [min] + Advarsel ved kritisk mangel på data [min] Intervall for autosens [h] Antall timer med historiske data for beregning av sensitivitet (absorpsjonstid for KH er ekskludert) OpenAPS Opplaster - Sensitivitets deteksjon + Sensitivitetsdeteksjon Hvilken sensitivitetsalgoritme skal benyttes? SENS Sensitivitet Oref1 Sensitivitet AAPS - Absorpsjon innstillinger + Absorpsjonsinnstillinger Maks absorpsjonstid for måltid [h] Tid i timer hvor det forventes at alle karbohydrater fra måltid vil være absorbert OAPS UPLD BAS Hold skjermen påslått - Forhindre Android å slå av skjermen. Mobil vil bruke mye batteri hvis den ikke plugges til strømledning. - Hvis du slår på Autosense funksjonen må du huske å angi alle spiste karbohydrater. Ellers vil KH avvik gi feil i sensitivitetsberegningen !! + Forhindre Android fra å slå av skjermen. Mobilen vil bruke mye batteri hvis den ikke plugges til strømledning. + Hvis du slår på Autosense-funksjonen må du huske å angi alle spiste karbohydrater. Ellers vil KH-avvik gi feil i sensitivitetsberegningen !! Sensitivitet vektet middelverdi Ikke alle profiler ble lastet! Verdier ikke lagret! - Aktiver kringkasting til andre apper (som xDrip+). Ikke aktiver dette hvis du har mer enn en AAPS eller NSClient installert! - Aktiver lokale sendinger. + Aktiver kringkasting til andre apper (som xDrip+). Ikke aktiver dette hvis du har mer enn én AAPS eller NSClient installert! + Aktiver deling av data mellom apper på telefonen. OpenAPS SMB Dynamisk ISF - DynamiskISF justeringsfaktor %% - Justeringsfaktor for dynamisk ISF. Verdier over 100%% vil gi mer aggressive korreksjonsdoser, mens verdier under 100%% vil gi mildere korreksjonsdoser. + DynamiskISF justeringsfaktor % + Justeringsfaktor for dynamisk ISF. Verdier over 100% vil gi mer aggressive korreksjonsdoser, mens verdier under 100% vil gi mildere korreksjonsdoser. Aktiver UAM Aktiver SMB - Bruk Super Mikro Solen i stedet for temp basal for raskere resultat - Oppdaget uannonsert måltid (UAM) - IOB kurvens topp tid - Topp tid [min] + Bruk Super Mikro Bolus i stedet for temp basal for raskere resultat + Oppdag uannonsert måltid (UAM) + IOB-kurvens topptid + Topptid [min] Topp Free-Peak Oref Rapid-Acting Oref @@ -451,10 +452,10 @@ Prosent Tidsforskyving Standard temp mål - spise snart varighet - spise snart målverdi - aktivitet varighet - aktivitet målverdi + spise snart-varighet + spise snart-målverdi + varighet for aktivitet + målverdi ved aktivitet hypo varighet hypo målverdi Gjenbruk %1$d%% %2$dt @@ -468,52 +469,52 @@ Pr Fett Kommandoen utføres akkurat nå - Mangler BS målinger + Mangler BS-målinger Bruk systemvarslinger for alarmer og varslinger Øk volumet gradvis for alarmer og varsler Lokale varsler - Varsel hvis ingen BS data mottas + Varsel hvis ingen BS-data mottas Varsel hvis pumpen er utilgjengelig Pumpen er ikke tilgjengelig etter [min] Varsel hvis karbohydrater må tilføres Kritisk alarm INFO Eversense App (patched) - Last opp BS data til NS - BS opplast innstillinger + Last opp BS-data til NS + Innstillinger for opplasting av BS Vis detaljer om delta Vis delta med én ekstra desimal Minste antall minutter mellom hver SMB Maks antall minutter med basal som kan bli SMB UAM SMB maks minutter Maks antall minutter basal som kan bli SMB ved UAM - Minimumsgrense for KH forslag + Minimumsgrense for KH-forslag Minimum mengde karbohydrater i gram for å vise advarsel. Behov under denne grenseverdien vil ikke vises som et varsel. - Send BS data til xDrip+ - I xDrip+ velg 640G/Eversens som datakilde + Send BS-data til xDrip+ + I xDrip+, velg 640G/Eversens som datakilde NSClient BS NS BS - BS beregning - Bolus IOB beregning - Basal IOB beregning - Trend beregning - Superbolus beregning + BS-beregning + Bolus IOB-beregning + Basal IOB-beregning + Trendberegning + Superbolus-beregning Bare positive Bare negative - COB beregning - Temp target beregning - Prosent beregning + COB-beregning + Beregning av temp target + Prosentvis beregning Loop er aktivert APS valgt - NSClient har skrive rettigheter + NSClient har skriverettigheter Lukket loop aktivert Maks IOB er angitt riktig BS tilgjengelig fra valgt kilde Forlenget bolus feilet - Aktiverer alltid SMB + Aktiver alltid SMB Aktiver alltid SMB uavhengig av boluser. Bare mulig med en bra filtrert BS kilde som f.eks. Dexcom G5/G6 Aktiver SMB etter karbohydrater - Aktiver SMB i 6t etter karbohydrat inntak, selv med 0 IOB. Bare mulig med en bra filtrert BS kilde som f. eks. Dexcom G5/G6 + Aktiver SMB i 6t etter karbohydratinntak, selv med 0 IOB. Bare mulig med en bra filtrert BS kilde som f. eks. Dexcom G5/G6 Aktiver SMB med COB Aktiver SMB når COB er aktiv. Aktiver SMB med temp målverdi @@ -523,7 +524,7 @@ Insulin Knapper Sender en kalibrering til xDrip+ eller åpne kalibreringsdialogen i BYODA - Åpner xDrip+ eller BYODA, tilbake knappen får deg tilbake til AAPS + Åpner xDrip+ eller BYODA, tilbake-knappen får deg tilbake til AAPS Antall karbohydrater som skal legges til når knappen trykkes Mengde insulin som skal legges til når knappen trykkes inn Kunne ikke starte CGM-programmet. Kontroller at det er installert. @@ -565,7 +566,7 @@ Start Hypo TT Du kjører dev-versjonen. Lukket loop ikke aktivert. Engineering Mode aktivert - Profil bytte mangler. Utfør et profil bytte og trykk på \"Aktiver profil\" i din lokale profil. + Profilbytte mangler. Utfør et profilbytte og trykk på \"Aktiver profil\" i din lokale profil. Pumpen støtter ikke temp basaler Lukket Loop deaktivert i innstillinger Autosens deaktivert i innstillinger @@ -592,6 +593,7 @@ Denne verdien kalles Maks IOB av OpenAPS\nOpenAPS vil ikke gi mere insulin hvis mengden insulin ombord (IOB) overstiger denne verdien Maks absorpsjonstid for måltid [h] Etter denne tiden forventes det at måltidet er absorbert. Eventuelle gjenværende karbo vil tas ut av beregninger. + BS er under terskelverdi slik at all insulintilførsel stoppes. Mulighet for bruker å definere verdier mellom 3.3mmol/l (60mg/dl) og 5.5mmol/l (100mg/dl). Verdier under 3.6/65 bruker standard målverdier Vis merknadsfelt i dialogvindu for Behandlinger Neste Forrige @@ -643,7 +645,6 @@ App trenger tillatelse til å bruke Varslinger for å vise meldinger App trenger tilgang til Posisjon for å søke etter Bluetooth og Wifi enheter App trenger tilgang til Lagring for lagre logg filer og eksportere innstillinger - Appen trenger bluetooth tillatelse Forespørsel Åpne meny Lukk meny @@ -968,7 +969,7 @@ Maks-BS utenfor område! Temp target:\nMin: %1$s\nMaks: %2$s\nVarighet: %3$s TempTarget:\nMål: %1$s\nVarighet: %2$s - TempTarget:\nMin: %1$s\nMål: %2$s\nVarighet: %3$s + TempTarget:\nÅrsak: %1$s\nMål: %2$s\nVarighet: %3$s QuickWizard: %1$s\ninsulin: %2$.2fE\nKarbo: %3$dg Kalk. Wizard:\nInsulin: %1$.2fE\nKarbo: %2$dg Vis oppføring på enhet: @@ -998,7 +999,7 @@ Oppdater fra Nightscout Fjern valgte elementer Velg hva som skal fjernes - Profil endringer + Profilendringer Temp Target Karbohydrater og bolus Er du sikker på at du vil fjerne %1$d elementer @@ -1035,10 +1036,13 @@ kun på klokke kun på telefon dra og slipp håndtering + Søk GlucoRx Aidex Aidex Motta BS verdier fra GlucoRx Aidex CGM. Blokkert på grunn av ladealternativer Blokkert på grunn av tilkoblingsalternativer + (Ingen klokke tilkoblet) + Feil under spørring etter tillatelser diff --git a/app/src/main/res/values-pl-rPL/exam.xml b/app/src/main/res/values-pl-rPL/exam.xml index dfa9014d5e..b9ce8332d5 100644 --- a/app/src/main/res/values-pl-rPL/exam.xml +++ b/app/src/main/res/values-pl-rPL/exam.xml @@ -134,7 +134,6 @@ Podaj obliczoną dawkę „pominiętej” insuliny za pomocą strzykawki / wstrzykiwacza lub za pomocą pompy funkcji wypełnienia. Nie rób nic i pozwól AndroidAPS na skorygowanie każdego uzyskanego wysokiego stężenia glukozy we krwi. Aktywna insulina (IOB) - Sprawdź/Zaznacz wszystkie prawidłowe odpowiedzi. Na wartość IOB mają wpływ wykonane tymczasowe dawki bazowe. Wysoka tymczasowa dawka bazowa nie zostanie podana, gdy twóje poziom cukru we krwi jest poniżej poziomu docelowego. Negatywne IOB utrzymujące się przez znaczny okres czasu bez wysiłku fizycznego sugeruje, że Twój profil jest zbyt silny i mniej insuliny jest wymagane w Twoich ustawieniach. diff --git a/app/src/main/res/values-pl-rPL/strings.xml b/app/src/main/res/values-pl-rPL/strings.xml index 716f005083..f91047c74f 100644 --- a/app/src/main/res/values-pl-rPL/strings.xml +++ b/app/src/main/res/values-pl-rPL/strings.xml @@ -244,6 +244,7 @@ Oprogramowanie Wear (Smartwatch) Prześlij ponownie wszystkie dane Otwórz ustawienia dla Wear + Dawka bazowa Wartość bazy poniżej minimum. Nie ustawiono profilu! BG: Ostatnia BG: @@ -631,7 +632,6 @@ Aplikacja wymaga uprawnienia systemowego okna dla powiadomień Aplikacja wymaga dostępu do lokalizacji dla zarządzania bluetoothem i identyfikacją Wi-Fi Aplikacja wymaga zgody na zapis do pamięci, aby móc przechować pliki logów i eksportować ustawienia - Aplikacja wymaga uprawnienia Bluetooth Żądanie Otwórz menu Zamknij menu @@ -667,6 +667,7 @@ Leczenie (insulina: %1$.2f, węglowodany: %2$d, czas:%3$s) nie mogą być dodane. Sprawdź i dodaj ręcznie rekord w razie potrzeby. eWęgle: %1$d g (%2$d h), Opóźnienie: %3$d m Brak dostępnych danych autosens + Log files Ustawienia logów Przywróć ustawienia domyślne Usterka NSClient. Spróbuj zrestartować NS i NSClient. @@ -748,6 +749,8 @@ Nazwa profilu zawiera kropki.\nTo nie jest obsługiwane przez NS.\nProfil nie zostanie przesyłany do NS. Dolna wartość zakresu docelowego (tylko do wyświetlania) Górna wartość zakresu docelowego (tylko do wyświetlania) + Czas + Waga ID: Wyślij Najczęściej używany profil: @@ -797,6 +800,7 @@ Na każdym telefonie śledzącym zainstalować aplikację uwierzytelniania obsługującą tokeny TOTP RFC 6238 Popularne darmowe aplikacje:\n • Authy\n • Google Authenticator\n • LastPass Authenticator\n • FreeOTP Authenticator Resetowanie uwierzytelniania powoduje, że wszystkie już ustawione uwierzytelnienia stają się niepoprawne (przestają działać). Trzeba będzie je jeszcze raz skonfigurować! Prognozy poziomu + Zabiegi Krzywa odchylenie Autoryzacja nie powiodła się Cała insulina @@ -896,6 +900,7 @@ Usuń wybrane pozycje Czy na pewno chcesz usunąć %1$d pozycji + Brak wpisów Wybrany %1$d Sortuj Zaloguj się diff --git a/app/src/main/res/values-pt-rBR/exam.xml b/app/src/main/res/values-pt-rBR/exam.xml index 0a6e10f3a3..c2bf8ae20a 100644 --- a/app/src/main/res/values-pt-rBR/exam.xml +++ b/app/src/main/res/values-pt-rBR/exam.xml @@ -136,7 +136,6 @@ Dê uma porção do bolus calculado não administrado por meio de seringa/caneta ou usando o menu ações -> purgar/preencher. Não faça nada e permita que o AndroidAPS corrija qualquer nível de glicose elevado resultante. Insulina ativa (IA) - Marque todas as respostas corretas. O valor de IA é afetado por basais temporárias efetuadas. Um basal alto temporário não será efetuado quando sua glicose estiver abaixo do alvo. Insulina Ativa (IA) negativa por um período substancial na ausência de exercícios, sugere que seu perfil é muito agressivo e menos insulina deve ser considerada nas suas configurações. diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index cc897fcb4c..27bfd34a25 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -413,8 +413,6 @@ Ativar partilha local. SMB OpenAPS FSI Dinâmico - Fator de Ajuste FSI dinâmico %% - Fator de ajuste para FSI dinâmico. Defina mais de 100%% para doses de correção mais agressivas e menos de 100%% para correções menos agressivas. Ativar UAM Ativar SMB Use Super Micro Boluses em vez de basal temp para uma ação mais rápida @@ -554,7 +552,7 @@ SMB não permitido no modo open loop Alimentos repor - Máximo total IOS OpenAPS não pode superar [U] + Máximo total de IOB OpenAPS não pode superar [U] Este valor é chamado de Max IOB em contexto de OpenAPS\nOpenAPS não adicionará mais insulina se o IOB atual for maior que este valor Tempo máx. absorção refeição [h] Hora em que qualquer refeição é considerada absorvida. Restantes hidratos de carbono serão cortados. @@ -865,7 +863,6 @@ Glicemia maxima fora da meta! Alvo temporário:\nMin: %1$s\nMax: %2$s\nDuração: %3$s Alvo temporário:\nTarget: %1$s\nDuration: %2$s - Alvo temporário:\Reason: %1$s\nTarget: %2$s\nDuration: %3$s Assistente rápido: %1$s\nInsulin: %2$.2fU\nCarbs: %3$dg Calculadora:\nInsulin: %1$.2fU\nCarbs: %2$dg Mostrar entrada no dispositivo: diff --git a/app/src/main/res/values-pt-rPT/exam.xml b/app/src/main/res/values-pt-rPT/exam.xml index 3b66353316..5d3cd2fca4 100644 --- a/app/src/main/res/values-pt-rPT/exam.xml +++ b/app/src/main/res/values-pt-rPT/exam.xml @@ -134,7 +134,6 @@ Bólus uma proporção de insulina calculada \'não administrada\' ou com seringa/caneta ou purgando. Faça nada e permita que o AndroidAPS corrija qualquer nível de glicose elevado que daí resulte. Insulina ativa (IA ) - Marque todas as respostas corretas. O valor do IA é afectado por basais temporárias emitidas. Basal temporária alta não será dada quando a sua glicose estiver abaixo do alvo. IA negativa por um período substancial na ausência de exercício, sugere que o seu perfil é muito alto e é necessária menos insulina nas suas configurações. diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 1049c0380e..b435fbeb69 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -631,7 +631,6 @@ Aplicação precisa de permissão de janela do sistema para notificações Aplicação necessita de permissão de localização para pesquisa Bluetooth e identificação Wi-Fi A aplicação precisa da permissão de armazenamento para poder armazenar ficheiros de registo e exportar definições - Aplicação precisa de permissão Bluetooth Pedido Abrir a navegação Fechar a navegação diff --git a/app/src/main/res/values-ro-rRO/exam.xml b/app/src/main/res/values-ro-rRO/exam.xml index e71e92bee4..4b5f2acaf1 100644 --- a/app/src/main/res/values-ro-rRO/exam.xml +++ b/app/src/main/res/values-ro-rRO/exam.xml @@ -134,7 +134,6 @@ Bolusati o cantitate parțiala de insulina din insulina calculata ca fiind lipsa utilizând seringa/penul sau amorsarea. Nu faceți nimic și permiteți AndroidAPS să corecteze valorile mari ale glicemiei. Insulină activă (IOB) - Bifați toate răspunsurile corecte. Valoarea IOB este afectată de bazalele temporare emise. Rata bazala ridicata temporara nu va fi livrata atunci când glicemia este sub nivelul țintă. Un IOB negativ pentru o perioadă substanțială în absența exercițiilor fizice sugerează că profilul tău este prea puternic și este nevoie de mai puţină insulină în setările inițiale. diff --git a/app/src/main/res/values-ro-rRO/strings.xml b/app/src/main/res/values-ro-rRO/strings.xml index 2d55df640a..44c5283a22 100644 --- a/app/src/main/res/values-ro-rRO/strings.xml +++ b/app/src/main/res/values-ro-rRO/strings.xml @@ -631,7 +631,6 @@ Aplicația are nevoie de permisiune la fereastra sistemului pentru a afișa notificări Aplicația are nevoie sa acceseze locația pentru scanare Bluetooth și identificare WiFi Aplicația are nevoie de permisiunea de a accesa unitatea de stocare pentru a scrie fișierele registru și pentru a exporta setările - Aplicația are nevoie de permisiune Bluetooth Cerință Afișare navigație Închidere navigație diff --git a/app/src/main/res/values-ru-rRU/exam.xml b/app/src/main/res/values-ru-rRU/exam.xml index d5edb09ce2..58e9d84eaf 100644 --- a/app/src/main/res/values-ru-rRU/exam.xml +++ b/app/src/main/res/values-ru-rRU/exam.xml @@ -136,8 +136,20 @@ Сравните значения в истории AndroidAPS и помпы (если помпа это поддерживает). Рассчитать и ввести «пропущенный» вами инсулин шприцем/ручкой или через кнопку заполнения канюли. Ничего не делать и позволить AndroidAPS исправить возможный высокий уровень ГК. + Активные углеводы COB - углеводы в процессе компенсации + Как изменение значения ISF влияет на расчет COB? + Увеличение фактора чувствительности ISF потребует больше времени на усвоение углеводов + Увеличение фактора чувствительности ISF потребует меньше времени на усвоение углеводов + Увеличение фактора чувствительности ISF не повлияет на расчетное время усвоения углеводов + Как изменение значения IC влияет на расчет COB? + Увеличение IC увеличит время усвоения углеводов + Увеличение IC уменьшит время усвоения углеводов + Увеличение IC не повлияет на расчетное время усвоения углеводов + Как изменение процента профиля влияет на расчет активных углеводов COB? + Установка профиля на 150% потребует больше времени на усвоение углеводов + Установка профиля на 150% потребует меньше времени на усвоение углеводов + Установка профиля на 150% не повлияет на расчетное время усвоения углеводов Активный инсулин (IOB) - Отметьте все правильные ответы. На величину IOB влияют устанавливаемые ВБС. Высокая ВБС не будет применяться, если уровень сахара в крови ниже целевого. Отрицательный IOB в течение длительного периода при отсутствии физнагрузки указывает на то, что ваш профиль завышен и требуется снизить кол-во инсулина в настройках. diff --git a/app/src/main/res/values-ru-rRU/objectives.xml b/app/src/main/res/values-ru-rRU/objectives.xml index 65f4dd716f..499fa398bf 100644 --- a/app/src/main/res/values-ru-rRU/objectives.xml +++ b/app/src/main/res/values-ru-rRU/objectives.xml @@ -6,7 +6,7 @@ Цель %1$d не начата Цель %1$d не завершена Настройка визуализации и мониторинга, анализ базала и коэффициентов - Убедитесь, что BG доступен в Nightscut, и данные инсулина помпы загружаются + Убедитесь, что значения ГК и данные по инсулину помпы передаются в Nightscout Старт незамкнутого цикла Начинайте работу в режиме незамкнутого цикла и ручной подстройки величины временного базала. Установите и применяйте временные цели и временные цели по умолчанию (напр. углеводы при нагрузке или купировании гипо) Глубже понимаем незакольцованную систему Open Loop, включая ее рекомендации по временным базалам diff --git a/app/src/main/res/values-ru-rRU/strings.xml b/app/src/main/res/values-ru-rRU/strings.xml index d41d36c2e4..b8fd6d5a81 100644 --- a/app/src/main/res/values-ru-rRU/strings.xml +++ b/app/src/main/res/values-ru-rRU/strings.xml @@ -6,6 +6,7 @@ Безопасность терапии Макс разрешенный болюс [U] ед. Макс разрешенные углеводы (г) + Уровень ГК, ниже которого происходит остановка подачи инсулина Настройки %1$s Настройки Синхронизировать назначения с NS @@ -432,8 +433,8 @@ Активировать локальную передачу Супер микро болюс OpenAPS Динамический ISF - Коэффициент регулировки динамического диапазона чувствительности ISF %% - Коэффициент корректировки динамического диапазона чувствительности ISF. Установите более 100%% для более агрессивных доз коррекции и менее 100%% для менее агрессивной коррекции. + Коэффициент регулировки динамического диапазона чувствительности ISF % + Коэффициент корректировки динамического диапазона чувствительности ISF. Установите более 100% для агрессивных доз коррекции и менее 100% для менее агрессивной коррекции. Включить непредвиденный прием пищи UAM Включить супер микро болюс SMB Для ускорения действия используйте супер микро болюсы SMB вместо временного базала @@ -592,6 +593,7 @@ Эта величина называется Max IOB в OpenAPS context\nOpenAPS не будет добавлять инсулин если текущий активный инсулин ее превысит Максимальное время усваимости пищи [h] Время, за которое любая еда считается усвоившейся. Оставшиеся углеводы не будут учтены. + Значение уровня ГК, на котором происходит приостановка подачи инсулина. Значения по умолчанию являются стандартными для целевого диапазона. Пользователь может установить значения между 60 мг/дл (3.3 ммоль/л) и 100 мг/дл (5.5 ммоль/л) Параметры, заданные ниже 65/3.6 приводят к использованию значений по умолчанию Показать поле примечаний в диалогах назначений Далее Назад @@ -643,7 +645,6 @@ Приложению требуется разрешение системного окна для уведомлений Приложению требуется разрешение на доступ к местоположению для сканирования BT и идентификации WiFi Приложение требует разрешения на доступ к записи в память, чтобы хранить файлы журналов и настройки экспорта - Приложению требуется разрешение Bluetooth Запрос Показать панель навигации Cкрыть панель навигации @@ -967,7 +968,7 @@ Макс ГК вне диапазона! ВремЦель:\nМин: %1$s\nМакс.: %2$s\nДлительность: %3$s ВремЦель:\nЦель: %1$s\nДлительность: %2$s - ВремЦель:\Причина: %1$s\nЦель.: %2$s\nДлительность: %3$s + ВремЦель:\nПричина: %1$s\nЦель.: %2$s\nДлительность: %3$s Мастер: %1$s\nИнсулин: %2$.2fЕд\nУгл: %3$dg Мастер:\nИнсулин: %1$.2fЕд\nУгл: %2$dg Показать запись на устройстве: @@ -1034,10 +1035,13 @@ только на часах только на телефоне якорь перетягивания + Поиск Aidex GlucoRx Aidex Получить значения ГК от GlucoRx Aidex Заблокировано опциями зарядки Заблокировано настройками подключения + (Часы не подключены) + Ошибка при запросе разрешения diff --git a/app/src/main/res/values-sk-rSK/exam.xml b/app/src/main/res/values-sk-rSK/exam.xml index 54aaa5002d..1aefaf97da 100644 --- a/app/src/main/res/values-sk-rSK/exam.xml +++ b/app/src/main/res/values-sk-rSK/exam.xml @@ -136,8 +136,20 @@ Porovnaj hodnoty v AndroidAPS z históriou v tvojej pumpe (ak pumpa má túto funkciu). Pošlite bolus na vypočítaný „chýbajúci“ inzulín buď injekčnou striekačkou, alebo perom, alebo pomocou plnenia na pumpe. Nerobte nič a dovoľte AndroidAPS upraviť akúkoľvek výslednú vysokú hladinu glukózy v krvi. + Aktívne sacharidy (COB) + Ako ovplyvňuje zmena hodnoty citlivosti výpočet COB? + Zvýšenie hodnoty citlivosti predĺži dobu absorbcie sacharidov + Zvýšenie hodnoty citlivosti skráti dobu absorbcie sacharidov + Zvýšenie citlivosti neovplyvní vypočítanú absorbciu sacharidov + Ako ovplyvňuje zmena inzulíno-sacharidového pomeru výpočet COB? + Zvýšenie hodnoty inzulíno-sacharidového pomeru predĺži dobu absorbcie sacharidov + Zvýšenie hodnoty inzulíno-sacharidového pomeru skráti dobu absorbcie sacharidov + Zvýšenie inzulíno-sacharidového pomeru neovplyvní vypočítanú absorbciu sacharidov + Ako ovplyvňuje percentuálna zmena profilu výpočet COB? + Nastavením profilu na 150 % dôjde k predĺženiu doby absorbcie sacharidov + Nastavením profilu na 150 % dôjde ku skráteniu doby absorbcie sacharidov + Nastavenie profilu na 150% neovplyvní vypočítanú absorbciu sacharidov Aktívny inzulín (IOB) - Zaškrtnite všetky správne odpovede. Hodnota IOB je ovplyvnená vydanými dočasnými bazálmi. Vysoký dočasný bazál nebude spustený, pokiaľ je Vaša glykémia nižšia, ako cieľ. Negatívne IOB po značnú dobu bez cvičenia naznačuje, že váš profil je príliš \"silný\" a vo vašom profile je potrebného menej inzulínu. diff --git a/app/src/main/res/values-sk-rSK/strings.xml b/app/src/main/res/values-sk-rSK/strings.xml index b0e22b54b4..5173d5ea18 100644 --- a/app/src/main/res/values-sk-rSK/strings.xml +++ b/app/src/main/res/values-sk-rSK/strings.xml @@ -6,6 +6,7 @@ Bezpečnosť zadania ošetrenia Maximálny povolený bolus [JI] Maximálne povolené množstvo sacharidov [g] + Hodnota glykémie, pri ktorej sa aktivuje LGS Nastavenie pluginu %1$s Nastavenia Obnoviť ošetrenia z NS @@ -432,8 +433,8 @@ Povoliť lokálne vysielanie. OpenAPS SMB Dynamická ISF - Korekčný faktor pre Dynamickú ISF v %% - Korekčný faktor pre dynamickú ISF. Pre agresivnejšie korekčné dávky nastavte hodnoty väčšie ako 100%% a pre menej agresivne korekcie menšie než 100%%. + Korekčný faktor pre Dynamickú ISF v % + Korekčný faktor pre dynamickú ISF. Pre agresivnejšie korekčné dávky nastavte hodnoty väčšie ako 100%, pre menej agresívne korekcie, menšie než 100%. Povoliť UAM Povoliť SMB Použiť Super Mikro Bolusy namiesto dočasných bazálov, pre zrýchleniu účinku @@ -592,6 +593,7 @@ Táto hodnota je v kontexte OpenAPS nazývaná Max IOB.\nOpenAPS nikdy nepridá inzulín, pokiaľ je súčasné IOB väčšie, ako táto hodnota Maximálna doba vstrebávania sacharidov [h] Doba, po ktorej sú všetky sacharidy považované za vstrebané. Zvyšné budú orezané. + Hodnota glykémie, pri ktorej bude podávanie inzulínu zastavené. Východzia hodnota využíva štandardný cieľový model. Užívateľ môže nastaviť hodnoty od 3,3 mmol/l do 5,5 mmol/l. Pri hodnotách pod 3,6 mmol/l se použije východzí model. Zobrazovať kolónku poznámky v dialógoch ošetrení Ďalšia Späť @@ -643,7 +645,6 @@ Aplikácia vyžaduje pre oznámenia systémové oprávnenie Aplikácia vyžaduje oprávnenie polohy, pre vyhľadávanie BT a identifikáciu WiFi Aby bolo možné nahrávať logy a exportovať nastavenia, je nutné pre aplikáciu povoliť oprávnenie prístupu k úložisku - Aplikácia vyžaduje povolenie bluetooth Požiadavka Otvoriť Menu Zavrieť Menu @@ -1035,10 +1036,12 @@ iba na hodinkách iba na telefóne úchop potiahni a pusť + Hľadať GlucoRx Aidex Aidex Prijímať hodnoty glykémie zo senzora GlucoRx Aidex. Zablokované možnosti nabíjania Zablokované možnosti pripojenia + (Žiadne hodinky nie sú pripojené) diff --git a/app/src/main/res/values-sv-rSE/exam.xml b/app/src/main/res/values-sv-rSE/exam.xml index 9657e08fdd..cf588d6136 100644 --- a/app/src/main/res/values-sv-rSE/exam.xml +++ b/app/src/main/res/values-sv-rSE/exam.xml @@ -134,7 +134,6 @@ Ge en bolus med en del av det insulin du saknar antingen med penna eller genom att använda förfyllningsfunktionen. Gör ingenting och låt AndroidAPS korrigera eventuella höga blodglukosnivåer. Aktivt Insulin (IOB) - Markera ett eller flera alternativ. IOB-värdet påverkas av temp basaler. Hög temp basal kommer inte att ges när ditt BG-värde är under målet. Negativ IOB under en längre period även om du inte motionerat, tyder på att din profil ger för mycket insulin. diff --git a/app/src/main/res/values-sv-rSE/strings.xml b/app/src/main/res/values-sv-rSE/strings.xml index ee5c7d8905..3a6718d5c3 100644 --- a/app/src/main/res/values-sv-rSE/strings.xml +++ b/app/src/main/res/values-sv-rSE/strings.xml @@ -636,7 +636,6 @@ Eversense-appen. Applikationen behöver förhöjd behörighet för aviseringar Appen behöver platsåtkomst för bluetooth- och WiFi-identifiering Applikationen behöver lagringsbehörighet för att kunna lagra loggfiler och exportinställningar - Applikationen behöver bluetooth-behörighet Begäran Öppna menyn Stäng menyn @@ -941,7 +940,6 @@ Eversense-appen. Ogiltigt maximum BG! Temp-mål:\nMin: %1$s\nMax: %2$s\nVaraktighet: %3$s Temp-mål:\nMål: %1$s\nDuration: %2$s - Temp-mål:\Orsak: %1$s\nMål: %2$s\nVaraktighet: %3$s Snabbsteg: %1$s\nInsulin: %2$.2fU\nKolhydrater: %3$dg Kalkylator:\nInsulin: %1$.2fU\nKolhydrater: %2$dg Visa post på enhet: diff --git a/app/src/main/res/values-tr-rTR/exam.xml b/app/src/main/res/values-tr-rTR/exam.xml index 979bfb5b2e..68b9eb13ca 100644 --- a/app/src/main/res/values-tr-rTR/exam.xml +++ b/app/src/main/res/values-tr-rTR/exam.xml @@ -136,16 +136,28 @@ AndroidAPS ve pompa geçmişindeki değerleri karşılaştırın (pompa bunu destekliyorsa). Şırınga/kalem veya başlatma kullanarak hesaplanan \"eksik\" insülininizi bolus olarak karşılayın. Hiçbir şey yapmayın ve AndroidAPS\'in ortaya çıkabilecek yüksek kan şekeri seviyesini düzeltmesine müsade edin. - Aktif İnsülin (IOB) - Tüm doğru cevapları kontrol edin. - IOB değeri, verilen geçici bazallardan etkilenir. + Aktif Karbonhidrat (AKRB) + İDF değerinin değiştirilmesi AKRB (Aktif karbonhidrat) hesaplamasını nasıl etkiler? + Artan İDF, karbonhidratların daha uzun süre emilmesini sağlayacaktır + Artan İDF, karbonhidratların daha kısa sürede emilmesini sağlayacaktır + Artan İDF, hesaplanan karbonhidrat emilimini etkilemez + Değişen Kİ değeri AKRB hesaplamasını nasıl etkiler? + Artan Kİ oranı, karbonhidratların daha uzun sürede emilmesini sağlar + Artan Kİ, karbonhidratların daha kısa sürede emilmesini sağlayacaktır + Artan Kİ oranı, hesaplanan karbonhidrat emilimini etkilemez + Değişen profil yüzdesi AKRB hesaplamasını nasıl etkiler? + Profili %150\'ye ayarlamak karbonhidratların daha uzun sürede emilmesini sağlar + Profili %150\'ye ayarlamak karbonhidratların daha kısa sürede emilmesini sağlar + Profili %150\'ye ayarlamak hesaplanan karbonhidrat emilimini etkilemez + Aktif İnsülin (AİNS) + AİNS değeri, verilen geçici bazallardan etkilenir. Kan şekeriniz hedefin altına düştüğünde yüksek geçici bazal verilmeyecektir. - Egzersiz yapmadığınız halde uzun bir dönem için negatif IOB, profilinizin çok güçlü olduğunu ve ayarlarınızda daha az insüline ihtiyaç duyulduğunu gösterir. + Egzersiz yapmadığınız halde uzun bir dönem için negatif AİNS, profilinizin çok güçlü olduğunu ve ayarlarınızda daha az insüline ihtiyaç duyulduğunu gösterir. Önemli bir süre için pozitif IOB, insülin direncini veya habersiz öğünleri gösterir. Karbonhidrat girişi ve boluslar Tüketilen karbonhidratları tahmin etmek ve kaydetmek için sadece gram kullanılmalıdır. Tüketilen karbonhidratlar uygun bir değişim sistemi kullanılarak kaydedilebilir (örn. DAFNE \"CHO\" değişimleri veya Avrupa \"Ekmek Birimleri\"). - AndroidAPS, karbonhidrat \"çözünmesini\" tahmin etmek ve COB\'ı hesaplamak için dinamik bir model kullanır. + AndroidAPS, karbonhidrat \"çözünmesini\" tahmin etmek ve AKRB\'ı hesaplamak için dinamik bir model kullanır. Kan şekeri seviyeleri kabul edilebilir değerlerin dışındaysa (çok düşük veya çok yüksek), karbonhidrat veya insülin düzeltmeleri için öneriler sağlamak için bolus hesaplayıcı kullanılabilir. https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-to-carb-ratio-ic-g-u yayma-karbonhidratlar @@ -158,11 +170,11 @@ Uzaktan İzleme AndroidAPS\'i (örneğin çocuğunuz için) uzaktan nasıl izleyebilirsiniz? NS Client uygulaması, Nightscout uygulaması ve Nightscout web sayfasının tümü, AndroidAPS\'i uzaktan takip etmenize olanak tanır. - Diğer uygulamalar (ör. Dexcom takip, xDrip) bazı parametreleri (ör. kan şekeri/sensör değerleri) uzaktan takip etmenize izin verir, ancak farklı algoritma kullanımı, hatalı IOB veya COB değerlerine sebep olabilir. + Diğer uygulamalar (ör. Dexcom takip, xDrip) bazı parametreleri (ör. kan şekeri/sensör değerleri) uzaktan takip etmenize izin verir, ancak farklı algoritma kullanımı, hatalı AİNS veya AKRB değerlerine sebep olabilir. AndroidAPS\'yi uzaktan takip etmek için her iki cihazın da internet erişimine sahip olması gerekir (ör. Wi-Fi veya mobil/hücresel ağ verileri aracılığıyla). Uzak takipçi olarak kullanılan NS İstemcisi, AndroidAPS\'i hem izleyecek hem de tam kontrol sağlayacaktır. https://androidaps.readthedocs.io/en/latest/EN/Children/Children.html - İnsülin Duyarlılık Faktörü (ISF) + İnsülin Duyarlılık Faktörü (İDF) ISF değerlerini yükseltmek, belirli bir karbonhidrat miktarını karşılamak için daha fazla insülin verilmesine yol açacaktır. ISF değerinin düşürülmesi, hedeflenen kan şekerinin üzerinde bir düzeltme için daha fazla insülin verilmesine yol açar. Kan şekeri seviyeleri hedefin altında olduğunda ISF\'yi yükseltmenin veya düşürmenin insülin iletimi üzerinde hiçbir etkisi yoktur. @@ -175,7 +187,7 @@ Karbonhidrat insülin Oranı (I:C oranı) Daha yüksek I:C oranları, belirli bir miktarda karbonhidrat için daha az insülin verilmesine yol açar. Daha düşük I:C oranları, belirli bir miktarda karbonhidrat için daha az insülin verilmesine yol açar. - 0 COB\'niz varsa, IC oranını değiştirmek, belirli bir KŞ değerini düzeltmek için farklı insülin miktarına sebep olur. + 0 AKRB varsa, Kİ oranını değiştirmek, belirli bir KŞ değerini düzeltmek için farklı insülin miktarına sebep olur. Ekmek (değişim) birimini 10g veya 12g olarak sayarsanız IC farklı olacaktır. IC anlamı şudur: 1Ü insülin kaç ekmek birimi (değişim) kapsar. https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u diff --git a/app/src/main/res/values-tr-rTR/objectives.xml b/app/src/main/res/values-tr-rTR/objectives.xml index f34abb589c..4f5d4a7a1b 100644 --- a/app/src/main/res/values-tr-rTR/objectives.xml +++ b/app/src/main/res/values-tr-rTR/objectives.xml @@ -11,7 +11,7 @@ Birkaç gün boyunca Açık Döngü modunda çalıştırın ve birçok geçici bazalı el yordamı ile girin. Geçici ve varsayılan geçici hedefleri düzenleyin ve kullanın (örn. egzersiz ve hipo-tedaviyi desteklemek için) Geçici bazal tavsiyeleri de dahil olmak üzere Açık Döngüyü anlamak Bu deneyime dayanarak, max bazalın ne olması gerektiğine karar vermeli ve bunu pompa ve tercihlere koymalısınız - Kapalı Döngü, (LGS) Düşük Glikoz Süspansiyonu modunda başlatılıyor + Kapalı Döngü, (LGS) Düşük Glikoz Duraklatma modunda başlatılıyor Kapalı Döngüyü, maks IOB = 0 olacak şekilde çok sayıda LGS (düşük KŞ) olmadan birkaç gün boyunca deneyin Kapalı Döngü\'de ince ayarlar, maks (IOB) Aktif İnsülini 0\'ın üzerine yükseltme ve yavaş yavaş KŞ hedeflerini aşağıya çekme KŞ hedefini azaltmadan önce birkaç gün ve en az bir gece düşük KŞ (Hipo) alarmı olmadan deneyin diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index f0383b2d42..23e6ddd95e 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -6,6 +6,7 @@ Tedavi güvenliği Maks izin verilen bolus [U] Maks izin verilen karbonhidrat [g] + KŞ seviyesi altında düşük glikoz duraklatma meydana gelir %1$s Tercihler Tercihler NS\'tan tedavileri güncelle @@ -44,27 +45,27 @@ SMS komutlarını kullanarak uzaktan AndroidAPS kontrolü. İnsülin: Karbonhidrat: - IOB: - IOB: - Toplam IOB: - Toplam IOB etkinliği: + AİNS: + AİNS: + Toplam AİNS: + Toplam AİNS etkinliği: Süre: Oran: İns: - IOB: - Toplam IOB: + AİNS: + Toplam AİNS: GH Karbonhidrat Düzeltme - Bolus IOB + Bolus AİNS Şimdi Çalıştır SANAL POMPA Son Çalıştırma Girdi Parametreleri Glikoz durumu Mevcut Geçici Bazal - IOB Verisi + AİNS Verisi Profil Yemek Verisi Sonuç @@ -110,12 +111,12 @@ APS modu Kapalı Döngü Açık Döngü - Düşük Glikoz Süspansiyonu + Düşük Glikoz Duraklatma (LGS) Döngü devre dışı Yeni öneri mevcut Karbonhidrat Önerisi Nightscout\'un desteklenmeyen sürümü - Bazal IOB + Bazal AİNS Bolus kısıtlaması uygulandı Karbonhidrat kısıtlaması uygulandı Diğer @@ -139,8 +140,8 @@ İçe aktarma ayarları Maks Ü/s geçici Bazal ayarlanabilir Bu değer OpenAPS\'te \"maksimum bazal\" olarak adlandırılır - OpenAPS\'nin vermesine izin verilen maksimum bazal IOB (Aktif insülin) [U] - Bu değere OpenAPS bağlamında Maks IOB denir.\nAPS\'de bir kerede verilebilen maksimum insülin [U] ü. + OpenAPS\'in gönderebileceği maksimum bazal AİNS (Aktif insülin) [U] + Bu değere OpenAPS bağlamında Maks AİNS denir.\nAPS\'de bir kerede verilebilen maksimum insülin [U] ü. Dışa aktarılan tercihleri şifrelemek için kullanılacak ana parola sorulacaktır. İçe aktarılan tercihlerin şifresini çözmek için gerekli olan ana parola sorulacaktır. Aktarım iptal edildi! Tercihler dışa aktarılmadı! @@ -316,8 +317,8 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Günlüğü temizle NSCLIENT yazma izni yok. Yanlış API Anahtarı? Wear ayarları - Ayrıntılı IOB göster - Saat arayüzü üzerinde IOB\'yi bolus ve bazal olarak ayırın + Ayrıntılı AİNS göster + Saat arayüzü üzerinde AİNS\'i bolus ve bazal olarak ayırın başarısız - lütfen telefonu kontrol edin n/a Hasta tipi @@ -356,7 +357,7 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Döngü duraklatıldı Döngü devam ettirildi 15 dk eğilim - COB + AKRB Süperbolus NS\'a uygulama başlangıcını kaydet Ayarları uygulamak için uygulamadan çıkılıyor. @@ -433,13 +434,13 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Yerel yayınları etkinleştirin. OpenAPS SMB Dinamik İDF - DinamikİDF ayarlama faktörü %% - DinamikİDF için ayarlama faktörü. Daha agresif düzeltme dozları için %%100\'den fazla ve de az agresif düzeltmeler için %%100\'den az ayarlayın. + DinamikİDF Ayar Faktörü % + DinamikİDF için ayarlama faktörü. Daha agresif düzeltme dozları için %100\'den fazla ve daha az agresif düzeltmeler için %100\'den az ayarlayın. UAM etkinleştir SMB (Super Micro Bolus) etkinleştir Daha hızlı bir etki için geçici bazal yerine Super Micro Bolus kullanın (Uam) Bildirilmemiş öğünlerin tespiti - IOB Eğrisi Tepe Zamanı + AİNS Eğrisi Tepe Zamanı Tepe zamanı [min] Tepe Serbest tepe Oref @@ -495,28 +496,28 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Nightscout Client KŞ NS KŞ KŞ Hesaplaması - Bolus IOB (Aktif İnsülin) hesaplaması - Bazal IOB (Aktif İnsülin) hesaplaması + Bolus AİNS hesaplaması + Bazal AİNS hesaplaması Trend hesapla Süperbolus hesapla Sadece pozitif Sadece negatif - COB (Aktif Karbonhidrat) hesaplaması + AKRB (Aktif Karbonhidrat) hesaplaması Geçici hedef hesaplaması Yüzde Hesaplaması Döngü etkin APS Seçildi NSClient\'in yazma izni var Kapalı mod etkin - Maksimal IOB doğru şekilde ayarlandı + Maksimal AİNS doğru şekilde ayarlandı Seçili kaynaktan KŞ kullanılabilir Yayma bolus iletim hatası SMB\'yi her zaman etkinleştir SMB\'yi her zaman bağımsız olarak boluslarla etkinleştirin. G5 gibi verilerin yalnızca filtrelenmesiyle yalnızca KŞ kaynağıyla mümkündür Yemeklerden sonra SMB\'yi etkinleştir - Karbonhidrat alındıktan sonra 6 saat süreyle SMB\'yi (Super Micro Bolus) etkinleştirin.0 COB (Aktif Karbonhidrat) ile de çalışır, Şayet KŞ kaynağıyla kullanılacaksa verilerin iyice filtrelenmesiyle mümkündür.örn. Dexcom G5 gibi - SMB\'yi COB ile etkinleştir - COB (Aktif Karbonhidrat) aktif olduğunda SMB\'yi (Super Micro Bolus) etkinleştirin. + 0 AKRB (Aktif Karbonhidrat) olsa dahi, karbonhidrat alındıktan sonra 6 saat süreyle SMB\'yi (Süper Mikro Bolus) etkinleştirir. Şayet KŞ kaynağıyla kullanılacaksa verilerin iyice filtrelenmesiyle (Dexcom G5-G6 gibi) mümkündür. + SMB\'yi AKRB ile etkinleştir + AKRB (Aktif Karbonhidrat) aktif olduğunda SMB\'yi (Süper Mikro Bolus) etkinleştirin. Geçici hedeflerle SMB\'yi etkinleştir Geçici hedef aktif olduğunda SMB\'yi etkinleştir (yakında yeme, egzersiz) Yüksek geçici hedeflerle SMB\'yi etkinleştir @@ -579,7 +580,7 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Bazal doğru ayarlanmış %2$s\'den dolayı yayma bolus %1$.1f Ü ile sınırlandırılıyor %2$s\'den dolayı karbonhidratlar %1$d g ile sınırlandırılıyor - %2$s\'den dolayı IOB (Aktif İnsülin)%1$.1f Ü ile sınırlandırılıyor + %2$s\'den dolayı AİNS %1$.1f Ü ile sınırlandırılıyor tercihlerde maksimum değer sert sınır Durumu okumak başarısız oldu @@ -589,8 +590,8 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Açık Döngü modunda SMB\'ye (Super Micro Bolus) izin verilmiyor Yiyecek sıfırla - OpenAPS tarafından aşılmayacak, maksimum toplam IOB(Aktif İnsülin)[U] - Bu değer OpenAPS bağlamında Max IOB (Aktif İnsülin) olarak adlandırılır\nOpenAPS, mevcut IOB bu değerden daha büyükse daha fazla insülin eklemez + OpenAPS tarafından aşılamayacak maksimum toplam AİNS (Aktif İnsülin)[U] + Bu değer OpenAPS bağlamında Max AİNS (Aktif İnsülin) olarak adlandırılır\nOpenAPS, mevcut AİNS bu değerden daha büyükse daha fazla insülin vermez Besinin maksimum emilim süresi [h] Herhangi bir öğünün emildiği kabul edilen zaman. Kalan karbonhidratlar kesilecek. Altına düştüğünde insülinin askıya alındığı KŞ değeri. Varsayılan değer, standart hedef modeli kullanır. Kullanıcı değeri 60mg/dl (3,3mmol/l) ile 100mg/dl(5.5mmol/l) arasında ayarlayabilir. 65/3,6\'nın altındaki değerler varsayılan modelin kullanılmasına neden olur @@ -632,7 +633,7 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Durum oku Kurulum sihirbazını atla AndroidAPS\'ın bazal değişiklikleri önerme/yapmasını sağlamak için aşağıdaki düğmeye basın - Duyarlılık eklentisi, duyarlılık tespiti ve COB hesaplaması için kullanılır. Daha fazla bilgi için ziyaret edin: + Duyarlılık eklentisi, duyarlılık tespiti ve AKRB hesaplaması için kullanılır. Daha fazla bilgi için ziyaret edin: https://androidaps.readthedocs.io/en/latest/Configuration/Sensitivity-detection-and-COB.html NSClient, Nightscout\'a bağlantıyı sağlar. Şimdi bu kısmı atlayabilirsiniz, ancak ayarlamadan görevleri geçemezsiniz. Lütfen unutmayın: yeni insülin profilleri en az 5 saat DIA gerektirir. Yeni profildeki DIA 5–6 saat, eski insülin profillerinde DIA 3saat\'e eşittir. @@ -645,7 +646,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Uygulama, bildirimler için sistem iznine ihtiyaç duyuyor Uygulamanın BT taraması ve WiFi tanımlaması için konum iznine ihtiyacı var Uygulamanın, günlük dosyalarını saklayabilmesi ve ayarları dışa aktarabilmesi için depolama iznine ihtiyacı var - Uygulama bluetooth iznine ihtiyac duyuyor İstek Navigasyonu aç Navigasyonu kapat @@ -736,9 +736,9 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d BYODA BYODA \'Kendi Dexcom Uygulamanızı Oluşturun\' uygulamasından KŞ değerlerini alın. - COB vs IOB + AKRB vs AİNS Bolus kısıtlaması uygulandı: %1$.2f Ü ile %2$.2f Ü - !!!!! Yavaş karbonhidrat emilimi tespit edildi: zamanın %2$d%% si. Hesaplamanızı iki kez kontrol edin. Aktif Karbonhidrat (COB) olduğundan fazla tahmin edilebilir, bu nedenle daha fazla insülin verilebilir !!!!!]]> + !!!!! Yavaş karbonhidrat emilimi tespit edildi: zamanın %2$d%% si. Hesaplamanızı iki kez kontrol edin. Aktif Karbonhidrat (AKRB) olduğundan fazla tahmin edilebilir, bu nedenle daha fazla insülin verilebilir !!!!!]]> Bolus sihirbazı sonucunun bu kadarını ilet [%] Bolus sihirbazı hesaplamayı gerçekleştirir ancak hesaplanan insülinin yalnızca bu kısmı iletilir. SMB algoritması ile kullanışlıdır. Ertele @@ -746,7 +746,7 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Geçersiz mesaj %1$s ISF: %2$.1f %1$.0fg IC: %2$.1f - %1$.1fg IC: %2$.1f + %1$.1fg Kİ: %2$.1f %1$d%% dk. Profil adı: @@ -897,7 +897,7 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d GBO ve EB (Yayma Bolus) alın Başka bir örnek üzerinden girilen GBO ve EB (Yayma Bolusu) kabul edin İnsülinleri alın - NS veya NSClient aracılığıyla girilen insülini kabul edin (iletilmez, yalnızca aktif insüline göre (IOB) hesaplanır) + NS veya NSClient aracılığıyla girilen insülini kabul edin (iletilmez, yalnızca AİNS\'e göre hesaplanır) Karbonhidratları alın NS veya NSClient aracılığıyla girilen karbonhidratları kabul edin Terapi etkinlikleri alın @@ -970,20 +970,20 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d Maks-KŞ aralık dışında! Geçici Hedef:\nMin: %1$s\nMaks: %2$s\nSüre: %3$s Geçici Hedef:\nHedef: %1$s\nSüre: %2$s - Geçici Hedef:\Neden: %1$s\nHedef: %2$s\nSüre: %3$s + Geçicihedef:\nNeden: %1$s\nHedef: %2$s\nSüre: %3$s Hızlı Asistan: %1$s\nİnsülin: %2$.2fU\nKarb: %3$dg Hesap Mak.:\nİnsulin: %1$.2fÜ\nKarb: %2$dg Girişi cihazda göster: Seçili hızlı asistan artık mevcut değil, lütfen kutucuğu yenileyin Hesaplamayı temel alacak yeni bir KŞ yok! Etkin profil ayarlanmadı! - Aktif karbonhidrat bilinmiyor! KŞ okuması eksik veya son uygulama yeniden başlatılsın mı? + Aktif karbonhidrat (AKRB) bilinmiyor! KŞ okuması eksik veya son uygulama yeniden başlatılsın mı? Karbonhidrat kısıtlaması ihlali! Hesap (KİO: %1$.1f, İDF: %2$.1f) Karb: %1$.2fÜ - COB: %1$.0fg %2$.2fÜ + AKRB: %1$.0fg %2$.2fÜ KŞ: %1$.2fÜ - Aktif İnsülin: %1$.2fÜ + AİNS: %1$.2fÜ Süperbolus: %1$.2fÜ 15\' trend: %1$.2fÜ Yüzde: %1$.2fÜ x %2$d%% ≈ %3$.2fÜ @@ -1037,10 +1037,13 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d sadece saatte sadece telefonda sürükle ve bırak kolu + Ara GlucoRx Aidex Aidex GlucoRx Aidex CGMS\'den KŞ değerleri alır. Şarj seçenekleri tarafından engellendi Bağlantı seçenekleri tarafından engellendi + (Saat Bağlı Değil) + İzin istenirken hata diff --git a/app/src/main/res/values-zh-rCN/exam.xml b/app/src/main/res/values-zh-rCN/exam.xml index ae7b8c0ad4..bb37fdc4ef 100644 --- a/app/src/main/res/values-zh-rCN/exam.xml +++ b/app/src/main/res/values-zh-rCN/exam.xml @@ -137,7 +137,6 @@ 通过注射器或胰岛素笔输注你计算出的“遗漏”胰岛素的一部分。 不做任何事情,允许AndroidAPS纠正高血糖导致的任何结果。 活性胰岛素(IOB) - 选择所有正确的答案。 活性胰岛素IOB数值受发布的临时基础率影响。 当您的血糖低于目标值时,不会被给予高临时基础率。 在没有运动的情况下,活性胰岛素IOB长时间负数表明你的个人配置太强,你需要在配置中减少的胰岛素用量。 diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 0258e545fb..47018ea425 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -432,8 +432,7 @@ 启用本地广播。 OpenAPS SMB 动态ISF(胰岛素敏感系数) - 动态ISF胰岛素敏系数调整比例 %% - 动态ISF的调整因子。设置100%%以上用于更积极的校正,100%%以下则不那么积极校正。 + 动态ISF的调整因子。设置100%以上用于更积极的校正,100%以下则不那么积极校正。 启用 UAM 启用微型大剂量 使用微型大剂量代替使用临时基础率,更快的干预 @@ -638,7 +637,6 @@ 应用程序需要悬浮窗权限用于发送通知。 应用程序需要定位权限,才能进行蓝牙扫描及WIFI识别。 应用程序需要文件存储权限,才能存储日志文件及导出设置。 - 应用程序需要蓝牙权限。 请求 打开导航栏 关闭导航栏 @@ -957,7 +955,6 @@ 目标血糖最大值超出范围! 临时目标:\n最小: %1$s\n最大: %2$s\n持续时间: %3$s 临时目标:\n目标: %1$s\n持续时间: %2$s - 临时目标:\原因: %1$s\n目标: %2$s\n持续时间: %3$s 快速向导: %1$s\n胰岛素: %2$.2fU\n碳水: %3$d克 计算. 向导:\n胰岛素: %1$.2fU\n碳水: %2$d克 在设备上显示条目: diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 76a0593fb9..47dd65198e 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -28,6 +28,7 @@ @string/bg_lang @string/cs_lang @string/de_lang + @string/dk_lang @string/fr_lang @string/nl_lang @string/es_lang @@ -55,6 +56,7 @@ bg cs de + dk fr nl es diff --git a/app/src/main/res/values/exam.xml b/app/src/main/res/values/exam.xml index d61962065a..ff2a4f9d5d 100644 --- a/app/src/main/res/values/exam.xml +++ b/app/src/main/res/values/exam.xml @@ -136,8 +136,20 @@ Compare values in AndroidAPS and pump history (if pump supports this). Bolus a proportion of your calculated ‘missed’ insulin by either syringe/pen or using a prime. Do nothing and allow AndroidAPS to correct any resulting high blood glucose level. + Carbs on Board (COB) + How changing ISF value affects COB calculation? + Increasing ISF will take absorbing carbs a longer time + Increasing ISF will take absorbing carbs a shorter time + Increasing ISF will not affect calculated carbs absorption + How changing IC value affects COB calculation? + Increasing IC will take absorbing carbs a longer time + Increasing IC will take absorbing carbs a shorter time + Increasing IC will not affect calculated carbs absorption + How changing profile percentage affects COB calculation? + Setting profile to 150% will take absorbing carbs a longer time + Setting profile to 150% will take absorbing carbs a shorter time + Setting profile to 150% will not affect calculated carbs absorption Insulin on Board (IOB) - Check all the correct answers. IOB value is affected by issued temporary basals. High temp basal will not be given when your blood sugar is below target. Negative IOB for a substantial period in the absence of exercise suggests your profile is too strong and less insulin is needed in your settings. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 269dd9a883..1702d1bef8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -9,6 +9,7 @@ French German + Danish Greek Chinese @@ -520,8 +521,8 @@ OpenAPS SMB Dynamic ISF DynISFAdjust - DynamicISF Adjustment Factor %% - Adjustment factor for DynamicISF. Set more than 100%% for more aggressive correction doses, and less than 100%% for less aggressive corrections. + DynamicISF Adjustment Factor % + Adjustment factor for DynamicISF. Set more than 100% for more aggressive correction doses, and less than 100% for less aggressive corrections. use_smb use_uam smb_enable_carbs_suggestions_threshold @@ -789,7 +790,6 @@ Application needs system window permission for notifications Application needs location permission for BT scan and WiFi identification Application needs storage permission to be able store log files and export settings - Application needs bluetooth permission Request Open navigation Close navigation @@ -1175,7 +1175,7 @@ Max-BG out of range! Temptarget:\nMin: %1$s\nMax: %2$s\nDuration: %3$s Temptarget:\nTarget: %1$s\nDuration: %2$s - Temptarget:\Reason: %1$s\nTarget: %2$s\nDuration: %3$s + Temptarget:\nReason: %1$s\nTarget: %2$s\nDuration: %3$s QuickWizard: %1$s\nInsulin: %2$.2fU\nCarbs: %3$dg Calc. Wizard:\nInsulin: %1$.2fU\nCarbs: %2$dg Show entry on device: @@ -1242,13 +1242,17 @@ only on watch only on phone drag and drop handle + Search - + GlucoRx Aidex Aidex Receive BG values from GlucoRx Aidex CGMS. Blocked by charging options Blocked by connectivity options - + (No Watch Connected) + Error asking for permissions + dynisf_adjust_sensitivity + Adjust sensitivity and BG diff --git a/app/src/main/res/xml/pref_autotune.xml b/app/src/main/res/xml/pref_autotune.xml index fc5f6dbc72..7cc1d6d488 100644 --- a/app/src/main/res/xml/pref_autotune.xml +++ b/app/src/main/res/xml/pref_autotune.xml @@ -1,10 +1,12 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:validate="http://schemas.android.com/apk/res-auto"> + + app:initialExpandedChildrenCount="0"> --> - + android:title="@string/autotune_default_tune_days_title" + android:dialogMessage="@string/autotune_default_tune_days_summary" + android:digits="0123456789" + android:inputType="number" + android:selectAllOnFocus="true" + android:singleLine="true" + validate:maxNumber="30" + validate:minNumber="1" + validate:testType="numericRange" /> + android:key="@string/key_adjust_sensitivity" + android:title="@string/dynisf_adjust_sensitivity" /> (1).also { val isfJsonArray = isfJson.getJSONArray("sensitivities") val value = isfJsonArray.getJSONObject(0).getDouble("sensitivity") - it.add(0,Block((T.hours(24).secs()) * 1000L, value)) + it.add(0, Block((T.hours(24).secs()) * 1000L, value)) } val icBlocks = ArrayList(1).also { val value = jsonObject.getDouble("carb_ratio") - it.add(0,Block((T.hours(24).secs()) * 1000L, value)) + it.add(0, Block((T.hours(24).secs()) * 1000L, value)) } - val basalBlocks = blockFromJsonArray(jsonObject.getJSONArray("basalprofile"), dateUtil) + val basalBlocks = blockFromJsonArray(jsonObject.getJSONArray("basalprofile")) ?: return null val targetBlocks = ArrayList(1).also { it.add(0, TargetBlock((T.hours(24).secs()) * 1000L, 100.0, 100.0)) @@ -106,14 +129,13 @@ class AutotuneCoreTest : TestBaseWithProfile() { timeZone = timezone, dia = dia ) - return ATProfile(ProfileSealed.Pure(pure), localInsulin, profileInjector).also { it.dateUtil = dateUtil} + return ATProfile(ProfileSealed.Pure(pure), localInsulin, profileInjector).also { it.dateUtil = dateUtil } } catch (ignored: Exception) { return null } } - - fun blockFromJsonArray(jsonArray: JSONArray?, dateUtil: DateUtil): List? { + private fun blockFromJsonArray(jsonArray: JSONArray?): List? { val size = jsonArray?.length() ?: return null val ret = ArrayList(size) try { diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePrepTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePrepTest.kt new file mode 100644 index 0000000000..ea797d8566 --- /dev/null +++ b/app/src/test/java/info/nightscout/androidaps/plugins/general/autotune/AutotunePrepTest.kt @@ -0,0 +1,333 @@ +package info.nightscout.androidaps.plugins.general.autotune + +import dagger.android.HasAndroidInjector +import info.nightscout.androidaps.R +import info.nightscout.androidaps.TestBaseWithProfile +import info.nightscout.androidaps.data.IobTotal +import info.nightscout.androidaps.data.LocalInsulin +import info.nightscout.androidaps.data.ProfileSealed +import info.nightscout.androidaps.data.PureProfile +import info.nightscout.androidaps.database.AppRepository +import info.nightscout.androidaps.database.data.Block +import info.nightscout.androidaps.database.data.TargetBlock +import info.nightscout.androidaps.database.entities.Bolus +import info.nightscout.androidaps.database.entities.Carbs +import info.nightscout.androidaps.database.entities.GlucoseValue +import info.nightscout.androidaps.extensions.shiftBlock +import info.nightscout.androidaps.interfaces.* +import info.nightscout.androidaps.plugins.general.autotune.data.* +import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.androidaps.utils.JsonHelper +import info.nightscout.androidaps.utils.T +import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.sharedPreferences.SP +import org.json.JSONArray +import org.json.JSONObject +import org.junit.Assert +import org.junit.Before +import org.junit.Test +import org.mockito.Mock +import org.mockito.Mockito.`when` +import java.io.File +import java.util.* + +class AutotunePrepTest : TestBaseWithProfile() { + + @Mock lateinit var sp: SP + @Mock lateinit var autotuneFS: AutotuneFS + @Mock lateinit var injector: HasAndroidInjector + @Mock lateinit var activePlugin: ActivePlugin + @Mock lateinit var repository: AppRepository + private lateinit var autotunePrep: AutotunePrep + private lateinit var autotuneIob: TestAutotuneIob + private var ts = 0 + private var min5mCarbImpact = 0.0 + private var autotuneMin = 0.0 + private var autotuneMax = 0.0 + private var startDayTime = 0L + + @Before + fun initData() { + ts = T.msecs(TimeZone.getDefault().getOffset(System.currentTimeMillis()).toLong()).hours().toInt() - 2 + } + + @Test + fun autotunePrepTest1() { // Test if categorisation with standard treatments with carbs is Ok + val inputIobJson = File("src/test/res/autotune/test1/oaps-iobCalc.2022-05-21.json").readText() //json files build with iob/activity calculated by OAPS + val iobOapsCalculation = buildIobOaps(JSONArray(inputIobJson)) + autotuneIob = TestAutotuneIob(aapsLogger, repository, profileFunction, sp, dateUtil, activePlugin, autotuneFS, iobOapsCalculation) + autotunePrep = AutotunePrep(aapsLogger, sp, dateUtil, autotuneFS, autotuneIob) + val inputProfileJson = File("src/test/res/autotune/test1/profile.pump.json").readText() + val inputProfile = atProfileFromOapsJson(JSONObject(inputProfileJson), dateUtil)!! + val prepJson = File("src/test/res/autotune/test1/autotune.2022-05-21.json").readText() + val oapsPreppedGlucose = PreppedGlucose(JSONObject(prepJson), dateUtil) //prep data calculated by OpenAPS autotune + val oapsEntriesJson = File("src/test/res/autotune/test1/aaps-entries.2022-05-21.json").readText() + autotuneIob.glucose = buildGlucose(JSONArray(oapsEntriesJson)) + val oapsTreatmentsJson = File("src/test/res/autotune/test1/aaps-treatments.2022-05-21.json").readText() + autotuneIob.meals = buildMeals(JSONArray(oapsTreatmentsJson)) //Only meals is used in unit test, Insulin only used for iob calculation + autotuneIob.boluses = buildBoluses(oapsPreppedGlucose) //Values from oapsPrepData because linked to iob calculation method for TBR + `when`(sp.getDouble(R.string.key_openapsama_min_5m_carbimpact, 3.0)).thenReturn(min5mCarbImpact) + `when`(sp.getBoolean(R.string.key_autotune_categorize_uam_as_basal, false)).thenReturn(false) + val aapsPreppedGlucose = autotunePrep.categorizeBGDatums(inputProfile, inputProfile.localInsulin, false) + try { + aapsPreppedGlucose?.let { // compare all categorization calculated by aaps plugin (aapsPreppedGlucose) with categorization calculated by OpenAPS (oapsPreppedGlucose) + for (i in aapsPreppedGlucose.crData.indices) + Assert.assertTrue(oapsPreppedGlucose.crData[i].equals(aapsPreppedGlucose.crData[i])) + for (i in aapsPreppedGlucose.csfGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.csfGlucoseData[i].equals(aapsPreppedGlucose.csfGlucoseData[i])) + oapsPreppedGlucose.isfGlucoseData = oapsPreppedGlucose.isfGlucoseData.sortedBy { it.date } + aapsPreppedGlucose.isfGlucoseData = aapsPreppedGlucose.isfGlucoseData.sortedBy { it.date } + for (i in aapsPreppedGlucose.isfGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.isfGlucoseData[i].equals(aapsPreppedGlucose.isfGlucoseData[i])) + oapsPreppedGlucose.basalGlucoseData = oapsPreppedGlucose.basalGlucoseData.sortedBy { it.date } + aapsPreppedGlucose.basalGlucoseData = aapsPreppedGlucose.basalGlucoseData.sortedBy { it.date } + for (i in aapsPreppedGlucose.basalGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.basalGlucoseData[i].equals(aapsPreppedGlucose.basalGlucoseData[i])) + } + ?: Assert.fail() + } catch (e: Exception) { + Assert.fail() + } + } + + @Test + fun autotunePrepTest2() { // Test if categorisation without carbs (full UAM) and categorize UAM as basal false is Ok + val inputIobJson = File("src/test/res/autotune/test2/oaps-iobCalc.2022-05-21.json").readText() //json files build with iob/activity calculated by OAPS + val iobOapsCalculation = buildIobOaps(JSONArray(inputIobJson)) + autotuneIob = TestAutotuneIob(aapsLogger, repository, profileFunction, sp, dateUtil, activePlugin, autotuneFS, iobOapsCalculation) + autotunePrep = AutotunePrep(aapsLogger, sp, dateUtil, autotuneFS, autotuneIob) + val inputProfileJson = File("src/test/res/autotune/test2/profile.pump.json").readText() + val inputProfile = atProfileFromOapsJson(JSONObject(inputProfileJson), dateUtil)!! + val prepJson = File("src/test/res/autotune/test2/autotune.2022-05-21.json").readText() + val oapsPreppedGlucose = PreppedGlucose(JSONObject(prepJson), dateUtil) //prep data calculated by OpenAPS autotune + val oapsEntriesJson = File("src/test/res/autotune/test2/aaps-entries.2022-05-21.json").readText() + autotuneIob.glucose = buildGlucose(JSONArray(oapsEntriesJson)) + val oapsTreatmentsJson = File("src/test/res/autotune/test2/aaps-treatments.2022-05-21.json").readText() + autotuneIob.meals = buildMeals(JSONArray(oapsTreatmentsJson)) //Only meals is used in unit test, Insulin only used for iob calculation + autotuneIob.boluses = buildBoluses(oapsPreppedGlucose) //Values from oapsPrepData because linked to iob calculation method for TBR + `when`(sp.getDouble(R.string.key_openapsama_min_5m_carbimpact, 3.0)).thenReturn(min5mCarbImpact) + `when`(sp.getBoolean(R.string.key_autotune_categorize_uam_as_basal, false)).thenReturn(false) // CategorizeUAM as Basal = False + val aapsPreppedGlucose = autotunePrep.categorizeBGDatums(inputProfile, inputProfile.localInsulin, false) + try { + aapsPreppedGlucose?.let { // compare all categorization calculated by aaps plugin (aapsPreppedGlucose) with categorization calculated by OpenAPS (oapsPreppedGlucose) + for (i in aapsPreppedGlucose.crData.indices) + Assert.assertTrue(oapsPreppedGlucose.crData[i].equals(aapsPreppedGlucose.crData[i])) + for (i in aapsPreppedGlucose.csfGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.csfGlucoseData[i].equals(aapsPreppedGlucose.csfGlucoseData[i])) + oapsPreppedGlucose.isfGlucoseData = oapsPreppedGlucose.isfGlucoseData.sortedBy { it.date } + aapsPreppedGlucose.isfGlucoseData = aapsPreppedGlucose.isfGlucoseData.sortedBy { it.date } + for (i in aapsPreppedGlucose.isfGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.isfGlucoseData[i].equals(aapsPreppedGlucose.isfGlucoseData[i])) + oapsPreppedGlucose.basalGlucoseData = oapsPreppedGlucose.basalGlucoseData.sortedBy { it.date } + aapsPreppedGlucose.basalGlucoseData = aapsPreppedGlucose.basalGlucoseData.sortedBy { it.date } + for (i in aapsPreppedGlucose.basalGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.basalGlucoseData[i].equals(aapsPreppedGlucose.basalGlucoseData[i])) + } + ?: Assert.fail() + } catch (e: Exception) { + Assert.fail() + } + } + + @Test + fun autotunePrepTest3() { // Test if categorisation without carbs (full UAM) and categorize UAM as basal true is Ok + val inputIobJson = File("src/test/res/autotune/test3/oaps-iobCalc.2022-05-21.json").readText() //json files build with iob/activity calculated by OAPS + val iobOapsCalculation = buildIobOaps(JSONArray(inputIobJson)) + autotuneIob = TestAutotuneIob(aapsLogger, repository, profileFunction, sp, dateUtil, activePlugin, autotuneFS, iobOapsCalculation) + autotunePrep = AutotunePrep(aapsLogger, sp, dateUtil, autotuneFS, autotuneIob) + val inputProfileJson = File("src/test/res/autotune/test3/profile.pump.json").readText() + val inputProfile = atProfileFromOapsJson(JSONObject(inputProfileJson), dateUtil)!! + val prepJson = File("src/test/res/autotune/test3/autotune.2022-05-21.json").readText() + val oapsPreppedGlucose = PreppedGlucose(JSONObject(prepJson), dateUtil) //prep data calculated by OpenAPS autotune + val oapsEntriesJson = File("src/test/res/autotune/test3/aaps-entries.2022-05-21.json").readText() + autotuneIob.glucose = buildGlucose(JSONArray(oapsEntriesJson)) + val oapsTreatmentsJson = File("src/test/res/autotune/test3/aaps-treatments.2022-05-21.json").readText() + autotuneIob.meals = buildMeals(JSONArray(oapsTreatmentsJson)) //Only meals is used in unit test, Insulin only used for iob calculation + autotuneIob.boluses = buildBoluses(oapsPreppedGlucose) //Values from oapsPrepData because linked to iob calculation method for TBR + `when`(sp.getDouble(R.string.key_openapsama_min_5m_carbimpact, 3.0)).thenReturn(min5mCarbImpact) + `when`(sp.getBoolean(R.string.key_autotune_categorize_uam_as_basal, false)).thenReturn(true) // CategorizeUAM as Basal = True + val aapsPreppedGlucose = autotunePrep.categorizeBGDatums(inputProfile, inputProfile.localInsulin, false) + try { + aapsPreppedGlucose?.let { // compare all categorization calculated by aaps plugin (aapsPreppedGlucose) with categorization calculated by OpenAPS (oapsPreppedGlucose) + for (i in aapsPreppedGlucose.crData.indices) + Assert.assertTrue(oapsPreppedGlucose.crData[i].equals(aapsPreppedGlucose.crData[i])) + for (i in aapsPreppedGlucose.csfGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.csfGlucoseData[i].equals(aapsPreppedGlucose.csfGlucoseData[i])) + oapsPreppedGlucose.isfGlucoseData = oapsPreppedGlucose.isfGlucoseData.sortedBy { it.date } + aapsPreppedGlucose.isfGlucoseData = aapsPreppedGlucose.isfGlucoseData.sortedBy { it.date } + for (i in aapsPreppedGlucose.isfGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.isfGlucoseData[i].equals(aapsPreppedGlucose.isfGlucoseData[i])) + oapsPreppedGlucose.basalGlucoseData = oapsPreppedGlucose.basalGlucoseData.sortedBy { it.date } + aapsPreppedGlucose.basalGlucoseData = aapsPreppedGlucose.basalGlucoseData.sortedBy { it.date } + for (i in aapsPreppedGlucose.basalGlucoseData.indices) + Assert.assertTrue(oapsPreppedGlucose.basalGlucoseData[i].equals(aapsPreppedGlucose.basalGlucoseData[i])) + } + ?: Assert.fail() + } catch (e: Exception) { + Assert.fail() + } + } + + /************************************************************************************************************************************************************************************* + * OpenAPS profile for Autotune only have one ISF value and one IC value + */ + @Suppress("SpellCheckingInspection") + private fun atProfileFromOapsJson(jsonObject: JSONObject, dateUtil: DateUtil, defaultUnits: String? = null): ATProfile? { + try { + min5mCarbImpact = JsonHelper.safeGetDoubleAllowNull(jsonObject, "min_5m_carbimpact") ?: return null + autotuneMin = JsonHelper.safeGetDoubleAllowNull(jsonObject, "autosens_min") ?: return null + autotuneMax = JsonHelper.safeGetDoubleAllowNull(jsonObject, "autosens_max") ?: return null + val txtUnits = JsonHelper.safeGetStringAllowNull(jsonObject, "units", defaultUnits) ?: return null + val units = GlucoseUnit.fromText(txtUnits) + val dia = JsonHelper.safeGetDoubleAllowNull(jsonObject, "dia") ?: return null + val peak = JsonHelper.safeGetIntAllowNull(jsonObject, "insulinPeakTime") ?: return null + val localInsulin = LocalInsulin("insulin", peak, dia) + val timezone = TimeZone.getTimeZone(JsonHelper.safeGetString(jsonObject, "timezone", "UTC")) + val isfJson = jsonObject.getJSONObject("isfProfile") + val isfBlocks = ArrayList(1).also { + val isfJsonArray = isfJson.getJSONArray("sensitivities") + val value = isfJsonArray.getJSONObject(0).getDouble("sensitivity") + it.add(0, Block((T.hours(24).secs()) * 1000L, value)) + } + val icBlocks = ArrayList(1).also { + val value = jsonObject.getDouble("carb_ratio") + it.add(0, Block((T.hours(24).secs()) * 1000L, value)) + } + val basalBlocks = blockFromJsonArray(jsonObject.getJSONArray("basalprofile")) + ?: return null + val targetBlocks = ArrayList(1).also { + it.add(0, TargetBlock((T.hours(24).secs()) * 1000L, 100.0, 100.0)) + } + + val pure = PureProfile( + jsonObject = jsonObject, + basalBlocks = basalBlocks.shiftBlock(1.0,ts), + isfBlocks = isfBlocks, + icBlocks = icBlocks, + targetBlocks = targetBlocks, + glucoseUnit = units, + timeZone = timezone, + dia = dia + ) + return ATProfile(ProfileSealed.Pure(pure), localInsulin, profileInjector).also { it.dateUtil = dateUtil } + } catch (ignored: Exception) { + return null + } + } + + private fun blockFromJsonArray(jsonArray: JSONArray?): List? { + val size = jsonArray?.length() ?: return null + val ret = ArrayList(size) + try { + for (index in 0 until jsonArray.length() - 1) { + val o = jsonArray.getJSONObject(index) + val tas = o.getInt("minutes") * 60 + val next = jsonArray.getJSONObject(index + 1) + val nextTas = next.getInt("minutes") * 60 + val value = o.getDouble("rate") + if (tas % 3600 != 0) return null + if (nextTas % 3600 != 0) return null + ret.add(index, Block((nextTas - tas) * 1000L, value)) + } + val last: JSONObject = jsonArray.getJSONObject(jsonArray.length() - 1) + val lastTas = last.getInt("minutes") * 60 + val value = last.getDouble("rate") + ret.add(jsonArray.length() - 1, Block((T.hours(24).secs() - lastTas) * 1000L, value)) + } catch (e: Exception) { + return null + } + return ret + } + + private fun buildBoluses(preppedGlucose: PreppedGlucose): ArrayList { //if categorization is correct then I return for dose function the crInsulin calculated in Oaps + val boluses: ArrayList = ArrayList() + for (i in preppedGlucose.crData.indices) { + boluses.add( + Bolus( + timestamp = preppedGlucose.crData[i].crEndTime, + amount = preppedGlucose.crData[i].crInsulin, + type = Bolus.Type.NORMAL + ) + ) + } + if (boluses.size == 0) //Add at least one insulin treatment for tests to avoid return null in categorization + boluses.add( + Bolus( + timestamp = startDayTime, + amount = 1.0, + type = Bolus.Type.NORMAL + ) + ) + return boluses + } + + private fun buildMeals(jsonArray: JSONArray): ArrayList { + val list: ArrayList = ArrayList() + for (index in 0 until jsonArray.length()) { + val json = jsonArray.getJSONObject(index) + val value = JsonHelper.safeGetDouble(json, "carbs", 0.0) + val timestamp = JsonHelper.safeGetLong(json, "date") + if (value > 0.0 && timestamp > startDayTime) { + list.add(Carbs(timestamp = timestamp, amount = value, duration = 0)) + } + } + return list + } + + private fun buildGlucose(jsonArray: JSONArray): List { + val list: ArrayList = ArrayList() + for (index in 0 until jsonArray.length()) { + val json = jsonArray.getJSONObject(index) + val value = JsonHelper.safeGetDouble(json, "sgv") + val timestamp = JsonHelper.safeGetLong(json, "date") + list.add(GlucoseValue(raw = value, noise = 0.0, value = value, timestamp = timestamp, sourceSensor = GlucoseValue.SourceSensor.UNKNOWN, trendArrow = GlucoseValue.TrendArrow.FLAT)) + } + if (list.size > 0) + startDayTime = list[list.size - 1].timestamp + return list + } + + private fun buildIobOaps(jsonArray: JSONArray): ArrayList { //if categorization is correct then I return for dose function the crInsulin calculated in Oaps + val list: ArrayList = ArrayList() + for (index in 0 until jsonArray.length()) { + val json = jsonArray.getJSONObject(index) + val time = JsonHelper.safeGetLong(json, "date") + val iob = JsonHelper.safeGetDouble(json, "iob") + val activity = JsonHelper.safeGetDouble(json, "activity") + val iobTotal = IobTotal(time) + iobTotal.iob = iob + iobTotal.activity = activity + list.add(iobTotal) + } + return list + } + + class TestAutotuneIob( + val aapsLogger: AAPSLogger, + repository: AppRepository, + val profileFunction: ProfileFunction, + val sp: SP, + val dateUtil: DateUtil, + val activePlugin: ActivePlugin, + autotuneFS: AutotuneFS, + private val iobOapsCalculation: ArrayList + ) : AutotuneIob( + aapsLogger, + repository, + profileFunction, + sp, + dateUtil, + activePlugin, + autotuneFS + ) { + + override fun getIOB(time: Long, localInsulin: LocalInsulin): IobTotal { + val bolusIob = IobTotal(time) + iobOapsCalculation.forEach { + if (it.time == time) + return it + } + return bolusIob + } + } +} diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/general/autotune/PreppedGlucoseTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/general/autotune/PreppedGlucoseTest.kt index f769e5af72..9150c87bb2 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/general/autotune/PreppedGlucoseTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/general/autotune/PreppedGlucoseTest.kt @@ -1,35 +1,48 @@ package info.nightscout.androidaps.plugins.general.autotune -import android.content.Context -import info.nightscout.androidaps.TestBase -import info.nightscout.androidaps.plugins.general.autotune.data.* -import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.androidaps.TestBaseWithProfile +import info.nightscout.androidaps.plugins.general.autotune.data.BGDatum +import info.nightscout.androidaps.plugins.general.autotune.data.CRDatum +import info.nightscout.androidaps.plugins.general.autotune.data.PreppedGlucose import org.json.JSONObject import org.junit.Assert import org.junit.Before import org.junit.Test -import org.mockito.Mock import java.io.File -class PreppedGlucoseTest : TestBase() { - @Mock lateinit var context: Context - lateinit var dateUtil: DateUtil - lateinit var prep1: PreppedGlucose - lateinit var prepjson1: String +class PreppedGlucoseTest : TestBaseWithProfile() { + + private lateinit var prep1: PreppedGlucose + private lateinit var prepJson1: String @Before fun initData() { - dateUtil = DateUtil(context) - prepjson1 = File("src/test/res/autotune/test1/autotune.2022-05-21.json").readText() - prep1 = PreppedGlucose(JSONObject(prepjson1), dateUtil) + prepJson1 = File("src/test/res/autotune/test1/autotune.2022-05-21.json").readText() + prep1 = PreppedGlucose(JSONObject(prepJson1), dateUtil) } @Test fun preppedGlucoseLoadTest() { // Test if load from file of OpenAPS categorisation is Ok - val crData0 = CRDatum(JSONObject("{\"CRInitialIOB\":13.594,\"CRInitialBG\":123,\"CRInitialCarbTime\":\"2022-05-21T07:54:09.000Z\",\"CREndIOB\":-0.155,\"CREndBG\":98,\"CREndTime\":\"2022-05-21T11:19:08.000Z\",\"CRCarbs\":70,\"CRInsulin\":-2.13}"), dateUtil) - val csfDataEnd = BGDatum(JSONObject("{\"device\":\"AndroidAPS-DexcomG6\",\"date\":1653176050000,\"dateString\":\"2022-05-21T23:34:10.000Z\",\"isValid\":true,\"sgv\":127,\"direction\":\"Flat\",\"type\":\"sgv\",\"_id\":\"6289771371a363000480abc1\",\"glucose\":127,\"avgDelta\":\"2.50\",\"BGI\":-2.93,\"deviation\":\"5.43\",\"mealCarbs\":0,\"mealAbsorption\":\"end\"}"), dateUtil) - val isfData0 = BGDatum(JSONObject("{\"device\":\"AndroidAPS-DexcomG6\",\"date\":1653108249000,\"dateString\":\"2022-05-21T04:44:09.000Z\",\"isValid\":true,\"sgv\":123,\"direction\":\"FortyFiveDown\",\"type\":\"sgv\",\"_id\":\"62886e2919e2e60004989bba\",\"glucose\":123,\"avgDelta\":\"-7.50\",\"BGI\":-7.59,\"deviation\":\"0.09\"}"), dateUtil) - val basalDataEnd = BGDatum(JSONObject("{\"device\":\"AndroidAPS-DexcomG6\",\"date\":1653180549000,\"dateString\":\"2022-05-22T00:49:09.000Z\",\"isValid\":true,\"sgv\":121,\"direction\":\"FortyFiveDown\",\"type\":\"sgv\",\"_id\":\"628988a3da46aa0004d1e0f5\",\"glucose\":121,\"avgDelta\":\"-5.25\",\"BGI\":-3.32,\"deviation\":\"-1.93\"}"), dateUtil) + val crData0 = + CRDatum( + JSONObject("{\"CRInitialIOB\":13.594,\"CRInitialBG\":123,\"CRInitialCarbTime\":\"2022-05-21T07:54:09.000Z\",\"CREndIOB\":-0.155,\"CREndBG\":98,\"CREndTime\":\"2022-05-21T11:19:08.000Z\",\"CRCarbs\":70,\"CRInsulin\":-2.13}"), + dateUtil + ) + val csfDataEnd = + BGDatum( + JSONObject("{\"device\":\"AndroidAPS-DexcomG6\",\"date\":1653176050000,\"dateString\":\"2022-05-21T23:34:10.000Z\",\"isValid\":true,\"sgv\":127,\"direction\":\"Flat\",\"type\":\"sgv\",\"_id\":\"6289771371a363000480abc1\",\"glucose\":127,\"avgDelta\":\"2.50\",\"BGI\":-2.93,\"deviation\":\"5.43\",\"mealCarbs\":0,\"mealAbsorption\":\"end\"}"), + dateUtil + ) + val isfData0 = + BGDatum( + JSONObject("{\"device\":\"AndroidAPS-DexcomG6\",\"date\":1653108249000,\"dateString\":\"2022-05-21T04:44:09.000Z\",\"isValid\":true,\"sgv\":123,\"direction\":\"FortyFiveDown\",\"type\":\"sgv\",\"_id\":\"62886e2919e2e60004989bba\",\"glucose\":123,\"avgDelta\":\"-7.50\",\"BGI\":-7.59,\"deviation\":\"0.09\"}"), + dateUtil + ) + val basalDataEnd = + BGDatum( + JSONObject("{\"device\":\"AndroidAPS-DexcomG6\",\"date\":1653180549000,\"dateString\":\"2022-05-22T00:49:09.000Z\",\"isValid\":true,\"sgv\":121,\"direction\":\"FortyFiveDown\",\"type\":\"sgv\",\"_id\":\"628988a3da46aa0004d1e0f5\",\"glucose\":121,\"avgDelta\":\"-5.25\",\"BGI\":-3.32,\"deviation\":\"-1.93\"}"), + dateUtil + ) Assert.assertEquals(3, prep1.crData.size) Assert.assertTrue(crData0.equals(prep1.crData[0])) Assert.assertTrue(csfDataEnd.equals(prep1.csfGlucoseData[prep1.csfGlucoseData.size - 1])) diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinLyumjevPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinLyumjevPluginTest.kt index c906ad4b27..27f3b16011 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinLyumjevPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinLyumjevPluginTest.kt @@ -6,9 +6,10 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.shared.logging.AAPSLogger import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule @@ -31,6 +32,7 @@ class InsulinLyumjevPluginTest { @Mock lateinit var profileFunction: ProfileFunction @Mock lateinit var aapsLogger: AAPSLogger @Mock lateinit var config: Config + @Mock lateinit var hardLimits: HardLimits private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -39,7 +41,7 @@ class InsulinLyumjevPluginTest { @Before fun setup() { - sut = InsulinLyumjevPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config) + sut = InsulinLyumjevPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) } @Test diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefBasePluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefBasePluginTest.kt index 1aada50c74..254974283b 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefBasePluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefBasePluginTest.kt @@ -9,17 +9,17 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.insulin.InsulinOrefBasePlugin.Companion.MIN_DIA -import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.shared.logging.AAPSLogger import org.json.JSONObject import org.junit.Assert import org.junit.Before import org.junit.Rule import org.junit.Test import org.mockito.Mock +import org.mockito.Mockito.`when` import org.mockito.junit.MockitoJUnit import org.mockito.junit.MockitoRule @@ -35,10 +35,9 @@ class InsulinOrefBasePluginTest { profileFunction: ProfileFunction, rxBus: RxBus, aapsLogger: AAPSLogger, - config: Config - ) : InsulinOrefBasePlugin( - injector, rh, profileFunction, rxBus, aapsLogger, config - ) { + config: Config, + hardLimits: HardLimits + ) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { override fun sendShortDiaNotification(dia: Double) { shortDiaNotificationSend = true @@ -62,13 +61,13 @@ class InsulinOrefBasePluginTest { private lateinit var sut: InsulinBaseTest - @Mock lateinit var defaultValueHelper: DefaultValueHelper @Mock lateinit var rh: ResourceHelper @Mock lateinit var profileFunction: ProfileFunction @Mock lateinit var rxBus: RxBus @Mock lateinit var aapsLogger: AAPSLogger @Mock lateinit var activePlugin: ActivePlugin @Mock lateinit var config: Config + @Mock lateinit var hardLimits: HardLimits private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -77,30 +76,23 @@ class InsulinOrefBasePluginTest { @Before fun setUp() { - sut = InsulinBaseTest(injector, rh, profileFunction, rxBus, aapsLogger, config) + sut = InsulinBaseTest(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) + `when`(hardLimits.minDia()).thenReturn(5.0) } @Test fun testGetDia() { - Assert.assertEquals(MIN_DIA, sut.dia, 0.0) - testUserDefinedDia = MIN_DIA + 1 - Assert.assertEquals(MIN_DIA + 1, sut.dia, 0.0) - testUserDefinedDia = MIN_DIA - 1 - Assert.assertEquals(MIN_DIA, sut.dia, 0.0) + Assert.assertEquals(5.0, sut.dia, 0.0) + testUserDefinedDia = 5.0 + 1 + Assert.assertEquals(5.0 + 1, sut.dia, 0.0) + testUserDefinedDia = 5.0 - 1 + Assert.assertEquals(5.0, sut.dia, 0.0) Assert.assertTrue(shortDiaNotificationSend) } - @Test - fun minDiaTes() { - Assert.assertEquals(5.0, MIN_DIA, 0.0001) - } - @Test fun testIobCalcForTreatment() { val treatment = Bolus(timestamp = 0, amount = 10.0, type = Bolus.Type.NORMAL) - val expected = Iob() - Assert.assertEquals(expected.iobContrib, sut.iobCalcForTreatment(treatment, 0, 0.0).iobContrib, 0.001) - Assert.assertEquals(expected.activityContrib, sut.iobCalcForTreatment(treatment, 0, 0.0).activityContrib, 0.001) testPeak = 30 testUserDefinedDia = 4.0 val time = System.currentTimeMillis() diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefFreePeakPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefFreePeakPluginTest.kt index c71c61655b..75d996285d 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefFreePeakPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefFreePeakPluginTest.kt @@ -7,8 +7,9 @@ import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.utils.HardLimits import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert.assertEquals import org.junit.Before @@ -31,6 +32,7 @@ class InsulinOrefFreePeakPluginTest : TestBase() { @Mock lateinit var rxBus: RxBus @Mock lateinit var profileFunction: ProfileFunction @Mock lateinit var config: Config + @Mock lateinit var hardLimits: HardLimits private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -39,7 +41,7 @@ class InsulinOrefFreePeakPluginTest : TestBase() { @Before fun setup() { - sut = InsulinOrefFreePeakPlugin( injector, sp, rh, profileFunction, rxBus, aapsLogger, config) + sut = InsulinOrefFreePeakPlugin(injector, sp, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) } @Test diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefRapidActingPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefRapidActingPluginTest.kt index fb2a5f91da..317ccabf5f 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefRapidActingPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefRapidActingPluginTest.kt @@ -6,9 +6,10 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.shared.logging.AAPSLogger import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule @@ -31,6 +32,7 @@ class InsulinOrefRapidActingPluginTest { @Mock lateinit var profileFunction: ProfileFunction @Mock lateinit var aapsLogger: AAPSLogger @Mock lateinit var config: Config + @Mock lateinit var hardLimits: HardLimits private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -39,7 +41,7 @@ class InsulinOrefRapidActingPluginTest { @Before fun setup() { - sut = InsulinOrefRapidActingPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config) + sut = InsulinOrefRapidActingPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) } @Test diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt index 2de46cf16b..1944d0a0f0 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt @@ -6,9 +6,10 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.shared.logging.AAPSLogger import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule @@ -31,6 +32,7 @@ class InsulinOrefUltraRapidActingPluginTest { @Mock lateinit var profileFunction: ProfileFunction @Mock lateinit var aapsLogger: AAPSLogger @Mock lateinit var config: Config + @Mock lateinit var hardLimits: HardLimits private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -39,7 +41,7 @@ class InsulinOrefUltraRapidActingPluginTest { @Before fun setup() { - sut = InsulinOrefUltraRapidActingPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config) + sut = InsulinOrefUltraRapidActingPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) } @Test diff --git a/app/src/test/res/autotune/test1/Convert_Log2JSON.xlsx b/app/src/test/res/autotune/test1/Convert_Log2JSON.xlsx new file mode 100644 index 0000000000..5f4d84fff9 Binary files /dev/null and b/app/src/test/res/autotune/test1/Convert_Log2JSON.xlsx differ diff --git a/app/src/test/res/autotune/test1/oaps-iobCalc.2022-05-21.json b/app/src/test/res/autotune/test1/oaps-iobCalc.2022-05-21.json new file mode 100644 index 0000000000..92304dbf45 --- /dev/null +++ b/app/src/test/res/autotune/test1/oaps-iobCalc.2022-05-21.json @@ -0,0 +1,286 @@ +[ + { "iob": 5.249, "activity": 0.0391, "date": 1653099848000}, + { "iob": 5.292, "activity": 0.0438, "date": 1653100148000}, + { "iob": 4.964, "activity": 0.047, "date": 1653100449000}, + { "iob": 4.674, "activity": 0.0489, "date": 1653100748000}, + { "iob": 4.377, "activity": 0.0498, "date": 1653101048000}, + { "iob": 4.077, "activity": 0.0498, "date": 1653101348000}, + { "iob": 3.73, "activity": 0.0491, "date": 1653101648000}, + { "iob": 3.389, "activity": 0.0476, "date": 1653101948000}, + { "iob": 3.055, "activity": 0.0457, "date": 1653102249000}, + { "iob": 2.782, "activity": 0.0436, "date": 1653102548000}, + { "iob": 2.47, "activity": 0.0411, "date": 1653102848000}, + { "iob": 2.22, "activity": 0.0386, "date": 1653103149000}, + { "iob": 1.935, "activity": 0.0358, "date": 1653103448000}, + { "iob": 1.711, "activity": 0.0332, "date": 1653103748000}, + { "iob": 1.452, "activity": 0.0304, "date": 1653104049000}, + { "iob": 1.927, "activity": 0.028, "date": 1653104349000}, + { "iob": 1.84, "activity": 0.027, "date": 1653104648000}, + { "iob": 1.658, "activity": 0.0258, "date": 1653104949000}, + { "iob": 1.482, "activity": 0.0245, "date": 1653105248000}, + { "iob": 1.264, "activity": 0.0229, "date": 1653105549000}, + { "iob": 1.104, "activity": 0.0212, "date": 1653105848000}, + { "iob": 0.952, "activity": 0.0194, "date": 1653106149000}, + { "iob": 1.619, "activity": 0.0181, "date": 1653106449000}, + { "iob": 1.678, "activity": 0.0184, "date": 1653106749000}, + { "iob": 1.775, "activity": 0.0187, "date": 1653107048000}, + { "iob": 1.581, "activity": 0.019, "date": 1653107348000}, + { "iob": 1.437, "activity": 0.0188, "date": 1653107648000}, + { "iob": 1.294, "activity": 0.0183, "date": 1653107948000}, + { "iob": 1.153, "activity": 0.0176, "date": 1653108249000}, + { "iob": 1.017, "activity": 0.0167, "date": 1653108548000}, + { "iob": 0.887, "activity": 0.0156, "date": 1653108848000}, + { "iob": 1.011, "activity": 0.0147, "date": 1653109148000}, + { "iob": 0.889, "activity": 0.0141, "date": 1653109448000}, + { "iob": 0.771, "activity": 0.0133, "date": 1653109748000}, + { "iob": 0.656, "activity": 0.0124, "date": 1653110049000}, + { "iob": 0.547, "activity": 0.0114, "date": 1653110348000}, + { "iob": 0.392, "activity": 0.0103, "date": 1653110649000}, + { "iob": 0.294, "activity": 0.0091, "date": 1653110949000}, + { "iob": 0.2, "activity": 0.008, "date": 1653111249000}, + { "iob": 0.065, "activity": 0.0066, "date": 1653111549000}, + { "iob": 0.034, "activity": 0.0055, "date": 1653111849000}, + { "iob": 0.549, "activity": 0.0048, "date": 1653112148000}, + { "iob": 0.674, "activity": 0.0053, "date": 1653112449000}, + { "iob": 0.597, "activity": 0.0057, "date": 1653112749000}, + { "iob": 0.468, "activity": 0.0058, "date": 1653113049000}, + { "iob": 0.389, "activity": 0.0057, "date": 1653113349000}, + { "iob": 0.262, "activity": 0.0053, "date": 1653113649000}, + { "iob": 0.186, "activity": 0.0048, "date": 1653113949000}, + { "iob": 0.064, "activity": 0.0041, "date": 1653114249000}, + { "iob": -0.005, "activity": 0.0034, "date": 1653114549000}, + { "iob": -0.12, "activity": 0.0026, "date": 1653114849000}, + { "iob": -0.181, "activity": 0.0018, "date": 1653115149000}, + { "iob": -0.287, "activity": 0.0008, "date": 1653115449000}, + { "iob": -0.34, "activity": 0, "date": 1653115749000}, + { "iob": -0.436, "activity": -0.001, "date": 1653116049000}, + { "iob": -0.48, "activity": -0.0018, "date": 1653116349000}, + { "iob": -0.519, "activity": -0.0026, "date": 1653116649000}, + { "iob": -0.554, "activity": -0.0034, "date": 1653116949000}, + { "iob": -0.585, "activity": -0.0041, "date": 1653117249000}, + { "iob": -0.662, "activity": -0.0049, "date": 1653117549000}, + { "iob": -0.687, "activity": -0.0055, "date": 1653117848000}, + { "iob": -0.708, "activity": -0.0061, "date": 1653118149000}, + { "iob": -0.726, "activity": -0.0066, "date": 1653118449000}, + { "iob": -0.351, "activity": -0.0071, "date": 1653118748000}, + { "iob": -0.218, "activity": -0.0064, "date": 1653119049000}, + { "iob": -0.088, "activity": -0.0055, "date": 1653119349000}, + { "iob": 13.594, "activity": 0.0023, "date": 1653119649000}, + { "iob": 13.552, "activity": 0.0331, "date": 1653119949000}, + { "iob": 13.224, "activity": 0.0573, "date": 1653120249000}, + { "iob": 12.838, "activity": 0.076, "date": 1653120548000}, + { "iob": 12.322, "activity": 0.09, "date": 1653120849000}, + { "iob": 11.794, "activity": 0.1001, "date": 1653121149000}, + { "iob": 11.177, "activity": 0.1068, "date": 1653121449000}, + { "iob": 10.58, "activity": 0.111, "date": 1653121749000}, + { "iob": 9.919, "activity": 0.1129, "date": 1653122049000}, + { "iob": 9.254, "activity": 0.1129, "date": 1653122349000}, + { "iob": 8.643, "activity": 0.1114, "date": 1653122649000}, + { "iob": 7.992, "activity": 0.1088, "date": 1653122949000}, + { "iob": 7.406, "activity": 0.1053, "date": 1653123248000}, + { "iob": 7.111, "activity": 0.1012, "date": 1653123549000}, + { "iob": 6.515, "activity": 0.0971, "date": 1653123849000}, + { "iob": 5.99, "activity": 0.0927, "date": 1653124149000}, + { "iob": 5.439, "activity": 0.0878, "date": 1653124448000}, + { "iob": 4.962, "activity": 0.0828, "date": 1653124749000}, + { "iob": 4.462, "activity": 0.0775, "date": 1653125048000}, + { "iob": 4.036, "activity": 0.0724, "date": 1653125349000}, + { "iob": 3.638, "activity": 0.0672, "date": 1653125649000}, + { "iob": 3.214, "activity": 0.0621, "date": 1653125948000}, + { "iob": 2.866, "activity": 0.0571, "date": 1653126249000}, + { "iob": 2.494, "activity": 0.0522, "date": 1653126549000}, + { "iob": 2.193, "activity": 0.0476, "date": 1653126849000}, + { "iob": 1.867, "activity": 0.0431, "date": 1653127149000}, + { "iob": 1.563, "activity": 0.0388, "date": 1653127449000}, + { "iob": 1.329, "activity": 0.0347, "date": 1653127748000}, + { "iob": 1.115, "activity": 0.0309, "date": 1653128049000}, + { "iob": 0.87, "activity": 0.0272, "date": 1653128349000}, + { "iob": 0.692, "activity": 0.0239, "date": 1653128649000}, + { "iob": 0.482, "activity": 0.0206, "date": 1653128948000}, + { "iob": 0.287, "activity": 0.0176, "date": 1653129249000}, + { "iob": 0.156, "activity": 0.0148, "date": 1653129548000}, + { "iob": 0.038, "activity": 0.0122, "date": 1653129848000}, + { "iob": -0.067, "activity": 0.0099, "date": 1653130149000}, + { "iob": -0.161, "activity": 0.0078, "date": 1653130448000}, + { "iob": -0.195, "activity": 0.006, "date": 1653130748000}, + { "iob": -0.271, "activity": 0.0044, "date": 1653131049000}, + { "iob": -0.339, "activity": 0.0029, "date": 1653131349000}, + { "iob": -0.4, "activity": 0.0015, "date": 1653131649000}, + { "iob": -0.155, "activity": 0.0007, "date": 1653131948000}, + { "iob": 8.11, "activity": 0.0045, "date": 1653132249000}, + { "iob": 7.992, "activity": 0.0222, "date": 1653132549000}, + { "iob": 7.745, "activity": 0.0359, "date": 1653132849000}, + { "iob": 7.488, "activity": 0.0465, "date": 1653133149000}, + { "iob": 7.136, "activity": 0.0541, "date": 1653133449000}, + { "iob": 6.8, "activity": 0.0596, "date": 1653133749000}, + { "iob": 6.441, "activity": 0.0633, "date": 1653134049000}, + { "iob": 6.022, "activity": 0.0651, "date": 1653134349000}, + { "iob": 5.644, "activity": 0.0657, "date": 1653134649000}, + { "iob": 5.216, "activity": 0.0653, "date": 1653134949000}, + { "iob": 4.962, "activity": 0.0644, "date": 1653135249000}, + { "iob": 4.544, "activity": 0.0627, "date": 1653135549000}, + { "iob": 4.185, "activity": 0.0606, "date": 1653135849000}, + { "iob": 3.839, "activity": 0.058, "date": 1653136149000}, + { "iob": 3.456, "activity": 0.055, "date": 1653136449000}, + { "iob": 3.139, "activity": 0.0519, "date": 1653136749000}, + { "iob": 2.788, "activity": 0.0486, "date": 1653137049000}, + { "iob": 2.503, "activity": 0.0453, "date": 1653137350000}, + { "iob": 2.186, "activity": 0.0418, "date": 1653137649000}, + { "iob": 3.17, "activity": 0.0407, "date": 1653137949000}, + { "iob": 3.956, "activity": 0.0413, "date": 1653138249000}, + { "iob": 3.648, "activity": 0.042, "date": 1653138549000}, + { "iob": 4.126, "activity": 0.043, "date": 1653138849000}, + { "iob": 3.81, "activity": 0.0437, "date": 1653139150000}, + { "iob": 3.541, "activity": 0.0437, "date": 1653139450000}, + { "iob": 3.272, "activity": 0.0431, "date": 1653139749000}, + { "iob": 3.588, "activity": 0.0428, "date": 1653140049000}, + { "iob": 3.875, "activity": 0.0431, "date": 1653140349000}, + { "iob": 3.608, "activity": 0.0434, "date": 1653140648000}, + { "iob": 4.271, "activity": 0.0442, "date": 1653140949000}, + { "iob": 3.996, "activity": 0.0452, "date": 1653141249000}, + { "iob": 4.298, "activity": 0.0462, "date": 1653141548000}, + { "iob": 4.015, "activity": 0.0468, "date": 1653141849000}, + { "iob": 4.538, "activity": 0.0481, "date": 1653142149000}, + { "iob": 4.245, "activity": 0.0489, "date": 1653142449000}, + { "iob": 4.729, "activity": 0.05, "date": 1653142749000}, + { "iob": 4.426, "activity": 0.0508, "date": 1653143049000}, + { "iob": 4.353, "activity": 0.051, "date": 1653143349000}, + { "iob": 4.049, "activity": 0.0507, "date": 1653143650000}, + { "iob": 3.747, "activity": 0.0498, "date": 1653143949000}, + { "iob": 3.402, "activity": 0.0483, "date": 1653144249000}, + { "iob": 3.115, "activity": 0.0464, "date": 1653144550000}, + { "iob": 2.788, "activity": 0.0441, "date": 1653144849000}, + { "iob": 2.524, "activity": 0.0417, "date": 1653145149000}, + { "iob": 2.271, "activity": 0.0391, "date": 1653145449000}, + { "iob": 2.033, "activity": 0.0365, "date": 1653145750000}, + { "iob": 1.807, "activity": 0.0338, "date": 1653146050000}, + { "iob": 1.594, "activity": 0.0312, "date": 1653146349000}, + { "iob": 1.395, "activity": 0.0286, "date": 1653146650000}, + { "iob": 1.258, "activity": 0.0262, "date": 1653146949000}, + { "iob": 1.034, "activity": 0.0236, "date": 1653147249000}, + { "iob": 0.971, "activity": 0.0215, "date": 1653147549000}, + { "iob": 1.008, "activity": 0.0197, "date": 1653147849000}, + { "iob": 0.963, "activity": 0.0183, "date": 1653148149000}, + { "iob": 1.046, "activity": 0.0171, "date": 1653148450000}, + { "iob": 0.912, "activity": 0.0161, "date": 1653148749000}, + { "iob": 1.254, "activity": 0.0156, "date": 1653149049000}, + { "iob": 1.176, "activity": 0.0154, "date": 1653149349000}, + { "iob": 1.051, "activity": 0.0149, "date": 1653149650000}, + { "iob": 0.928, "activity": 0.0142, "date": 1653149949000}, + { "iob": 1.008, "activity": 0.0138, "date": 1653150249000}, + { "iob": 0.89, "activity": 0.0133, "date": 1653150549000}, + { "iob": 0.775, "activity": 0.0127, "date": 1653150849000}, + { "iob": 0.664, "activity": 0.0118, "date": 1653151149000}, + { "iob": 0.606, "activity": 0.011, "date": 1653151449000}, + { "iob": 0.703, "activity": 0.0105, "date": 1653151749000}, + { "iob": 0.702, "activity": 0.0101, "date": 1653152049000}, + { "iob": 0.902, "activity": 0.0101, "date": 1653152349000}, + { "iob": 0.801, "activity": 0.0101, "date": 1653152649000}, + { "iob": 0.701, "activity": 0.0098, "date": 1653152949000}, + { "iob": 0.603, "activity": 0.0094, "date": 1653153249000}, + { "iob": 0.508, "activity": 0.0088, "date": 1653153549000}, + { "iob": 0.415, "activity": 0.0081, "date": 1653153849000}, + { "iob": 0.327, "activity": 0.0074, "date": 1653154149000}, + { "iob": 0.242, "activity": 0.0066, "date": 1653154449000}, + { "iob": 0.161, "activity": 0.0058, "date": 1653154749000}, + { "iob": 0.134, "activity": 0.005, "date": 1653155049000}, + { "iob": 0.4, "activity": 0.0048, "date": 1653155349000}, + { "iob": 0.475, "activity": 0.0049, "date": 1653155649000}, + { "iob": 0.401, "activity": 0.005, "date": 1653155950000}, + { "iob": 0.327, "activity": 0.0048, "date": 1653156250000}, + { "iob": 0.203, "activity": 0.0044, "date": 1653156549000}, + { "iob": 0.132, "activity": 0.004, "date": 1653156849000}, + { "iob": 0.064, "activity": 0.0034, "date": 1653157149000}, + { "iob": -0.002, "activity": 0.0028, "date": 1653157449000}, + { "iob": -0.064, "activity": 0.0022, "date": 1653157750000}, + { "iob": -0.073, "activity": 0.0016, "date": 1653158049000}, + { "iob": -0.08, "activity": 0.0011, "date": 1653158349000}, + { "iob": -0.085, "activity": 0.0007, "date": 1653158649000}, + { "iob": -0.087, "activity": 0.0004, "date": 1653158949000}, + { "iob": -0.088, "activity": 0.0001, "date": 1653159249000}, + { "iob": -0.088, "activity": -0.0001, "date": 1653159549000}, + { "iob": -0.137, "activity": -0.0004, "date": 1653159849000}, + { "iob": -0.184, "activity": -0.0007, "date": 1653160150000}, + { "iob": -0.18, "activity": -0.001, "date": 1653160449000}, + { "iob": -0.175, "activity": -0.0012, "date": 1653160749000}, + { "iob": -0.168, "activity": -0.0014, "date": 1653161049000}, + { "iob": -0.211, "activity": -0.0015, "date": 1653161350000}, + { "iob": -0.203, "activity": -0.0017, "date": 1653161649000}, + { "iob": -0.243, "activity": -0.002, "date": 1653161950000}, + { "iob": -0.282, "activity": -0.0023, "date": 1653162250000}, + { "iob": -0.32, "activity": -0.0026, "date": 1653162549000}, + { "iob": -0.357, "activity": -0.0029, "date": 1653162850000}, + { "iob": -0.391, "activity": -0.0032, "date": 1653163150000}, + { "iob": -0.375, "activity": -0.0035, "date": 1653163449000}, + { "iob": -0.357, "activity": -0.0036, "date": 1653163749000}, + { "iob": -0.149, "activity": -0.0035, "date": 1653164049000}, + { "iob": -0.132, "activity": -0.0031, "date": 1653164350000}, + { "iob": 9.296, "activity": 0.015, "date": 1653164649000}, + { "iob": 9.123, "activity": 0.0332, "date": 1653164950000}, + { "iob": 8.96, "activity": 0.0474, "date": 1653165249000}, + { "iob": 8.644, "activity": 0.0584, "date": 1653165550000}, + { "iob": 8.282, "activity": 0.0664, "date": 1653165850000}, + { "iob": 7.835, "activity": 0.0718, "date": 1653166149000}, + { "iob": 7.416, "activity": 0.0753, "date": 1653166450000}, + { "iob": 6.984, "activity": 0.0772, "date": 1653166749000}, + { "iob": 6.547, "activity": 0.0776, "date": 1653167049000}, + { "iob": 6.061, "activity": 0.0769, "date": 1653167350000}, + { "iob": 5.68, "activity": 0.0754, "date": 1653167650000}, + { "iob": 5.458, "activity": 0.0734, "date": 1653167949000}, + { "iob": 5.046, "activity": 0.0712, "date": 1653168250000}, + { "iob": 4.925, "activity": 0.069, "date": 1653168549000}, + { "iob": 4.487, "activity": 0.0663, "date": 1653168849000}, + { "iob": 4.113, "activity": 0.0633, "date": 1653169150000}, + { "iob": 3.706, "activity": 0.0599, "date": 1653169449000}, + { "iob": 3.363, "activity": 0.0566, "date": 1653169749000}, + { "iob": 3.039, "activity": 0.053, "date": 1653170049000}, + { "iob": 2.733, "activity": 0.0494, "date": 1653170350000}, + { "iob": 2.395, "activity": 0.0457, "date": 1653170650000}, + { "iob": 2.126, "activity": 0.0421, "date": 1653170950000}, + { "iob": 1.824, "activity": 0.0385, "date": 1653171250000}, + { "iob": 1.64, "activity": 0.0351, "date": 1653171549000}, + { "iob": 1.473, "activity": 0.0319, "date": 1653171849000}, + { "iob": 1.273, "activity": 0.0288, "date": 1653172150000}, + { "iob": 1.136, "activity": 0.026, "date": 1653172450000}, + { "iob": 1.011, "activity": 0.0235, "date": 1653172749000}, + { "iob": 0.852, "activity": 0.021, "date": 1653173050000}, + { "iob": 0.752, "activity": 0.0189, "date": 1653173350000}, + { "iob": 0.662, "activity": 0.0169, "date": 1653173650000}, + { "iob": 0.534, "activity": 0.0149, "date": 1653173949000}, + { "iob": 0.463, "activity": 0.0132, "date": 1653174249000}, + { "iob": 0.352, "activity": 0.0115, "date": 1653174550000}, + { "iob": 0.298, "activity": 0.0101, "date": 1653174850000}, + { "iob": 0.25, "activity": 0.0089, "date": 1653175149000}, + { "iob": 0.329, "activity": 0.0079, "date": 1653175450000}, + { "iob": 0.34, "activity": 0.0074, "date": 1653175750000}, + { "iob": 0.304, "activity": 0.0068, "date": 1653176050000}, + { "iob": 0.272, "activity": 0.0062, "date": 1653176350000}, + { "iob": 0.512, "activity": 0.006, "date": 1653176650000}, + { "iob": 0.581, "activity": 0.0061, "date": 1653176950000}, + { "iob": 1.238, "activity": 0.0075, "date": 1653177250000}, + { "iob": 1.147, "activity": 0.0088, "date": 1653177550000}, + { "iob": 1.151, "activity": 0.0098, "date": 1653177850000}, + { "iob": 1.05, "activity": 0.0104, "date": 1653178149000}, + { "iob": 0.947, "activity": 0.0107, "date": 1653178449000}, + { "iob": 0.844, "activity": 0.0106, "date": 1653178750000}, + { "iob": 0.741, "activity": 0.0104, "date": 1653179050000}, + { "iob": 0.59, "activity": 0.0099, "date": 1653179350000}, + { "iob": 0.542, "activity": 0.0093, "date": 1653179649000}, + { "iob": 0.497, "activity": 0.0087, "date": 1653179949000}, + { "iob": 0.456, "activity": 0.0081, "date": 1653180250000}, + { "iob": 0.516, "activity": 0.0077, "date": 1653180549000}, + { "iob": 0.429, "activity": 0.0072, "date": 1653180849000}, + { "iob": 0.294, "activity": 0.0066, "date": 1653181150000}, + { "iob": 0.163, "activity": 0.0058, "date": 1653181450000}, + { "iob": 0.037, "activity": 0.0049, "date": 1653181750000}, + { "iob": -0.085, "activity": 0.0039, "date": 1653182050000}, + { "iob": -0.153, "activity": 0.0029, "date": 1653182349000}, + { "iob": -0.265, "activity": 0.0018, "date": 1653182650000}, + { "iob": -0.371, "activity": 0.0007, "date": 1653182949000}, + { "iob": -0.471, "activity": -0.0005, "date": 1653183249000}, + { "iob": -0.566, "activity": -0.0016, "date": 1653183550000}, + { "iob": -0.606, "activity": -0.0026, "date": 1653183850000}, + { "iob": -0.64, "activity": -0.0036, "date": 1653184150000}, + { "iob": -0.67, "activity": -0.0044, "date": 1653184450000} +] + diff --git a/app/src/test/res/autotune/test2/aaps-entries.2022-05-21.json b/app/src/test/res/autotune/test2/aaps-entries.2022-05-21.json new file mode 100644 index 0000000000..70c349e9d8 --- /dev/null +++ b/app/src/test/res/autotune/test2/aaps-entries.2022-05-21.json @@ -0,0 +1,2882 @@ +[ + { + "device": "AndroidAPS-DexcomG6", + "date": 1653184750000, + "dateString": "2022-05-22T01:59:10.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "6289990761a8290004740388" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653184450000, + "dateString": "2022-05-22T01:54:10.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "628997d861a8290004740385" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653184150000, + "dateString": "2022-05-22T01:49:10.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "628996a961a8290004740382" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653183850000, + "dateString": "2022-05-22T01:44:10.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "_id": "6289957b61a829000474037f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653183550000, + "dateString": "2022-05-22T01:39:10.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "_id": "6289945f50e51d0004429e6d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653183249000, + "dateString": "2022-05-22T01:34:09.000Z", + "isValid": true, + "sgv": 73, + "direction": "Flat", + "type": "sgv", + "_id": "6289933050e51d0004429e6b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653182949000, + "dateString": "2022-05-22T01:29:09.000Z", + "isValid": true, + "sgv": 72, + "direction": "Flat", + "type": "sgv", + "_id": "6289920150e51d0004429e69" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653182650000, + "dateString": "2022-05-22T01:24:10.000Z", + "isValid": true, + "sgv": 74, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628990d350e51d0004429e67" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653182349000, + "dateString": "2022-05-22T01:19:09.000Z", + "isValid": true, + "sgv": 77, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62898fa550e51d0004429e65" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653182050000, + "dateString": "2022-05-22T01:14:10.000Z", + "isValid": true, + "sgv": 81, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62898e7650e51d0004429e63" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653181750000, + "dateString": "2022-05-22T01:09:10.000Z", + "isValid": true, + "sgv": 87, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62898d4750e51d0004429e5f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653181450000, + "dateString": "2022-05-22T01:04:10.000Z", + "isValid": true, + "sgv": 92, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62898c2fda46aa0004d1e0fc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653181150000, + "dateString": "2022-05-22T00:59:10.000Z", + "isValid": true, + "sgv": 97, + "direction": "SingleDown", + "type": "sgv", + "_id": "62898b01da46aa0004d1e0fa" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653180849000, + "dateString": "2022-05-22T00:54:09.000Z", + "isValid": true, + "sgv": 105, + "direction": "SingleDown", + "type": "sgv", + "_id": "628989d2da46aa0004d1e0f8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653180549000, + "dateString": "2022-05-22T00:49:09.000Z", + "isValid": true, + "sgv": 121, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628988a3da46aa0004d1e0f5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653180250000, + "dateString": "2022-05-22T00:44:10.000Z", + "isValid": true, + "sgv": 135, + "direction": "Flat", + "type": "sgv", + "_id": "62898774da46aa0004d1e0f1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653179949000, + "dateString": "2022-05-22T00:39:09.000Z", + "isValid": true, + "sgv": 143, + "direction": "Flat", + "type": "sgv", + "_id": "62898645da46aa0004d1e0ee" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653179649000, + "dateString": "2022-05-22T00:34:09.000Z", + "isValid": true, + "sgv": 143, + "direction": "Flat", + "type": "sgv", + "_id": "62898517da46aa0004d1e0ea" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653179350000, + "dateString": "2022-05-22T00:29:10.000Z", + "isValid": true, + "sgv": 142, + "direction": "Flat", + "type": "sgv", + "_id": "628983f69d6f1800047cd0dd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653179050000, + "dateString": "2022-05-22T00:24:10.000Z", + "isValid": true, + "sgv": 142, + "direction": "Flat", + "type": "sgv", + "_id": "628982c89d6f1800047cd0db" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653178750000, + "dateString": "2022-05-22T00:19:10.000Z", + "isValid": true, + "sgv": 144, + "direction": "Flat", + "type": "sgv", + "_id": "628981999d6f1800047cd0d8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653178449000, + "dateString": "2022-05-22T00:14:09.000Z", + "isValid": true, + "sgv": 147, + "direction": "Flat", + "type": "sgv", + "_id": "6289806a9d6f1800047cd0d6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653178149000, + "dateString": "2022-05-22T00:09:09.000Z", + "isValid": true, + "sgv": 149, + "direction": "Flat", + "type": "sgv", + "_id": "62897f3b9d6f1800047cd0d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653177850000, + "dateString": "2022-05-22T00:04:10.000Z", + "isValid": true, + "sgv": 149, + "direction": "Flat", + "type": "sgv", + "_id": "62897e0c9d6f1800047cd0d0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653177550000, + "dateString": "2022-05-21T23:59:10.000Z", + "isValid": true, + "sgv": 147, + "direction": "Flat", + "type": "sgv", + "_id": "62897cde9d6f1800047cd0cc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653177250000, + "dateString": "2022-05-21T23:54:10.000Z", + "isValid": true, + "sgv": 146, + "direction": "Flat", + "type": "sgv", + "_id": "62897bc89d6f1800047cd0c9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653176950000, + "dateString": "2022-05-21T23:49:10.000Z", + "isValid": true, + "sgv": 143, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62897a8771a363000480abca" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653176650000, + "dateString": "2022-05-21T23:44:10.000Z", + "isValid": true, + "sgv": 139, + "direction": "Flat", + "type": "sgv", + "_id": "6289797071a363000480abc7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653176350000, + "dateString": "2022-05-21T23:39:10.000Z", + "isValid": true, + "sgv": 132, + "direction": "Flat", + "type": "sgv", + "_id": "6289784271a363000480abc3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653176050000, + "dateString": "2022-05-21T23:34:10.000Z", + "isValid": true, + "sgv": 127, + "direction": "Flat", + "type": "sgv", + "_id": "6289771371a363000480abc1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653175750000, + "dateString": "2022-05-21T23:29:10.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "628975e471a363000480abbe" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653175450000, + "dateString": "2022-05-21T23:24:10.000Z", + "isValid": true, + "sgv": 123, + "direction": "Flat", + "type": "sgv", + "_id": "628974b671a363000480abbc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653175149000, + "dateString": "2022-05-21T23:19:09.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "_id": "6289738f37d09a00043f2b26" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653174850000, + "dateString": "2022-05-21T23:14:10.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "_id": "6289727a37d09a00043f2b22" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653174550000, + "dateString": "2022-05-21T23:09:10.000Z", + "isValid": true, + "sgv": 114, + "direction": "Flat", + "type": "sgv", + "_id": "6289727937d09a00043f2b21" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653174249000, + "dateString": "2022-05-21T23:04:09.000Z", + "isValid": true, + "sgv": 111, + "direction": "Flat", + "type": "sgv", + "_id": "6289726037d09a00043f2b20" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653173949000, + "dateString": "2022-05-21T22:59:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "_id": "6289721437d09a00043f2b1f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653173650000, + "dateString": "2022-05-21T22:54:10.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "_id": "6289717d37d09a00043f2b1e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653173350000, + "dateString": "2022-05-21T22:49:10.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "_id": "62896fb837d09a00043f2b1b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653173050000, + "dateString": "2022-05-21T22:44:10.000Z", + "isValid": true, + "sgv": 115, + "direction": "Flat", + "type": "sgv", + "_id": "62896f8537d09a00043f2b1a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653172749000, + "dateString": "2022-05-21T22:39:09.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "_id": "62896e8937d09a00043f2b19" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653172450000, + "dateString": "2022-05-21T22:34:10.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "62896d8b37d09a00043f2b17" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653172150000, + "dateString": "2022-05-21T22:29:10.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "62896cda37d09a00043f2b16" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653171849000, + "dateString": "2022-05-21T22:24:09.000Z", + "isValid": true, + "sgv": 122, + "direction": "Flat", + "type": "sgv", + "_id": "62896c7537d09a00043f2b14" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653171549000, + "dateString": "2022-05-21T22:19:09.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "_id": "62896c1037d09a00043f2b13" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653171250000, + "dateString": "2022-05-21T22:14:10.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "62896b5f6a5ecf00042d5474" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653170950000, + "dateString": "2022-05-21T22:09:10.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "_id": "62896ac76a5ecf00042d5472" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653170650000, + "dateString": "2022-05-21T22:04:10.000Z", + "isValid": true, + "sgv": 115, + "direction": "Flat", + "type": "sgv", + "_id": "628969fd6a5ecf00042d5471" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653170350000, + "dateString": "2022-05-21T21:59:10.000Z", + "isValid": true, + "sgv": 112, + "direction": "Flat", + "type": "sgv", + "_id": "628969016a5ecf00042d5470" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653170049000, + "dateString": "2022-05-21T21:54:09.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "_id": "628967a06a5ecf00042d546e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653169749000, + "dateString": "2022-05-21T21:49:09.000Z", + "isValid": true, + "sgv": 107, + "direction": "Flat", + "type": "sgv", + "_id": "628964906a5ecf00042d546b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653169449000, + "dateString": "2022-05-21T21:44:09.000Z", + "isValid": true, + "sgv": 105, + "direction": "Flat", + "type": "sgv", + "_id": "628961a4fb144900043c34ea" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653169150000, + "dateString": "2022-05-21T21:39:10.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "_id": "62895f5ffb144900043c34e8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653168849000, + "dateString": "2022-05-21T21:34:09.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "_id": "62895d98fb144900043c34e5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653168549000, + "dateString": "2022-05-21T21:29:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "62895b9a9bf1e6000482ffa1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653168250000, + "dateString": "2022-05-21T21:24:10.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628959ed9bf1e6000482ff9e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653167949000, + "dateString": "2022-05-21T21:19:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "6289583f9bf1e6000482ff9b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653167650000, + "dateString": "2022-05-21T21:14:10.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628956919bf1e6000482ff96" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653167350000, + "dateString": "2022-05-21T21:09:10.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "_id": "628955179bf1e6000482ff92" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653167049000, + "dateString": "2022-05-21T21:04:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628953e79bf1e6000482ff90" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653166749000, + "dateString": "2022-05-21T20:59:09.000Z", + "isValid": true, + "sgv": 104, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628952c680fc7e00041b22a9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653166450000, + "dateString": "2022-05-21T20:54:10.000Z", + "isValid": true, + "sgv": 110, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6289519580fc7e00041b22a7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653166149000, + "dateString": "2022-05-21T20:49:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6289506680fc7e00041b22a5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653165850000, + "dateString": "2022-05-21T20:44:10.000Z", + "isValid": true, + "sgv": 128, + "direction": "Flat", + "type": "sgv", + "_id": "62894f3880fc7e00041b22a3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653165550000, + "dateString": "2022-05-21T20:39:10.000Z", + "isValid": true, + "sgv": 139, + "direction": "Flat", + "type": "sgv", + "_id": "62894e0980fc7e00041b22a0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653165249000, + "dateString": "2022-05-21T20:34:09.000Z", + "isValid": true, + "sgv": 145, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62894cdb80fc7e00041b229e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653164950000, + "dateString": "2022-05-21T20:29:10.000Z", + "isValid": true, + "sgv": 143, + "direction": "SingleUp", + "type": "sgv", + "_id": "62894bab80fc7e00041b229b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653164649000, + "dateString": "2022-05-21T20:24:09.000Z", + "isValid": true, + "sgv": 133, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62894a7e4493460004e63a38" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653164350000, + "dateString": "2022-05-21T20:19:10.000Z", + "isValid": true, + "sgv": 120, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6289496a4493460004e63a34" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653164049000, + "dateString": "2022-05-21T20:14:09.000Z", + "isValid": true, + "sgv": 109, + "direction": "Flat", + "type": "sgv", + "_id": "628948214493460004e63a31" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653163749000, + "dateString": "2022-05-21T20:09:09.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "_id": "6289470c4493460004e63a2d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653163449000, + "dateString": "2022-05-21T20:04:09.000Z", + "isValid": true, + "sgv": 95, + "direction": "Flat", + "type": "sgv", + "_id": "628945dc4493460004e63a2a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653163150000, + "dateString": "2022-05-21T19:59:10.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "_id": "628944ae4493460004e63a27" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653162850000, + "dateString": "2022-05-21T19:54:10.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "_id": "6289437f4493460004e63a25" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653162549000, + "dateString": "2022-05-21T19:49:09.000Z", + "isValid": true, + "sgv": 88, + "direction": "Flat", + "type": "sgv", + "_id": "6289425f598f780004bb3b30" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653162250000, + "dateString": "2022-05-21T19:44:10.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "_id": "62894118598f780004bb3b2d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653161950000, + "dateString": "2022-05-21T19:39:10.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "_id": "62893feb598f780004bb3b2b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653161649000, + "dateString": "2022-05-21T19:34:09.000Z", + "isValid": true, + "sgv": 93, + "direction": "Flat", + "type": "sgv", + "_id": "62893ed7598f780004bb3b29" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653161350000, + "dateString": "2022-05-21T19:29:10.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "62893daa598f780004bb3b27" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653161049000, + "dateString": "2022-05-21T19:24:09.000Z", + "isValid": true, + "sgv": 95, + "direction": "Flat", + "type": "sgv", + "_id": "62893c7d598f780004bb3b24" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653160749000, + "dateString": "2022-05-21T19:19:09.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "_id": "62893b4f598f780004bb3b22" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653160449000, + "dateString": "2022-05-21T19:14:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "62893a1222fbc8000495b822" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653160150000, + "dateString": "2022-05-21T19:09:10.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628938fe22fbc8000495b81f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653159849000, + "dateString": "2022-05-21T19:04:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628937b822fbc8000495b81d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653159549000, + "dateString": "2022-05-21T18:59:09.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "_id": "628936a422fbc8000495b81a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653159249000, + "dateString": "2022-05-21T18:54:09.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "_id": "6289357622fbc8000495b818" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653158949000, + "dateString": "2022-05-21T18:49:09.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "_id": "6289344a22fbc8000495b815" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653158649000, + "dateString": "2022-05-21T18:44:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "_id": "6289331c22fbc8000495b813" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653158349000, + "dateString": "2022-05-21T18:39:09.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "_id": "628931e9840d8d0004a20bff" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653158049000, + "dateString": "2022-05-21T18:34:09.000Z", + "isValid": true, + "sgv": 104, + "direction": "Flat", + "type": "sgv", + "_id": "628930bc840d8d0004a20bfd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653157750000, + "dateString": "2022-05-21T18:29:10.000Z", + "isValid": true, + "sgv": 106, + "direction": "Flat", + "type": "sgv", + "_id": "62892f8f840d8d0004a20bfa" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653157449000, + "dateString": "2022-05-21T18:24:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "_id": "62892e62840d8d0004a20bf8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653157149000, + "dateString": "2022-05-21T18:19:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "_id": "62892d34840d8d0004a20bf5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653156849000, + "dateString": "2022-05-21T18:14:09.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "_id": "62892c06840d8d0004a20bf2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653156549000, + "dateString": "2022-05-21T18:09:09.000Z", + "isValid": true, + "sgv": 114, + "direction": "Flat", + "type": "sgv", + "_id": "62892af2840d8d0004a20bf0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653156250000, + "dateString": "2022-05-21T18:04:10.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "_id": "628929ac8809e60004c644e9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653155950000, + "dateString": "2022-05-21T17:59:10.000Z", + "isValid": true, + "sgv": 123, + "direction": "Flat", + "type": "sgv", + "_id": "6289287e8809e60004c644e6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653155649000, + "dateString": "2022-05-21T17:54:09.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "6289276a8809e60004c644e3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653155349000, + "dateString": "2022-05-21T17:49:09.000Z", + "isValid": true, + "sgv": 123, + "direction": "NONE", + "type": "sgv", + "_id": "6289263c8809e60004c644e1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653155049000, + "dateString": "2022-05-21T17:44:09.000Z", + "isValid": true, + "sgv": 116, + "direction": "NONE", + "type": "sgv", + "_id": "6289250d8809e60004c644dd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653154749000, + "dateString": "2022-05-21T17:39:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "NONE", + "type": "sgv", + "_id": "628923df8809e60004c644d9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653154449000, + "dateString": "2022-05-21T17:34:09.000Z", + "isValid": true, + "sgv": 97, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628922b18809e60004c644d6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653154149000, + "dateString": "2022-05-21T17:29:09.000Z", + "isValid": true, + "sgv": 93, + "direction": "SingleDown", + "type": "sgv", + "_id": "628921861090500004ca472b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653153849000, + "dateString": "2022-05-21T17:24:09.000Z", + "isValid": true, + "sgv": 96, + "direction": "SingleDown", + "type": "sgv", + "_id": "628920591090500004ca4727" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653153549000, + "dateString": "2022-05-21T17:19:09.000Z", + "isValid": true, + "sgv": 110, + "direction": "SingleDown", + "type": "sgv", + "_id": "62891f2b1090500004ca4724" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653153249000, + "dateString": "2022-05-21T17:14:09.000Z", + "isValid": true, + "sgv": 124, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62891dfd1090500004ca4722" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653152949000, + "dateString": "2022-05-21T17:09:09.000Z", + "isValid": true, + "sgv": 138, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62891cd01090500004ca471f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653152649000, + "dateString": "2022-05-21T17:04:09.000Z", + "isValid": true, + "sgv": 149, + "direction": "Flat", + "type": "sgv", + "_id": "62891ba31090500004ca471d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653152349000, + "dateString": "2022-05-21T16:59:09.000Z", + "isValid": true, + "sgv": 158, + "direction": "Flat", + "type": "sgv", + "_id": "62891a811090500004ca471a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653152049000, + "dateString": "2022-05-21T16:54:09.000Z", + "isValid": true, + "sgv": 160, + "direction": "Flat", + "type": "sgv", + "_id": "628919531090500004ca4717" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653151749000, + "dateString": "2022-05-21T16:49:09.000Z", + "isValid": true, + "sgv": 159, + "direction": "Flat", + "type": "sgv", + "_id": "628918261090500004ca4714" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653151449000, + "dateString": "2022-05-21T16:44:09.000Z", + "isValid": true, + "sgv": 158, + "direction": "Flat", + "type": "sgv", + "_id": "628916f81090500004ca4710" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653151149000, + "dateString": "2022-05-21T16:39:09.000Z", + "isValid": true, + "sgv": 158, + "direction": "Flat", + "type": "sgv", + "_id": "628915ce1090500004ca470c" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653150849000, + "dateString": "2022-05-21T16:34:09.000Z", + "isValid": true, + "sgv": 161, + "direction": "Flat", + "type": "sgv", + "_id": "628914d01090500004ca4709" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653150549000, + "dateString": "2022-05-21T16:29:09.000Z", + "isValid": true, + "sgv": 165, + "direction": "Flat", + "type": "sgv", + "_id": "628913731090500004ca4706" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653150249000, + "dateString": "2022-05-21T16:24:09.000Z", + "isValid": true, + "sgv": 170, + "direction": "Flat", + "type": "sgv", + "_id": "628913111090500004ca4704" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653149949000, + "dateString": "2022-05-21T16:19:09.000Z", + "isValid": true, + "sgv": 172, + "direction": "Flat", + "type": "sgv", + "_id": "6289130f1090500004ca46ff" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653149650000, + "dateString": "2022-05-21T16:14:10.000Z", + "isValid": true, + "sgv": 173, + "direction": "Flat", + "type": "sgv", + "_id": "62890fff1090500004ca46fd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653149349000, + "dateString": "2022-05-21T16:09:09.000Z", + "isValid": true, + "sgv": 174, + "direction": "Flat", + "type": "sgv", + "_id": "62890edacf7ee10004a2b1e2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653149049000, + "dateString": "2022-05-21T16:04:09.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "62890daccf7ee10004a2b1de" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653148749000, + "dateString": "2022-05-21T15:59:09.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "62890c64cf7ee10004a2b1da" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653148450000, + "dateString": "2022-05-21T15:54:10.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "62890b36cf7ee10004a2b1d7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653148149000, + "dateString": "2022-05-21T15:49:09.000Z", + "isValid": true, + "sgv": 174, + "direction": "Flat", + "type": "sgv", + "_id": "62890a21cf7ee10004a2b1d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653147849000, + "dateString": "2022-05-21T15:44:09.000Z", + "isValid": true, + "sgv": 175, + "direction": "Flat", + "type": "sgv", + "_id": "628908f3cf7ee10004a2b1d1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653147549000, + "dateString": "2022-05-21T15:39:09.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "628907c5cf7ee10004a2b1ce" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653147249000, + "dateString": "2022-05-21T15:34:09.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "6289067fc9346b0004863369" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653146949000, + "dateString": "2022-05-21T15:29:09.000Z", + "isValid": true, + "sgv": 178, + "direction": "Flat", + "type": "sgv", + "_id": "6289056ac9346b0004863366" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653146650000, + "dateString": "2022-05-21T15:24:10.000Z", + "isValid": true, + "sgv": 178, + "direction": "Flat", + "type": "sgv", + "_id": "6289043cc9346b0004863363" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653146349000, + "dateString": "2022-05-21T15:19:09.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "6289030ec9346b0004863361" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653146050000, + "dateString": "2022-05-21T15:14:10.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "628901e0c9346b000486335f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653145750000, + "dateString": "2022-05-21T15:09:10.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "628900b2c9346b000486335d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653145449000, + "dateString": "2022-05-21T15:04:09.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "6288ff9ec9346b000486335b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653145149000, + "dateString": "2022-05-21T14:59:09.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "6288fe56c9346b0004863359" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653144849000, + "dateString": "2022-05-21T14:54:09.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "6288fd270e0c880004d58de7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653144550000, + "dateString": "2022-05-21T14:49:10.000Z", + "isValid": true, + "sgv": 178, + "direction": "Flat", + "type": "sgv", + "_id": "6288fbf90e0c880004d58de5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653144249000, + "dateString": "2022-05-21T14:44:09.000Z", + "isValid": true, + "sgv": 180, + "direction": "Flat", + "type": "sgv", + "_id": "6288facb0e0c880004d58de3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653143949000, + "dateString": "2022-05-21T14:39:09.000Z", + "isValid": true, + "sgv": 184, + "direction": "Flat", + "type": "sgv", + "_id": "6288f9b60e0c880004d58de0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653143650000, + "dateString": "2022-05-21T14:34:10.000Z", + "isValid": true, + "sgv": 185, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f8880e0c880004d58dde" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653143349000, + "dateString": "2022-05-21T14:29:09.000Z", + "isValid": true, + "sgv": 182, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f75a0e0c880004d58ddb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653143049000, + "dateString": "2022-05-21T14:24:09.000Z", + "isValid": true, + "sgv": 174, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f62c0e0c880004d58dd8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653142749000, + "dateString": "2022-05-21T14:19:09.000Z", + "isValid": true, + "sgv": 166, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f4f72634cd0004296074" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653142449000, + "dateString": "2022-05-21T14:14:09.000Z", + "isValid": true, + "sgv": 160, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f3c92634cd0004296071" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653142149000, + "dateString": "2022-05-21T14:09:09.000Z", + "isValid": true, + "sgv": 155, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f29b2634cd000429606f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653141849000, + "dateString": "2022-05-21T14:04:09.000Z", + "isValid": true, + "sgv": 147, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f16d2634cd000429606c" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653141548000, + "dateString": "2022-05-21T13:59:08.000Z", + "isValid": true, + "sgv": 139, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f03f2634cd000429606a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653141249000, + "dateString": "2022-05-21T13:54:09.000Z", + "isValid": true, + "sgv": 131, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288ef2a2634cd0004296067" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653140949000, + "dateString": "2022-05-21T13:49:09.000Z", + "isValid": true, + "sgv": 126, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288edfc2634cd0004296065" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653140648000, + "dateString": "2022-05-21T13:44:08.000Z", + "isValid": true, + "sgv": 121, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288ecca0f1be700041e5a0b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653140349000, + "dateString": "2022-05-21T13:39:09.000Z", + "isValid": true, + "sgv": 114, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288eb9d0f1be700041e5a09" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653140049000, + "dateString": "2022-05-21T13:34:09.000Z", + "isValid": true, + "sgv": 105, + "direction": "Flat", + "type": "sgv", + "_id": "6288ea6e0f1be700041e5a06" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653139749000, + "dateString": "2022-05-21T13:29:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "6288e9410f1be700041e5a03" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653139450000, + "dateString": "2022-05-21T13:24:10.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "6288e82c0f1be700041e5a00" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653139150000, + "dateString": "2022-05-21T13:19:10.000Z", + "isValid": true, + "sgv": 93, + "direction": "Flat", + "type": "sgv", + "_id": "6288e7030f1be700041e59fd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653138849000, + "dateString": "2022-05-21T13:14:09.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "6288e5d00f1be700041e59fb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653138549000, + "dateString": "2022-05-21T13:09:09.000Z", + "isValid": true, + "sgv": 95, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288e4900f1be700041e59f8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653138249000, + "dateString": "2022-05-21T13:04:09.000Z", + "isValid": true, + "sgv": 93, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288e3610f1be700041e59f6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653137949000, + "dateString": "2022-05-21T12:59:09.000Z", + "isValid": true, + "sgv": 86, + "direction": "Flat", + "type": "sgv", + "_id": "6288e24c0f1be700041e59f3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653137649000, + "dateString": "2022-05-21T12:54:09.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "_id": "6288e1040f1be700041e59f0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653137350000, + "dateString": "2022-05-21T12:49:10.000Z", + "isValid": true, + "sgv": 72, + "direction": "Flat", + "type": "sgv", + "_id": "6288dfd60f1be700041e59ee" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653137049000, + "dateString": "2022-05-21T12:44:09.000Z", + "isValid": true, + "sgv": 69, + "direction": "Flat", + "type": "sgv", + "_id": "6288df8a0f1be700041e59ec" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653136749000, + "dateString": "2022-05-21T12:39:09.000Z", + "isValid": true, + "sgv": 68, + "direction": "Flat", + "type": "sgv", + "_id": "6288de580f1be700041e59ea" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653136449000, + "dateString": "2022-05-21T12:34:09.000Z", + "isValid": true, + "sgv": 70, + "direction": "Flat", + "type": "sgv", + "_id": "6288dd270f1be700041e59e8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653136149000, + "dateString": "2022-05-21T12:29:09.000Z", + "isValid": true, + "sgv": 73, + "direction": "Flat", + "type": "sgv", + "_id": "6288db8a0f1be700041e59e5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653135849000, + "dateString": "2022-05-21T12:24:09.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "_id": "6288d9fb0f1be700041e59e2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653135549000, + "dateString": "2022-05-21T12:19:09.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "_id": "6288d8e00f1be700041e59e0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653135249000, + "dateString": "2022-05-21T12:14:09.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "_id": "6288d7ae0f1be700041e59de" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653134949000, + "dateString": "2022-05-21T12:09:09.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "_id": "6288d67f0f1be700041e59da" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653134649000, + "dateString": "2022-05-21T12:04:09.000Z", + "isValid": true, + "sgv": 77, + "direction": "Flat", + "type": "sgv", + "_id": "6288d5500f1be700041e59d7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653134349000, + "dateString": "2022-05-21T11:59:09.000Z", + "isValid": true, + "sgv": 76, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288d4220f1be700041e59d5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653134049000, + "dateString": "2022-05-21T11:54:09.000Z", + "isValid": true, + "sgv": 79, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288d3060f1be700041e59d2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653133749000, + "dateString": "2022-05-21T11:49:09.000Z", + "isValid": true, + "sgv": 87, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288d1d80f1be700041e59cf" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653133449000, + "dateString": "2022-05-21T11:44:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "_id": "6288d0a80f1be700041e59cb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653133149000, + "dateString": "2022-05-21T11:39:09.000Z", + "isValid": true, + "sgv": 114, + "direction": "Flat", + "type": "sgv", + "_id": "6288cf770f1be700041e59c8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653132849000, + "dateString": "2022-05-21T11:34:09.000Z", + "isValid": true, + "sgv": 121, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288ce548e9ed800049b39f7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653132549000, + "dateString": "2022-05-21T11:29:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288cd278e9ed800049b39f5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653132249000, + "dateString": "2022-05-21T11:24:09.000Z", + "isValid": true, + "sgv": 109, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288cbf98e9ed800049b39f2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653131948000, + "dateString": "2022-05-21T11:19:08.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "6288cacb8e9ed800049b39ec" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653131649000, + "dateString": "2022-05-21T11:14:09.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "_id": "6288c99e8e9ed800049b39e8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653131349000, + "dateString": "2022-05-21T11:09:09.000Z", + "isValid": true, + "sgv": 82, + "direction": "Flat", + "type": "sgv", + "_id": "6288c86f8e9ed800049b39e5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653131049000, + "dateString": "2022-05-21T11:04:09.000Z", + "isValid": true, + "sgv": 81, + "direction": "Flat", + "type": "sgv", + "_id": "6288c7418e9ed800049b39e3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653130748000, + "dateString": "2022-05-21T10:59:08.000Z", + "isValid": true, + "sgv": 84, + "direction": "Flat", + "type": "sgv", + "_id": "6288c61a1991280004dce468" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653130448000, + "dateString": "2022-05-21T10:54:08.000Z", + "isValid": true, + "sgv": 88, + "direction": "Flat", + "type": "sgv", + "_id": "6288c4ec1991280004dce464" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653130149000, + "dateString": "2022-05-21T10:49:09.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "_id": "6288c3be1991280004dce461" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653129848000, + "dateString": "2022-05-21T10:44:08.000Z", + "isValid": true, + "sgv": 93, + "direction": "Flat", + "type": "sgv", + "_id": "6288c2911991280004dce45e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653129548000, + "dateString": "2022-05-21T10:39:08.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "6288c1631991280004dce45b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653129249000, + "dateString": "2022-05-21T10:34:09.000Z", + "isValid": true, + "sgv": 96, + "direction": "Flat", + "type": "sgv", + "_id": "6288c0341991280004dce459" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653128948000, + "dateString": "2022-05-21T10:29:08.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "_id": "6288bf061991280004dce457" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653128649000, + "dateString": "2022-05-21T10:24:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "_id": "6288bde0abbef90004616cf8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653128349000, + "dateString": "2022-05-21T10:19:09.000Z", + "isValid": true, + "sgv": 104, + "direction": "Flat", + "type": "sgv", + "_id": "6288bcb2abbef90004616cf6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653128049000, + "dateString": "2022-05-21T10:14:09.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "_id": "6288bb84abbef90004616cf4" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653127748000, + "dateString": "2022-05-21T10:09:08.000Z", + "isValid": true, + "sgv": 115, + "direction": "Flat", + "type": "sgv", + "_id": "6288ba56abbef90004616cf2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653127449000, + "dateString": "2022-05-21T10:04:09.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "_id": "6288b941abbef90004616cf0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653127149000, + "dateString": "2022-05-21T09:59:09.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "_id": "6288b813abbef90004616ceb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653126849000, + "dateString": "2022-05-21T09:54:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "6288b6e9c9c02c00041f7f06" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653126549000, + "dateString": "2022-05-21T09:49:09.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "_id": "6288b5bbc9c02c00041f7f04" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653126249000, + "dateString": "2022-05-21T09:44:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "6288b48dc9c02c00041f7f02" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653125948000, + "dateString": "2022-05-21T09:39:08.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "6288b35fc9c02c00041f7f00" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653125649000, + "dateString": "2022-05-21T09:34:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "6288b231c9c02c00041f7efe" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653125349000, + "dateString": "2022-05-21T09:29:09.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "_id": "6288b103c9c02c00041f7efc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653125048000, + "dateString": "2022-05-21T09:24:08.000Z", + "isValid": true, + "sgv": 122, + "direction": "Flat", + "type": "sgv", + "_id": "6288afd5c9c02c00041f7ef8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653124749000, + "dateString": "2022-05-21T09:19:09.000Z", + "isValid": true, + "sgv": 125, + "direction": "Flat", + "type": "sgv", + "_id": "6288aea799fc930004d6bdfb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653124448000, + "dateString": "2022-05-21T09:14:08.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "6288ad7999fc930004d6bdfa" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653124149000, + "dateString": "2022-05-21T09:09:09.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "_id": "6288ac4b99fc930004d6bdf8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653123849000, + "dateString": "2022-05-21T09:04:09.000Z", + "isValid": true, + "sgv": 113, + "direction": "Flat", + "type": "sgv", + "_id": "6288ab1d99fc930004d6bdf6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653123549000, + "dateString": "2022-05-21T08:59:09.000Z", + "isValid": true, + "sgv": 109, + "direction": "Flat", + "type": "sgv", + "_id": "6288a9f099fc930004d6bdf4" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653123248000, + "dateString": "2022-05-21T08:54:08.000Z", + "isValid": true, + "sgv": 107, + "direction": "Flat", + "type": "sgv", + "_id": "6288a8db99fc930004d6bdf1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653122949000, + "dateString": "2022-05-21T08:49:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288a7ad99fc930004d6bdef" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653122649000, + "dateString": "2022-05-21T08:44:09.000Z", + "isValid": true, + "sgv": 111, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288a73099fc930004d6bded" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653122349000, + "dateString": "2022-05-21T08:39:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288a55199fc930004d6bdeb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653122049000, + "dateString": "2022-05-21T08:34:09.000Z", + "isValid": true, + "sgv": 128, + "direction": "Flat", + "type": "sgv", + "_id": "6288a42099fc930004d6bde8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653121749000, + "dateString": "2022-05-21T08:29:09.000Z", + "isValid": true, + "sgv": 138, + "direction": "Flat", + "type": "sgv", + "_id": "6288a2fca4cc860004a251d2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653121449000, + "dateString": "2022-05-21T08:24:09.000Z", + "isValid": true, + "sgv": 145, + "direction": "Flat", + "type": "sgv", + "_id": "6288a1cda4cc860004a251d1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653121149000, + "dateString": "2022-05-21T08:19:09.000Z", + "isValid": true, + "sgv": 147, + "direction": "Flat", + "type": "sgv", + "_id": "6288a09fa4cc860004a251ce" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653120849000, + "dateString": "2022-05-21T08:14:09.000Z", + "isValid": true, + "sgv": 148, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889f6fa4cc860004a251cc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653120548000, + "dateString": "2022-05-21T08:09:08.000Z", + "isValid": true, + "sgv": 146, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889e41a4cc860004a251cb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653120249000, + "dateString": "2022-05-21T08:04:09.000Z", + "isValid": true, + "sgv": 141, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889d13a4cc860004a251c9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653119949000, + "dateString": "2022-05-21T07:59:09.000Z", + "isValid": true, + "sgv": 132, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889be4a4cc860004a251c7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653119649000, + "dateString": "2022-05-21T07:54:09.000Z", + "isValid": true, + "sgv": 123, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889ac27ff1e700040f17dc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653119349000, + "dateString": "2022-05-21T07:49:09.000Z", + "isValid": true, + "sgv": 114, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "628899957ff1e700040f17d7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653119049000, + "dateString": "2022-05-21T07:44:09.000Z", + "isValid": true, + "sgv": 105, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "628898627ff1e700040f17d5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653118748000, + "dateString": "2022-05-21T07:39:08.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "_id": "628897357ff1e700040f17d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653118449000, + "dateString": "2022-05-21T07:34:09.000Z", + "isValid": true, + "sgv": 92, + "direction": "Flat", + "type": "sgv", + "_id": "6288961d7ff1e700040f17ce" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653118149000, + "dateString": "2022-05-21T07:29:09.000Z", + "isValid": true, + "sgv": 86, + "direction": "Flat", + "type": "sgv", + "_id": "628894d37ff1e700040f17cd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653117848000, + "dateString": "2022-05-21T07:24:08.000Z", + "isValid": true, + "sgv": 82, + "direction": "Flat", + "type": "sgv", + "_id": "628893bd7ff1e700040f17c9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653117549000, + "dateString": "2022-05-21T07:19:09.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "628892907ff1e700040f17c7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653117249000, + "dateString": "2022-05-21T07:14:09.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "_id": "628891627ff1e700040f17c6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653116949000, + "dateString": "2022-05-21T07:09:09.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "_id": "62889024149196000412bf57" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653116649000, + "dateString": "2022-05-21T07:04:09.000Z", + "isValid": true, + "sgv": 74, + "direction": "Flat", + "type": "sgv", + "_id": "62888f0f149196000412bf54" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653116349000, + "dateString": "2022-05-21T06:59:09.000Z", + "isValid": true, + "sgv": 70, + "direction": "Flat", + "type": "sgv", + "_id": "62888de2149196000412bf51" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653116049000, + "dateString": "2022-05-21T06:54:09.000Z", + "isValid": true, + "sgv": 69, + "direction": "Flat", + "type": "sgv", + "_id": "62888ccc149196000412bf4f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653115749000, + "dateString": "2022-05-21T06:49:09.000Z", + "isValid": true, + "sgv": 70, + "direction": "Flat", + "type": "sgv", + "_id": "62888b85149196000412bf4d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653115449000, + "dateString": "2022-05-21T06:44:09.000Z", + "isValid": true, + "sgv": 74, + "direction": "Flat", + "type": "sgv", + "_id": "62888a57149196000412bf4b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653115149000, + "dateString": "2022-05-21T06:39:09.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "_id": "6288892a149196000412bf49" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653114849000, + "dateString": "2022-05-21T06:34:09.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "_id": "628888018ff3530004dc6070" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653114549000, + "dateString": "2022-05-21T06:29:09.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "628886d28ff3530004dc606b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653114249000, + "dateString": "2022-05-21T06:24:09.000Z", + "isValid": true, + "sgv": 85, + "direction": "Flat", + "type": "sgv", + "_id": "628885a48ff3530004dc6069" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653113949000, + "dateString": "2022-05-21T06:19:09.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "_id": "628884778ff3530004dc6067" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653113649000, + "dateString": "2022-05-21T06:14:09.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "_id": "6288834a8ff3530004dc6065" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653113349000, + "dateString": "2022-05-21T06:09:09.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "6288821b8ff3530004dc6062" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653113049000, + "dateString": "2022-05-21T06:04:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628880ee8ff3530004dc6060" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653112749000, + "dateString": "2022-05-21T05:59:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "_id": "62887fcee964810004aa5666" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653112449000, + "dateString": "2022-05-21T05:54:09.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "_id": "62887ea1e964810004aa5664" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653112148000, + "dateString": "2022-05-21T05:49:08.000Z", + "isValid": true, + "sgv": 103, + "direction": "Flat", + "type": "sgv", + "_id": "62887d72e964810004aa5661" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653111849000, + "dateString": "2022-05-21T05:44:09.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "_id": "62887c44e964810004aa565d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653111549000, + "dateString": "2022-05-21T05:39:09.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "_id": "62887b17e964810004aa565a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653111249000, + "dateString": "2022-05-21T05:34:09.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "_id": "628879e9e964810004aa5657" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653110949000, + "dateString": "2022-05-21T05:29:09.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "_id": "628878bbe964810004aa5655" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653110649000, + "dateString": "2022-05-21T05:24:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628877a5363e6c0004f710e0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653110348000, + "dateString": "2022-05-21T05:19:08.000Z", + "isValid": true, + "sgv": 102, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62887677363e6c0004f710de" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653110049000, + "dateString": "2022-05-21T05:14:09.000Z", + "isValid": true, + "sgv": 109, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62887549363e6c0004f710dc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653109748000, + "dateString": "2022-05-21T05:09:08.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "_id": "6288741c363e6c0004f710d9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653109448000, + "dateString": "2022-05-21T05:04:08.000Z", + "isValid": true, + "sgv": 125, + "direction": "Flat", + "type": "sgv", + "_id": "628872ef363e6c0004f710d6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653109148000, + "dateString": "2022-05-21T04:59:08.000Z", + "isValid": true, + "sgv": 129, + "direction": "Flat", + "type": "sgv", + "_id": "628871c1363e6c0004f710d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653108848000, + "dateString": "2022-05-21T04:54:08.000Z", + "isValid": true, + "sgv": 130, + "direction": "Flat", + "type": "sgv", + "_id": "62887093363e6c0004f710cf" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653108548000, + "dateString": "2022-05-21T04:49:08.000Z", + "isValid": true, + "sgv": 128, + "direction": "Flat", + "type": "sgv", + "_id": "62886f5719e2e60004989bbc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653108249000, + "dateString": "2022-05-21T04:44:09.000Z", + "isValid": true, + "sgv": 123, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62886e2919e2e60004989bba" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653107948000, + "dateString": "2022-05-21T04:39:08.000Z", + "isValid": true, + "sgv": 124, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62886cfc19e2e60004989bb8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653107648000, + "dateString": "2022-05-21T04:34:08.000Z", + "isValid": true, + "sgv": 132, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62886be719e2e60004989bb5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653107348000, + "dateString": "2022-05-21T04:29:08.000Z", + "isValid": true, + "sgv": 144, + "direction": "Flat", + "type": "sgv", + "_id": "62886ab919e2e60004989bb3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653107048000, + "dateString": "2022-05-21T04:24:08.000Z", + "isValid": true, + "sgv": 153, + "direction": "Flat", + "type": "sgv", + "_id": "6288698b19e2e60004989bb0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653106749000, + "dateString": "2022-05-21T04:19:09.000Z", + "isValid": true, + "sgv": 157, + "direction": "Flat", + "type": "sgv", + "_id": "6288685d19e2e60004989bac" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653106449000, + "dateString": "2022-05-21T04:14:09.000Z", + "isValid": true, + "sgv": 155, + "direction": "Flat", + "type": "sgv", + "_id": "6288672f42c1220004f9573a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653106149000, + "dateString": "2022-05-21T04:09:09.000Z", + "isValid": true, + "sgv": 151, + "direction": "Flat", + "type": "sgv", + "_id": "6288660142c1220004f95736" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653105848000, + "dateString": "2022-05-21T04:04:08.000Z", + "isValid": true, + "sgv": 146, + "direction": "Flat", + "type": "sgv", + "_id": "628864d342c1220004f95733" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653105549000, + "dateString": "2022-05-21T03:59:09.000Z", + "isValid": true, + "sgv": 146, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628863a542c1220004f95730" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653105248000, + "dateString": "2022-05-21T03:54:08.000Z", + "isValid": true, + "sgv": 149, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288629042c1220004f9572e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653104949000, + "dateString": "2022-05-21T03:49:09.000Z", + "isValid": true, + "sgv": 155, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288614942c1220004f9572c" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653104648000, + "dateString": "2022-05-21T03:44:08.000Z", + "isValid": true, + "sgv": 162, + "direction": "Flat", + "type": "sgv", + "_id": "6288601b42c1220004f95729" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653104349000, + "dateString": "2022-05-21T03:39:09.000Z", + "isValid": true, + "sgv": 167, + "direction": "Flat", + "type": "sgv", + "_id": "62885ef1293f3e00042c31e2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653104049000, + "dateString": "2022-05-21T03:34:09.000Z", + "isValid": true, + "sgv": 170, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62885dc3293f3e00042c31de" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653103748000, + "dateString": "2022-05-21T03:29:08.000Z", + "isValid": true, + "sgv": 171, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62885c95293f3e00042c31db" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653103448000, + "dateString": "2022-05-21T03:24:08.000Z", + "isValid": true, + "sgv": 174, + "direction": "SingleDown", + "type": "sgv", + "_id": "62885b81293f3e00042c31d9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653103149000, + "dateString": "2022-05-21T03:19:09.000Z", + "isValid": true, + "sgv": 182, + "direction": "SingleDown", + "type": "sgv", + "_id": "62885a52293f3e00042c31d7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653102848000, + "dateString": "2022-05-21T03:14:08.000Z", + "isValid": true, + "sgv": 193, + "direction": "SingleDown", + "type": "sgv", + "_id": "62885924293f3e00042c31d5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653102548000, + "dateString": "2022-05-21T03:09:08.000Z", + "isValid": true, + "sgv": 204, + "direction": "SingleDown", + "type": "sgv", + "_id": "628857f7293f3e00042c31d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653102249000, + "dateString": "2022-05-21T03:04:09.000Z", + "isValid": true, + "sgv": 216, + "direction": "SingleDown", + "type": "sgv", + "_id": "628856da5151b5000462a1ea" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653101948000, + "dateString": "2022-05-21T02:59:08.000Z", + "isValid": true, + "sgv": 228, + "direction": "SingleDown", + "type": "sgv", + "_id": "628855935151b5000462a1e8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653101648000, + "dateString": "2022-05-21T02:54:08.000Z", + "isValid": true, + "sgv": 241, + "direction": "SingleDown", + "type": "sgv", + "_id": "6288547f5151b5000462a1e6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653101348000, + "dateString": "2022-05-21T02:49:08.000Z", + "isValid": true, + "sgv": 253, + "direction": "SingleDown", + "type": "sgv", + "_id": "628853395151b5000462a1e4" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653101048000, + "dateString": "2022-05-21T02:44:08.000Z", + "isValid": true, + "sgv": 267, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288520b5151b5000462a1e2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653100748000, + "dateString": "2022-05-21T02:39:08.000Z", + "isValid": true, + "sgv": 283, + "direction": "Flat", + "type": "sgv", + "_id": "628850de5151b5000462a1df" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653100449000, + "dateString": "2022-05-21T02:34:09.000Z", + "isValid": true, + "sgv": 297, + "direction": "Flat", + "type": "sgv", + "_id": "62884fb05151b5000462a1dc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653100148000, + "dateString": "2022-05-21T02:29:08.000Z", + "isValid": true, + "sgv": 307, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62884e9493668c0004a30517" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653099848000, + "dateString": "2022-05-21T02:24:08.000Z", + "isValid": true, + "sgv": 308, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62884d6793668c0004a30514" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653099548000, + "dateString": "2022-05-21T02:19:08.000Z", + "isValid": true, + "sgv": 296, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62884c3993668c0004a30510" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653099249000, + "dateString": "2022-05-21T02:14:09.000Z", + "isValid": true, + "sgv": 282, + "direction": "Flat", + "type": "sgv", + "_id": "62884b0c93668c0004a3050d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653098948000, + "dateString": "2022-05-21T02:09:08.000Z", + "isValid": true, + "sgv": 271, + "direction": "Flat", + "type": "sgv", + "_id": "628849de93668c0004a30508" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653098648000, + "dateString": "2022-05-21T02:04:08.000Z", + "isValid": true, + "sgv": 271, + "direction": "Flat", + "type": "sgv", + "_id": "628848b093668c0004a30504" + } +] diff --git a/app/src/test/res/autotune/test2/aaps-treatments.2022-05-21.json b/app/src/test/res/autotune/test2/aaps-treatments.2022-05-21.json new file mode 100644 index 0000000000..b271cc80e4 --- /dev/null +++ b/app/src/test/res/autotune/test2/aaps-treatments.2022-05-21.json @@ -0,0 +1,3146 @@ +[ + { + "created_at": "2022-05-22T02:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 635539, + "type": "NORMAL", + "rate": 0.0742, + "percent": -90, + "pumpId": 454016, + "endId": 454021, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289982461a8290004740387" + }, + { + "created_at": "2022-05-22T01:55:40.718Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 259282, + "type": "NORMAL", + "rate": 0.0824, + "percent": -90, + "pumpId": 454016, + "endId": 454021, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289982461a8290004740387" + }, + { + "created_at": "2022-05-22T01:50:36.118Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303106, + "type": "NORMAL", + "rate": 0.1648, + "percent": -80, + "pumpId": 454013, + "endId": 454015, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628996f661a8290004740384" + }, + { + "created_at": "2022-05-22T01:45:35.222Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299405, + "type": "NORMAL", + "rate": 0.49439999999999995, + "percent": -40, + "pumpId": 454010, + "endId": 454012, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628995c761a8290004740381" + }, + { + "created_at": "2022-05-22T01:40:51.929Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 281796, + "type": "NORMAL", + "rate": 0.6592, + "percent": -20, + "pumpId": 454007, + "endId": 454009, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628994ab50e51d0004429e6f" + }, + { + "created_at": "2022-05-22T01:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 40, + "durationInMilliseconds": 2449437, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 454003, + "endId": 454006, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628988efda46aa0004d1e0f7" + }, + { + "created_at": "2022-05-22T00:50:32.326Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 567674, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 454003, + "endId": 454006, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628988efda46aa0004d1e0f7" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-22T00:45:47.966Z", + "date": 1653180347966, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21574, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628987c0da46aa0004d1e0f3" + }, + { + "created_at": "2022-05-22T00:45:45.232Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285608, + "type": "NORMAL", + "rate": 1.209, + "percent": 50, + "pumpId": 453998, + "endId": 454002, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628987c0da46aa0004d1e0f4" + }, + { + "created_at": "2022-05-22T00:35:30.702Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 613035, + "type": "NORMAL", + "rate": 1.0478, + "percent": 30, + "pumpId": 453995, + "endId": 453997, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62898563da46aa0004d1e0ec" + }, + { + "created_at": "2022-05-22T00:30:42.142Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 287064, + "type": "NORMAL", + "rate": 0.7254, + "percent": -10, + "pumpId": 453992, + "endId": 453994, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628984439d6f1800047cd0df" + }, + { + "created_at": "2022-05-22T00:20:44.045Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 595609, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453989, + "endId": 453991, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628981e59d6f1800047cd0da" + }, + { + "created_at": "2022-05-22T00:10:28.057Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 614498, + "type": "NORMAL", + "rate": 0.403, + "percent": -50, + "pumpId": 453986, + "endId": 453988, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897f879d6f1800047cd0d5" + }, + { + "created_at": "2022-05-22T00:06:13.096Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 252465, + "type": "NORMAL", + "rate": 0.403, + "percent": -50, + "pumpId": 453983, + "endId": 453985, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897e8b9d6f1800047cd0d2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-22T00:00:34.526Z", + "date": 1653177634526, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21573, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897d299d6f1800047cd0cd" + }, + { + "created_at": "2022-05-22T00:00:31.592Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 340013, + "type": "NORMAL", + "rate": 0.5642, + "percent": -30, + "pumpId": 453978, + "endId": 453982, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897d299d6f1800047cd0cf" + }, + { + "created_at": "2022-05-22T00:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 30096, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453974, + "endId": 453977, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897c139d6f1800047cd0ca" + }, + { + "created_at": "2022-05-21T23:55:56.658Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 243342, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453974, + "endId": 453977, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897c139d6f1800047cd0ca" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.54, + "created_at": "2022-05-21T23:50:30.757Z", + "date": 1653177030757, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21572, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897ad171a363000480abcb" + }, + { + "created_at": "2022-05-21T23:46:13.228Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 573000, + "type": "FAKE_EXTENDED", + "rate": 2.561162303664922, + "absolute": 2.561162303664922, + "pumpId": 21571, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628979d571a363000480abc9" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-21T23:40:59.180Z", + "date": 1653176459180, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21570, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289788d71a363000480abc4" + }, + { + "created_at": "2022-05-21T23:40:57.936Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304306, + "type": "NORMAL", + "rate": 1.6842000000000001, + "percent": 110, + "pumpId": 453959, + "endId": 453963, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289788e71a363000480abc6" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-21T23:20:51.857Z", + "date": 1653175251857, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21569, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628973eb71a363000480abba" + }, + { + "created_at": "2022-05-21T23:16:23.121Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1472326, + "type": "NORMAL", + "rate": 1.1228, + "percent": 40, + "pumpId": 453954, + "endId": 453958, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628972de37d09a00043f2b24" + }, + { + "created_at": "2022-05-21T23:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 16, + "durationInMilliseconds": 983121, + "type": "NORMAL", + "rate": 0.802, + "percent": 0, + "_id": "neutral_1653171415806" + }, + { + "created_at": "2022-05-21T22:16:55.806Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 43, + "durationInMilliseconds": 2584194, + "type": "NORMAL", + "rate": 0.795, + "percent": 0, + "_id": "neutral_1653171415806" + }, + { + "created_at": "2022-05-21T22:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 16, + "durationInMilliseconds": 1015806, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453943, + "endId": 453951, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628957129bf1e6000482ff9a" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-21T21:24:43.261Z", + "date": 1653168283261, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21568, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628958a49bf1e6000482ff9c" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-21T21:17:49.628Z", + "date": 1653167869628, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21567, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628957109bf1e6000482ff99" + }, + { + "created_at": "2022-05-21T21:17:43.507Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 42, + "durationInMilliseconds": 2536493, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453943, + "endId": 453951, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628957129bf1e6000482ff9a" + }, + { + "created_at": "2022-05-21T21:10:55.350Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 6, + "durationInMilliseconds": 406671, + "type": "NORMAL", + "rate": 1.0049000000000001, + "percent": 30, + "pumpId": 453940, + "endId": 453942, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628955629bf1e6000482ff94" + }, + { + "created_at": "2022-05-21T21:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 653862, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453936, + "endId": 453939, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894e5580fc7e00041b22a2" + }, + { + "created_at": "2022-05-21T20:40:34.976Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1165024, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453936, + "endId": 453939, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894e5580fc7e00041b22a2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-21T20:30:40.892Z", + "date": 1653165040892, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21566, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894bf780fc7e00041b229d" + }, + { + "created_at": "2022-05-21T20:25:40.930Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 891567, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453931, + "endId": 453935, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894aca4493460004e63a3a" + }, + { + "eventType": "Meal Bolus", + "insulin": 9.4, + "created_at": "2022-05-21T20:19:54.209Z", + "date": 1653164394209, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21565, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628949824493460004e63a35" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-21T20:11:04.953Z", + "date": 1653163864953, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21564, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628947704493460004e63a30" + }, + { + "created_at": "2022-05-21T20:11:03.814Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 874625, + "type": "NORMAL", + "rate": 1.2563, + "percent": 70, + "pumpId": 453924, + "endId": 453930, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628947574493460004e63a2f" + }, + { + "created_at": "2022-05-21T20:00:37.912Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 623413, + "type": "NORMAL", + "rate": 0.9606999999999999, + "percent": 30, + "pumpId": 453921, + "endId": 453923, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628944fa4493460004e63a29" + }, + { + "created_at": "2022-05-21T20:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 35425, + "type": "NORMAL", + "rate": 0.2956, + "percent": -60, + "pumpId": 453917, + "endId": 453920, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894164598f780004bb3b2f" + }, + { + "created_at": "2022-05-21T19:45:25.759Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 874241, + "type": "NORMAL", + "rate": 0.2888, + "percent": -60, + "pumpId": 453917, + "endId": 453920, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894164598f780004bb3b2f" + }, + { + "created_at": "2022-05-21T19:25:47.539Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1175731, + "type": "NORMAL", + "rate": 0.43320000000000003, + "percent": -40, + "pumpId": 453914, + "endId": 453916, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62893cc8598f780004bb3b25" + }, + { + "created_at": "2022-05-21T19:20:54.174Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293365, + "type": "NORMAL", + "rate": 0.722, + "percent": 0, + "_id": "neutral_1653160854174" + }, + { + "created_at": "2022-05-21T19:10:51.515Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 602659, + "type": "NORMAL", + "rate": 0.7942, + "percent": 10, + "pumpId": 453908, + "endId": 453910, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289394a22fbc8000495b821" + }, + { + "created_at": "2022-05-21T19:01:01.322Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 588703, + "type": "NORMAL", + "rate": 0.2888, + "percent": -60, + "pumpId": 453905, + "endId": 453907, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628936ef22fbc8000495b81c" + }, + { + "created_at": "2022-05-21T19:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 59826, + "type": "NORMAL", + "rate": 0.7942, + "percent": 10, + "pumpId": 453900, + "endId": 453904, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289349522fbc8000495b816" + }, + { + "created_at": "2022-05-21T18:50:58.216Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 541784, + "type": "NORMAL", + "rate": 0.77, + "percent": 10, + "pumpId": 453900, + "endId": 453904, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289349522fbc8000495b816" + }, + { + "created_at": "2022-05-21T18:46:12.499Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285717, + "type": "NORMAL", + "rate": 0.7, + "percent": 0, + "_id": "neutral_1653158772499" + }, + { + "created_at": "2022-05-21T18:30:30.651Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 941848, + "type": "NORMAL", + "rate": 0.91, + "percent": 30, + "pumpId": 453894, + "endId": 453896, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62892fda840d8d0004a20bfc" + }, + { + "created_at": "2022-05-21T18:20:44.275Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 584884, + "type": "NORMAL", + "rate": 0.28, + "percent": -60, + "pumpId": 453891, + "endId": 453893, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62892d80840d8d0004a20bf7" + }, + { + "created_at": "2022-05-21T18:15:30.389Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 312398, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453888, + "endId": 453890, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62892c52840d8d0004a20bf4" + }, + { + "created_at": "2022-05-21T18:00:33.832Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 895066, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453885, + "endId": 453887, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628928ca8809e60004c644e8" + }, + { + "created_at": "2022-05-21T18:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 32345, + "type": "NORMAL", + "rate": 0.35, + "percent": -50, + "pumpId": 453881, + "endId": 453884, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628927b58809e60004c644e5" + }, + { + "created_at": "2022-05-21T17:55:44.739Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 255261, + "type": "NORMAL", + "rate": 0.3295, + "percent": -50, + "pumpId": 453881, + "endId": 453884, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628927b58809e60004c644e5" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-21T17:45:48.032Z", + "date": 1653155148032, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21563, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628925588809e60004c644de" + }, + { + "created_at": "2022-05-21T17:45:45.750Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 597498, + "type": "NORMAL", + "rate": 1.5816, + "percent": 140, + "pumpId": 453876, + "endId": 453880, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628925588809e60004c644e0" + }, + { + "created_at": "2022-05-21T17:40:44.874Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299386, + "type": "NORMAL", + "rate": 0.8567, + "percent": 30, + "pumpId": 453873, + "endId": 453875, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289242b8809e60004c644db" + }, + { + "created_at": "2022-05-21T17:35:46.611Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 295766, + "type": "NORMAL", + "rate": 0.3295, + "percent": -50, + "pumpId": 453870, + "endId": 453872, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628922fe8809e60004c644d8" + }, + { + "created_at": "2022-05-21T17:25:37.912Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 607206, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453867, + "endId": 453869, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628920a41090500004ca4729" + }, + { + "created_at": "2022-05-21T17:20:42.063Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293355, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453864, + "endId": 453866, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62891f771090500004ca4726" + }, + { + "created_at": "2022-05-21T17:10:30.971Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 608601, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453861, + "endId": 453863, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62891d1b1090500004ca4721" + }, + { + "created_at": "2022-05-21T17:00:45.815Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 582673, + "type": "NORMAL", + "rate": 0.0659, + "percent": -90, + "pumpId": 453858, + "endId": 453860, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62891ac01090500004ca471c" + }, + { + "created_at": "2022-05-21T17:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 43325, + "type": "NORMAL", + "rate": 1.4498000000000002, + "percent": 120, + "pumpId": 453852, + "endId": 453857, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628918711090500004ca4716" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-21T16:55:53.346Z", + "date": 1653152153346, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21562, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289199e1090500004ca4718" + }, + { + "created_at": "2022-05-21T16:50:50.998Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 549002, + "type": "NORMAL", + "rate": 1.4322, + "percent": 120, + "pumpId": 453852, + "endId": 453857, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628918711090500004ca4716" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-21T16:45:50.105Z", + "date": 1653151550105, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21561, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628917431090500004ca4711" + }, + { + "created_at": "2022-05-21T16:45:47.200Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300314, + "type": "NORMAL", + "rate": 1.0415999999999999, + "percent": 60, + "pumpId": 453847, + "endId": 453851, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628917431090500004ca4713" + }, + { + "created_at": "2022-05-21T16:40:54.765Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 290944, + "type": "NORMAL", + "rate": 0.8463, + "percent": 30, + "pumpId": 453844, + "endId": 453846, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289161c1090500004ca470e" + }, + { + "created_at": "2022-05-21T16:35:35.684Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 317593, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453841, + "endId": 453843, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628914eb1090500004ca470b" + }, + { + "created_at": "2022-05-21T16:30:39.072Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 295126, + "type": "NORMAL", + "rate": 0.06509999999999999, + "percent": -90, + "pumpId": 453838, + "endId": 453840, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628913c01090500004ca4708" + }, + { + "created_at": "2022-05-21T16:25:35.342Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 301235, + "type": "NORMAL", + "rate": 0.06509999999999999, + "percent": -90, + "pumpId": 453835, + "endId": 453837, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628913141090500004ca4705" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-21T16:20:30.382Z", + "date": 1653150030382, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21560, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289130f1090500004ca4700" + }, + { + "created_at": "2022-05-21T16:20:27.375Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 306478, + "type": "NORMAL", + "rate": 1.0415999999999999, + "percent": 60, + "pumpId": 453830, + "endId": 453834, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628913101090500004ca4702" + }, + { + "created_at": "2022-05-21T16:11:20.186Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 545699, + "type": "NORMAL", + "rate": 0.32550000000000007, + "percent": -50, + "pumpId": 453827, + "endId": 453829, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890f811090500004ca46fc" + }, + { + "created_at": "2022-05-21T16:06:52.798Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 265903, + "type": "NORMAL", + "rate": 0.26039999999999996, + "percent": -60, + "pumpId": 453824, + "endId": 453826, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890e29cf7ee10004a2b1e1" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-21T16:01:01.819Z", + "date": 1653148861819, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21559, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890cc9cf7ee10004a2b1dc" + }, + { + "created_at": "2022-05-21T16:00:58.172Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 344000, + "type": "FAKE_EXTENDED", + "rate": 1.9068139534883721, + "absolute": 1.9068139534883721, + "pumpId": 21558, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890cc9cf7ee10004a2b1dd" + }, + { + "created_at": "2022-05-21T16:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 46830, + "type": "NORMAL", + "rate": 0.06509999999999999, + "percent": -90, + "pumpId": 453811, + "endId": 453814, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890b82cf7ee10004a2b1d9" + }, + { + "created_at": "2022-05-21T15:55:39.147Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 260853, + "type": "NORMAL", + "rate": 0.0673, + "percent": -90, + "pumpId": 453811, + "endId": 453814, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890b82cf7ee10004a2b1d9" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-21T15:51:00.932Z", + "date": 1653148260932, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21557, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890a6dcf7ee10004a2b1d4" + }, + { + "created_at": "2022-05-21T15:50:58.818Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 278838, + "type": "NORMAL", + "rate": 1.1441000000000001, + "percent": 70, + "pumpId": 453806, + "endId": 453810, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890a6ecf7ee10004a2b1d6" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-21T15:40:59.961Z", + "date": 1653147659961, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21556, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890811cf7ee10004a2b1cf" + }, + { + "created_at": "2022-05-21T15:35:20.343Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 935989, + "type": "NORMAL", + "rate": 1.0095, + "percent": 50, + "pumpId": 453800, + "endId": 453805, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628906e3cf7ee10004a2b1cc" + }, + { + "created_at": "2022-05-21T15:31:00.492Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 258353, + "type": "NORMAL", + "rate": 0.0673, + "percent": -90, + "pumpId": 453797, + "endId": 453799, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628905b6c9346b0004863368" + }, + { + "created_at": "2022-05-21T15:25:55.840Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303154, + "type": "NORMAL", + "rate": 0.3365000000000001, + "percent": -50, + "pumpId": 453794, + "endId": 453796, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890488c9346b0004863365" + }, + { + "created_at": "2022-05-21T15:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1553350, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453790, + "endId": 453793, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288fa1b0e0c880004d58de2" + }, + { + "created_at": "2022-05-21T14:41:07.802Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 18, + "durationInMilliseconds": 1132198, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453790, + "endId": 453793, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288fa1b0e0c880004d58de2" + }, + { + "created_at": "2022-05-21T14:30:59.772Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 605542, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453787, + "endId": 453789, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288f7a60e0c880004d58ddd" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-21T14:25:43.954Z", + "date": 1653143143954, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21555, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288f6770e0c880004d58dd9" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.78, + "created_at": "2022-05-21T14:15:46.926Z", + "date": 1653142546926, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21554, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288f4152634cd0004296072" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.86, + "created_at": "2022-05-21T14:05:34.493Z", + "date": 1653141934493, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21553, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288f1b82634cd000429606d" + }, + { + "created_at": "2022-05-21T14:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 30, + "durationInMilliseconds": 1857281, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453769, + "endId": 453786, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e8910f1be700041e5a02" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.58, + "created_at": "2022-05-21T13:55:47.615Z", + "date": 1653141347615, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21552, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288ef752634cd0004296068" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.98, + "created_at": "2022-05-21T13:45:57.753Z", + "date": 1653140757753, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21551, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288ed160f1be700041e5a0c" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.6, + "created_at": "2022-05-21T13:36:02.971Z", + "date": 1653140162971, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21550, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288ead30f1be700041e5a08" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.58, + "created_at": "2022-05-21T13:30:42.515Z", + "date": 1653139842515, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21549, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e98c0f1be700041e5a04" + }, + { + "created_at": "2022-05-21T13:26:18.959Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 33, + "durationInMilliseconds": 2021041, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453769, + "endId": 453786, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e8910f1be700041e5a02" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.74, + "created_at": "2022-05-21T13:10:43.719Z", + "date": 1653138643719, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21548, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e5520f1be700041e59f9" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.04, + "created_at": "2022-05-21T13:00:56.399Z", + "date": 1653138056399, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21547, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e2970f1be700041e59f4" + }, + { + "created_at": "2022-05-21T13:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 26, + "durationInMilliseconds": 1576482, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453759, + "endId": 453768, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288da470f1be700041e59e4" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.24, + "created_at": "2022-05-21T12:55:30.825Z", + "date": 1653137730825, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21546, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e1500f1be700041e59f1" + }, + { + "created_at": "2022-05-21T12:25:26.042Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 34, + "durationInMilliseconds": 2073958, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453759, + "endId": 453768, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288da470f1be700041e59e4" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-21T12:10:34.513Z", + "date": 1653135034513, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21545, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288d6ca0f1be700041e59db" + }, + { + "created_at": "2022-05-21T12:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1523557, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453752, + "endId": 453758, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288cc5d8e9ed800049b39f4" + }, + { + "created_at": "2022-05-21T11:26:10.112Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 33, + "durationInMilliseconds": 2029888, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453752, + "endId": 453758, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288cc5d8e9ed800049b39f4" + }, + { + "eventType": "Meal Bolus", + "insulin": 8.22, + "created_at": "2022-05-21T11:23:36.043Z", + "date": 1653132216043, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21544, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288cbc78e9ed800049b39ef" + }, + { + "created_at": "2022-05-21T11:21:02.281Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299000, + "type": "FAKE_EXTENDED", + "rate": 1.6932107023411371, + "absolute": 1.6932107023411371, + "pumpId": 21543, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288cb308e9ed800049b39ee" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-21T11:15:45.765Z", + "date": 1653131745765, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21542, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c9e98e9ed800049b39e9" + }, + { + "created_at": "2022-05-21T11:15:43.070Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 308169, + "type": "NORMAL", + "rate": 1.533, + "percent": 110, + "pumpId": 453738, + "endId": 453742, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c9e98e9ed800049b39eb" + }, + { + "created_at": "2022-05-21T11:10:35.181Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 305390, + "type": "NORMAL", + "rate": 0.073, + "percent": -90, + "pumpId": 453735, + "endId": 453737, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c8bb8e9ed800049b39e7" + }, + { + "created_at": "2022-05-21T11:00:50.721Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 582968, + "type": "NORMAL", + "rate": 0.21899999999999997, + "percent": -70, + "pumpId": 453732, + "endId": 453734, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c6661991280004dce46a" + }, + { + "created_at": "2022-05-21T11:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 49281, + "type": "NORMAL", + "rate": 1.022, + "percent": 40, + "pumpId": 453728, + "endId": 453731, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c5381991280004dce466" + }, + { + "created_at": "2022-05-21T10:55:43.162Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 256838, + "type": "NORMAL", + "rate": 1.0248, + "percent": 40, + "pumpId": 453728, + "endId": 453731, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c5381991280004dce466" + }, + { + "created_at": "2022-05-21T10:50:29.463Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 312203, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453725, + "endId": 453727, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c40a1991280004dce463" + }, + { + "created_at": "2022-05-21T10:45:42.010Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285961, + "type": "NORMAL", + "rate": 0.0732, + "percent": -90, + "pumpId": 453722, + "endId": 453724, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c2dd1991280004dce460" + }, + { + "created_at": "2022-05-21T10:40:32.888Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 306629, + "type": "NORMAL", + "rate": 0.2928, + "percent": -60, + "pumpId": 453719, + "endId": 453721, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c1ae1991280004dce45d" + }, + { + "created_at": "2022-05-21T10:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 40, + "durationInMilliseconds": 2430396, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453715, + "endId": 453718, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288b09fc9c02c00041f7efb" + }, + { + "created_at": "2022-05-21T09:27:51.738Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 32, + "durationInMilliseconds": 1928262, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453715, + "endId": 453718, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288b09fc9c02c00041f7efb" + }, + { + "created_at": "2022-05-21T09:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 27, + "durationInMilliseconds": 1670246, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453708, + "endId": 453714, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288a50699fc930004d6bdea" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-21T08:58:07.216Z", + "date": 1653123487216, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21541, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288a9a499fc930004d6bdf2" + }, + { + "created_at": "2022-05-21T08:38:27.621Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 21, + "durationInMilliseconds": 1292379, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453708, + "endId": 453714, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288a50699fc930004d6bdea" + }, + { + "created_at": "2022-05-21T08:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 38, + "durationInMilliseconds": 2306129, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453704, + "endId": 453707, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62889bb2a4cc860004a251c6" + }, + { + "created_at": "2022-05-21T07:58:04.003Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 1, + "durationInMilliseconds": 115997, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453704, + "endId": 453707, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62889bb2a4cc860004a251c6" + }, + { + "eventType": "Meal Bolus", + "insulin": 13.56, + "created_at": "2022-05-21T07:52:52.394Z", + "date": 1653119572394, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21540, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62889a5d7ff1e700040f17d9" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-21T07:38:42.955Z", + "date": 1653118722955, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21539, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288971c7ff1e700040f17d2" + }, + { + "created_at": "2022-05-21T07:38:40.317Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1153999, + "type": "FAKE_EXTENDED", + "rate": 2.251401644195532, + "absolute": 2.251401644195532, + "pumpId": 21538, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628897027ff1e700040f17d0" + }, + { + "created_at": "2022-05-21T07:28:33.763Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 595482, + "type": "NORMAL", + "rate": 0.377, + "percent": -50, + "pumpId": 453689, + "endId": 453691, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628894a17ff1e700040f17cc" + }, + { + "created_at": "2022-05-21T07:13:06.679Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 924592, + "type": "NORMAL", + "rate": 0.2262, + "percent": -70, + "pumpId": 453686, + "endId": 453688, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62889106149196000412bf59" + }, + { + "created_at": "2022-05-21T07:08:35.905Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 269284, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453683, + "endId": 453685, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288900b149196000412bf56" + }, + { + "created_at": "2022-05-21T07:03:41.224Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 292184, + "type": "NORMAL", + "rate": 0.0754, + "percent": -90, + "pumpId": 453680, + "endId": 453682, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62888edd149196000412bf53" + }, + { + "created_at": "2022-05-21T07:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 3, + "durationInMilliseconds": 219733, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453676, + "endId": 453679, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628887058ff3530004dc606e" + }, + { + "created_at": "2022-05-21T06:30:07.195Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1792805, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453676, + "endId": 453679, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628887058ff3530004dc606e" + }, + { + "created_at": "2022-05-21T06:12:44.359Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 17, + "durationInMilliseconds": 1041347, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453673, + "endId": 453675, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628882e48ff3530004dc6064" + }, + { + "created_at": "2022-05-21T06:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 12, + "durationInMilliseconds": 762867, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453669, + "endId": 453672, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887ea0e964810004aa5663" + }, + { + "created_at": "2022-05-21T05:54:16.341Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 343659, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453669, + "endId": 453672, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887ea0e964810004aa5663" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.44, + "created_at": "2022-05-21T05:47:59.042Z", + "date": 1653112079042, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21537, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887d27e964810004aa5660" + }, + { + "created_at": "2022-05-21T05:47:56.189Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 6, + "durationInMilliseconds": 371000, + "type": "FAKE_EXTENDED", + "rate": 3.305911051212938, + "absolute": 3.305911051212938, + "pumpId": 21536, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887d0ee964810004aa565f" + }, + { + "created_at": "2022-05-21T05:42:45.087Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299481, + "type": "NORMAL", + "rate": 0.8613000000000001, + "percent": 10, + "pumpId": 453657, + "endId": 453659, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887be0e964810004aa565c" + }, + { + "created_at": "2022-05-21T05:37:33.183Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 309411, + "type": "NORMAL", + "rate": 0.0783, + "percent": -90, + "pumpId": 453654, + "endId": 453656, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887ab2e964810004aa5659" + }, + { + "created_at": "2022-05-21T05:12:51.790Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1479904, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453651, + "endId": 453653, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628874e5363e6c0004f710db" + }, + { + "created_at": "2022-05-21T05:07:46.012Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304280, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453648, + "endId": 453650, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628873b8363e6c0004f710d8" + }, + { + "created_at": "2022-05-21T05:02:53.773Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289742, + "type": "NORMAL", + "rate": 0.1566, + "percent": -80, + "pumpId": 453645, + "endId": 453647, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288728a363e6c0004f710d5" + }, + { + "created_at": "2022-05-21T05:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 171279, + "type": "NORMAL", + "rate": 1.5659999999999998, + "percent": 100, + "pumpId": 453639, + "endId": 453644, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288715d363e6c0004f710d2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-21T04:57:53.298Z", + "date": 1653109073298, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21535, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288715c363e6c0004f710d1" + }, + { + "created_at": "2022-05-21T04:57:50.147Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 129853, + "type": "NORMAL", + "rate": 1.472, + "percent": 100, + "pumpId": 453639, + "endId": 453644, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288715d363e6c0004f710d2" + }, + { + "created_at": "2022-05-21T04:52:45.360Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303299, + "type": "NORMAL", + "rate": 1.0304, + "percent": 40, + "pumpId": 453636, + "endId": 453638, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288702f363e6c0004f710ce" + }, + { + "created_at": "2022-05-21T04:37:34.478Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 909400, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453633, + "endId": 453635, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62886c9719e2e60004989bb7" + }, + { + "created_at": "2022-05-21T04:27:51.392Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 581589, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453630, + "endId": 453632, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62886a5519e2e60004989bb2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-21T04:23:04.285Z", + "date": 1653106984285, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21534, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288694019e2e60004989baf" + }, + { + "created_at": "2022-05-21T04:23:00.631Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289268, + "type": "NORMAL", + "rate": 0.4416, + "percent": -40, + "pumpId": 453625, + "endId": 453629, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288692719e2e60004989bae" + }, + { + "created_at": "2022-05-21T04:18:00.399Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 291000, + "type": "FAKE_EXTENDED", + "rate": 3.210226804123711, + "absolute": 3.210226804123711, + "pumpId": 21533, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288681219e2e60004989bab" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.66, + "created_at": "2022-05-21T04:13:03.102Z", + "date": 1653106383102, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21532, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628866e342c1220004f95738" + }, + { + "created_at": "2022-05-21T04:13:00.412Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299987, + "type": "FAKE_EXTENDED", + "rate": 3.3759999999999994, + "absolute": 3.3759999999999994, + "pumpId": 21531, + "endId": 21533, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628866e342c1220004f95739" + }, + { + "created_at": "2022-05-21T04:07:39.846Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 307758, + "type": "NORMAL", + "rate": 1.0304, + "percent": 40, + "pumpId": 453609, + "endId": 453611, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288659d42c1220004f95735" + }, + { + "created_at": "2022-05-21T04:02:57.240Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 280112, + "type": "NORMAL", + "rate": 0.368, + "percent": -50, + "pumpId": 453606, + "endId": 453608, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288648842c1220004f95732" + }, + { + "created_at": "2022-05-21T04:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 175749, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453602, + "endId": 453605, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628860fe42c1220004f9572b" + }, + { + "created_at": "2022-05-21T03:47:49.532Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 12, + "durationInMilliseconds": 730468, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453602, + "endId": 453605, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628860fe42c1220004f9572b" + }, + { + "created_at": "2022-05-21T03:43:04.365Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 283670, + "type": "NORMAL", + "rate": 0.7001999999999999, + "percent": -10, + "pumpId": 453599, + "endId": 453601, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62885fcf42c1220004f95728" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.52, + "created_at": "2022-05-21T03:38:07.812Z", + "date": 1653104287812, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21530, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62885ea5293f3e00042c31e0" + }, + { + "created_at": "2022-05-21T03:38:05.030Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 290000, + "type": "FAKE_EXTENDED", + "rate": 3.2607586206896553, + "absolute": 3.2607586206896553, + "pumpId": 21529, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62885ea5293f3e00042c31e1" + }, + { + "created_at": "2022-05-21T03:32:50.531Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303634, + "type": "NORMAL", + "rate": 0.2334, + "percent": -70, + "pumpId": 453587, + "endId": 453589, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62885d78293f3e00042c31dd" + }, + { + "created_at": "2022-05-21T03:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 32, + "durationInMilliseconds": 1969040, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453583, + "endId": 453586, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628851a75151b5000462a1e1" + }, + { + "created_at": "2022-05-21T02:42:42.383Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 17, + "durationInMilliseconds": 1037617, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453583, + "endId": 453586, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628851a75151b5000462a1e1" + }, + { + "created_at": "2022-05-21T02:37:54.170Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 286717, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453580, + "endId": 453582, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628850925151b5000462a1de" + }, + { + "created_at": "2022-05-21T02:32:55.252Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 297423, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453577, + "endId": 453579, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884f645151b5000462a1db" + }, + { + "created_at": "2022-05-21T02:28:10.152Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 283605, + "type": "NORMAL", + "rate": 0.2968, + "percent": -60, + "pumpId": 453574, + "endId": 453576, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884e4993668c0004a30516" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.5, + "created_at": "2022-05-21T02:23:08.766Z", + "date": 1653099788766, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21528, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884d1b93668c0004a30512" + }, + { + "created_at": "2022-05-21T02:23:06.229Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 294000, + "type": "FAKE_EXTENDED", + "rate": 7.10934693877551, + "absolute": 7.10934693877551, + "pumpId": 21527, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884d1b93668c0004a30513" + }, + { + "created_at": "2022-05-21T02:17:55.333Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299966, + "type": "NORMAL", + "rate": 0.5936, + "percent": -20, + "pumpId": 453562, + "endId": 453564, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884bd493668c0004a3050f" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.92, + "created_at": "2022-05-21T02:13:06.284Z", + "date": 1653099186284, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21526, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884ac093668c0004a3050b" + }, + { + "created_at": "2022-05-21T02:13:03.301Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 283000, + "type": "FAKE_EXTENDED", + "rate": 3.0317526501766783, + "absolute": 3.0317526501766783, + "pumpId": 21525, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884ac093668c0004a3050c" + }, + { + "created_at": "2022-05-21T02:02:49.661Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 601864, + "type": "NORMAL", + "rate": 0.5201, + "percent": -30, + "pumpId": 453548, + "endId": 453552, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288484c93668c0004a30503" + }, + { + "created_at": "2022-05-21T02:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 168169, + "type": "NORMAL", + "rate": 0.6687000000000001, + "percent": -10, + "pumpId": 453542, + "endId": 453547, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288473793668c0004a30500" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-21T01:57:52.501Z", + "date": 1653098272501, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21524, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288473793668c0004a304ff" + }, + { + "created_at": "2022-05-21T01:57:50.546Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 129454, + "type": "NORMAL", + "rate": 0.7155, + "percent": -10, + "pumpId": 453542, + "endId": 453547, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288473793668c0004a30500" + }, + { + "created_at": "2022-05-21T01:52:49.925Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300621, + "type": "NORMAL", + "rate": 0.795, + "percent": 0, + "_id": "neutral_1653097969925" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.46, + "created_at": "2022-05-21T01:47:59.874Z", + "date": 1653097679874, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21523, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628844e49d7ff00004aaf0c0" + }, + { + "created_at": "2022-05-21T01:47:56.925Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293000, + "type": "FAKE_EXTENDED", + "rate": 3.00660409556314, + "absolute": 3.00660409556314, + "pumpId": 21522, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628844e49d7ff00004aaf0c1" + }, + { + "created_at": "2022-05-21T01:42:53.604Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 292860, + "type": "NORMAL", + "rate": 0.3975, + "percent": -50, + "pumpId": 453530, + "endId": 453532, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628843b79d7ff00004aaf0bd" + }, + { + "created_at": "2022-05-21T01:37:38.923Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 313186, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453527, + "endId": 453529, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628842709d7ff00004aaf0ba" + }, + { + "created_at": "2022-05-21T01:32:51.444Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 284984, + "type": "NORMAL", + "rate": 0.318, + "percent": -60, + "pumpId": 453524, + "endId": 453526, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288415b9d7ff00004aaf0b7" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.5, + "created_at": "2022-05-21T01:27:52.076Z", + "date": 1653096472076, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21521, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288402d9d7ff00004aaf0b4" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.6, + "created_at": "2022-05-21T01:18:07.619Z", + "date": 1653095887619, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21520, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62883de332ad2e0004b68cca" + }, + { + "created_at": "2022-05-21T01:18:05.464Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 876000, + "type": "FAKE_EXTENDED", + "rate": 5.068972602739726, + "absolute": 5.068972602739726, + "pumpId": 21519, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62883de332ad2e0004b68cc9" + }, + { + "created_at": "2022-05-21T01:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 18, + "durationInMilliseconds": 1085464, + "type": "NORMAL", + "rate": 0.795, + "percent": 0, + "_id": "neutral_1653086276443" + }, + { + "created_at": "2022-05-21T00:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 60, + "durationInMilliseconds": 3600000, + "type": "NORMAL", + "rate": 0.76, + "percent": 0, + "_id": "neutral_1653086276443" + }, + { + "created_at": "2022-05-20T23:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 60, + "durationInMilliseconds": 3600000, + "type": "NORMAL", + "rate": 0.738, + "percent": 0, + "_id": "neutral_1653086276443" + }, + { + "created_at": "2022-05-20T22:37:56.443Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 22, + "durationInMilliseconds": 1323557, + "type": "NORMAL", + "rate": 0.7239999999999999, + "percent": 0, + "_id": "neutral_1653086276443" + }, + { + "created_at": "2022-05-20T22:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 37, + "durationInMilliseconds": 2276443, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453504, + "endId": 453510, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62880a6b1664860004cb51ad" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-20T21:38:36.984Z", + "date": 1653082716984, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21518, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62880a6b1664860004cb51ac" + }, + { + "created_at": "2022-05-20T21:38:35.831Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 21, + "durationInMilliseconds": 1284169, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453504, + "endId": 453510, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62880a6b1664860004cb51ad" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-20T21:28:21.755Z", + "date": 1653082101755, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21517, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628807f71664860004cb51a6" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.18, + "created_at": "2022-05-20T21:18:34.069Z", + "date": 1653081514069, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21516, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628805b61664860004cb51a2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-20T21:08:33.702Z", + "date": 1653080913702, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21515, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288035c1664860004cb519c" + }, + { + "created_at": "2022-05-20T21:08:31.728Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 30, + "durationInMilliseconds": 1801610, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453495, + "endId": 453503, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288035c1664860004cb519d" + }, + { + "created_at": "2022-05-20T21:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 8, + "durationInMilliseconds": 510237, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453478, + "endId": 453494, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287ece572b1ae0004593ff0" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-20T20:53:24.438Z", + "date": 1653080004438, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21514, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287ffd41664860004cb5195" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-20T20:43:26.220Z", + "date": 1653079406220, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21513, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287fd7ba2dcb700046b8728" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-20T20:33:38.526Z", + "date": 1653078818526, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21512, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287fb3aa2dcb700046b8724" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-20T20:22:54.311Z", + "date": 1653078174311, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21511, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287f8aba2dcb700046b871e" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-20T20:17:40.808Z", + "date": 1653077860808, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21510, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287f765a2dcb700046b871b" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-20T20:08:27.325Z", + "date": 1653077307325, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21509, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287f54db2af570004d8c046" + }, + { + "created_at": "2022-05-20T20:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 60, + "durationInMilliseconds": 3600000, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453478, + "endId": 453494, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287ece572b1ae0004593ff0" + }, + { + "created_at": "2022-05-20T19:32:50.116Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 27, + "durationInMilliseconds": 1629884, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453478, + "endId": 453494, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287ece572b1ae0004593ff0" + }, + { + "eventType": "Meal Bolus", + "insulin": 9.58, + "created_at": "2022-05-20T19:27:22.747Z", + "date": 1653074842747, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21508, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287eb9d72b1ae0004593fea" + }, + { + "created_at": "2022-05-20T19:08:06.145Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1481495, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453473, + "endId": 453477, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287e73072b1ae0004593fe2" + }, + { + "created_at": "2022-05-20T19:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 8, + "durationInMilliseconds": 484657, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453469, + "endId": 453472, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287dedc72b1ae0004593fd2" + }, + { + "created_at": "2022-05-20T18:33:00.960Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 26, + "durationInMilliseconds": 1619040, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453469, + "endId": 453472, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287dedc72b1ae0004593fd2" + }, + { + "created_at": "2022-05-20T18:17:39.957Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 918518, + "type": "NORMAL", + "rate": 0.5591999999999999, + "percent": -20, + "pumpId": 453466, + "endId": 453468, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287db4963f1e20004e4e5a7" + }, + { + "created_at": "2022-05-20T18:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 17, + "durationInMilliseconds": 1059957, + "type": "NORMAL", + "rate": 0.699, + "percent": 0, + "_id": "neutral_1653069600000" + } +] diff --git a/app/src/test/res/autotune/test2/aapsorefautotune_recommendations.log b/app/src/test/res/autotune/test2/aapsorefautotune_recommendations.log new file mode 100644 index 0000000000..c7d134a614 --- /dev/null +++ b/app/src/test/res/autotune/test2/aapsorefautotune_recommendations.log @@ -0,0 +1,53 @@ +Parameter | Pump | Autotune | Days Missing +--------------------------------------------------------- +ISF [mg/dL/U] | 86.200 | 82.222 | +Carb Ratio[g/U]| 5.750 | 5.750 | +Basals [U/hr] | - | | + 00:00 | 0.966 | 1.009 | 0 + 00:30 | | | + 01:00 | 0.977 | 0.984 | 0 + 01:30 | | | + 02:00 | 0.971 | 0.988 | 0 + 02:30 | | | + 03:00 | 1.111 | 1.158 | 0 + 03:30 | | | + 04:00 | 0.974 | 1.028 | 0 + 04:30 | | | + 05:00 | 0.923 | 0.933 | 0 + 05:30 | | | + 06:00 | 0.823 | 0.824 | 0 + 06:30 | | | + 07:00 | 0.855 | 0.849 | 0 + 07:30 | | | + 08:00 | 0.902 | 0.909 | 0 + 08:30 | | | + 09:00 | 0.934 | 0.954 | 0 + 09:30 | | | + 10:00 | 0.938 | 0.961 | 0 + 10:30 | | | + 11:00 | 0.903 | 0.926 | 0 + 11:30 | | | + 12:00 | 0.882 | 0.885 | 0 + 12:30 | | | + 13:00 | 0.874 | 0.876 | 1 + 13:30 | | | + 14:00 | 0.866 | 0.869 | 1 + 14:30 | | | + 15:00 | 0.848 | 0.881 | 0 + 15:30 | | | + 16:00 | 0.758 | 0.798 | 0 + 16:30 | | | + 17:00 | 0.650 | 0.683 | 0 + 17:30 | | | + 18:00 | 0.648 | 0.634 | 0 + 18:30 | | | + 19:00 | 0.738 | 0.725 | 0 + 19:30 | | | + 20:00 | 0.847 | 0.838 | 0 + 20:30 | | | + 21:00 | 0.861 | 0.881 | 0 + 21:30 | | | + 22:00 | 0.863 | 0.910 | 0 + 22:30 | | | + 23:00 | 0.843 | 0.910 | 0 + 23:30 | | | diff --git a/app/src/test/res/autotune/test2/aapsorefprofile.2022-05-21.json b/app/src/test/res/autotune/test2/aapsorefprofile.2022-05-21.json new file mode 100644 index 0000000000..eefadabacb --- /dev/null +++ b/app/src/test/res/autotune/test2/aapsorefprofile.2022-05-21.json @@ -0,0 +1,147 @@ +{ + "name": "Tuned Dyn2", + "min_5m_carbimpact": 8, + "dia": 6, + "curve": "ultra-rapid", + "useCustomPeakTime": true, + "insulinPeakTime": 45, + "basalprofile": [ + { + "start": "00:00:00", + "minutes": 0, + "rate": 0.966 + }, + { + "start": "01:00:00", + "minutes": 60, + "rate": 0.977 + }, + { + "start": "02:00:00", + "minutes": 120, + "rate": 0.971 + }, + { + "start": "03:00:00", + "minutes": 180, + "rate": 1.111 + }, + { + "start": "04:00:00", + "minutes": 240, + "rate": 0.974 + }, + { + "start": "05:00:00", + "minutes": 300, + "rate": 0.923 + }, + { + "start": "06:00:00", + "minutes": 360, + "rate": 0.823 + }, + { + "start": "07:00:00", + "minutes": 420, + "rate": 0.855 + }, + { + "start": "08:00:00", + "minutes": 480, + "rate": 0.902 + }, + { + "start": "09:00:00", + "minutes": 540, + "rate": 0.934 + }, + { + "start": "10:00:00", + "minutes": 600, + "rate": 0.938 + }, + { + "start": "11:00:00", + "minutes": 660, + "rate": 0.903 + }, + { + "start": "12:00:00", + "minutes": 720, + "rate": 0.882 + }, + { + "start": "13:00:00", + "minutes": 780, + "rate": 0.874 + }, + { + "start": "14:00:00", + "minutes": 840, + "rate": 0.866 + }, + { + "start": "15:00:00", + "minutes": 900, + "rate": 0.848 + }, + { + "start": "16:00:00", + "minutes": 960, + "rate": 0.758 + }, + { + "start": "17:00:00", + "minutes": 1020, + "rate": 0.65 + }, + { + "start": "18:00:00", + "minutes": 1080, + "rate": 0.648 + }, + { + "start": "19:00:00", + "minutes": 1140, + "rate": 0.738 + }, + { + "start": "20:00:00", + "minutes": 1200, + "rate": 0.847 + }, + { + "start": "21:00:00", + "minutes": 1260, + "rate": 0.861 + }, + { + "start": "22:00:00", + "minutes": 1320, + "rate": 0.863 + }, + { + "start": "23:00:00", + "minutes": 1380, + "rate": 0.843 + } + ], + "isfProfile": { + "sensitivities": [ + { + "i": 0, + "start": "00:00:00", + "sensitivity": 86.2, + "offset": 0, + "x": 0, + "endoffset": 1440 + } + ] + }, + "carb_ratio": 5.75, + "autosens_max": 1.3, + "autosens_min": 0.7, + "units": "mg/dl", + "timezone": "Europe/Paris" +} diff --git a/app/src/test/res/autotune/test2/aapsorefprofile.json b/app/src/test/res/autotune/test2/aapsorefprofile.json new file mode 100644 index 0000000000..ad7b75b70c --- /dev/null +++ b/app/src/test/res/autotune/test2/aapsorefprofile.json @@ -0,0 +1,175 @@ +{ + "autosens_max": 1.3, + "autosens_min": 0.7, + "basalprofile": [ + { + "i": 0, + "minutes": 0, + "rate": 1.009, + "start": "00:00:00" + }, + { + "i": 1, + "minutes": 60, + "rate": 0.984, + "start": "01:00:00" + }, + { + "i": 2, + "minutes": 120, + "rate": 0.988, + "start": "02:00:00" + }, + { + "i": 3, + "minutes": 180, + "rate": 1.158, + "start": "03:00:00" + }, + { + "i": 4, + "minutes": 240, + "rate": 1.028, + "start": "04:00:00" + }, + { + "i": 5, + "minutes": 300, + "rate": 0.933, + "start": "05:00:00" + }, + { + "i": 6, + "minutes": 360, + "rate": 0.824, + "start": "06:00:00" + }, + { + "i": 7, + "minutes": 420, + "rate": 0.849, + "start": "07:00:00" + }, + { + "i": 8, + "minutes": 480, + "rate": 0.909, + "start": "08:00:00" + }, + { + "i": 9, + "minutes": 540, + "rate": 0.954, + "start": "09:00:00" + }, + { + "i": 10, + "minutes": 600, + "rate": 0.961, + "start": "10:00:00" + }, + { + "i": 11, + "minutes": 660, + "rate": 0.926, + "start": "11:00:00" + }, + { + "i": 12, + "minutes": 720, + "rate": 0.885, + "start": "12:00:00" + }, + { + "i": 13, + "minutes": 780, + "rate": 0.876, + "start": "13:00:00", + "untuned": 1 + }, + { + "i": 14, + "minutes": 840, + "rate": 0.869, + "start": "14:00:00", + "untuned": 1 + }, + { + "i": 15, + "minutes": 900, + "rate": 0.881, + "start": "15:00:00" + }, + { + "i": 16, + "minutes": 960, + "rate": 0.798, + "start": "16:00:00" + }, + { + "i": 17, + "minutes": 1020, + "rate": 0.683, + "start": "17:00:00" + }, + { + "i": 18, + "minutes": 1080, + "rate": 0.634, + "start": "18:00:00" + }, + { + "i": 19, + "minutes": 1140, + "rate": 0.725, + "start": "19:00:00" + }, + { + "i": 20, + "minutes": 1200, + "rate": 0.838, + "start": "20:00:00" + }, + { + "i": 21, + "minutes": 1260, + "rate": 0.881, + "start": "21:00:00" + }, + { + "i": 22, + "minutes": 1320, + "rate": 0.91, + "start": "22:00:00" + }, + { + "i": 23, + "minutes": 1380, + "rate": 0.91, + "start": "23:00:00" + } + ], + "carb_ratio": 5.75, + "csf": 14.991, + "curve": "ultra-rapid", + "dia": 6, + "insulinPeakTime": 45, + "isfProfile": { + "sensitivities": [ + { + "endoffset": 1440, + "i": 0, + "offset": 0, + "sensitivity": 82.222, + "start": "00:00:00", + "x": 0 + } + ] + }, + "min_5m_carbimpact": 8, + "name": "Tuned Dyn2", + "sens": 82.222, + "timezone": "Europe/Paris", + "units": "mg/dl", + "useCustomPeakTime": true +} diff --git a/app/src/test/res/autotune/test2/autotune.2022-05-21.json b/app/src/test/res/autotune/test2/autotune.2022-05-21.json new file mode 100644 index 0000000000..cfedd0cf9b --- /dev/null +++ b/app/src/test/res/autotune/test2/autotune.2022-05-21.json @@ -0,0 +1 @@ +{"CRData":[],"CSFGlucoseData":[],"ISFGlucoseData":[{"device":"AndroidAPS-DexcomG6","date":1653153849000,"dateString":"2022-05-21T17:24:09.000Z","isValid":true,"sgv":96,"direction":"SingleDown","type":"sgv","_id":"628920591090500004ca4727","glucose":96,"avgDelta":"-13.25","BGI":-3.49,"deviation":"-9.76"},{"device":"AndroidAPS-DexcomG6","date":1653181150000,"dateString":"2022-05-22T00:59:10.000Z","isValid":true,"sgv":97,"direction":"SingleDown","type":"sgv","_id":"62898b01da46aa0004d1e0fa","glucose":97,"avgDelta":"-11.50","BGI":-2.84,"deviation":"-8.66"},{"device":"AndroidAPS-DexcomG6","date":1653181450000,"dateString":"2022-05-22T01:04:10.000Z","isValid":true,"sgv":92,"direction":"FortyFiveDown","type":"sgv","_id":"62898c2fda46aa0004d1e0fc","glucose":92,"avgDelta":"-10.75","BGI":-2.5,"deviation":"-8.25"},{"device":"AndroidAPS-DexcomG6","date":1653153549000,"dateString":"2022-05-21T17:19:09.000Z","isValid":true,"sgv":110,"direction":"SingleDown","type":"sgv","_id":"62891f2b1090500004ca4724","glucose":110,"avgDelta":"-12.00","BGI":-3.79,"deviation":"-8.21"},{"device":"AndroidAPS-DexcomG6","date":1653154149000,"dateString":"2022-05-21T17:29:09.000Z","isValid":true,"sgv":93,"direction":"SingleDown","type":"sgv","_id":"628921861090500004ca472b","glucose":93,"avgDelta":"-11.25","BGI":-3.19,"deviation":"-8.06"},{"device":"AndroidAPS-DexcomG6","date":1653180849000,"dateString":"2022-05-22T00:54:09.000Z","isValid":true,"sgv":105,"direction":"SingleDown","type":"sgv","_id":"628989d2da46aa0004d1e0f8","glucose":105,"avgDelta":"-9.50","BGI":-3.1,"deviation":"-6.40"},{"device":"AndroidAPS-DexcomG6","date":1653181750000,"dateString":"2022-05-22T01:09:10.000Z","isValid":true,"sgv":87,"direction":"FortyFiveDown","type":"sgv","_id":"62898d4750e51d0004429e5f","glucose":87,"avgDelta":"-8.50","BGI":-2.11,"deviation":"-6.39"},{"device":"AndroidAPS-DexcomG6","date":1653153249000,"dateString":"2022-05-21T17:14:09.000Z","isValid":true,"sgv":124,"direction":"FortyFiveDown","type":"sgv","_id":"62891dfd1090500004ca4722","glucose":124,"avgDelta":"-9.00","BGI":-4.05,"deviation":"-4.95"},{"device":"AndroidAPS-DexcomG6","date":1653154449000,"dateString":"2022-05-21T17:34:09.000Z","isValid":true,"sgv":97,"direction":"FortyFiveDown","type":"sgv","_id":"628922b18809e60004c644d6","glucose":97,"avgDelta":"-6.75","BGI":-2.84,"deviation":"-3.91"},{"device":"AndroidAPS-DexcomG6","date":1653110649000,"dateString":"2022-05-21T05:24:09.000Z","isValid":true,"sgv":98,"direction":"FortyFiveDown","type":"sgv","_id":"628877a5363e6c0004f710e0","glucose":98,"avgDelta":"-6.75","BGI":-4.44,"deviation":"-2.31"},{"device":"AndroidAPS-DexcomG6","date":1653180549000,"dateString":"2022-05-22T00:49:09.000Z","isValid":true,"sgv":121,"direction":"FortyFiveDown","type":"sgv","_id":"628988a3da46aa0004d1e0f5","glucose":121,"avgDelta":"-5.25","BGI":-3.32,"deviation":"-1.93"},{"device":"AndroidAPS-DexcomG6","date":1653110348000,"dateString":"2022-05-21T05:19:08.000Z","isValid":true,"sgv":102,"direction":"FortyFiveDown","type":"sgv","_id":"62887677363e6c0004f710de","glucose":102,"avgDelta":"-6.75","BGI":-4.91,"deviation":"-1.84"},{"device":"AndroidAPS-DexcomG6","date":1653156849000,"dateString":"2022-05-21T18:14:09.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","_id":"62892c06840d8d0004a20bf2","glucose":110,"avgDelta":"-3.50","BGI":-1.72,"deviation":"-1.78"},{"device":"AndroidAPS-DexcomG6","date":1653114249000,"dateString":"2022-05-21T06:24:09.000Z","isValid":true,"sgv":85,"direction":"Flat","type":"sgv","_id":"628885a48ff3530004dc6069","glucose":85,"avgDelta":"-3.25","BGI":-1.77,"deviation":"-1.48"},{"device":"AndroidAPS-DexcomG6","date":1653131049000,"dateString":"2022-05-21T11:04:09.000Z","isValid":true,"sgv":81,"direction":"Flat","type":"sgv","_id":"6288c7418e9ed800049b39e3","glucose":81,"avgDelta":"-3.00","BGI":-1.9,"deviation":"-1.10"},{"device":"AndroidAPS-DexcomG6","date":1653110949000,"dateString":"2022-05-21T05:29:09.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","_id":"628878bbe964810004aa5655","glucose":97,"avgDelta":"-5.00","BGI":-3.92,"deviation":"-1.08"},{"device":"AndroidAPS-DexcomG6","date":1653152949000,"dateString":"2022-05-21T17:09:09.000Z","isValid":true,"sgv":138,"direction":"FortyFiveDown","type":"sgv","_id":"62891cd01090500004ca471f","glucose":138,"avgDelta":"-5.25","BGI":-4.22,"deviation":"-1.03"},{"device":"AndroidAPS-DexcomG6","date":1653113949000,"dateString":"2022-05-21T06:19:09.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","_id":"628884778ff3530004dc6067","glucose":89,"avgDelta":"-3.00","BGI":-2.07,"deviation":"-0.93"},{"device":"AndroidAPS-DexcomG6","date":1653113649000,"dateString":"2022-05-21T06:14:09.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"6288834a8ff3530004dc6065","glucose":91,"avgDelta":"-2.75","BGI":-2.28,"deviation":"-0.47"},{"device":"AndroidAPS-DexcomG6","date":1653107948000,"dateString":"2022-05-21T04:39:08.000Z","isValid":true,"sgv":124,"direction":"FortyFiveDown","type":"sgv","_id":"62886cfc19e2e60004989bb8","glucose":124,"avgDelta":"-8.25","BGI":-7.89,"deviation":"-0.36"},{"device":"AndroidAPS-DexcomG6","date":1653156549000,"dateString":"2022-05-21T18:09:09.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","_id":"62892af2840d8d0004a20bf0","glucose":114,"avgDelta":"-2.25","BGI":-1.9,"deviation":"-0.35"},{"device":"AndroidAPS-DexcomG6","date":1653137649000,"dateString":"2022-05-21T12:54:09.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"6288e1040f1be700041e59f0","glucose":79,"avgDelta":"2.25","BGI":-18.02,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137350000,"dateString":"2022-05-21T12:49:10.000Z","isValid":true,"sgv":72,"direction":"Flat","type":"sgv","_id":"6288dfd60f1be700041e59ee","glucose":72,"avgDelta":"-0.25","BGI":-19.52,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137049000,"dateString":"2022-05-21T12:44:09.000Z","isValid":true,"sgv":69,"direction":"Flat","type":"sgv","_id":"6288df8a0f1be700041e59ec","glucose":69,"avgDelta":"-1.75","BGI":-20.95,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136449000,"dateString":"2022-05-21T12:34:09.000Z","isValid":true,"sgv":70,"direction":"Flat","type":"sgv","_id":"6288dd270f1be700041e59e8","glucose":70,"avgDelta":"-2.25","BGI":-23.7,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136149000,"dateString":"2022-05-21T12:29:09.000Z","isValid":true,"sgv":73,"direction":"Flat","type":"sgv","_id":"6288db8a0f1be700041e59e5","glucose":73,"avgDelta":"-1.25","BGI":-25,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135249000,"dateString":"2022-05-21T12:14:09.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"6288d7ae0f1be700041e59de","glucose":79,"avgDelta":"0.00","BGI":-27.76,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134949000,"dateString":"2022-05-21T12:09:09.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","_id":"6288d67f0f1be700041e59da","glucose":78,"avgDelta":"-2.25","BGI":-28.14,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134649000,"dateString":"2022-05-21T12:04:09.000Z","isValid":true,"sgv":77,"direction":"Flat","type":"sgv","_id":"6288d5500f1be700041e59d7","glucose":77,"avgDelta":"-6.00","BGI":-28.32,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134349000,"dateString":"2022-05-21T11:59:09.000Z","isValid":true,"sgv":76,"direction":"FortyFiveDown","type":"sgv","_id":"6288d4220f1be700041e59d5","glucose":76,"avgDelta":"-9.50","BGI":-28.06,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134049000,"dateString":"2022-05-21T11:54:09.000Z","isValid":true,"sgv":79,"direction":"FortyFiveDown","type":"sgv","_id":"6288d3060f1be700041e59d2","glucose":79,"avgDelta":"-10.50","BGI":-27.28,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135849000,"dateString":"2022-05-21T12:24:09.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"6288d9fb0f1be700041e59e2","glucose":76,"avgDelta":"-0.25","BGI":-26.12,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136749000,"dateString":"2022-05-21T12:39:09.000Z","isValid":true,"sgv":68,"direction":"Flat","type":"sgv","_id":"6288de580f1be700041e59ea","glucose":68,"avgDelta":"-2.50","BGI":-22.37,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135549000,"dateString":"2022-05-21T12:19:09.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","_id":"6288d8e00f1be700041e59e0","glucose":78,"avgDelta":"0.50","BGI":-27.02,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653108249000,"dateString":"2022-05-21T04:44:09.000Z","isValid":true,"sgv":123,"direction":"FortyFiveDown","type":"sgv","_id":"62886e2919e2e60004989bba","glucose":123,"avgDelta":"-7.50","BGI":-7.59,"deviation":"0.09"},{"device":"AndroidAPS-DexcomG6","date":1653130748000,"dateString":"2022-05-21T10:59:08.000Z","isValid":true,"sgv":84,"direction":"Flat","type":"sgv","_id":"6288c61a1991280004dce468","glucose":84,"avgDelta":"-2.50","BGI":-2.59,"deviation":"0.09"},{"device":"AndroidAPS-DexcomG6","date":1653110049000,"dateString":"2022-05-21T05:14:09.000Z","isValid":true,"sgv":109,"direction":"FortyFiveDown","type":"sgv","_id":"62887549363e6c0004f710dc","glucose":109,"avgDelta":"-5.25","BGI":-5.34,"deviation":"0.09"},{"device":"AndroidAPS-DexcomG6","date":1653113349000,"dateString":"2022-05-21T06:09:09.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"6288821b8ff3530004dc6062","glucose":94,"avgDelta":"-2.25","BGI":-2.46,"deviation":"0.21"},{"device":"AndroidAPS-DexcomG6","date":1653111249000,"dateString":"2022-05-21T05:34:09.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","_id":"628879e9e964810004aa5657","glucose":97,"avgDelta":"-3.00","BGI":-3.45,"deviation":"0.45"},{"device":"AndroidAPS-DexcomG6","date":1653130448000,"dateString":"2022-05-21T10:54:08.000Z","isValid":true,"sgv":88,"direction":"Flat","type":"sgv","_id":"6288c4ec1991280004dce464","glucose":88,"avgDelta":"-2.00","BGI":-3.36,"deviation":"1.36"},{"device":"AndroidAPS-DexcomG6","date":1653113049000,"dateString":"2022-05-21T06:04:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"628880ee8ff3530004dc6060","glucose":98,"avgDelta":"-1.00","BGI":-2.5,"deviation":"1.50"},{"device":"AndroidAPS-DexcomG6","date":1653151149000,"dateString":"2022-05-21T16:39:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"628915ce1090500004ca470c","glucose":158,"avgDelta":"-3.50","BGI":-5.09,"deviation":"1.59"},{"device":"AndroidAPS-DexcomG6","date":1653180250000,"dateString":"2022-05-22T00:44:10.000Z","isValid":true,"sgv":135,"direction":"Flat","type":"sgv","_id":"62898774da46aa0004d1e0f1","glucose":135,"avgDelta":"-1.75","BGI":-3.49,"deviation":"1.74"},{"device":"AndroidAPS-DexcomG6","date":1653151449000,"dateString":"2022-05-21T16:44:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"628916f81090500004ca4710","glucose":158,"avgDelta":"-3.00","BGI":-4.74,"deviation":"1.74"},{"device":"AndroidAPS-DexcomG6","date":1653154749000,"dateString":"2022-05-21T17:39:09.000Z","isValid":true,"sgv":108,"direction":"NONE","type":"sgv","_id":"628923df8809e60004c644d9","glucose":108,"avgDelta":"-0.50","BGI":-2.5,"deviation":"2.00"},{"device":"AndroidAPS-DexcomG6","date":1653152649000,"dateString":"2022-05-21T17:04:09.000Z","isValid":true,"sgv":149,"direction":"Flat","type":"sgv","_id":"62891ba31090500004ca471d","glucose":149,"avgDelta":"-2.25","BGI":-4.35,"deviation":"2.10"},{"device":"AndroidAPS-DexcomG6","date":1653130149000,"dateString":"2022-05-21T10:49:09.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"6288c3be1991280004dce461","glucose":91,"avgDelta":"-2.00","BGI":-4.27,"deviation":"2.27"},{"device":"AndroidAPS-DexcomG6","date":1653111549000,"dateString":"2022-05-21T05:39:09.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","_id":"62887b17e964810004aa565a","glucose":100,"avgDelta":"-0.50","BGI":-2.84,"deviation":"2.34"},{"device":"AndroidAPS-DexcomG6","date":1653107648000,"dateString":"2022-05-21T04:34:08.000Z","isValid":true,"sgv":132,"direction":"FortyFiveDown","type":"sgv","_id":"62886be719e2e60004989bb5","glucose":132,"avgDelta":"-5.75","BGI":-8.1,"deviation":"2.35"},{"device":"AndroidAPS-DexcomG6","date":1653150849000,"dateString":"2022-05-21T16:34:09.000Z","isValid":true,"sgv":161,"direction":"Flat","type":"sgv","_id":"628914d01090500004ca4709","glucose":161,"avgDelta":"-3.00","BGI":-5.47,"deviation":"2.47"},{"device":"AndroidAPS-DexcomG6","date":1653179350000,"dateString":"2022-05-22T00:29:10.000Z","isValid":true,"sgv":142,"direction":"Flat","type":"sgv","_id":"628983f69d6f1800047cd0dd","glucose":142,"avgDelta":"-1.75","BGI":-4.27,"deviation":"2.52"},{"device":"AndroidAPS-DexcomG6","date":1653112749000,"dateString":"2022-05-21T05:59:09.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","_id":"62887fcee964810004aa5666","glucose":101,"avgDelta":"0.25","BGI":-2.46,"deviation":"2.71"},{"device":"AndroidAPS-DexcomG6","date":1653179050000,"dateString":"2022-05-22T00:24:10.000Z","isValid":true,"sgv":142,"direction":"Flat","type":"sgv","_id":"628982c89d6f1800047cd0db","glucose":142,"avgDelta":"-1.75","BGI":-4.48,"deviation":"2.73"},{"device":"AndroidAPS-DexcomG6","date":1653156250000,"dateString":"2022-05-21T18:04:10.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","_id":"628929ac8809e60004c644e9","glucose":119,"avgDelta":"0.75","BGI":-2.07,"deviation":"2.82"},{"device":"AndroidAPS-DexcomG6","date":1653109748000,"dateString":"2022-05-21T05:09:08.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","_id":"6288741c363e6c0004f710d9","glucose":117,"avgDelta":"-2.75","BGI":-5.73,"deviation":"2.98"},{"device":"AndroidAPS-DexcomG6","date":1653179649000,"dateString":"2022-05-22T00:34:09.000Z","isValid":true,"sgv":143,"direction":"Flat","type":"sgv","_id":"62898517da46aa0004d1e0ea","glucose":143,"avgDelta":"-1.00","BGI":-4.01,"deviation":"3.01"},{"device":"AndroidAPS-DexcomG6","date":1653151749000,"dateString":"2022-05-21T16:49:09.000Z","isValid":true,"sgv":159,"direction":"Flat","type":"sgv","_id":"628918261090500004ca4714","glucose":159,"avgDelta":"-1.50","BGI":-4.53,"deviation":"3.03"},{"device":"AndroidAPS-DexcomG6","date":1653108548000,"dateString":"2022-05-21T04:49:08.000Z","isValid":true,"sgv":128,"direction":"Flat","type":"sgv","_id":"62886f5719e2e60004989bbc","glucose":128,"avgDelta":"-4.00","BGI":-7.2,"deviation":"3.20"},{"device":"AndroidAPS-DexcomG6","date":1653129848000,"dateString":"2022-05-21T10:44:08.000Z","isValid":true,"sgv":93,"direction":"Flat","type":"sgv","_id":"6288c2911991280004dce45e","glucose":93,"avgDelta":"-2.00","BGI":-5.26,"deviation":"3.26"},{"device":"AndroidAPS-DexcomG6","date":1653173650000,"dateString":"2022-05-21T22:54:10.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"6289717d37d09a00043f2b1e","glucose":108,"avgDelta":"-4.00","BGI":-7.28,"deviation":"3.28"},{"device":"AndroidAPS-DexcomG6","date":1653111849000,"dateString":"2022-05-21T05:44:09.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","_id":"62887c44e964810004aa565d","glucose":102,"avgDelta":"1.00","BGI":-2.37,"deviation":"3.37"},{"device":"AndroidAPS-DexcomG6","date":1653173949000,"dateString":"2022-05-21T22:59:09.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"6289721437d09a00043f2b1f","glucose":108,"avgDelta":"-3.00","BGI":-6.42,"deviation":"3.42"},{"device":"AndroidAPS-DexcomG6","date":1653150549000,"dateString":"2022-05-21T16:29:09.000Z","isValid":true,"sgv":165,"direction":"Flat","type":"sgv","_id":"628913731090500004ca4706","glucose":165,"avgDelta":"-2.25","BGI":-5.73,"deviation":"3.48"},{"device":"AndroidAPS-DexcomG6","date":1653179949000,"dateString":"2022-05-22T00:39:09.000Z","isValid":true,"sgv":143,"direction":"Flat","type":"sgv","_id":"62898645da46aa0004d1e0ee","glucose":143,"avgDelta":"-0.25","BGI":-3.75,"deviation":"3.50"},{"device":"AndroidAPS-DexcomG6","date":1653112449000,"dateString":"2022-05-21T05:54:09.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","_id":"62887ea1e964810004aa5664","glucose":102,"avgDelta":"1.25","BGI":-2.28,"deviation":"3.53"},{"device":"AndroidAPS-DexcomG6","date":1653112148000,"dateString":"2022-05-21T05:49:08.000Z","isValid":true,"sgv":103,"direction":"Flat","type":"sgv","_id":"62887d72e964810004aa5661","glucose":103,"avgDelta":"1.50","BGI":-2.07,"deviation":"3.57"},{"device":"AndroidAPS-DexcomG6","date":1653178750000,"dateString":"2022-05-22T00:19:10.000Z","isValid":true,"sgv":144,"direction":"Flat","type":"sgv","_id":"628981999d6f1800047cd0d8","glucose":144,"avgDelta":"-0.75","BGI":-4.57,"deviation":"3.82"},{"device":"AndroidAPS-DexcomG6","date":1653129548000,"dateString":"2022-05-21T10:39:08.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"6288c1631991280004dce45b","glucose":94,"avgDelta":"-2.50","BGI":-6.38,"deviation":"3.88"},{"device":"AndroidAPS-DexcomG6","date":1653129249000,"dateString":"2022-05-21T10:34:09.000Z","isValid":true,"sgv":96,"direction":"Flat","type":"sgv","_id":"6288c0341991280004dce459","glucose":96,"avgDelta":"-3.50","BGI":-7.59,"deviation":"4.09"},{"device":"AndroidAPS-DexcomG6","date":1653152049000,"dateString":"2022-05-21T16:54:09.000Z","isValid":true,"sgv":160,"direction":"Flat","type":"sgv","_id":"628919531090500004ca4717","glucose":160,"avgDelta":"-0.25","BGI":-4.35,"deviation":"4.10"},{"device":"AndroidAPS-DexcomG6","date":1653152349000,"dateString":"2022-05-21T16:59:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"62891a811090500004ca471a","glucose":158,"avgDelta":"0.00","BGI":-4.35,"deviation":"4.35"},{"device":"AndroidAPS-DexcomG6","date":1653150249000,"dateString":"2022-05-21T16:24:09.000Z","isValid":true,"sgv":170,"direction":"Flat","type":"sgv","_id":"628913111090500004ca4704","glucose":170,"avgDelta":"-1.50","BGI":-5.95,"deviation":"4.45"},{"device":"AndroidAPS-DexcomG6","date":1653105549000,"dateString":"2022-05-21T03:59:09.000Z","isValid":true,"sgv":146,"direction":"FortyFiveDown","type":"sgv","_id":"628863a542c1220004f95730","glucose":146,"avgDelta":"-5.25","BGI":-9.87,"deviation":"4.62"},{"device":"AndroidAPS-DexcomG6","date":1653173350000,"dateString":"2022-05-21T22:49:10.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","_id":"62896fb837d09a00043f2b1b","glucose":110,"avgDelta":"-3.50","BGI":-8.15,"deviation":"4.65"},{"device":"AndroidAPS-DexcomG6","date":1653174249000,"dateString":"2022-05-21T23:04:09.000Z","isValid":true,"sgv":111,"direction":"Flat","type":"sgv","_id":"6289726037d09a00043f2b20","glucose":111,"avgDelta":"-1.00","BGI":-5.69,"deviation":"4.69"},{"device":"AndroidAPS-DexcomG6","date":1653178449000,"dateString":"2022-05-22T00:14:09.000Z","isValid":true,"sgv":147,"direction":"Flat","type":"sgv","_id":"6289806a9d6f1800047cd0d6","glucose":147,"avgDelta":"0.25","BGI":-4.61,"deviation":"4.86"},{"device":"AndroidAPS-DexcomG6","date":1653128948000,"dateString":"2022-05-21T10:29:08.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","_id":"6288bf061991280004dce457","glucose":99,"avgDelta":"-4.00","BGI":-8.88,"deviation":"4.88"},{"device":"AndroidAPS-DexcomG6","date":1653103448000,"dateString":"2022-05-21T03:24:08.000Z","isValid":true,"sgv":174,"direction":"SingleDown","type":"sgv","_id":"62885b81293f3e00042c31d9","glucose":174,"avgDelta":"-10.50","BGI":-15.43,"deviation":"4.93"},{"device":"AndroidAPS-DexcomG6","date":1653149949000,"dateString":"2022-05-21T16:19:09.000Z","isValid":true,"sgv":172,"direction":"Flat","type":"sgv","_id":"6289130f1090500004ca46ff","glucose":172,"avgDelta":"-1.00","BGI":-6.12,"deviation":"5.12"},{"device":"AndroidAPS-DexcomG6","date":1653105848000,"dateString":"2022-05-21T04:04:08.000Z","isValid":true,"sgv":146,"direction":"Flat","type":"sgv","_id":"628864d342c1220004f95733","glucose":146,"avgDelta":"-4.00","BGI":-9.14,"deviation":"5.14"},{"device":"AndroidAPS-DexcomG6","date":1653103149000,"dateString":"2022-05-21T03:19:09.000Z","isValid":true,"sgv":182,"direction":"SingleDown","type":"sgv","_id":"62885a52293f3e00042c31d7","glucose":182,"avgDelta":"-11.50","BGI":-16.64,"deviation":"5.14"},{"device":"AndroidAPS-DexcomG6","date":1653105248000,"dateString":"2022-05-21T03:54:08.000Z","isValid":true,"sgv":149,"direction":"FortyFiveDown","type":"sgv","_id":"6288629042c1220004f9572e","glucose":149,"avgDelta":"-5.25","BGI":-10.56,"deviation":"5.31"},{"device":"AndroidAPS-DexcomG6","date":1653176050000,"dateString":"2022-05-21T23:34:10.000Z","isValid":true,"sgv":127,"direction":"Flat","type":"sgv","_id":"6289771371a363000480abc1","glucose":127,"avgDelta":"2.50","BGI":-2.93,"deviation":"5.43"},{"device":"AndroidAPS-DexcomG6","date":1653149650000,"dateString":"2022-05-21T16:14:10.000Z","isValid":true,"sgv":173,"direction":"Flat","type":"sgv","_id":"62890fff1090500004ca46fd","glucose":173,"avgDelta":"-0.75","BGI":-6.42,"deviation":"5.67"},{"device":"AndroidAPS-DexcomG6","date":1653176350000,"dateString":"2022-05-21T23:39:10.000Z","isValid":true,"sgv":132,"direction":"Flat","type":"sgv","_id":"6289784271a363000480abc3","glucose":132,"avgDelta":"3.00","BGI":-2.67,"deviation":"5.67"},{"device":"AndroidAPS-DexcomG6","date":1653175750000,"dateString":"2022-05-21T23:29:10.000Z","isValid":true,"sgv":124,"direction":"Flat","type":"sgv","_id":"628975e471a363000480abbe","glucose":124,"avgDelta":"2.50","BGI":-3.19,"deviation":"5.69"},{"device":"AndroidAPS-DexcomG6","date":1653102848000,"dateString":"2022-05-21T03:14:08.000Z","isValid":true,"sgv":193,"direction":"SingleDown","type":"sgv","_id":"62885924293f3e00042c31d5","glucose":193,"avgDelta":"-12.00","BGI":-17.71,"deviation":"5.71"},{"device":"AndroidAPS-DexcomG6","date":1653128649000,"dateString":"2022-05-21T10:24:09.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","_id":"6288bde0abbef90004616cf8","glucose":101,"avgDelta":"-4.50","BGI":-10.3,"deviation":"5.80"},{"device":"AndroidAPS-DexcomG6","date":1653155950000,"dateString":"2022-05-21T17:59:10.000Z","isValid":true,"sgv":123,"direction":"Flat","type":"sgv","_id":"6289287e8809e60004c644e6","glucose":123,"avgDelta":"3.75","BGI":-2.16,"deviation":"5.91"},{"device":"AndroidAPS-DexcomG6","date":1653174550000,"dateString":"2022-05-21T23:09:10.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","_id":"6289727937d09a00043f2b21","glucose":114,"avgDelta":"1.00","BGI":-4.96,"deviation":"5.96"},{"device":"AndroidAPS-DexcomG6","date":1653178149000,"dateString":"2022-05-22T00:09:09.000Z","isValid":true,"sgv":149,"direction":"Flat","type":"sgv","_id":"62897f3b9d6f1800047cd0d3","glucose":149,"avgDelta":"1.50","BGI":-4.48,"deviation":"5.98"},{"device":"AndroidAPS-DexcomG6","date":1653103748000,"dateString":"2022-05-21T03:29:08.000Z","isValid":true,"sgv":171,"direction":"FortyFiveDown","type":"sgv","_id":"62885c95293f3e00042c31db","glucose":171,"avgDelta":"-8.25","BGI":-14.31,"deviation":"6.06"},{"device":"AndroidAPS-DexcomG6","date":1653108848000,"dateString":"2022-05-21T04:54:08.000Z","isValid":true,"sgv":130,"direction":"Flat","type":"sgv","_id":"62887093363e6c0004f710cf","glucose":130,"avgDelta":"-0.50","BGI":-6.72,"deviation":"6.22","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653175450000,"dateString":"2022-05-21T23:24:10.000Z","isValid":true,"sgv":123,"direction":"Flat","type":"sgv","_id":"628974b671a363000480abbc","glucose":123,"avgDelta":"3.00","BGI":-3.4,"deviation":"6.40"},{"device":"AndroidAPS-DexcomG6","date":1653107348000,"dateString":"2022-05-21T04:29:08.000Z","isValid":true,"sgv":144,"direction":"Flat","type":"sgv","_id":"62886ab919e2e60004989bb3","glucose":144,"avgDelta":"-1.75","BGI":-8.19,"deviation":"6.44"},{"device":"AndroidAPS-DexcomG6","date":1653102548000,"dateString":"2022-05-21T03:09:08.000Z","isValid":true,"sgv":204,"direction":"SingleDown","type":"sgv","_id":"628857f7293f3e00042c31d3","glucose":204,"avgDelta":"-12.25","BGI":-18.79,"deviation":"6.54"},{"device":"AndroidAPS-DexcomG6","date":1653109448000,"dateString":"2022-05-21T05:04:08.000Z","isValid":true,"sgv":125,"direction":"Flat","type":"sgv","_id":"628872ef363e6c0004f710d6","glucose":125,"avgDelta":"0.50","BGI":-6.08,"deviation":"6.58"},{"device":"AndroidAPS-DexcomG6","date":1653176650000,"dateString":"2022-05-21T23:44:10.000Z","isValid":true,"sgv":139,"direction":"Flat","type":"sgv","_id":"6289797071a363000480abc7","glucose":139,"avgDelta":"4.00","BGI":-2.59,"deviation":"6.59"},{"device":"AndroidAPS-DexcomG6","date":1653174850000,"dateString":"2022-05-21T23:14:10.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","_id":"6289727a37d09a00043f2b22","glucose":117,"avgDelta":"2.25","BGI":-4.35,"deviation":"6.60"},{"device":"AndroidAPS-DexcomG6","date":1653149349000,"dateString":"2022-05-21T16:09:09.000Z","isValid":true,"sgv":174,"direction":"Flat","type":"sgv","_id":"62890edacf7ee10004a2b1e2","glucose":174,"avgDelta":"0.00","BGI":-6.64,"deviation":"6.64"},{"device":"AndroidAPS-DexcomG6","date":1653177850000,"dateString":"2022-05-22T00:04:10.000Z","isValid":true,"sgv":149,"direction":"Flat","type":"sgv","_id":"62897e0c9d6f1800047cd0d0","glucose":149,"avgDelta":"2.50","BGI":-4.22,"deviation":"6.72"},{"device":"AndroidAPS-DexcomG6","date":1653101948000,"dateString":"2022-05-21T02:59:08.000Z","isValid":true,"sgv":228,"direction":"SingleDown","type":"sgv","_id":"628855935151b5000462a1e8","glucose":228,"avgDelta":"-13.75","BGI":-20.52,"deviation":"6.77"},{"device":"AndroidAPS-DexcomG6","date":1653175149000,"dateString":"2022-05-21T23:19:09.000Z","isValid":true,"sgv":120,"direction":"Flat","type":"sgv","_id":"6289738f37d09a00043f2b26","glucose":120,"avgDelta":"3.00","BGI":-3.84,"deviation":"6.84"},{"device":"AndroidAPS-DexcomG6","date":1653148149000,"dateString":"2022-05-21T15:49:09.000Z","isValid":true,"sgv":174,"direction":"Flat","type":"sgv","_id":"62890a21cf7ee10004a2b1d3","glucose":174,"avgDelta":"-1.00","BGI":-7.89,"deviation":"6.89"},{"device":"AndroidAPS-DexcomG6","date":1653148749000,"dateString":"2022-05-21T15:59:09.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","_id":"62890c64cf7ee10004a2b1da","glucose":176,"avgDelta":"0.00","BGI":-6.94,"deviation":"6.94"},{"device":"AndroidAPS-DexcomG6","date":1653102249000,"dateString":"2022-05-21T03:04:09.000Z","isValid":true,"sgv":216,"direction":"SingleDown","type":"sgv","_id":"628856da5151b5000462a1ea","glucose":216,"avgDelta":"-12.75","BGI":-19.7,"deviation":"6.95"},{"device":"AndroidAPS-DexcomG6","date":1653149049000,"dateString":"2022-05-21T16:04:09.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","_id":"62890daccf7ee10004a2b1de","glucose":176,"avgDelta":"0.25","BGI":-6.72,"deviation":"6.97"},{"device":"AndroidAPS-DexcomG6","date":1653148450000,"dateString":"2022-05-21T15:54:10.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","_id":"62890b36cf7ee10004a2b1d7","glucose":176,"avgDelta":"-0.25","BGI":-7.37,"deviation":"7.12"},{"device":"AndroidAPS-DexcomG6","date":1653104949000,"dateString":"2022-05-21T03:49:09.000Z","isValid":true,"sgv":155,"direction":"FortyFiveDown","type":"sgv","_id":"6288614942c1220004f9572c","glucose":155,"avgDelta":"-4.00","BGI":-11.12,"deviation":"7.12"},{"device":"AndroidAPS-DexcomG6","date":1653101648000,"dateString":"2022-05-21T02:54:08.000Z","isValid":true,"sgv":241,"direction":"SingleDown","type":"sgv","_id":"6288547f5151b5000462a1e6","glucose":241,"avgDelta":"-14.00","BGI":-21.16,"deviation":"7.16"},{"device":"AndroidAPS-DexcomG6","date":1653155049000,"dateString":"2022-05-21T17:44:09.000Z","isValid":true,"sgv":116,"direction":"NONE","type":"sgv","_id":"6289250d8809e60004c644dd","glucose":116,"avgDelta":"5.00","BGI":-2.16,"deviation":"7.16","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653173050000,"dateString":"2022-05-21T22:44:10.000Z","isValid":true,"sgv":115,"direction":"Flat","type":"sgv","_id":"62896f8537d09a00043f2b1a","glucose":115,"avgDelta":"-1.75","BGI":-9.05,"deviation":"7.30"},{"device":"AndroidAPS-DexcomG6","date":1653104049000,"dateString":"2022-05-21T03:34:09.000Z","isValid":true,"sgv":170,"direction":"FortyFiveDown","type":"sgv","_id":"62885dc3293f3e00042c31de","glucose":170,"avgDelta":"-5.75","BGI":-13.1,"deviation":"7.35"},{"device":"AndroidAPS-DexcomG6","date":1653106149000,"dateString":"2022-05-21T04:09:09.000Z","isValid":true,"sgv":151,"direction":"Flat","type":"sgv","_id":"6288660142c1220004f95736","glucose":151,"avgDelta":"-1.00","BGI":-8.36,"deviation":"7.36"}],"basalGlucoseData":[{"device":"AndroidAPS-DexcomG6","date":1653182050000,"dateString":"2022-05-22T01:14:10.000Z","isValid":true,"sgv":81,"direction":"FortyFiveDown","type":"sgv","_id":"62898e7650e51d0004429e63","glucose":81,"avgDelta":"-6.00","BGI":-1.68,"deviation":"-4.32"},{"device":"AndroidAPS-DexcomG6","date":1653182349000,"dateString":"2022-05-22T01:19:09.000Z","isValid":true,"sgv":77,"direction":"FortyFiveDown","type":"sgv","_id":"62898fa550e51d0004429e65","glucose":77,"avgDelta":"-5.00","BGI":-1.25,"deviation":"-3.75"},{"device":"AndroidAPS-DexcomG6","date":1653182650000,"dateString":"2022-05-22T01:24:10.000Z","isValid":true,"sgv":74,"direction":"FortyFiveDown","type":"sgv","_id":"628990d350e51d0004429e67","glucose":74,"avgDelta":"-4.50","BGI":-0.78,"deviation":"-3.72"},{"device":"AndroidAPS-DexcomG6","date":1653182949000,"dateString":"2022-05-22T01:29:09.000Z","isValid":true,"sgv":72,"direction":"Flat","type":"sgv","_id":"6289920150e51d0004429e69","glucose":72,"avgDelta":"-3.75","BGI":-0.3,"deviation":"-3.45"},{"device":"AndroidAPS-DexcomG6","date":1653116049000,"dateString":"2022-05-21T06:54:09.000Z","isValid":true,"sgv":69,"direction":"Flat","type":"sgv","_id":"62888ccc149196000412bf4f","glucose":69,"avgDelta":"-2.25","BGI":0.43,"deviation":"-2.68"},{"device":"AndroidAPS-DexcomG6","date":1653162549000,"dateString":"2022-05-21T19:49:09.000Z","isValid":true,"sgv":88,"direction":"Flat","type":"sgv","_id":"6289425f598f780004bb3b30","glucose":88,"avgDelta":"-1.50","BGI":1.12,"deviation":"-2.62"},{"device":"AndroidAPS-DexcomG6","date":1653115749000,"dateString":"2022-05-21T06:49:09.000Z","isValid":true,"sgv":70,"direction":"Flat","type":"sgv","_id":"62888b85149196000412bf4d","glucose":70,"avgDelta":"-2.50","BGI":0,"deviation":"-2.50"},{"device":"AndroidAPS-DexcomG6","date":1653162250000,"dateString":"2022-05-21T19:44:10.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","_id":"62894118598f780004bb3b2d","glucose":89,"avgDelta":"-1.50","BGI":0.99,"deviation":"-2.49"},{"device":"AndroidAPS-DexcomG6","date":1653115149000,"dateString":"2022-05-21T06:39:09.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"6288892a149196000412bf49","glucose":76,"avgDelta":"-3.25","BGI":-0.78,"deviation":"-2.47"},{"device":"AndroidAPS-DexcomG6","date":1653115449000,"dateString":"2022-05-21T06:44:09.000Z","isValid":true,"sgv":74,"direction":"Flat","type":"sgv","_id":"62888a57149196000412bf4b","glucose":74,"avgDelta":"-2.75","BGI":-0.34,"deviation":"-2.41"},{"device":"AndroidAPS-DexcomG6","date":1653161950000,"dateString":"2022-05-21T19:39:10.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"62893feb598f780004bb3b2b","glucose":91,"avgDelta":"-1.50","BGI":0.86,"deviation":"-2.36"},{"device":"AndroidAPS-DexcomG6","date":1653116349000,"dateString":"2022-05-21T06:59:09.000Z","isValid":true,"sgv":70,"direction":"Flat","type":"sgv","_id":"62888de2149196000412bf51","glucose":70,"avgDelta":"-1.50","BGI":0.78,"deviation":"-2.28"},{"device":"AndroidAPS-DexcomG6","date":1653157149000,"dateString":"2022-05-21T18:19:09.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"62892d34840d8d0004a20bf5","glucose":108,"avgDelta":"-3.75","BGI":-1.47,"deviation":"-2.28"},{"device":"AndroidAPS-DexcomG6","date":1653162850000,"dateString":"2022-05-21T19:54:10.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","_id":"6289437f4493460004e63a25","glucose":89,"avgDelta":"-1.00","BGI":1.25,"deviation":"-2.25"},{"device":"AndroidAPS-DexcomG6","date":1653183249000,"dateString":"2022-05-22T01:34:09.000Z","isValid":true,"sgv":73,"direction":"Flat","type":"sgv","_id":"6289933050e51d0004429e6b","glucose":73,"avgDelta":"-2.00","BGI":0.22,"deviation":"-2.22"},{"device":"AndroidAPS-DexcomG6","date":1653114849000,"dateString":"2022-05-21T06:34:09.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","_id":"628888018ff3530004dc6070","glucose":78,"avgDelta":"-3.25","BGI":-1.12,"deviation":"-2.13"},{"device":"AndroidAPS-DexcomG6","date":1653114549000,"dateString":"2022-05-21T06:29:09.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","_id":"628886d28ff3530004dc606b","glucose":80,"avgDelta":"-3.50","BGI":-1.47,"deviation":"-2.03"},{"device":"AndroidAPS-DexcomG6","date":1653161649000,"dateString":"2022-05-21T19:34:09.000Z","isValid":true,"sgv":93,"direction":"Flat","type":"sgv","_id":"62893ed7598f780004bb3b29","glucose":93,"avgDelta":"-1.25","BGI":0.73,"deviation":"-1.98"},{"device":"AndroidAPS-DexcomG6","date":1653180549000,"dateString":"2022-05-22T00:49:09.000Z","isValid":true,"sgv":121,"direction":"FortyFiveDown","type":"sgv","_id":"628988a3da46aa0004d1e0f5","glucose":121,"avgDelta":"-5.25","BGI":-3.32,"deviation":"-1.93"},{"device":"AndroidAPS-DexcomG6","date":1653110348000,"dateString":"2022-05-21T05:19:08.000Z","isValid":true,"sgv":102,"direction":"FortyFiveDown","type":"sgv","_id":"62887677363e6c0004f710de","glucose":102,"avgDelta":"-6.75","BGI":-4.91,"deviation":"-1.84"},{"device":"AndroidAPS-DexcomG6","date":1653161350000,"dateString":"2022-05-21T19:29:10.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"62893daa598f780004bb3b27","glucose":94,"avgDelta":"-1.00","BGI":0.65,"deviation":"-1.65"},{"device":"AndroidAPS-DexcomG6","date":1653157449000,"dateString":"2022-05-21T18:24:09.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"62892e62840d8d0004a20bf8","glucose":108,"avgDelta":"-2.75","BGI":-1.21,"deviation":"-1.54"},{"device":"AndroidAPS-DexcomG6","date":1653158649000,"dateString":"2022-05-21T18:44:09.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","_id":"6289331c22fbc8000495b813","glucose":101,"avgDelta":"-1.75","BGI":-0.3,"deviation":"-1.45"},{"device":"AndroidAPS-DexcomG6","date":1653163150000,"dateString":"2022-05-21T19:59:10.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"628944ae4493460004e63a27","glucose":91,"avgDelta":"0.00","BGI":1.38,"deviation":"-1.38"},{"device":"AndroidAPS-DexcomG6","date":1653161049000,"dateString":"2022-05-21T19:24:09.000Z","isValid":true,"sgv":95,"direction":"Flat","type":"sgv","_id":"62893c7d598f780004bb3b24","glucose":95,"avgDelta":"-0.75","BGI":0.6,"deviation":"-1.35"},{"device":"AndroidAPS-DexcomG6","date":1653158949000,"dateString":"2022-05-21T18:49:09.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","_id":"6289344a22fbc8000495b815","glucose":100,"avgDelta":"-1.50","BGI":-0.17,"deviation":"-1.33"},{"device":"AndroidAPS-DexcomG6","date":1653159249000,"dateString":"2022-05-21T18:54:09.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","_id":"6289357622fbc8000495b818","glucose":99,"avgDelta":"-1.25","BGI":-0.04,"deviation":"-1.21"},{"device":"AndroidAPS-DexcomG6","date":1653116649000,"dateString":"2022-05-21T07:04:09.000Z","isValid":true,"sgv":74,"direction":"Flat","type":"sgv","_id":"62888f0f149196000412bf54","glucose":74,"avgDelta":"0.00","BGI":1.12,"deviation":"-1.12"},{"device":"AndroidAPS-DexcomG6","date":1653131049000,"dateString":"2022-05-21T11:04:09.000Z","isValid":true,"sgv":81,"direction":"Flat","type":"sgv","_id":"6288c7418e9ed800049b39e3","glucose":81,"avgDelta":"-3.00","BGI":-1.9,"deviation":"-1.10"},{"device":"AndroidAPS-DexcomG6","date":1653157750000,"dateString":"2022-05-21T18:29:10.000Z","isValid":true,"sgv":106,"direction":"Flat","type":"sgv","_id":"62892f8f840d8d0004a20bfa","glucose":106,"avgDelta":"-2.00","BGI":-0.95,"deviation":"-1.05"},{"device":"AndroidAPS-DexcomG6","date":1653152949000,"dateString":"2022-05-21T17:09:09.000Z","isValid":true,"sgv":138,"direction":"FortyFiveDown","type":"sgv","_id":"62891cd01090500004ca471f","glucose":138,"avgDelta":"-5.25","BGI":-4.22,"deviation":"-1.03"},{"device":"AndroidAPS-DexcomG6","date":1653158349000,"dateString":"2022-05-21T18:39:09.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","_id":"628931e9840d8d0004a20bff","glucose":102,"avgDelta":"-1.50","BGI":-0.47,"deviation":"-1.03"},{"device":"AndroidAPS-DexcomG6","date":1653160749000,"dateString":"2022-05-21T19:19:09.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","_id":"62893b4f598f780004bb3b22","glucose":97,"avgDelta":"-0.50","BGI":0.52,"deviation":"-1.02"},{"device":"AndroidAPS-DexcomG6","date":1653131349000,"dateString":"2022-05-21T11:09:09.000Z","isValid":true,"sgv":82,"direction":"Flat","type":"sgv","_id":"6288c86f8e9ed800049b39e5","glucose":82,"avgDelta":"-2.25","BGI":-1.25,"deviation":"-1.00"},{"device":"AndroidAPS-DexcomG6","date":1653183550000,"dateString":"2022-05-22T01:39:10.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"6289945f50e51d0004429e6d","glucose":76,"avgDelta":"-0.25","BGI":0.69,"deviation":"-0.94"},{"device":"AndroidAPS-DexcomG6","date":1653159849000,"dateString":"2022-05-21T19:04:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"628937b822fbc8000495b81d","glucose":98,"avgDelta":"-0.75","BGI":0.17,"deviation":"-0.92"},{"device":"AndroidAPS-DexcomG6","date":1653158049000,"dateString":"2022-05-21T18:34:09.000Z","isValid":true,"sgv":104,"direction":"Flat","type":"sgv","_id":"628930bc840d8d0004a20bfd","glucose":104,"avgDelta":"-1.50","BGI":-0.69,"deviation":"-0.81"},{"device":"AndroidAPS-DexcomG6","date":1653160150000,"dateString":"2022-05-21T19:09:10.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"628938fe22fbc8000495b81f","glucose":98,"avgDelta":"-0.50","BGI":0.3,"deviation":"-0.80"},{"device":"AndroidAPS-DexcomG6","date":1653159549000,"dateString":"2022-05-21T18:59:09.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","_id":"628936a422fbc8000495b81a","glucose":99,"avgDelta":"-0.75","BGI":0.04,"deviation":"-0.79"},{"device":"AndroidAPS-DexcomG6","date":1653160449000,"dateString":"2022-05-21T19:14:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"62893a1222fbc8000495b822","glucose":98,"avgDelta":"-0.25","BGI":0.43,"deviation":"-0.68"},{"device":"AndroidAPS-DexcomG6","date":1653117848000,"dateString":"2022-05-21T07:24:08.000Z","isValid":true,"sgv":82,"direction":"Flat","type":"sgv","_id":"628893bd7ff1e700040f17c9","glucose":82,"avgDelta":"2.00","BGI":2.37,"deviation":"-0.37"},{"device":"AndroidAPS-DexcomG6","date":1653107948000,"dateString":"2022-05-21T04:39:08.000Z","isValid":true,"sgv":124,"direction":"FortyFiveDown","type":"sgv","_id":"62886cfc19e2e60004989bb8","glucose":124,"avgDelta":"-8.25","BGI":-7.89,"deviation":"-0.36"},{"device":"AndroidAPS-DexcomG6","date":1653156549000,"dateString":"2022-05-21T18:09:09.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","_id":"62892af2840d8d0004a20bf0","glucose":114,"avgDelta":"-2.25","BGI":-1.9,"deviation":"-0.35"},{"device":"AndroidAPS-DexcomG6","date":1653184450000,"dateString":"2022-05-22T01:54:10.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","_id":"628997d861a8290004740385","glucose":80,"avgDelta":"1.75","BGI":1.9,"deviation":"-0.15"},{"device":"AndroidAPS-DexcomG6","date":1653118149000,"dateString":"2022-05-21T07:29:09.000Z","isValid":true,"sgv":86,"direction":"Flat","type":"sgv","_id":"628894d37ff1e700040f17cd","glucose":86,"avgDelta":"2.50","BGI":2.63,"deviation":"-0.13"},{"device":"AndroidAPS-DexcomG6","date":1653163449000,"dateString":"2022-05-21T20:04:09.000Z","isValid":true,"sgv":95,"direction":"Flat","type":"sgv","_id":"628945dc4493460004e63a2a","glucose":95,"avgDelta":"1.50","BGI":1.51,"deviation":"-0.01"},{"device":"AndroidAPS-DexcomG6","date":1653183850000,"dateString":"2022-05-22T01:44:10.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"6289957b61a829000474037f","glucose":79,"avgDelta":"1.25","BGI":1.12,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653116949000,"dateString":"2022-05-21T07:09:09.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"62889024149196000412bf57","glucose":76,"avgDelta":"1.50","BGI":1.47,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135249000,"dateString":"2022-05-21T12:14:09.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"6288d7ae0f1be700041e59de","glucose":79,"avgDelta":"0.00","BGI":-27.76,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135549000,"dateString":"2022-05-21T12:19:09.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","_id":"6288d8e00f1be700041e59e0","glucose":78,"avgDelta":"0.50","BGI":-27.02,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137049000,"dateString":"2022-05-21T12:44:09.000Z","isValid":true,"sgv":69,"direction":"Flat","type":"sgv","_id":"6288df8a0f1be700041e59ec","glucose":69,"avgDelta":"-1.75","BGI":-20.95,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134349000,"dateString":"2022-05-21T11:59:09.000Z","isValid":true,"sgv":76,"direction":"FortyFiveDown","type":"sgv","_id":"6288d4220f1be700041e59d5","glucose":76,"avgDelta":"-9.50","BGI":-28.06,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135849000,"dateString":"2022-05-21T12:24:09.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"6288d9fb0f1be700041e59e2","glucose":76,"avgDelta":"-0.25","BGI":-26.12,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137350000,"dateString":"2022-05-21T12:49:10.000Z","isValid":true,"sgv":72,"direction":"Flat","type":"sgv","_id":"6288dfd60f1be700041e59ee","glucose":72,"avgDelta":"-0.25","BGI":-19.52,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136149000,"dateString":"2022-05-21T12:29:09.000Z","isValid":true,"sgv":73,"direction":"Flat","type":"sgv","_id":"6288db8a0f1be700041e59e5","glucose":73,"avgDelta":"-1.25","BGI":-25,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137649000,"dateString":"2022-05-21T12:54:09.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"6288e1040f1be700041e59f0","glucose":79,"avgDelta":"2.25","BGI":-18.02,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136449000,"dateString":"2022-05-21T12:34:09.000Z","isValid":true,"sgv":70,"direction":"Flat","type":"sgv","_id":"6288dd270f1be700041e59e8","glucose":70,"avgDelta":"-2.25","BGI":-23.7,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134649000,"dateString":"2022-05-21T12:04:09.000Z","isValid":true,"sgv":77,"direction":"Flat","type":"sgv","_id":"6288d5500f1be700041e59d7","glucose":77,"avgDelta":"-6.00","BGI":-28.32,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134949000,"dateString":"2022-05-21T12:09:09.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","_id":"6288d67f0f1be700041e59da","glucose":78,"avgDelta":"-2.25","BGI":-28.14,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136749000,"dateString":"2022-05-21T12:39:09.000Z","isValid":true,"sgv":68,"direction":"Flat","type":"sgv","_id":"6288de580f1be700041e59ea","glucose":68,"avgDelta":"-2.50","BGI":-22.37,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653117249000,"dateString":"2022-05-21T07:14:09.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"628891627ff1e700040f17c6","glucose":79,"avgDelta":"2.50","BGI":1.77,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134049000,"dateString":"2022-05-21T11:54:09.000Z","isValid":true,"sgv":79,"direction":"FortyFiveDown","type":"sgv","_id":"6288d3060f1be700041e59d2","glucose":79,"avgDelta":"-10.50","BGI":-27.28,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653130748000,"dateString":"2022-05-21T10:59:08.000Z","isValid":true,"sgv":84,"direction":"Flat","type":"sgv","_id":"6288c61a1991280004dce468","glucose":84,"avgDelta":"-2.50","BGI":-2.59,"deviation":"0.09"},{"device":"AndroidAPS-DexcomG6","date":1653110049000,"dateString":"2022-05-21T05:14:09.000Z","isValid":true,"sgv":109,"direction":"FortyFiveDown","type":"sgv","_id":"62887549363e6c0004f710dc","glucose":109,"avgDelta":"-5.25","BGI":-5.34,"deviation":"0.09"},{"device":"AndroidAPS-DexcomG6","date":1653117549000,"dateString":"2022-05-21T07:19:09.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","_id":"628892907ff1e700040f17c7","glucose":80,"avgDelta":"2.50","BGI":2.11,"deviation":"0.39"},{"device":"AndroidAPS-DexcomG6","date":1653118449000,"dateString":"2022-05-21T07:34:09.000Z","isValid":true,"sgv":92,"direction":"Flat","type":"sgv","_id":"6288961d7ff1e700040f17ce","glucose":92,"avgDelta":"3.25","BGI":2.84,"deviation":"0.41"},{"device":"AndroidAPS-DexcomG6","date":1653184150000,"dateString":"2022-05-22T01:49:10.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","_id":"628996a961a8290004740382","glucose":80,"avgDelta":"2.00","BGI":1.55,"deviation":"0.45"},{"device":"AndroidAPS-DexcomG6","date":1653131649000,"dateString":"2022-05-21T11:14:09.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","_id":"6288c99e8e9ed800049b39e8","glucose":89,"avgDelta":"0.25","BGI":-0.65,"deviation":"0.90"},{"device":"AndroidAPS-DexcomG6","date":1653118748000,"dateString":"2022-05-21T07:39:08.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","_id":"628897357ff1e700040f17d3","glucose":97,"avgDelta":"4.25","BGI":3.06,"deviation":"1.19"},{"device":"AndroidAPS-DexcomG6","date":1653130448000,"dateString":"2022-05-21T10:54:08.000Z","isValid":true,"sgv":88,"direction":"Flat","type":"sgv","_id":"6288c4ec1991280004dce464","glucose":88,"avgDelta":"-2.00","BGI":-3.36,"deviation":"1.36"},{"device":"AndroidAPS-DexcomG6","date":1653163749000,"dateString":"2022-05-21T20:09:09.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","_id":"6289470c4493460004e63a2d","glucose":100,"avgDelta":"3.00","BGI":1.55,"deviation":"1.45"},{"device":"AndroidAPS-DexcomG6","date":1653151149000,"dateString":"2022-05-21T16:39:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"628915ce1090500004ca470c","glucose":158,"avgDelta":"-3.50","BGI":-5.09,"deviation":"1.59"},{"device":"AndroidAPS-DexcomG6","date":1653180250000,"dateString":"2022-05-22T00:44:10.000Z","isValid":true,"sgv":135,"direction":"Flat","type":"sgv","_id":"62898774da46aa0004d1e0f1","glucose":135,"avgDelta":"-1.75","BGI":-3.49,"deviation":"1.74"},{"device":"AndroidAPS-DexcomG6","date":1653151449000,"dateString":"2022-05-21T16:44:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"628916f81090500004ca4710","glucose":158,"avgDelta":"-3.00","BGI":-4.74,"deviation":"1.74"},{"device":"AndroidAPS-DexcomG6","date":1653152649000,"dateString":"2022-05-21T17:04:09.000Z","isValid":true,"sgv":149,"direction":"Flat","type":"sgv","_id":"62891ba31090500004ca471d","glucose":149,"avgDelta":"-2.25","BGI":-4.35,"deviation":"2.10"},{"device":"AndroidAPS-DexcomG6","date":1653130149000,"dateString":"2022-05-21T10:49:09.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"6288c3be1991280004dce461","glucose":91,"avgDelta":"-2.00","BGI":-4.27,"deviation":"2.27"},{"device":"AndroidAPS-DexcomG6","date":1653107648000,"dateString":"2022-05-21T04:34:08.000Z","isValid":true,"sgv":132,"direction":"FortyFiveDown","type":"sgv","_id":"62886be719e2e60004989bb5","glucose":132,"avgDelta":"-5.75","BGI":-8.1,"deviation":"2.35"},{"device":"AndroidAPS-DexcomG6","date":1653150849000,"dateString":"2022-05-21T16:34:09.000Z","isValid":true,"sgv":161,"direction":"Flat","type":"sgv","_id":"628914d01090500004ca4709","glucose":161,"avgDelta":"-3.00","BGI":-5.47,"deviation":"2.47"},{"device":"AndroidAPS-DexcomG6","date":1653179350000,"dateString":"2022-05-22T00:29:10.000Z","isValid":true,"sgv":142,"direction":"Flat","type":"sgv","_id":"628983f69d6f1800047cd0dd","glucose":142,"avgDelta":"-1.75","BGI":-4.27,"deviation":"2.52"},{"device":"AndroidAPS-DexcomG6","date":1653179050000,"dateString":"2022-05-22T00:24:10.000Z","isValid":true,"sgv":142,"direction":"Flat","type":"sgv","_id":"628982c89d6f1800047cd0db","glucose":142,"avgDelta":"-1.75","BGI":-4.48,"deviation":"2.73"},{"device":"AndroidAPS-DexcomG6","date":1653156250000,"dateString":"2022-05-21T18:04:10.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","_id":"628929ac8809e60004c644e9","glucose":119,"avgDelta":"0.75","BGI":-2.07,"deviation":"2.82"},{"device":"AndroidAPS-DexcomG6","date":1653109748000,"dateString":"2022-05-21T05:09:08.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","_id":"6288741c363e6c0004f710d9","glucose":117,"avgDelta":"-2.75","BGI":-5.73,"deviation":"2.98"},{"device":"AndroidAPS-DexcomG6","date":1653119049000,"dateString":"2022-05-21T07:44:09.000Z","isValid":true,"sgv":105,"direction":"FortyFiveUp","type":"sgv","_id":"628898627ff1e700040f17d5","glucose":105,"avgDelta":"5.75","BGI":2.76,"deviation":"2.99"},{"device":"AndroidAPS-DexcomG6","date":1653179649000,"dateString":"2022-05-22T00:34:09.000Z","isValid":true,"sgv":143,"direction":"Flat","type":"sgv","_id":"62898517da46aa0004d1e0ea","glucose":143,"avgDelta":"-1.00","BGI":-4.01,"deviation":"3.01"},{"device":"AndroidAPS-DexcomG6","date":1653151749000,"dateString":"2022-05-21T16:49:09.000Z","isValid":true,"sgv":159,"direction":"Flat","type":"sgv","_id":"628918261090500004ca4714","glucose":159,"avgDelta":"-1.50","BGI":-4.53,"deviation":"3.03"},{"device":"AndroidAPS-DexcomG6","date":1653129848000,"dateString":"2022-05-21T10:44:08.000Z","isValid":true,"sgv":93,"direction":"Flat","type":"sgv","_id":"6288c2911991280004dce45e","glucose":93,"avgDelta":"-2.00","BGI":-5.26,"deviation":"3.26"},{"device":"AndroidAPS-DexcomG6","date":1653173650000,"dateString":"2022-05-21T22:54:10.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"6289717d37d09a00043f2b1e","glucose":108,"avgDelta":"-4.00","BGI":-7.28,"deviation":"3.28"},{"device":"AndroidAPS-DexcomG6","date":1653173949000,"dateString":"2022-05-21T22:59:09.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"6289721437d09a00043f2b1f","glucose":108,"avgDelta":"-3.00","BGI":-6.42,"deviation":"3.42"},{"device":"AndroidAPS-DexcomG6","date":1653150549000,"dateString":"2022-05-21T16:29:09.000Z","isValid":true,"sgv":165,"direction":"Flat","type":"sgv","_id":"628913731090500004ca4706","glucose":165,"avgDelta":"-2.25","BGI":-5.73,"deviation":"3.48"},{"device":"AndroidAPS-DexcomG6","date":1653164049000,"dateString":"2022-05-21T20:14:09.000Z","isValid":true,"sgv":109,"direction":"Flat","type":"sgv","_id":"628948214493460004e63a31","glucose":109,"avgDelta":"5.00","BGI":1.51,"deviation":"3.49"},{"device":"AndroidAPS-DexcomG6","date":1653179949000,"dateString":"2022-05-22T00:39:09.000Z","isValid":true,"sgv":143,"direction":"Flat","type":"sgv","_id":"62898645da46aa0004d1e0ee","glucose":143,"avgDelta":"-0.25","BGI":-3.75,"deviation":"3.50"},{"device":"AndroidAPS-DexcomG6","date":1653131948000,"dateString":"2022-05-21T11:19:08.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"6288cacb8e9ed800049b39ec","glucose":98,"avgDelta":"3.50","BGI":-0.3,"deviation":"3.80"},{"device":"AndroidAPS-DexcomG6","date":1653178750000,"dateString":"2022-05-22T00:19:10.000Z","isValid":true,"sgv":144,"direction":"Flat","type":"sgv","_id":"628981999d6f1800047cd0d8","glucose":144,"avgDelta":"-0.75","BGI":-4.57,"deviation":"3.82"},{"device":"AndroidAPS-DexcomG6","date":1653129548000,"dateString":"2022-05-21T10:39:08.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"6288c1631991280004dce45b","glucose":94,"avgDelta":"-2.50","BGI":-6.38,"deviation":"3.88"},{"device":"AndroidAPS-DexcomG6","date":1653129249000,"dateString":"2022-05-21T10:34:09.000Z","isValid":true,"sgv":96,"direction":"Flat","type":"sgv","_id":"6288c0341991280004dce459","glucose":96,"avgDelta":"-3.50","BGI":-7.59,"deviation":"4.09"},{"device":"AndroidAPS-DexcomG6","date":1653152049000,"dateString":"2022-05-21T16:54:09.000Z","isValid":true,"sgv":160,"direction":"Flat","type":"sgv","_id":"628919531090500004ca4717","glucose":160,"avgDelta":"-0.25","BGI":-4.35,"deviation":"4.10"},{"device":"AndroidAPS-DexcomG6","date":1653152349000,"dateString":"2022-05-21T16:59:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"62891a811090500004ca471a","glucose":158,"avgDelta":"0.00","BGI":-4.35,"deviation":"4.35"},{"device":"AndroidAPS-DexcomG6","date":1653150249000,"dateString":"2022-05-21T16:24:09.000Z","isValid":true,"sgv":170,"direction":"Flat","type":"sgv","_id":"628913111090500004ca4704","glucose":170,"avgDelta":"-1.50","BGI":-5.95,"deviation":"4.45"},{"device":"AndroidAPS-DexcomG6","date":1653105549000,"dateString":"2022-05-21T03:59:09.000Z","isValid":true,"sgv":146,"direction":"FortyFiveDown","type":"sgv","_id":"628863a542c1220004f95730","glucose":146,"avgDelta":"-5.25","BGI":-9.87,"deviation":"4.62"},{"device":"AndroidAPS-DexcomG6","date":1653119349000,"dateString":"2022-05-21T07:49:09.000Z","isValid":true,"sgv":114,"direction":"FortyFiveUp","type":"sgv","_id":"628899957ff1e700040f17d7","glucose":114,"avgDelta":"7.00","BGI":2.37,"deviation":"4.63"},{"device":"AndroidAPS-DexcomG6","date":1653173350000,"dateString":"2022-05-21T22:49:10.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","_id":"62896fb837d09a00043f2b1b","glucose":110,"avgDelta":"-3.50","BGI":-8.15,"deviation":"4.65"},{"device":"AndroidAPS-DexcomG6","date":1653174249000,"dateString":"2022-05-21T23:04:09.000Z","isValid":true,"sgv":111,"direction":"Flat","type":"sgv","_id":"6289726037d09a00043f2b20","glucose":111,"avgDelta":"-1.00","BGI":-5.69,"deviation":"4.69"},{"device":"AndroidAPS-DexcomG6","date":1653178449000,"dateString":"2022-05-22T00:14:09.000Z","isValid":true,"sgv":147,"direction":"Flat","type":"sgv","_id":"6289806a9d6f1800047cd0d6","glucose":147,"avgDelta":"0.25","BGI":-4.61,"deviation":"4.86"},{"device":"AndroidAPS-DexcomG6","date":1653128948000,"dateString":"2022-05-21T10:29:08.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","_id":"6288bf061991280004dce457","glucose":99,"avgDelta":"-4.00","BGI":-8.88,"deviation":"4.88"},{"device":"AndroidAPS-DexcomG6","date":1653103448000,"dateString":"2022-05-21T03:24:08.000Z","isValid":true,"sgv":174,"direction":"SingleDown","type":"sgv","_id":"62885b81293f3e00042c31d9","glucose":174,"avgDelta":"-10.50","BGI":-15.43,"deviation":"4.93"},{"device":"AndroidAPS-DexcomG6","date":1653149949000,"dateString":"2022-05-21T16:19:09.000Z","isValid":true,"sgv":172,"direction":"Flat","type":"sgv","_id":"6289130f1090500004ca46ff","glucose":172,"avgDelta":"-1.00","BGI":-6.12,"deviation":"5.12"},{"device":"AndroidAPS-DexcomG6","date":1653105848000,"dateString":"2022-05-21T04:04:08.000Z","isValid":true,"sgv":146,"direction":"Flat","type":"sgv","_id":"628864d342c1220004f95733","glucose":146,"avgDelta":"-4.00","BGI":-9.14,"deviation":"5.14"},{"device":"AndroidAPS-DexcomG6","date":1653103149000,"dateString":"2022-05-21T03:19:09.000Z","isValid":true,"sgv":182,"direction":"SingleDown","type":"sgv","_id":"62885a52293f3e00042c31d7","glucose":182,"avgDelta":"-11.50","BGI":-16.64,"deviation":"5.14"},{"device":"AndroidAPS-DexcomG6","date":1653105248000,"dateString":"2022-05-21T03:54:08.000Z","isValid":true,"sgv":149,"direction":"FortyFiveDown","type":"sgv","_id":"6288629042c1220004f9572e","glucose":149,"avgDelta":"-5.25","BGI":-10.56,"deviation":"5.31"},{"device":"AndroidAPS-DexcomG6","date":1653176050000,"dateString":"2022-05-21T23:34:10.000Z","isValid":true,"sgv":127,"direction":"Flat","type":"sgv","_id":"6289771371a363000480abc1","glucose":127,"avgDelta":"2.50","BGI":-2.93,"deviation":"5.43"},{"device":"AndroidAPS-DexcomG6","date":1653176350000,"dateString":"2022-05-21T23:39:10.000Z","isValid":true,"sgv":132,"direction":"Flat","type":"sgv","_id":"6289784271a363000480abc3","glucose":132,"avgDelta":"3.00","BGI":-2.67,"deviation":"5.67"},{"device":"AndroidAPS-DexcomG6","date":1653149650000,"dateString":"2022-05-21T16:14:10.000Z","isValid":true,"sgv":173,"direction":"Flat","type":"sgv","_id":"62890fff1090500004ca46fd","glucose":173,"avgDelta":"-0.75","BGI":-6.42,"deviation":"5.67"},{"device":"AndroidAPS-DexcomG6","date":1653175750000,"dateString":"2022-05-21T23:29:10.000Z","isValid":true,"sgv":124,"direction":"Flat","type":"sgv","_id":"628975e471a363000480abbe","glucose":124,"avgDelta":"2.50","BGI":-3.19,"deviation":"5.69"},{"device":"AndroidAPS-DexcomG6","date":1653102848000,"dateString":"2022-05-21T03:14:08.000Z","isValid":true,"sgv":193,"direction":"SingleDown","type":"sgv","_id":"62885924293f3e00042c31d5","glucose":193,"avgDelta":"-12.00","BGI":-17.71,"deviation":"5.71"},{"device":"AndroidAPS-DexcomG6","date":1653128649000,"dateString":"2022-05-21T10:24:09.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","_id":"6288bde0abbef90004616cf8","glucose":101,"avgDelta":"-4.50","BGI":-10.3,"deviation":"5.80"},{"device":"AndroidAPS-DexcomG6","date":1653164350000,"dateString":"2022-05-21T20:19:10.000Z","isValid":true,"sgv":120,"direction":"FortyFiveUp","type":"sgv","_id":"6289496a4493460004e63a34","glucose":120,"avgDelta":"7.25","BGI":1.34,"deviation":"5.91"},{"device":"AndroidAPS-DexcomG6","date":1653155950000,"dateString":"2022-05-21T17:59:10.000Z","isValid":true,"sgv":123,"direction":"Flat","type":"sgv","_id":"6289287e8809e60004c644e6","glucose":123,"avgDelta":"3.75","BGI":-2.16,"deviation":"5.91"},{"device":"AndroidAPS-DexcomG6","date":1653174550000,"dateString":"2022-05-21T23:09:10.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","_id":"6289727937d09a00043f2b21","glucose":114,"avgDelta":"1.00","BGI":-4.96,"deviation":"5.96"},{"device":"AndroidAPS-DexcomG6","date":1653178149000,"dateString":"2022-05-22T00:09:09.000Z","isValid":true,"sgv":149,"direction":"Flat","type":"sgv","_id":"62897f3b9d6f1800047cd0d3","glucose":149,"avgDelta":"1.50","BGI":-4.48,"deviation":"5.98"},{"device":"AndroidAPS-DexcomG6","date":1653103748000,"dateString":"2022-05-21T03:29:08.000Z","isValid":true,"sgv":171,"direction":"FortyFiveDown","type":"sgv","_id":"62885c95293f3e00042c31db","glucose":171,"avgDelta":"-8.25","BGI":-14.31,"deviation":"6.06"},{"device":"AndroidAPS-DexcomG6","date":1653108848000,"dateString":"2022-05-21T04:54:08.000Z","isValid":true,"sgv":130,"direction":"Flat","type":"sgv","_id":"62887093363e6c0004f710cf","glucose":130,"avgDelta":"-0.50","BGI":-6.72,"deviation":"6.22","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653175450000,"dateString":"2022-05-21T23:24:10.000Z","isValid":true,"sgv":123,"direction":"Flat","type":"sgv","_id":"628974b671a363000480abbc","glucose":123,"avgDelta":"3.00","BGI":-3.4,"deviation":"6.40"},{"device":"AndroidAPS-DexcomG6","date":1653107348000,"dateString":"2022-05-21T04:29:08.000Z","isValid":true,"sgv":144,"direction":"Flat","type":"sgv","_id":"62886ab919e2e60004989bb3","glucose":144,"avgDelta":"-1.75","BGI":-8.19,"deviation":"6.44"},{"device":"AndroidAPS-DexcomG6","date":1653102548000,"dateString":"2022-05-21T03:09:08.000Z","isValid":true,"sgv":204,"direction":"SingleDown","type":"sgv","_id":"628857f7293f3e00042c31d3","glucose":204,"avgDelta":"-12.25","BGI":-18.79,"deviation":"6.54"},{"device":"AndroidAPS-DexcomG6","date":1653109448000,"dateString":"2022-05-21T05:04:08.000Z","isValid":true,"sgv":125,"direction":"Flat","type":"sgv","_id":"628872ef363e6c0004f710d6","glucose":125,"avgDelta":"0.50","BGI":-6.08,"deviation":"6.58"},{"device":"AndroidAPS-DexcomG6","date":1653176650000,"dateString":"2022-05-21T23:44:10.000Z","isValid":true,"sgv":139,"direction":"Flat","type":"sgv","_id":"6289797071a363000480abc7","glucose":139,"avgDelta":"4.00","BGI":-2.59,"deviation":"6.59"},{"device":"AndroidAPS-DexcomG6","date":1653174850000,"dateString":"2022-05-21T23:14:10.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","_id":"6289727a37d09a00043f2b22","glucose":117,"avgDelta":"2.25","BGI":-4.35,"deviation":"6.60"},{"device":"AndroidAPS-DexcomG6","date":1653149349000,"dateString":"2022-05-21T16:09:09.000Z","isValid":true,"sgv":174,"direction":"Flat","type":"sgv","_id":"62890edacf7ee10004a2b1e2","glucose":174,"avgDelta":"0.00","BGI":-6.64,"deviation":"6.64"}]} diff --git a/app/src/test/res/autotune/test2/autotune.2022-06-25-111214.log b/app/src/test/res/autotune/test2/autotune.2022-06-25-111214.log new file mode 100644 index 0000000000..8fafb15fc4 --- /dev/null +++ b/app/src/test/res/autotune/test2/autotune.2022-06-25-111214.log @@ -0,0 +1,420 @@ +Autotune disk usage: +160K . +Overall disk used/avail: +Filesystem Size Used Avail Use% Mounted on +rootfs 930G 431G 500G 47% / +Grabbing AAPS treatments.json and entries/sgv.json for date range... +oref0-autotune-prep ns-treatments.2022-05-21.json profile.json ns-entries.2022-05-21.json profile.pump.json > autotune.2022-05-21.json +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -16.9 IOB: 5.249 Activity: 0.0391 at 04:24:08 dev: 26.10 avgDelta: 9.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -18.9 IOB: 5.292 Activity: 0.0438 at 04:29:08 dev: 27.88 avgDelta: 9.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -20.3 IOB: 4.964 Activity: 0.047 at 04:34:09 dev: 24.01 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -21.1 IOB: 4.674 Activity: 0.0489 at 04:39:08 dev: 17.83 avgDelta: -3.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -21.5 IOB: 4.377 Activity: 0.0498 at 04:44:08 dev: 11.21 avgDelta: -10.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -21.5 IOB: 4.077 Activity: 0.0498 at 04:49:08 dev: 7.96 avgDelta: -13.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -21.2 IOB: 3.73 Activity: 0.0491 at 04:54:08 dev: 7.16 avgDelta: -14.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -20.5 IOB: 3.389 Activity: 0.0476 at 04:59:08 dev: 6.77 avgDelta: -13.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -19.7 IOB: 3.055 Activity: 0.0457 at 05:04:09 dev: 6.95 avgDelta: -12.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -18.8 IOB: 2.782 Activity: 0.0436 at 05:09:08 dev: 6.54 avgDelta: -12.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -17.7 IOB: 2.47 Activity: 0.0411 at 05:14:08 dev: 5.71 avgDelta: -12.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -16.6 IOB: 2.22 Activity: 0.0386 at 05:19:09 dev: 5.14 avgDelta: -11.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -15.4 IOB: 1.935 Activity: 0.0358 at 05:24:08 dev: 4.93 avgDelta: -10.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -14.3 IOB: 1.711 Activity: 0.0332 at 05:29:08 dev: 6.06 avgDelta: -8.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -13.1 IOB: 1.452 Activity: 0.0304 at 05:34:09 dev: 7.35 avgDelta: -5.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -12.1 IOB: 1.927 Activity: 0.028 at 05:39:09 dev: 8.32 avgDelta: -3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -11.6 IOB: 1.84 Activity: 0.027 at 05:44:08 dev: 8.64 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -11.1 IOB: 1.658 Activity: 0.0258 at 05:49:09 dev: 7.12 avgDelta: -4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -10.6 IOB: 1.482 Activity: 0.0245 at 05:54:08 dev: 5.31 avgDelta: -5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -9.9 IOB: 1.264 Activity: 0.0229 at 05:59:09 dev: 4.62 avgDelta: -5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -9.1 IOB: 1.104 Activity: 0.0212 at 06:04:08 dev: 5.14 avgDelta: -4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -8.4 IOB: 0.952 Activity: 0.0194 at 06:09:09 dev: 7.36 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.8 IOB: 1.619 Activity: 0.0181 at 06:14:09 dev: 9.30 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.9 IOB: 1.678 Activity: 0.0184 at 06:19:09 dev: 10.68 avgDelta: 2.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -8.1 IOB: 1.775 Activity: 0.0187 at 06:24:08 dev: 9.81 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -8.2 IOB: 1.581 Activity: 0.019 at 06:29:08 dev: 6.44 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -8.1 IOB: 1.437 Activity: 0.0188 at 06:34:08 dev: 2.35 avgDelta: -5.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.9 IOB: 1.294 Activity: 0.0183 at 06:39:08 dev: -0.36 avgDelta: -8.25 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.6 IOB: 1.153 Activity: 0.0176 at 06:44:09 dev: 0.09 avgDelta: -7.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.2 IOB: 1.017 Activity: 0.0167 at 06:49:08 dev: 3.20 avgDelta: -4.00 ISF +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -6.7 IOB: 0.887 Activity: 0.0156 at 06:54:08 dev: 6.22 avgDelta: -0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -6.3 IOB: 1.011 Activity: 0.0147 at 06:59:08 dev: 7.59 avgDelta: 1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -6.1 IOB: 0.889 Activity: 0.0141 at 07:04:08 dev: 6.58 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -5.7 IOB: 0.771 Activity: 0.0133 at 07:09:08 dev: 2.98 avgDelta: -2.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -5.3 IOB: 0.656 Activity: 0.0124 at 07:14:09 dev: 0.09 avgDelta: -5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -4.9 IOB: 0.547 Activity: 0.0114 at 07:19:08 dev: -1.84 avgDelta: -6.75 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -4.4 IOB: 0.392 Activity: 0.0103 at 07:24:09 dev: -2.31 avgDelta: -6.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -3.9 IOB: 0.294 Activity: 0.0091 at 07:29:09 dev: -1.08 avgDelta: -5.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -3.5 IOB: 0.2 Activity: 0.008 at 07:34:09 dev: 0.45 avgDelta: -3.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.8 IOB: 0.065 Activity: 0.0066 at 07:39:09 dev: 2.34 avgDelta: -0.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.4 IOB: 0.034 Activity: 0.0055 at 07:44:09 dev: 3.37 avgDelta: 1.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.1 IOB: 0.549 Activity: 0.0048 at 07:49:08 dev: 3.57 avgDelta: 1.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.3 IOB: 0.674 Activity: 0.0053 at 07:54:09 dev: 3.53 avgDelta: 1.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.5 IOB: 0.597 Activity: 0.0057 at 07:59:09 dev: 2.71 avgDelta: 0.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -2.5 IOB: 0.468 Activity: 0.0058 at 08:04:09 dev: 1.50 avgDelta: -1.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -2.5 IOB: 0.389 Activity: 0.0057 at 08:09:09 dev: 0.21 avgDelta: -2.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -2.3 IOB: 0.262 Activity: 0.0053 at 08:14:09 dev: -0.47 avgDelta: -2.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -2.1 IOB: 0.186 Activity: 0.0048 at 08:19:09 dev: -0.93 avgDelta: -3.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -1.8 IOB: 0.064 Activity: 0.0041 at 08:24:09 dev: -1.48 avgDelta: -3.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -1.5 IOB: -0.005 Activity: 0.0034 at 08:29:09 dev: -2.03 avgDelta: -3.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -1.1 IOB: -0.12 Activity: 0.0026 at 08:34:09 dev: -2.13 avgDelta: -3.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -0.8 IOB: -0.181 Activity: 0.0018 at 08:39:09 dev: -2.47 avgDelta: -3.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -0.3 IOB: -0.287 Activity: 0.0008 at 08:44:09 dev: -2.41 avgDelta: -2.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 0.0 IOB: -0.34 Activity: 0 at 08:49:09 dev: -2.50 avgDelta: -2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 0.4 IOB: -0.436 Activity: -0.001 at 08:54:09 dev: -2.68 avgDelta: -2.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 0.8 IOB: -0.48 Activity: -0.0018 at 08:59:09 dev: -2.28 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 1.1 IOB: -0.519 Activity: -0.0026 at 09:04:09 dev: -1.12 avgDelta: 0.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 1.5 IOB: -0.554 Activity: -0.0034 at 09:09:09 dev: 0.00 avgDelta: 1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 1.8 IOB: -0.585 Activity: -0.0041 at 09:14:09 dev: 0.00 avgDelta: 2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.1 IOB: -0.662 Activity: -0.0049 at 09:19:09 dev: 0.39 avgDelta: 2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.4 IOB: -0.687 Activity: -0.0055 at 09:24:08 dev: -0.37 avgDelta: 2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.6 IOB: -0.708 Activity: -0.0061 at 09:29:09 dev: -0.13 avgDelta: 2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.8 IOB: -0.726 Activity: -0.0066 at 09:34:09 dev: 0.41 avgDelta: 3.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 3.1 IOB: -0.351 Activity: -0.0071 at 09:39:08 dev: 1.19 avgDelta: 4.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.8 IOB: -0.218 Activity: -0.0064 at 09:44:09 dev: 2.99 avgDelta: 5.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.4 IOB: -0.088 Activity: -0.0055 at 09:49:09 dev: 4.63 avgDelta: 7.00 basal +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -1.0 IOB: 13.594 Activity: 0.0023 at 09:54:09 dev: 8.74 avgDelta: 7.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -14.3 IOB: 13.552 Activity: 0.0331 at 09:59:09 dev: 23.02 avgDelta: 8.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -24.7 IOB: 13.224 Activity: 0.0573 at 10:04:09 dev: 33.70 avgDelta: 9.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -32.8 IOB: 12.838 Activity: 0.076 at 10:09:08 dev: 40.76 avgDelta: 8.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -38.8 IOB: 12.322 Activity: 0.09 at 10:14:09 dev: 45.04 avgDelta: 6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -43.1 IOB: 11.794 Activity: 0.1001 at 10:19:09 dev: 46.89 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -46.0 IOB: 11.177 Activity: 0.1068 at 10:24:09 dev: 47.03 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -47.8 IOB: 10.58 Activity: 0.111 at 10:29:09 dev: 45.84 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -48.7 IOB: 9.919 Activity: 0.1129 at 10:34:09 dev: 43.66 avgDelta: -5.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -48.7 IOB: 9.254 Activity: 0.1129 at 10:39:09 dev: 41.41 avgDelta: -7.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -48.0 IOB: 8.643 Activity: 0.1114 at 10:44:09 dev: 39.51 avgDelta: -8.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -46.9 IOB: 7.992 Activity: 0.1088 at 10:49:09 dev: 39.39 avgDelta: -7.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -45.4 IOB: 7.406 Activity: 0.1053 at 10:54:08 dev: 40.13 avgDelta: -5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -43.6 IOB: 7.111 Activity: 0.1012 at 10:59:09 dev: 41.37 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -41.9 IOB: 6.515 Activity: 0.0971 at 11:04:09 dev: 42.35 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -40.0 IOB: 5.99 Activity: 0.0927 at 11:09:09 dev: 42.70 avgDelta: 2.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -37.8 IOB: 5.439 Activity: 0.0878 at 11:14:08 dev: 42.09 avgDelta: 4.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -35.7 IOB: 4.962 Activity: 0.0828 at 11:19:09 dev: 39.69 avgDelta: 4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -33.4 IOB: 4.462 Activity: 0.0775 at 11:24:08 dev: 35.65 avgDelta: 2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -31.2 IOB: 4.036 Activity: 0.0724 at 11:29:09 dev: 31.45 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -29.0 IOB: 3.638 Activity: 0.0672 at 11:34:09 dev: 27.46 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -26.8 IOB: 3.214 Activity: 0.0621 at 11:39:08 dev: 25.02 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -24.6 IOB: 2.866 Activity: 0.0571 at 11:44:09 dev: 23.61 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -22.5 IOB: 2.494 Activity: 0.0522 at 11:49:09 dev: 21.75 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -20.5 IOB: 2.193 Activity: 0.0476 at 11:54:09 dev: 20.52 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -18.6 IOB: 1.867 Activity: 0.0431 at 11:59:09 dev: 18.83 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -16.7 IOB: 1.563 Activity: 0.0388 at 12:04:09 dev: 16.97 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -15.0 IOB: 1.329 Activity: 0.0347 at 12:09:08 dev: 14.46 avgDelta: -0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -13.3 IOB: 1.115 Activity: 0.0309 at 12:14:09 dev: 11.32 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -11.7 IOB: 0.87 Activity: 0.0272 at 12:19:09 dev: 7.97 avgDelta: -3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -10.3 IOB: 0.692 Activity: 0.0239 at 12:24:09 dev: 5.80 avgDelta: -4.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -8.9 IOB: 0.482 Activity: 0.0206 at 12:29:08 dev: 4.88 avgDelta: -4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -7.6 IOB: 0.287 Activity: 0.0176 at 12:34:09 dev: 4.09 avgDelta: -3.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -6.4 IOB: 0.156 Activity: 0.0148 at 12:39:08 dev: 3.88 avgDelta: -2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -5.3 IOB: 0.038 Activity: 0.0122 at 12:44:08 dev: 3.26 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -4.3 IOB: -0.067 Activity: 0.0099 at 12:49:09 dev: 2.27 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -3.4 IOB: -0.161 Activity: 0.0078 at 12:54:08 dev: 1.36 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -2.6 IOB: -0.195 Activity: 0.006 at 12:59:08 dev: 0.09 avgDelta: -2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -1.9 IOB: -0.271 Activity: 0.0044 at 13:04:09 dev: -1.10 avgDelta: -3.00 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -1.3 IOB: -0.339 Activity: 0.0029 at 13:09:09 dev: -1.00 avgDelta: -2.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -0.7 IOB: -0.4 Activity: 0.0015 at 13:14:09 dev: 0.90 avgDelta: 0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -0.3 IOB: -0.155 Activity: 0.0007 at 13:19:08 dev: 3.80 avgDelta: 3.50 basal +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -1.9 IOB: 8.11 Activity: 0.0045 at 13:24:09 dev: 8.94 avgDelta: 7.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -9.6 IOB: 7.992 Activity: 0.0222 at 13:29:09 dev: 18.57 avgDelta: 9.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -15.5 IOB: 7.745 Activity: 0.0359 at 13:34:09 dev: 23.47 avgDelta: 8.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -20.0 IOB: 7.488 Activity: 0.0465 at 13:39:09 dev: 24.04 avgDelta: 4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -23.3 IOB: 7.136 Activity: 0.0541 at 13:44:09 dev: 21.32 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -25.7 IOB: 6.8 Activity: 0.0596 at 13:49:09 dev: 17.94 avgDelta: -7.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -27.3 IOB: 6.441 Activity: 0.0633 at 13:54:09 dev: 0.00 avgDelta: -10.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -28.1 IOB: 6.022 Activity: 0.0651 at 13:59:09 dev: 0.00 avgDelta: -9.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -28.3 IOB: 5.644 Activity: 0.0657 at 14:04:09 dev: 0.00 avgDelta: -6.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -28.1 IOB: 5.216 Activity: 0.0653 at 14:09:09 dev: 0.00 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -27.8 IOB: 4.962 Activity: 0.0644 at 14:14:09 dev: 0.00 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -27.0 IOB: 4.544 Activity: 0.0627 at 14:19:09 dev: 0.00 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -26.1 IOB: 4.185 Activity: 0.0606 at 14:24:09 dev: 0.00 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -25.0 IOB: 3.839 Activity: 0.058 at 14:29:09 dev: 0.00 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -23.7 IOB: 3.456 Activity: 0.055 at 14:34:09 dev: 0.00 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -22.4 IOB: 3.139 Activity: 0.0519 at 14:39:09 dev: 0.00 avgDelta: -2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -20.9 IOB: 2.788 Activity: 0.0486 at 14:44:09 dev: 0.00 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -19.5 IOB: 2.503 Activity: 0.0453 at 14:49:10 dev: 0.00 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -18.0 IOB: 2.186 Activity: 0.0418 at 14:54:09 dev: 0.00 avgDelta: 2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -17.5 IOB: 3.17 Activity: 0.0407 at 14:59:09 dev: 22.04 avgDelta: 4.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -17.8 IOB: 3.956 Activity: 0.0413 at 15:04:09 dev: 23.80 avgDelta: 6.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.1 IOB: 3.648 Activity: 0.042 at 15:09:09 dev: 23.85 avgDelta: 5.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.5 IOB: 4.126 Activity: 0.043 at 15:14:09 dev: 22.28 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.8 IOB: 3.81 Activity: 0.0437 at 15:19:10 dev: 20.58 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.8 IOB: 3.541 Activity: 0.0437 at 15:24:10 dev: 19.08 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.6 IOB: 3.272 Activity: 0.0431 at 15:29:09 dev: 19.33 avgDelta: 0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.4 IOB: 3.588 Activity: 0.0428 at 15:34:09 dev: 21.20 avgDelta: 2.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.6 IOB: 3.875 Activity: 0.0431 at 15:39:09 dev: 23.83 avgDelta: 5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.7 IOB: 3.608 Activity: 0.0434 at 15:44:08 dev: 25.46 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -19.1 IOB: 4.271 Activity: 0.0442 at 15:49:09 dev: 26.05 avgDelta: 7.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -19.5 IOB: 3.996 Activity: 0.0452 at 15:54:09 dev: 25.98 avgDelta: 6.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -19.9 IOB: 4.298 Activity: 0.0462 at 15:59:08 dev: 26.16 avgDelta: 6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -20.2 IOB: 4.015 Activity: 0.0468 at 16:04:09 dev: 26.67 avgDelta: 6.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -20.7 IOB: 4.538 Activity: 0.0481 at 16:09:09 dev: 27.98 avgDelta: 7.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.1 IOB: 4.245 Activity: 0.0489 at 16:14:09 dev: 28.33 avgDelta: 7.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.6 IOB: 4.729 Activity: 0.05 at 16:19:09 dev: 28.30 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.9 IOB: 4.426 Activity: 0.0508 at 16:24:09 dev: 28.64 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -22.0 IOB: 4.353 Activity: 0.051 at 16:29:09 dev: 28.73 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.9 IOB: 4.049 Activity: 0.0507 at 16:34:10 dev: 28.10 avgDelta: 6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.5 IOB: 3.747 Activity: 0.0498 at 16:39:09 dev: 25.96 avgDelta: 4.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -20.8 IOB: 3.402 Activity: 0.0483 at 16:44:09 dev: 22.32 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -20.0 IOB: 3.115 Activity: 0.0464 at 16:49:10 dev: 19.00 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -19.0 IOB: 2.788 Activity: 0.0441 at 16:54:09 dev: 17.01 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -18.0 IOB: 2.524 Activity: 0.0417 at 16:59:09 dev: 15.97 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -16.9 IOB: 2.271 Activity: 0.0391 at 17:04:09 dev: 16.10 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -15.7 IOB: 2.033 Activity: 0.0365 at 17:09:10 dev: 15.48 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -14.6 IOB: 1.807 Activity: 0.0338 at 17:14:10 dev: 14.57 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -13.4 IOB: 1.594 Activity: 0.0312 at 17:19:09 dev: 13.70 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -12.3 IOB: 1.395 Activity: 0.0286 at 17:24:10 dev: 12.58 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -11.3 IOB: 1.258 Activity: 0.0262 at 17:29:09 dev: 11.54 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -10.2 IOB: 1.034 Activity: 0.0236 at 17:34:09 dev: 10.17 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -9.3 IOB: 0.971 Activity: 0.0215 at 17:39:09 dev: 9.02 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -8.5 IOB: 1.008 Activity: 0.0197 at 17:44:09 dev: 7.74 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -7.9 IOB: 0.963 Activity: 0.0183 at 17:49:09 dev: 6.89 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -7.4 IOB: 1.046 Activity: 0.0171 at 17:54:10 dev: 7.12 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.9 IOB: 0.912 Activity: 0.0161 at 17:59:09 dev: 6.94 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.7 IOB: 1.254 Activity: 0.0156 at 18:04:09 dev: 6.97 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.6 IOB: 1.176 Activity: 0.0154 at 18:09:09 dev: 6.64 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.4 IOB: 1.051 Activity: 0.0149 at 18:14:10 dev: 5.67 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.1 IOB: 0.928 Activity: 0.0142 at 18:19:09 dev: 5.12 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.0 IOB: 1.008 Activity: 0.0138 at 18:24:09 dev: 4.45 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -5.7 IOB: 0.89 Activity: 0.0133 at 18:29:09 dev: 3.48 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -5.5 IOB: 0.775 Activity: 0.0127 at 18:34:09 dev: 2.47 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -5.1 IOB: 0.664 Activity: 0.0118 at 18:39:09 dev: 1.59 avgDelta: -3.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -4.7 IOB: 0.606 Activity: 0.011 at 18:44:09 dev: 1.74 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -4.5 IOB: 0.703 Activity: 0.0105 at 18:49:09 dev: 3.03 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -4.3 IOB: 0.702 Activity: 0.0101 at 18:54:09 dev: 4.10 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -4.3 IOB: 0.902 Activity: 0.0101 at 18:59:09 dev: 4.35 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -4.3 IOB: 0.801 Activity: 0.0101 at 19:04:09 dev: 2.10 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -4.2 IOB: 0.701 Activity: 0.0098 at 19:09:09 dev: -1.03 avgDelta: -5.25 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -4.0 IOB: 0.603 Activity: 0.0094 at 19:14:09 dev: -4.95 avgDelta: -9.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -3.8 IOB: 0.508 Activity: 0.0088 at 19:19:09 dev: -8.21 avgDelta: -12.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -3.5 IOB: 0.415 Activity: 0.0081 at 19:24:09 dev: -9.76 avgDelta: -13.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -3.2 IOB: 0.327 Activity: 0.0074 at 19:29:09 dev: -8.06 avgDelta: -11.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.8 IOB: 0.242 Activity: 0.0066 at 19:34:09 dev: -3.91 avgDelta: -6.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.5 IOB: 0.161 Activity: 0.0058 at 19:39:09 dev: 2.00 avgDelta: -0.50 ISF +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.2 IOB: 0.134 Activity: 0.005 at 19:44:09 dev: 7.16 avgDelta: 5.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.1 IOB: 0.4 Activity: 0.0048 at 19:49:09 dev: 9.57 avgDelta: 7.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.1 IOB: 0.475 Activity: 0.0049 at 19:54:09 dev: 8.86 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.2 IOB: 0.401 Activity: 0.005 at 19:59:10 dev: 5.91 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.1 IOB: 0.327 Activity: 0.0048 at 20:04:10 dev: 2.82 avgDelta: 0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.9 IOB: 0.203 Activity: 0.0044 at 20:09:09 dev: -0.35 avgDelta: -2.25 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.7 IOB: 0.132 Activity: 0.004 at 20:14:09 dev: -1.78 avgDelta: -3.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.5 IOB: 0.064 Activity: 0.0034 at 20:19:09 dev: -2.28 avgDelta: -3.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.2 IOB: -0.002 Activity: 0.0028 at 20:24:09 dev: -1.54 avgDelta: -2.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.9 IOB: -0.064 Activity: 0.0022 at 20:29:10 dev: -1.05 avgDelta: -2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.7 IOB: -0.073 Activity: 0.0016 at 20:34:09 dev: -0.81 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.5 IOB: -0.08 Activity: 0.0011 at 20:39:09 dev: -1.03 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.3 IOB: -0.085 Activity: 0.0007 at 20:44:09 dev: -1.45 avgDelta: -1.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.2 IOB: -0.087 Activity: 0.0004 at 20:49:09 dev: -1.33 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.0 IOB: -0.088 Activity: 0.0001 at 20:54:09 dev: -1.21 avgDelta: -1.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: 0.0 IOB: -0.088 Activity: -0.0001 at 20:59:09 dev: -0.79 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.2 IOB: -0.137 Activity: -0.0004 at 21:04:09 dev: -0.92 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.3 IOB: -0.184 Activity: -0.0007 at 21:09:10 dev: -0.80 avgDelta: -0.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.4 IOB: -0.18 Activity: -0.001 at 21:14:09 dev: -0.68 avgDelta: -0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.5 IOB: -0.175 Activity: -0.0012 at 21:19:09 dev: -1.02 avgDelta: -0.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.6 IOB: -0.168 Activity: -0.0014 at 21:24:09 dev: -1.35 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.7 IOB: -0.211 Activity: -0.0015 at 21:29:10 dev: -1.65 avgDelta: -1.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.7 IOB: -0.203 Activity: -0.0017 at 21:34:09 dev: -1.98 avgDelta: -1.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.9 IOB: -0.243 Activity: -0.002 at 21:39:10 dev: -2.36 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.0 IOB: -0.282 Activity: -0.0023 at 21:44:10 dev: -2.49 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.1 IOB: -0.32 Activity: -0.0026 at 21:49:09 dev: -2.62 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.3 IOB: -0.357 Activity: -0.0029 at 21:54:10 dev: -2.25 avgDelta: -1.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.4 IOB: -0.391 Activity: -0.0032 at 21:59:10 dev: -1.38 avgDelta: 0.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.5 IOB: -0.375 Activity: -0.0035 at 22:04:09 dev: -0.01 avgDelta: 1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.6 IOB: -0.357 Activity: -0.0036 at 22:09:09 dev: 1.45 avgDelta: 3.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.5 IOB: -0.149 Activity: -0.0035 at 22:14:09 dev: 3.49 avgDelta: 5.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.3 IOB: -0.132 Activity: -0.0031 at 22:19:10 dev: 5.91 avgDelta: 7.25 basal +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -6.5 IOB: 9.296 Activity: 0.015 at 22:24:09 dev: 15.96 avgDelta: 9.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -14.3 IOB: 9.123 Activity: 0.0332 at 22:29:10 dev: 25.06 avgDelta: 10.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -20.4 IOB: 8.96 Activity: 0.0474 at 22:34:09 dev: 29.43 avgDelta: 9.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -25.2 IOB: 8.644 Activity: 0.0584 at 22:39:10 dev: 29.92 avgDelta: 4.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -28.6 IOB: 8.282 Activity: 0.0664 at 22:44:10 dev: 27.37 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -30.9 IOB: 7.835 Activity: 0.0718 at 22:49:09 dev: 24.70 avgDelta: -6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -32.5 IOB: 7.416 Activity: 0.0753 at 22:54:10 dev: 23.70 avgDelta: -8.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -33.3 IOB: 6.984 Activity: 0.0772 at 22:59:09 dev: 24.52 avgDelta: -8.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -33.5 IOB: 6.547 Activity: 0.0776 at 23:04:09 dev: 26.70 avgDelta: -6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -33.1 IOB: 6.061 Activity: 0.0769 at 23:09:10 dev: 28.39 avgDelta: -4.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -32.5 IOB: 5.68 Activity: 0.0754 at 23:14:10 dev: 29.50 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -31.6 IOB: 5.458 Activity: 0.0734 at 23:19:09 dev: 30.14 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -30.7 IOB: 5.046 Activity: 0.0712 at 23:24:10 dev: 29.94 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -29.7 IOB: 4.925 Activity: 0.069 at 23:29:09 dev: 29.49 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -28.6 IOB: 4.487 Activity: 0.0663 at 23:34:09 dev: 29.08 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -27.3 IOB: 4.113 Activity: 0.0633 at 23:39:10 dev: 28.28 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -25.8 IOB: 3.706 Activity: 0.0599 at 23:44:09 dev: 27.57 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -24.4 IOB: 3.363 Activity: 0.0566 at 23:49:09 dev: 26.64 avgDelta: 2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -22.8 IOB: 3.039 Activity: 0.053 at 23:54:09 dev: 25.34 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -21.3 IOB: 2.733 Activity: 0.0494 at 23:59:10 dev: 23.79 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -19.7 IOB: 2.395 Activity: 0.0457 at 00:04:10 dev: 22.20 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -18.1 IOB: 2.126 Activity: 0.0421 at 00:09:10 dev: 20.65 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -16.6 IOB: 1.824 Activity: 0.0385 at 00:14:10 dev: 18.59 avgDelta: 2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -15.1 IOB: 1.64 Activity: 0.0351 at 00:19:09 dev: 17.13 avgDelta: 2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -13.8 IOB: 1.473 Activity: 0.0319 at 00:24:09 dev: 15.50 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -12.4 IOB: 1.273 Activity: 0.0288 at 00:29:10 dev: 14.16 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -11.2 IOB: 1.136 Activity: 0.026 at 00:34:10 dev: 12.71 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -10.1 IOB: 1.011 Activity: 0.0235 at 00:39:09 dev: 10.13 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -9.1 IOB: 0.852 Activity: 0.021 at 00:44:10 dev: 7.30 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -8.2 IOB: 0.752 Activity: 0.0189 at 00:49:10 dev: 4.65 avgDelta: -3.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -7.3 IOB: 0.662 Activity: 0.0169 at 00:54:10 dev: 3.28 avgDelta: -4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -6.4 IOB: 0.534 Activity: 0.0149 at 00:59:09 dev: 3.42 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -5.7 IOB: 0.463 Activity: 0.0132 at 01:04:09 dev: 4.69 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -5.0 IOB: 0.352 Activity: 0.0115 at 01:09:10 dev: 5.96 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.3 IOB: 0.298 Activity: 0.0101 at 01:14:10 dev: 6.60 avgDelta: 2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.8 IOB: 0.25 Activity: 0.0089 at 01:19:09 dev: 6.84 avgDelta: 3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.4 IOB: 0.329 Activity: 0.0079 at 01:24:10 dev: 6.40 avgDelta: 3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.2 IOB: 0.34 Activity: 0.0074 at 01:29:10 dev: 5.69 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.9 IOB: 0.304 Activity: 0.0068 at 01:34:10 dev: 5.43 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.7 IOB: 0.272 Activity: 0.0062 at 01:39:10 dev: 5.67 avgDelta: 3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.6 IOB: 0.512 Activity: 0.006 at 01:44:10 dev: 6.59 avgDelta: 4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.6 IOB: 0.581 Activity: 0.0061 at 01:49:10 dev: 7.38 avgDelta: 4.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.2 IOB: 1.238 Activity: 0.0075 at 01:54:10 dev: 7.98 avgDelta: 4.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.8 IOB: 1.147 Activity: 0.0088 at 01:59:10 dev: 7.54 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.2 IOB: 1.151 Activity: 0.0098 at 02:04:10 dev: 6.72 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.5 IOB: 1.05 Activity: 0.0104 at 02:09:09 dev: 5.98 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.6 IOB: 0.947 Activity: 0.0107 at 02:14:09 dev: 4.86 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.6 IOB: 0.844 Activity: 0.0106 at 02:19:10 dev: 3.82 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.5 IOB: 0.741 Activity: 0.0104 at 02:24:10 dev: 2.73 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.3 IOB: 0.59 Activity: 0.0099 at 02:29:10 dev: 2.52 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.0 IOB: 0.542 Activity: 0.0093 at 02:34:09 dev: 3.01 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.8 IOB: 0.497 Activity: 0.0087 at 02:39:09 dev: 3.50 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.5 IOB: 0.456 Activity: 0.0081 at 02:44:10 dev: 1.74 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.3 IOB: 0.516 Activity: 0.0077 at 02:49:09 dev: -1.93 avgDelta: -5.25 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.1 IOB: 0.429 Activity: 0.0072 at 02:54:09 dev: -6.40 avgDelta: -9.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.8 IOB: 0.294 Activity: 0.0066 at 02:59:10 dev: -8.66 avgDelta: -11.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -2.5 IOB: 0.163 Activity: 0.0058 at 03:04:10 dev: -8.25 avgDelta: -10.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -2.1 IOB: 0.037 Activity: 0.0049 at 03:09:10 dev: -6.39 avgDelta: -8.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -1.7 IOB: -0.085 Activity: 0.0039 at 03:14:10 dev: -4.32 avgDelta: -6.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -1.3 IOB: -0.153 Activity: 0.0029 at 03:19:09 dev: -3.75 avgDelta: -5.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -0.8 IOB: -0.265 Activity: 0.0018 at 03:24:10 dev: -3.72 avgDelta: -4.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -0.3 IOB: -0.371 Activity: 0.0007 at 03:29:09 dev: -3.45 avgDelta: -3.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 0.2 IOB: -0.471 Activity: -0.0005 at 03:34:09 dev: -2.22 avgDelta: -2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 0.7 IOB: -0.566 Activity: -0.0016 at 03:39:10 dev: -0.94 avgDelta: -0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 1.1 IOB: -0.606 Activity: -0.0026 at 03:44:10 dev: 0.00 avgDelta: 1.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 1.6 IOB: -0.64 Activity: -0.0036 at 03:49:10 dev: 0.45 avgDelta: 2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 1.9 IOB: -0.67 Activity: -0.0044 at 03:54:10 dev: -0.15 avgDelta: 1.75 basal +Warning: too many deviations categorized as UnAnnounced Meals +Adding 203 UAM deviations to 54 basal ones +and selecting the lowest 50%, leaving 128 basal+UAM ones +Adding 203 UAM deviations to 26 ISF ones +and selecting the lowest 50%, leaving 114 ISF+UAM ones +oref0-autotune-core autotune.2022-05-21.json profile.json profile.pump.json > newprofile.2022-05-21.json +CRTotalCarbs: 0 CRTotalInsulin: 0 totalCR: NaN +Hour 0 total deviations: 11.35 mg/dL +Hour 0 basal adjustment needed: 0.03 U/hr +Hour 1 total deviations: 47.03 mg/dL +Hour 1 basal adjustment needed: 0.11 U/hr +Hour 2 total deviations: 26.23 mg/dL +Hour 2 basal adjustment needed: 0.06 U/hr +Hour 3 total deviations: -18.1 mg/dL +Hour 3 basal adjustment needed: -0.04 U/hr +Hour 4 total deviations: 0 mg/dL +Hour 4 basal adjustment needed: 0 U/hr +Hour 5 total deviations: 38.31 mg/dL +Hour 5 basal adjustment needed: 0.09 U/hr +Hour 6 total deviations: 19.79 mg/dL +Hour 6 basal adjustment needed: 0.05 U/hr +Hour 7 total deviations: 7.81 mg/dL +Hour 7 basal adjustment needed: 0.02 U/hr +Hour 8 total deviations: -16.5 mg/dL +Hour 8 basal adjustment needed: -0.04 U/hr +Hour 9 total deviations: 7.99 mg/dL +Hour 9 basal adjustment needed: 0.02 U/hr +Hour 10 total deviations: 0 mg/dL +Hour 10 basal adjustment needed: 0 U/hr +Hour 11 total deviations: 0 mg/dL +Hour 11 basal adjustment needed: 0 U/hr +Hour 12 total deviations: 25.63 mg/dL +Hour 12 basal adjustment needed: 0.06 U/hr +Hour 13 total deviations: 2.6 mg/dL +Hour 13 basal adjustment needed: 0.01 U/hr +Hour 14 total deviations: 0 mg/dL +Hour 14 basal adjustment needed: 0 U/hr +Hour 15 total deviations: 0 mg/dL +Hour 15 basal adjustment needed: 0 U/hr +Hour 16 total deviations: 0 mg/dL +Hour 16 basal adjustment needed: 0 U/hr +Hour 17 total deviations: 0 mg/dL +Hour 17 basal adjustment needed: 0 U/hr +Hour 18 total deviations: 42.64 mg/dL +Hour 18 basal adjustment needed: 0.1 U/hr +Hour 19 total deviations: 6.98 mg/dL +Hour 19 basal adjustment needed: 0.02 U/hr +Hour 20 total deviations: -9.02 mg/dL +Hour 20 basal adjustment needed: -0.02 U/hr +Hour 21 total deviations: -19.5 mg/dL +Hour 21 basal adjustment needed: -0.05 U/hr +Hour 22 total deviations: 10.84 mg/dL +Hour 22 basal adjustment needed: 0.03 U/hr +Hour 23 total deviations: 0 mg/dL +Hour 23 basal adjustment needed: 0 U/hr +Adjusting hour 13 basal from 0.874 to 0.876 based on hour 12 = 0.885 and hour 15 = 0.881 +Adjusting hour 14 basal from 0.866 to 0.869 based on hour 12 = 0.885 and hour 15 = 0.881 +[ { start: '00:00:00', minutes: 0, rate: 1.009, i: 0 }, + { start: '01:00:00', minutes: 60, rate: 0.984, i: 1 }, + { start: '02:00:00', minutes: 120, rate: 0.988, i: 2 }, + { start: '03:00:00', minutes: 180, rate: 1.158, i: 3 }, + { start: '04:00:00', minutes: 240, rate: 1.028, i: 4 }, + { start: '05:00:00', minutes: 300, rate: 0.933, i: 5 }, + { start: '06:00:00', minutes: 360, rate: 0.824, i: 6 }, + { start: '07:00:00', minutes: 420, rate: 0.849, i: 7 }, + { start: '08:00:00', minutes: 480, rate: 0.909, i: 8 }, + { start: '09:00:00', minutes: 540, rate: 0.954, i: 9 }, + { start: '10:00:00', minutes: 600, rate: 0.961, i: 10 }, + { start: '11:00:00', minutes: 660, rate: 0.926, i: 11 }, + { start: '12:00:00', minutes: 720, rate: 0.885, i: 12 }, + { start: '13:00:00', minutes: 780, rate: 0.876, i: 13, untuned: 1 }, + { start: '14:00:00', minutes: 840, rate: 0.869, i: 14, untuned: 1 }, + { start: '15:00:00', minutes: 900, rate: 0.881, i: 15 }, + { start: '16:00:00', minutes: 960, rate: 0.798, i: 16 }, + { start: '17:00:00', minutes: 1020, rate: 0.683, i: 17 }, + { start: '18:00:00', minutes: 1080, rate: 0.634, i: 18 }, + { start: '19:00:00', minutes: 1140, rate: 0.725, i: 19 }, + { start: '20:00:00', minutes: 1200, rate: 0.838, i: 20 }, + { start: '21:00:00', minutes: 1260, rate: 0.881, i: 21 }, + { start: '22:00:00', minutes: 1320, rate: 0.91, i: 22 }, + { start: '23:00:00', minutes: 1380, rate: 0.91, i: 23 } ] +totalMealCarbs: 0 totalDeviations: 0 oldCSF 14.991 fullNewCSF: 14.991304347826087 newCSF: 14.991 +oldCR: 5.75 fullNewCR: NaN newCR: NaN +Limiting adjusted ISF of 43.19 to 66.31 (which is pump ISF of 86.2 / 1.3 ) +p50deviation: 3.2 p50BGI -4.96 p50ratios: 0.501 Old ISF: 86.2 fullNewISF: 43.186 adjustedISF: 66.308 newISF: 82.222 newDIA: 6 newPeak: 45 + +Autotune pump profile recommendations: +--------------------------------------------------------- +Recommendations Log File: /home/titi/aaps/autotune/aapsorefautotune_recommendations.log + +Parameter | Pump | Autotune | Days Missing +--------------------------------------------------------- +ISF [mg/dL/U] | 86.200 | 82.222 | +Carb Ratio[g/U]| 5.750 | 5.750 | + 00:00 | 0.966 | 1.009 | 0 + 01:00 | 0.977 | 0.984 | 0 + 02:00 | 0.971 | 0.988 | 0 + 03:00 | 1.111 | 1.158 | 0 + 04:00 | 0.974 | 1.028 | 0 + 05:00 | 0.923 | 0.933 | 0 + 06:00 | 0.823 | 0.824 | 0 + 07:00 | 0.855 | 0.849 | 0 + 08:00 | 0.902 | 0.909 | 0 + 09:00 | 0.934 | 0.954 | 0 + 10:00 | 0.938 | 0.961 | 0 + 11:00 | 0.903 | 0.926 | 0 + 12:00 | 0.882 | 0.885 | 0 + 13:00 | 0.874 | 0.876 | 1 + 14:00 | 0.866 | 0.869 | 1 + 15:00 | 0.848 | 0.881 | 0 + 16:00 | 0.758 | 0.798 | 0 + 17:00 | 0.650 | 0.683 | 0 + 18:00 | 0.648 | 0.634 | 0 + 19:00 | 0.738 | 0.725 | 0 + 20:00 | 0.847 | 0.838 | 0 + 21:00 | 0.861 | 0.881 | 0 + 22:00 | 0.863 | 0.910 | 0 + 23:00 | 0.843 | 0.910 | 0 diff --git a/app/src/test/res/autotune/test2/newaapsorefprofile.2022-05-21.json b/app/src/test/res/autotune/test2/newaapsorefprofile.2022-05-21.json new file mode 100644 index 0000000000..ad7b75b70c --- /dev/null +++ b/app/src/test/res/autotune/test2/newaapsorefprofile.2022-05-21.json @@ -0,0 +1,175 @@ +{ + "autosens_max": 1.3, + "autosens_min": 0.7, + "basalprofile": [ + { + "i": 0, + "minutes": 0, + "rate": 1.009, + "start": "00:00:00" + }, + { + "i": 1, + "minutes": 60, + "rate": 0.984, + "start": "01:00:00" + }, + { + "i": 2, + "minutes": 120, + "rate": 0.988, + "start": "02:00:00" + }, + { + "i": 3, + "minutes": 180, + "rate": 1.158, + "start": "03:00:00" + }, + { + "i": 4, + "minutes": 240, + "rate": 1.028, + "start": "04:00:00" + }, + { + "i": 5, + "minutes": 300, + "rate": 0.933, + "start": "05:00:00" + }, + { + "i": 6, + "minutes": 360, + "rate": 0.824, + "start": "06:00:00" + }, + { + "i": 7, + "minutes": 420, + "rate": 0.849, + "start": "07:00:00" + }, + { + "i": 8, + "minutes": 480, + "rate": 0.909, + "start": "08:00:00" + }, + { + "i": 9, + "minutes": 540, + "rate": 0.954, + "start": "09:00:00" + }, + { + "i": 10, + "minutes": 600, + "rate": 0.961, + "start": "10:00:00" + }, + { + "i": 11, + "minutes": 660, + "rate": 0.926, + "start": "11:00:00" + }, + { + "i": 12, + "minutes": 720, + "rate": 0.885, + "start": "12:00:00" + }, + { + "i": 13, + "minutes": 780, + "rate": 0.876, + "start": "13:00:00", + "untuned": 1 + }, + { + "i": 14, + "minutes": 840, + "rate": 0.869, + "start": "14:00:00", + "untuned": 1 + }, + { + "i": 15, + "minutes": 900, + "rate": 0.881, + "start": "15:00:00" + }, + { + "i": 16, + "minutes": 960, + "rate": 0.798, + "start": "16:00:00" + }, + { + "i": 17, + "minutes": 1020, + "rate": 0.683, + "start": "17:00:00" + }, + { + "i": 18, + "minutes": 1080, + "rate": 0.634, + "start": "18:00:00" + }, + { + "i": 19, + "minutes": 1140, + "rate": 0.725, + "start": "19:00:00" + }, + { + "i": 20, + "minutes": 1200, + "rate": 0.838, + "start": "20:00:00" + }, + { + "i": 21, + "minutes": 1260, + "rate": 0.881, + "start": "21:00:00" + }, + { + "i": 22, + "minutes": 1320, + "rate": 0.91, + "start": "22:00:00" + }, + { + "i": 23, + "minutes": 1380, + "rate": 0.91, + "start": "23:00:00" + } + ], + "carb_ratio": 5.75, + "csf": 14.991, + "curve": "ultra-rapid", + "dia": 6, + "insulinPeakTime": 45, + "isfProfile": { + "sensitivities": [ + { + "endoffset": 1440, + "i": 0, + "offset": 0, + "sensitivity": 82.222, + "start": "00:00:00", + "x": 0 + } + ] + }, + "min_5m_carbimpact": 8, + "name": "Tuned Dyn2", + "sens": 82.222, + "timezone": "Europe/Paris", + "units": "mg/dl", + "useCustomPeakTime": true +} diff --git a/app/src/test/res/autotune/test2/oaps-iobCalc.2022-05-21.json b/app/src/test/res/autotune/test2/oaps-iobCalc.2022-05-21.json new file mode 100644 index 0000000000..92304dbf45 --- /dev/null +++ b/app/src/test/res/autotune/test2/oaps-iobCalc.2022-05-21.json @@ -0,0 +1,286 @@ +[ + { "iob": 5.249, "activity": 0.0391, "date": 1653099848000}, + { "iob": 5.292, "activity": 0.0438, "date": 1653100148000}, + { "iob": 4.964, "activity": 0.047, "date": 1653100449000}, + { "iob": 4.674, "activity": 0.0489, "date": 1653100748000}, + { "iob": 4.377, "activity": 0.0498, "date": 1653101048000}, + { "iob": 4.077, "activity": 0.0498, "date": 1653101348000}, + { "iob": 3.73, "activity": 0.0491, "date": 1653101648000}, + { "iob": 3.389, "activity": 0.0476, "date": 1653101948000}, + { "iob": 3.055, "activity": 0.0457, "date": 1653102249000}, + { "iob": 2.782, "activity": 0.0436, "date": 1653102548000}, + { "iob": 2.47, "activity": 0.0411, "date": 1653102848000}, + { "iob": 2.22, "activity": 0.0386, "date": 1653103149000}, + { "iob": 1.935, "activity": 0.0358, "date": 1653103448000}, + { "iob": 1.711, "activity": 0.0332, "date": 1653103748000}, + { "iob": 1.452, "activity": 0.0304, "date": 1653104049000}, + { "iob": 1.927, "activity": 0.028, "date": 1653104349000}, + { "iob": 1.84, "activity": 0.027, "date": 1653104648000}, + { "iob": 1.658, "activity": 0.0258, "date": 1653104949000}, + { "iob": 1.482, "activity": 0.0245, "date": 1653105248000}, + { "iob": 1.264, "activity": 0.0229, "date": 1653105549000}, + { "iob": 1.104, "activity": 0.0212, "date": 1653105848000}, + { "iob": 0.952, "activity": 0.0194, "date": 1653106149000}, + { "iob": 1.619, "activity": 0.0181, "date": 1653106449000}, + { "iob": 1.678, "activity": 0.0184, "date": 1653106749000}, + { "iob": 1.775, "activity": 0.0187, "date": 1653107048000}, + { "iob": 1.581, "activity": 0.019, "date": 1653107348000}, + { "iob": 1.437, "activity": 0.0188, "date": 1653107648000}, + { "iob": 1.294, "activity": 0.0183, "date": 1653107948000}, + { "iob": 1.153, "activity": 0.0176, "date": 1653108249000}, + { "iob": 1.017, "activity": 0.0167, "date": 1653108548000}, + { "iob": 0.887, "activity": 0.0156, "date": 1653108848000}, + { "iob": 1.011, "activity": 0.0147, "date": 1653109148000}, + { "iob": 0.889, "activity": 0.0141, "date": 1653109448000}, + { "iob": 0.771, "activity": 0.0133, "date": 1653109748000}, + { "iob": 0.656, "activity": 0.0124, "date": 1653110049000}, + { "iob": 0.547, "activity": 0.0114, "date": 1653110348000}, + { "iob": 0.392, "activity": 0.0103, "date": 1653110649000}, + { "iob": 0.294, "activity": 0.0091, "date": 1653110949000}, + { "iob": 0.2, "activity": 0.008, "date": 1653111249000}, + { "iob": 0.065, "activity": 0.0066, "date": 1653111549000}, + { "iob": 0.034, "activity": 0.0055, "date": 1653111849000}, + { "iob": 0.549, "activity": 0.0048, "date": 1653112148000}, + { "iob": 0.674, "activity": 0.0053, "date": 1653112449000}, + { "iob": 0.597, "activity": 0.0057, "date": 1653112749000}, + { "iob": 0.468, "activity": 0.0058, "date": 1653113049000}, + { "iob": 0.389, "activity": 0.0057, "date": 1653113349000}, + { "iob": 0.262, "activity": 0.0053, "date": 1653113649000}, + { "iob": 0.186, "activity": 0.0048, "date": 1653113949000}, + { "iob": 0.064, "activity": 0.0041, "date": 1653114249000}, + { "iob": -0.005, "activity": 0.0034, "date": 1653114549000}, + { "iob": -0.12, "activity": 0.0026, "date": 1653114849000}, + { "iob": -0.181, "activity": 0.0018, "date": 1653115149000}, + { "iob": -0.287, "activity": 0.0008, "date": 1653115449000}, + { "iob": -0.34, "activity": 0, "date": 1653115749000}, + { "iob": -0.436, "activity": -0.001, "date": 1653116049000}, + { "iob": -0.48, "activity": -0.0018, "date": 1653116349000}, + { "iob": -0.519, "activity": -0.0026, "date": 1653116649000}, + { "iob": -0.554, "activity": -0.0034, "date": 1653116949000}, + { "iob": -0.585, "activity": -0.0041, "date": 1653117249000}, + { "iob": -0.662, "activity": -0.0049, "date": 1653117549000}, + { "iob": -0.687, "activity": -0.0055, "date": 1653117848000}, + { "iob": -0.708, "activity": -0.0061, "date": 1653118149000}, + { "iob": -0.726, "activity": -0.0066, "date": 1653118449000}, + { "iob": -0.351, "activity": -0.0071, "date": 1653118748000}, + { "iob": -0.218, "activity": -0.0064, "date": 1653119049000}, + { "iob": -0.088, "activity": -0.0055, "date": 1653119349000}, + { "iob": 13.594, "activity": 0.0023, "date": 1653119649000}, + { "iob": 13.552, "activity": 0.0331, "date": 1653119949000}, + { "iob": 13.224, "activity": 0.0573, "date": 1653120249000}, + { "iob": 12.838, "activity": 0.076, "date": 1653120548000}, + { "iob": 12.322, "activity": 0.09, "date": 1653120849000}, + { "iob": 11.794, "activity": 0.1001, "date": 1653121149000}, + { "iob": 11.177, "activity": 0.1068, "date": 1653121449000}, + { "iob": 10.58, "activity": 0.111, "date": 1653121749000}, + { "iob": 9.919, "activity": 0.1129, "date": 1653122049000}, + { "iob": 9.254, "activity": 0.1129, "date": 1653122349000}, + { "iob": 8.643, "activity": 0.1114, "date": 1653122649000}, + { "iob": 7.992, "activity": 0.1088, "date": 1653122949000}, + { "iob": 7.406, "activity": 0.1053, "date": 1653123248000}, + { "iob": 7.111, "activity": 0.1012, "date": 1653123549000}, + { "iob": 6.515, "activity": 0.0971, "date": 1653123849000}, + { "iob": 5.99, "activity": 0.0927, "date": 1653124149000}, + { "iob": 5.439, "activity": 0.0878, "date": 1653124448000}, + { "iob": 4.962, "activity": 0.0828, "date": 1653124749000}, + { "iob": 4.462, "activity": 0.0775, "date": 1653125048000}, + { "iob": 4.036, "activity": 0.0724, "date": 1653125349000}, + { "iob": 3.638, "activity": 0.0672, "date": 1653125649000}, + { "iob": 3.214, "activity": 0.0621, "date": 1653125948000}, + { "iob": 2.866, "activity": 0.0571, "date": 1653126249000}, + { "iob": 2.494, "activity": 0.0522, "date": 1653126549000}, + { "iob": 2.193, "activity": 0.0476, "date": 1653126849000}, + { "iob": 1.867, "activity": 0.0431, "date": 1653127149000}, + { "iob": 1.563, "activity": 0.0388, "date": 1653127449000}, + { "iob": 1.329, "activity": 0.0347, "date": 1653127748000}, + { "iob": 1.115, "activity": 0.0309, "date": 1653128049000}, + { "iob": 0.87, "activity": 0.0272, "date": 1653128349000}, + { "iob": 0.692, "activity": 0.0239, "date": 1653128649000}, + { "iob": 0.482, "activity": 0.0206, "date": 1653128948000}, + { "iob": 0.287, "activity": 0.0176, "date": 1653129249000}, + { "iob": 0.156, "activity": 0.0148, "date": 1653129548000}, + { "iob": 0.038, "activity": 0.0122, "date": 1653129848000}, + { "iob": -0.067, "activity": 0.0099, "date": 1653130149000}, + { "iob": -0.161, "activity": 0.0078, "date": 1653130448000}, + { "iob": -0.195, "activity": 0.006, "date": 1653130748000}, + { "iob": -0.271, "activity": 0.0044, "date": 1653131049000}, + { "iob": -0.339, "activity": 0.0029, "date": 1653131349000}, + { "iob": -0.4, "activity": 0.0015, "date": 1653131649000}, + { "iob": -0.155, "activity": 0.0007, "date": 1653131948000}, + { "iob": 8.11, "activity": 0.0045, "date": 1653132249000}, + { "iob": 7.992, "activity": 0.0222, "date": 1653132549000}, + { "iob": 7.745, "activity": 0.0359, "date": 1653132849000}, + { "iob": 7.488, "activity": 0.0465, "date": 1653133149000}, + { "iob": 7.136, "activity": 0.0541, "date": 1653133449000}, + { "iob": 6.8, "activity": 0.0596, "date": 1653133749000}, + { "iob": 6.441, "activity": 0.0633, "date": 1653134049000}, + { "iob": 6.022, "activity": 0.0651, "date": 1653134349000}, + { "iob": 5.644, "activity": 0.0657, "date": 1653134649000}, + { "iob": 5.216, "activity": 0.0653, "date": 1653134949000}, + { "iob": 4.962, "activity": 0.0644, "date": 1653135249000}, + { "iob": 4.544, "activity": 0.0627, "date": 1653135549000}, + { "iob": 4.185, "activity": 0.0606, "date": 1653135849000}, + { "iob": 3.839, "activity": 0.058, "date": 1653136149000}, + { "iob": 3.456, "activity": 0.055, "date": 1653136449000}, + { "iob": 3.139, "activity": 0.0519, "date": 1653136749000}, + { "iob": 2.788, "activity": 0.0486, "date": 1653137049000}, + { "iob": 2.503, "activity": 0.0453, "date": 1653137350000}, + { "iob": 2.186, "activity": 0.0418, "date": 1653137649000}, + { "iob": 3.17, "activity": 0.0407, "date": 1653137949000}, + { "iob": 3.956, "activity": 0.0413, "date": 1653138249000}, + { "iob": 3.648, "activity": 0.042, "date": 1653138549000}, + { "iob": 4.126, "activity": 0.043, "date": 1653138849000}, + { "iob": 3.81, "activity": 0.0437, "date": 1653139150000}, + { "iob": 3.541, "activity": 0.0437, "date": 1653139450000}, + { "iob": 3.272, "activity": 0.0431, "date": 1653139749000}, + { "iob": 3.588, "activity": 0.0428, "date": 1653140049000}, + { "iob": 3.875, "activity": 0.0431, "date": 1653140349000}, + { "iob": 3.608, "activity": 0.0434, "date": 1653140648000}, + { "iob": 4.271, "activity": 0.0442, "date": 1653140949000}, + { "iob": 3.996, "activity": 0.0452, "date": 1653141249000}, + { "iob": 4.298, "activity": 0.0462, "date": 1653141548000}, + { "iob": 4.015, "activity": 0.0468, "date": 1653141849000}, + { "iob": 4.538, "activity": 0.0481, "date": 1653142149000}, + { "iob": 4.245, "activity": 0.0489, "date": 1653142449000}, + { "iob": 4.729, "activity": 0.05, "date": 1653142749000}, + { "iob": 4.426, "activity": 0.0508, "date": 1653143049000}, + { "iob": 4.353, "activity": 0.051, "date": 1653143349000}, + { "iob": 4.049, "activity": 0.0507, "date": 1653143650000}, + { "iob": 3.747, "activity": 0.0498, "date": 1653143949000}, + { "iob": 3.402, "activity": 0.0483, "date": 1653144249000}, + { "iob": 3.115, "activity": 0.0464, "date": 1653144550000}, + { "iob": 2.788, "activity": 0.0441, "date": 1653144849000}, + { "iob": 2.524, "activity": 0.0417, "date": 1653145149000}, + { "iob": 2.271, "activity": 0.0391, "date": 1653145449000}, + { "iob": 2.033, "activity": 0.0365, "date": 1653145750000}, + { "iob": 1.807, "activity": 0.0338, "date": 1653146050000}, + { "iob": 1.594, "activity": 0.0312, "date": 1653146349000}, + { "iob": 1.395, "activity": 0.0286, "date": 1653146650000}, + { "iob": 1.258, "activity": 0.0262, "date": 1653146949000}, + { "iob": 1.034, "activity": 0.0236, "date": 1653147249000}, + { "iob": 0.971, "activity": 0.0215, "date": 1653147549000}, + { "iob": 1.008, "activity": 0.0197, "date": 1653147849000}, + { "iob": 0.963, "activity": 0.0183, "date": 1653148149000}, + { "iob": 1.046, "activity": 0.0171, "date": 1653148450000}, + { "iob": 0.912, "activity": 0.0161, "date": 1653148749000}, + { "iob": 1.254, "activity": 0.0156, "date": 1653149049000}, + { "iob": 1.176, "activity": 0.0154, "date": 1653149349000}, + { "iob": 1.051, "activity": 0.0149, "date": 1653149650000}, + { "iob": 0.928, "activity": 0.0142, "date": 1653149949000}, + { "iob": 1.008, "activity": 0.0138, "date": 1653150249000}, + { "iob": 0.89, "activity": 0.0133, "date": 1653150549000}, + { "iob": 0.775, "activity": 0.0127, "date": 1653150849000}, + { "iob": 0.664, "activity": 0.0118, "date": 1653151149000}, + { "iob": 0.606, "activity": 0.011, "date": 1653151449000}, + { "iob": 0.703, "activity": 0.0105, "date": 1653151749000}, + { "iob": 0.702, "activity": 0.0101, "date": 1653152049000}, + { "iob": 0.902, "activity": 0.0101, "date": 1653152349000}, + { "iob": 0.801, "activity": 0.0101, "date": 1653152649000}, + { "iob": 0.701, "activity": 0.0098, "date": 1653152949000}, + { "iob": 0.603, "activity": 0.0094, "date": 1653153249000}, + { "iob": 0.508, "activity": 0.0088, "date": 1653153549000}, + { "iob": 0.415, "activity": 0.0081, "date": 1653153849000}, + { "iob": 0.327, "activity": 0.0074, "date": 1653154149000}, + { "iob": 0.242, "activity": 0.0066, "date": 1653154449000}, + { "iob": 0.161, "activity": 0.0058, "date": 1653154749000}, + { "iob": 0.134, "activity": 0.005, "date": 1653155049000}, + { "iob": 0.4, "activity": 0.0048, "date": 1653155349000}, + { "iob": 0.475, "activity": 0.0049, "date": 1653155649000}, + { "iob": 0.401, "activity": 0.005, "date": 1653155950000}, + { "iob": 0.327, "activity": 0.0048, "date": 1653156250000}, + { "iob": 0.203, "activity": 0.0044, "date": 1653156549000}, + { "iob": 0.132, "activity": 0.004, "date": 1653156849000}, + { "iob": 0.064, "activity": 0.0034, "date": 1653157149000}, + { "iob": -0.002, "activity": 0.0028, "date": 1653157449000}, + { "iob": -0.064, "activity": 0.0022, "date": 1653157750000}, + { "iob": -0.073, "activity": 0.0016, "date": 1653158049000}, + { "iob": -0.08, "activity": 0.0011, "date": 1653158349000}, + { "iob": -0.085, "activity": 0.0007, "date": 1653158649000}, + { "iob": -0.087, "activity": 0.0004, "date": 1653158949000}, + { "iob": -0.088, "activity": 0.0001, "date": 1653159249000}, + { "iob": -0.088, "activity": -0.0001, "date": 1653159549000}, + { "iob": -0.137, "activity": -0.0004, "date": 1653159849000}, + { "iob": -0.184, "activity": -0.0007, "date": 1653160150000}, + { "iob": -0.18, "activity": -0.001, "date": 1653160449000}, + { "iob": -0.175, "activity": -0.0012, "date": 1653160749000}, + { "iob": -0.168, "activity": -0.0014, "date": 1653161049000}, + { "iob": -0.211, "activity": -0.0015, "date": 1653161350000}, + { "iob": -0.203, "activity": -0.0017, "date": 1653161649000}, + { "iob": -0.243, "activity": -0.002, "date": 1653161950000}, + { "iob": -0.282, "activity": -0.0023, "date": 1653162250000}, + { "iob": -0.32, "activity": -0.0026, "date": 1653162549000}, + { "iob": -0.357, "activity": -0.0029, "date": 1653162850000}, + { "iob": -0.391, "activity": -0.0032, "date": 1653163150000}, + { "iob": -0.375, "activity": -0.0035, "date": 1653163449000}, + { "iob": -0.357, "activity": -0.0036, "date": 1653163749000}, + { "iob": -0.149, "activity": -0.0035, "date": 1653164049000}, + { "iob": -0.132, "activity": -0.0031, "date": 1653164350000}, + { "iob": 9.296, "activity": 0.015, "date": 1653164649000}, + { "iob": 9.123, "activity": 0.0332, "date": 1653164950000}, + { "iob": 8.96, "activity": 0.0474, "date": 1653165249000}, + { "iob": 8.644, "activity": 0.0584, "date": 1653165550000}, + { "iob": 8.282, "activity": 0.0664, "date": 1653165850000}, + { "iob": 7.835, "activity": 0.0718, "date": 1653166149000}, + { "iob": 7.416, "activity": 0.0753, "date": 1653166450000}, + { "iob": 6.984, "activity": 0.0772, "date": 1653166749000}, + { "iob": 6.547, "activity": 0.0776, "date": 1653167049000}, + { "iob": 6.061, "activity": 0.0769, "date": 1653167350000}, + { "iob": 5.68, "activity": 0.0754, "date": 1653167650000}, + { "iob": 5.458, "activity": 0.0734, "date": 1653167949000}, + { "iob": 5.046, "activity": 0.0712, "date": 1653168250000}, + { "iob": 4.925, "activity": 0.069, "date": 1653168549000}, + { "iob": 4.487, "activity": 0.0663, "date": 1653168849000}, + { "iob": 4.113, "activity": 0.0633, "date": 1653169150000}, + { "iob": 3.706, "activity": 0.0599, "date": 1653169449000}, + { "iob": 3.363, "activity": 0.0566, "date": 1653169749000}, + { "iob": 3.039, "activity": 0.053, "date": 1653170049000}, + { "iob": 2.733, "activity": 0.0494, "date": 1653170350000}, + { "iob": 2.395, "activity": 0.0457, "date": 1653170650000}, + { "iob": 2.126, "activity": 0.0421, "date": 1653170950000}, + { "iob": 1.824, "activity": 0.0385, "date": 1653171250000}, + { "iob": 1.64, "activity": 0.0351, "date": 1653171549000}, + { "iob": 1.473, "activity": 0.0319, "date": 1653171849000}, + { "iob": 1.273, "activity": 0.0288, "date": 1653172150000}, + { "iob": 1.136, "activity": 0.026, "date": 1653172450000}, + { "iob": 1.011, "activity": 0.0235, "date": 1653172749000}, + { "iob": 0.852, "activity": 0.021, "date": 1653173050000}, + { "iob": 0.752, "activity": 0.0189, "date": 1653173350000}, + { "iob": 0.662, "activity": 0.0169, "date": 1653173650000}, + { "iob": 0.534, "activity": 0.0149, "date": 1653173949000}, + { "iob": 0.463, "activity": 0.0132, "date": 1653174249000}, + { "iob": 0.352, "activity": 0.0115, "date": 1653174550000}, + { "iob": 0.298, "activity": 0.0101, "date": 1653174850000}, + { "iob": 0.25, "activity": 0.0089, "date": 1653175149000}, + { "iob": 0.329, "activity": 0.0079, "date": 1653175450000}, + { "iob": 0.34, "activity": 0.0074, "date": 1653175750000}, + { "iob": 0.304, "activity": 0.0068, "date": 1653176050000}, + { "iob": 0.272, "activity": 0.0062, "date": 1653176350000}, + { "iob": 0.512, "activity": 0.006, "date": 1653176650000}, + { "iob": 0.581, "activity": 0.0061, "date": 1653176950000}, + { "iob": 1.238, "activity": 0.0075, "date": 1653177250000}, + { "iob": 1.147, "activity": 0.0088, "date": 1653177550000}, + { "iob": 1.151, "activity": 0.0098, "date": 1653177850000}, + { "iob": 1.05, "activity": 0.0104, "date": 1653178149000}, + { "iob": 0.947, "activity": 0.0107, "date": 1653178449000}, + { "iob": 0.844, "activity": 0.0106, "date": 1653178750000}, + { "iob": 0.741, "activity": 0.0104, "date": 1653179050000}, + { "iob": 0.59, "activity": 0.0099, "date": 1653179350000}, + { "iob": 0.542, "activity": 0.0093, "date": 1653179649000}, + { "iob": 0.497, "activity": 0.0087, "date": 1653179949000}, + { "iob": 0.456, "activity": 0.0081, "date": 1653180250000}, + { "iob": 0.516, "activity": 0.0077, "date": 1653180549000}, + { "iob": 0.429, "activity": 0.0072, "date": 1653180849000}, + { "iob": 0.294, "activity": 0.0066, "date": 1653181150000}, + { "iob": 0.163, "activity": 0.0058, "date": 1653181450000}, + { "iob": 0.037, "activity": 0.0049, "date": 1653181750000}, + { "iob": -0.085, "activity": 0.0039, "date": 1653182050000}, + { "iob": -0.153, "activity": 0.0029, "date": 1653182349000}, + { "iob": -0.265, "activity": 0.0018, "date": 1653182650000}, + { "iob": -0.371, "activity": 0.0007, "date": 1653182949000}, + { "iob": -0.471, "activity": -0.0005, "date": 1653183249000}, + { "iob": -0.566, "activity": -0.0016, "date": 1653183550000}, + { "iob": -0.606, "activity": -0.0026, "date": 1653183850000}, + { "iob": -0.64, "activity": -0.0036, "date": 1653184150000}, + { "iob": -0.67, "activity": -0.0044, "date": 1653184450000} +] + diff --git a/app/src/test/res/autotune/test2/profile.pump.json b/app/src/test/res/autotune/test2/profile.pump.json new file mode 100644 index 0000000000..eefadabacb --- /dev/null +++ b/app/src/test/res/autotune/test2/profile.pump.json @@ -0,0 +1,147 @@ +{ + "name": "Tuned Dyn2", + "min_5m_carbimpact": 8, + "dia": 6, + "curve": "ultra-rapid", + "useCustomPeakTime": true, + "insulinPeakTime": 45, + "basalprofile": [ + { + "start": "00:00:00", + "minutes": 0, + "rate": 0.966 + }, + { + "start": "01:00:00", + "minutes": 60, + "rate": 0.977 + }, + { + "start": "02:00:00", + "minutes": 120, + "rate": 0.971 + }, + { + "start": "03:00:00", + "minutes": 180, + "rate": 1.111 + }, + { + "start": "04:00:00", + "minutes": 240, + "rate": 0.974 + }, + { + "start": "05:00:00", + "minutes": 300, + "rate": 0.923 + }, + { + "start": "06:00:00", + "minutes": 360, + "rate": 0.823 + }, + { + "start": "07:00:00", + "minutes": 420, + "rate": 0.855 + }, + { + "start": "08:00:00", + "minutes": 480, + "rate": 0.902 + }, + { + "start": "09:00:00", + "minutes": 540, + "rate": 0.934 + }, + { + "start": "10:00:00", + "minutes": 600, + "rate": 0.938 + }, + { + "start": "11:00:00", + "minutes": 660, + "rate": 0.903 + }, + { + "start": "12:00:00", + "minutes": 720, + "rate": 0.882 + }, + { + "start": "13:00:00", + "minutes": 780, + "rate": 0.874 + }, + { + "start": "14:00:00", + "minutes": 840, + "rate": 0.866 + }, + { + "start": "15:00:00", + "minutes": 900, + "rate": 0.848 + }, + { + "start": "16:00:00", + "minutes": 960, + "rate": 0.758 + }, + { + "start": "17:00:00", + "minutes": 1020, + "rate": 0.65 + }, + { + "start": "18:00:00", + "minutes": 1080, + "rate": 0.648 + }, + { + "start": "19:00:00", + "minutes": 1140, + "rate": 0.738 + }, + { + "start": "20:00:00", + "minutes": 1200, + "rate": 0.847 + }, + { + "start": "21:00:00", + "minutes": 1260, + "rate": 0.861 + }, + { + "start": "22:00:00", + "minutes": 1320, + "rate": 0.863 + }, + { + "start": "23:00:00", + "minutes": 1380, + "rate": 0.843 + } + ], + "isfProfile": { + "sensitivities": [ + { + "i": 0, + "start": "00:00:00", + "sensitivity": 86.2, + "offset": 0, + "x": 0, + "endoffset": 1440 + } + ] + }, + "carb_ratio": 5.75, + "autosens_max": 1.3, + "autosens_min": 0.7, + "units": "mg/dl", + "timezone": "Europe/Paris" +} diff --git a/app/src/test/res/autotune/test3/aaps-entries.2022-05-21.json b/app/src/test/res/autotune/test3/aaps-entries.2022-05-21.json new file mode 100644 index 0000000000..70c349e9d8 --- /dev/null +++ b/app/src/test/res/autotune/test3/aaps-entries.2022-05-21.json @@ -0,0 +1,2882 @@ +[ + { + "device": "AndroidAPS-DexcomG6", + "date": 1653184750000, + "dateString": "2022-05-22T01:59:10.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "6289990761a8290004740388" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653184450000, + "dateString": "2022-05-22T01:54:10.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "628997d861a8290004740385" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653184150000, + "dateString": "2022-05-22T01:49:10.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "628996a961a8290004740382" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653183850000, + "dateString": "2022-05-22T01:44:10.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "_id": "6289957b61a829000474037f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653183550000, + "dateString": "2022-05-22T01:39:10.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "_id": "6289945f50e51d0004429e6d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653183249000, + "dateString": "2022-05-22T01:34:09.000Z", + "isValid": true, + "sgv": 73, + "direction": "Flat", + "type": "sgv", + "_id": "6289933050e51d0004429e6b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653182949000, + "dateString": "2022-05-22T01:29:09.000Z", + "isValid": true, + "sgv": 72, + "direction": "Flat", + "type": "sgv", + "_id": "6289920150e51d0004429e69" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653182650000, + "dateString": "2022-05-22T01:24:10.000Z", + "isValid": true, + "sgv": 74, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628990d350e51d0004429e67" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653182349000, + "dateString": "2022-05-22T01:19:09.000Z", + "isValid": true, + "sgv": 77, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62898fa550e51d0004429e65" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653182050000, + "dateString": "2022-05-22T01:14:10.000Z", + "isValid": true, + "sgv": 81, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62898e7650e51d0004429e63" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653181750000, + "dateString": "2022-05-22T01:09:10.000Z", + "isValid": true, + "sgv": 87, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62898d4750e51d0004429e5f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653181450000, + "dateString": "2022-05-22T01:04:10.000Z", + "isValid": true, + "sgv": 92, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62898c2fda46aa0004d1e0fc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653181150000, + "dateString": "2022-05-22T00:59:10.000Z", + "isValid": true, + "sgv": 97, + "direction": "SingleDown", + "type": "sgv", + "_id": "62898b01da46aa0004d1e0fa" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653180849000, + "dateString": "2022-05-22T00:54:09.000Z", + "isValid": true, + "sgv": 105, + "direction": "SingleDown", + "type": "sgv", + "_id": "628989d2da46aa0004d1e0f8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653180549000, + "dateString": "2022-05-22T00:49:09.000Z", + "isValid": true, + "sgv": 121, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628988a3da46aa0004d1e0f5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653180250000, + "dateString": "2022-05-22T00:44:10.000Z", + "isValid": true, + "sgv": 135, + "direction": "Flat", + "type": "sgv", + "_id": "62898774da46aa0004d1e0f1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653179949000, + "dateString": "2022-05-22T00:39:09.000Z", + "isValid": true, + "sgv": 143, + "direction": "Flat", + "type": "sgv", + "_id": "62898645da46aa0004d1e0ee" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653179649000, + "dateString": "2022-05-22T00:34:09.000Z", + "isValid": true, + "sgv": 143, + "direction": "Flat", + "type": "sgv", + "_id": "62898517da46aa0004d1e0ea" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653179350000, + "dateString": "2022-05-22T00:29:10.000Z", + "isValid": true, + "sgv": 142, + "direction": "Flat", + "type": "sgv", + "_id": "628983f69d6f1800047cd0dd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653179050000, + "dateString": "2022-05-22T00:24:10.000Z", + "isValid": true, + "sgv": 142, + "direction": "Flat", + "type": "sgv", + "_id": "628982c89d6f1800047cd0db" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653178750000, + "dateString": "2022-05-22T00:19:10.000Z", + "isValid": true, + "sgv": 144, + "direction": "Flat", + "type": "sgv", + "_id": "628981999d6f1800047cd0d8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653178449000, + "dateString": "2022-05-22T00:14:09.000Z", + "isValid": true, + "sgv": 147, + "direction": "Flat", + "type": "sgv", + "_id": "6289806a9d6f1800047cd0d6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653178149000, + "dateString": "2022-05-22T00:09:09.000Z", + "isValid": true, + "sgv": 149, + "direction": "Flat", + "type": "sgv", + "_id": "62897f3b9d6f1800047cd0d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653177850000, + "dateString": "2022-05-22T00:04:10.000Z", + "isValid": true, + "sgv": 149, + "direction": "Flat", + "type": "sgv", + "_id": "62897e0c9d6f1800047cd0d0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653177550000, + "dateString": "2022-05-21T23:59:10.000Z", + "isValid": true, + "sgv": 147, + "direction": "Flat", + "type": "sgv", + "_id": "62897cde9d6f1800047cd0cc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653177250000, + "dateString": "2022-05-21T23:54:10.000Z", + "isValid": true, + "sgv": 146, + "direction": "Flat", + "type": "sgv", + "_id": "62897bc89d6f1800047cd0c9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653176950000, + "dateString": "2022-05-21T23:49:10.000Z", + "isValid": true, + "sgv": 143, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62897a8771a363000480abca" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653176650000, + "dateString": "2022-05-21T23:44:10.000Z", + "isValid": true, + "sgv": 139, + "direction": "Flat", + "type": "sgv", + "_id": "6289797071a363000480abc7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653176350000, + "dateString": "2022-05-21T23:39:10.000Z", + "isValid": true, + "sgv": 132, + "direction": "Flat", + "type": "sgv", + "_id": "6289784271a363000480abc3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653176050000, + "dateString": "2022-05-21T23:34:10.000Z", + "isValid": true, + "sgv": 127, + "direction": "Flat", + "type": "sgv", + "_id": "6289771371a363000480abc1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653175750000, + "dateString": "2022-05-21T23:29:10.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "628975e471a363000480abbe" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653175450000, + "dateString": "2022-05-21T23:24:10.000Z", + "isValid": true, + "sgv": 123, + "direction": "Flat", + "type": "sgv", + "_id": "628974b671a363000480abbc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653175149000, + "dateString": "2022-05-21T23:19:09.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "_id": "6289738f37d09a00043f2b26" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653174850000, + "dateString": "2022-05-21T23:14:10.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "_id": "6289727a37d09a00043f2b22" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653174550000, + "dateString": "2022-05-21T23:09:10.000Z", + "isValid": true, + "sgv": 114, + "direction": "Flat", + "type": "sgv", + "_id": "6289727937d09a00043f2b21" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653174249000, + "dateString": "2022-05-21T23:04:09.000Z", + "isValid": true, + "sgv": 111, + "direction": "Flat", + "type": "sgv", + "_id": "6289726037d09a00043f2b20" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653173949000, + "dateString": "2022-05-21T22:59:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "_id": "6289721437d09a00043f2b1f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653173650000, + "dateString": "2022-05-21T22:54:10.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "_id": "6289717d37d09a00043f2b1e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653173350000, + "dateString": "2022-05-21T22:49:10.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "_id": "62896fb837d09a00043f2b1b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653173050000, + "dateString": "2022-05-21T22:44:10.000Z", + "isValid": true, + "sgv": 115, + "direction": "Flat", + "type": "sgv", + "_id": "62896f8537d09a00043f2b1a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653172749000, + "dateString": "2022-05-21T22:39:09.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "_id": "62896e8937d09a00043f2b19" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653172450000, + "dateString": "2022-05-21T22:34:10.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "62896d8b37d09a00043f2b17" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653172150000, + "dateString": "2022-05-21T22:29:10.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "62896cda37d09a00043f2b16" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653171849000, + "dateString": "2022-05-21T22:24:09.000Z", + "isValid": true, + "sgv": 122, + "direction": "Flat", + "type": "sgv", + "_id": "62896c7537d09a00043f2b14" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653171549000, + "dateString": "2022-05-21T22:19:09.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "_id": "62896c1037d09a00043f2b13" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653171250000, + "dateString": "2022-05-21T22:14:10.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "62896b5f6a5ecf00042d5474" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653170950000, + "dateString": "2022-05-21T22:09:10.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "_id": "62896ac76a5ecf00042d5472" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653170650000, + "dateString": "2022-05-21T22:04:10.000Z", + "isValid": true, + "sgv": 115, + "direction": "Flat", + "type": "sgv", + "_id": "628969fd6a5ecf00042d5471" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653170350000, + "dateString": "2022-05-21T21:59:10.000Z", + "isValid": true, + "sgv": 112, + "direction": "Flat", + "type": "sgv", + "_id": "628969016a5ecf00042d5470" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653170049000, + "dateString": "2022-05-21T21:54:09.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "_id": "628967a06a5ecf00042d546e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653169749000, + "dateString": "2022-05-21T21:49:09.000Z", + "isValid": true, + "sgv": 107, + "direction": "Flat", + "type": "sgv", + "_id": "628964906a5ecf00042d546b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653169449000, + "dateString": "2022-05-21T21:44:09.000Z", + "isValid": true, + "sgv": 105, + "direction": "Flat", + "type": "sgv", + "_id": "628961a4fb144900043c34ea" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653169150000, + "dateString": "2022-05-21T21:39:10.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "_id": "62895f5ffb144900043c34e8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653168849000, + "dateString": "2022-05-21T21:34:09.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "_id": "62895d98fb144900043c34e5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653168549000, + "dateString": "2022-05-21T21:29:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "62895b9a9bf1e6000482ffa1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653168250000, + "dateString": "2022-05-21T21:24:10.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628959ed9bf1e6000482ff9e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653167949000, + "dateString": "2022-05-21T21:19:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "6289583f9bf1e6000482ff9b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653167650000, + "dateString": "2022-05-21T21:14:10.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628956919bf1e6000482ff96" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653167350000, + "dateString": "2022-05-21T21:09:10.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "_id": "628955179bf1e6000482ff92" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653167049000, + "dateString": "2022-05-21T21:04:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628953e79bf1e6000482ff90" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653166749000, + "dateString": "2022-05-21T20:59:09.000Z", + "isValid": true, + "sgv": 104, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628952c680fc7e00041b22a9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653166450000, + "dateString": "2022-05-21T20:54:10.000Z", + "isValid": true, + "sgv": 110, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6289519580fc7e00041b22a7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653166149000, + "dateString": "2022-05-21T20:49:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6289506680fc7e00041b22a5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653165850000, + "dateString": "2022-05-21T20:44:10.000Z", + "isValid": true, + "sgv": 128, + "direction": "Flat", + "type": "sgv", + "_id": "62894f3880fc7e00041b22a3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653165550000, + "dateString": "2022-05-21T20:39:10.000Z", + "isValid": true, + "sgv": 139, + "direction": "Flat", + "type": "sgv", + "_id": "62894e0980fc7e00041b22a0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653165249000, + "dateString": "2022-05-21T20:34:09.000Z", + "isValid": true, + "sgv": 145, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62894cdb80fc7e00041b229e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653164950000, + "dateString": "2022-05-21T20:29:10.000Z", + "isValid": true, + "sgv": 143, + "direction": "SingleUp", + "type": "sgv", + "_id": "62894bab80fc7e00041b229b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653164649000, + "dateString": "2022-05-21T20:24:09.000Z", + "isValid": true, + "sgv": 133, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62894a7e4493460004e63a38" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653164350000, + "dateString": "2022-05-21T20:19:10.000Z", + "isValid": true, + "sgv": 120, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6289496a4493460004e63a34" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653164049000, + "dateString": "2022-05-21T20:14:09.000Z", + "isValid": true, + "sgv": 109, + "direction": "Flat", + "type": "sgv", + "_id": "628948214493460004e63a31" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653163749000, + "dateString": "2022-05-21T20:09:09.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "_id": "6289470c4493460004e63a2d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653163449000, + "dateString": "2022-05-21T20:04:09.000Z", + "isValid": true, + "sgv": 95, + "direction": "Flat", + "type": "sgv", + "_id": "628945dc4493460004e63a2a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653163150000, + "dateString": "2022-05-21T19:59:10.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "_id": "628944ae4493460004e63a27" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653162850000, + "dateString": "2022-05-21T19:54:10.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "_id": "6289437f4493460004e63a25" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653162549000, + "dateString": "2022-05-21T19:49:09.000Z", + "isValid": true, + "sgv": 88, + "direction": "Flat", + "type": "sgv", + "_id": "6289425f598f780004bb3b30" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653162250000, + "dateString": "2022-05-21T19:44:10.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "_id": "62894118598f780004bb3b2d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653161950000, + "dateString": "2022-05-21T19:39:10.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "_id": "62893feb598f780004bb3b2b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653161649000, + "dateString": "2022-05-21T19:34:09.000Z", + "isValid": true, + "sgv": 93, + "direction": "Flat", + "type": "sgv", + "_id": "62893ed7598f780004bb3b29" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653161350000, + "dateString": "2022-05-21T19:29:10.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "62893daa598f780004bb3b27" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653161049000, + "dateString": "2022-05-21T19:24:09.000Z", + "isValid": true, + "sgv": 95, + "direction": "Flat", + "type": "sgv", + "_id": "62893c7d598f780004bb3b24" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653160749000, + "dateString": "2022-05-21T19:19:09.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "_id": "62893b4f598f780004bb3b22" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653160449000, + "dateString": "2022-05-21T19:14:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "62893a1222fbc8000495b822" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653160150000, + "dateString": "2022-05-21T19:09:10.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628938fe22fbc8000495b81f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653159849000, + "dateString": "2022-05-21T19:04:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628937b822fbc8000495b81d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653159549000, + "dateString": "2022-05-21T18:59:09.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "_id": "628936a422fbc8000495b81a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653159249000, + "dateString": "2022-05-21T18:54:09.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "_id": "6289357622fbc8000495b818" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653158949000, + "dateString": "2022-05-21T18:49:09.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "_id": "6289344a22fbc8000495b815" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653158649000, + "dateString": "2022-05-21T18:44:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "_id": "6289331c22fbc8000495b813" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653158349000, + "dateString": "2022-05-21T18:39:09.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "_id": "628931e9840d8d0004a20bff" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653158049000, + "dateString": "2022-05-21T18:34:09.000Z", + "isValid": true, + "sgv": 104, + "direction": "Flat", + "type": "sgv", + "_id": "628930bc840d8d0004a20bfd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653157750000, + "dateString": "2022-05-21T18:29:10.000Z", + "isValid": true, + "sgv": 106, + "direction": "Flat", + "type": "sgv", + "_id": "62892f8f840d8d0004a20bfa" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653157449000, + "dateString": "2022-05-21T18:24:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "_id": "62892e62840d8d0004a20bf8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653157149000, + "dateString": "2022-05-21T18:19:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "_id": "62892d34840d8d0004a20bf5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653156849000, + "dateString": "2022-05-21T18:14:09.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "_id": "62892c06840d8d0004a20bf2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653156549000, + "dateString": "2022-05-21T18:09:09.000Z", + "isValid": true, + "sgv": 114, + "direction": "Flat", + "type": "sgv", + "_id": "62892af2840d8d0004a20bf0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653156250000, + "dateString": "2022-05-21T18:04:10.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "_id": "628929ac8809e60004c644e9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653155950000, + "dateString": "2022-05-21T17:59:10.000Z", + "isValid": true, + "sgv": 123, + "direction": "Flat", + "type": "sgv", + "_id": "6289287e8809e60004c644e6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653155649000, + "dateString": "2022-05-21T17:54:09.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "6289276a8809e60004c644e3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653155349000, + "dateString": "2022-05-21T17:49:09.000Z", + "isValid": true, + "sgv": 123, + "direction": "NONE", + "type": "sgv", + "_id": "6289263c8809e60004c644e1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653155049000, + "dateString": "2022-05-21T17:44:09.000Z", + "isValid": true, + "sgv": 116, + "direction": "NONE", + "type": "sgv", + "_id": "6289250d8809e60004c644dd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653154749000, + "dateString": "2022-05-21T17:39:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "NONE", + "type": "sgv", + "_id": "628923df8809e60004c644d9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653154449000, + "dateString": "2022-05-21T17:34:09.000Z", + "isValid": true, + "sgv": 97, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628922b18809e60004c644d6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653154149000, + "dateString": "2022-05-21T17:29:09.000Z", + "isValid": true, + "sgv": 93, + "direction": "SingleDown", + "type": "sgv", + "_id": "628921861090500004ca472b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653153849000, + "dateString": "2022-05-21T17:24:09.000Z", + "isValid": true, + "sgv": 96, + "direction": "SingleDown", + "type": "sgv", + "_id": "628920591090500004ca4727" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653153549000, + "dateString": "2022-05-21T17:19:09.000Z", + "isValid": true, + "sgv": 110, + "direction": "SingleDown", + "type": "sgv", + "_id": "62891f2b1090500004ca4724" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653153249000, + "dateString": "2022-05-21T17:14:09.000Z", + "isValid": true, + "sgv": 124, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62891dfd1090500004ca4722" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653152949000, + "dateString": "2022-05-21T17:09:09.000Z", + "isValid": true, + "sgv": 138, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62891cd01090500004ca471f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653152649000, + "dateString": "2022-05-21T17:04:09.000Z", + "isValid": true, + "sgv": 149, + "direction": "Flat", + "type": "sgv", + "_id": "62891ba31090500004ca471d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653152349000, + "dateString": "2022-05-21T16:59:09.000Z", + "isValid": true, + "sgv": 158, + "direction": "Flat", + "type": "sgv", + "_id": "62891a811090500004ca471a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653152049000, + "dateString": "2022-05-21T16:54:09.000Z", + "isValid": true, + "sgv": 160, + "direction": "Flat", + "type": "sgv", + "_id": "628919531090500004ca4717" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653151749000, + "dateString": "2022-05-21T16:49:09.000Z", + "isValid": true, + "sgv": 159, + "direction": "Flat", + "type": "sgv", + "_id": "628918261090500004ca4714" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653151449000, + "dateString": "2022-05-21T16:44:09.000Z", + "isValid": true, + "sgv": 158, + "direction": "Flat", + "type": "sgv", + "_id": "628916f81090500004ca4710" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653151149000, + "dateString": "2022-05-21T16:39:09.000Z", + "isValid": true, + "sgv": 158, + "direction": "Flat", + "type": "sgv", + "_id": "628915ce1090500004ca470c" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653150849000, + "dateString": "2022-05-21T16:34:09.000Z", + "isValid": true, + "sgv": 161, + "direction": "Flat", + "type": "sgv", + "_id": "628914d01090500004ca4709" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653150549000, + "dateString": "2022-05-21T16:29:09.000Z", + "isValid": true, + "sgv": 165, + "direction": "Flat", + "type": "sgv", + "_id": "628913731090500004ca4706" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653150249000, + "dateString": "2022-05-21T16:24:09.000Z", + "isValid": true, + "sgv": 170, + "direction": "Flat", + "type": "sgv", + "_id": "628913111090500004ca4704" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653149949000, + "dateString": "2022-05-21T16:19:09.000Z", + "isValid": true, + "sgv": 172, + "direction": "Flat", + "type": "sgv", + "_id": "6289130f1090500004ca46ff" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653149650000, + "dateString": "2022-05-21T16:14:10.000Z", + "isValid": true, + "sgv": 173, + "direction": "Flat", + "type": "sgv", + "_id": "62890fff1090500004ca46fd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653149349000, + "dateString": "2022-05-21T16:09:09.000Z", + "isValid": true, + "sgv": 174, + "direction": "Flat", + "type": "sgv", + "_id": "62890edacf7ee10004a2b1e2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653149049000, + "dateString": "2022-05-21T16:04:09.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "62890daccf7ee10004a2b1de" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653148749000, + "dateString": "2022-05-21T15:59:09.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "62890c64cf7ee10004a2b1da" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653148450000, + "dateString": "2022-05-21T15:54:10.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "62890b36cf7ee10004a2b1d7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653148149000, + "dateString": "2022-05-21T15:49:09.000Z", + "isValid": true, + "sgv": 174, + "direction": "Flat", + "type": "sgv", + "_id": "62890a21cf7ee10004a2b1d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653147849000, + "dateString": "2022-05-21T15:44:09.000Z", + "isValid": true, + "sgv": 175, + "direction": "Flat", + "type": "sgv", + "_id": "628908f3cf7ee10004a2b1d1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653147549000, + "dateString": "2022-05-21T15:39:09.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "628907c5cf7ee10004a2b1ce" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653147249000, + "dateString": "2022-05-21T15:34:09.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "6289067fc9346b0004863369" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653146949000, + "dateString": "2022-05-21T15:29:09.000Z", + "isValid": true, + "sgv": 178, + "direction": "Flat", + "type": "sgv", + "_id": "6289056ac9346b0004863366" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653146650000, + "dateString": "2022-05-21T15:24:10.000Z", + "isValid": true, + "sgv": 178, + "direction": "Flat", + "type": "sgv", + "_id": "6289043cc9346b0004863363" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653146349000, + "dateString": "2022-05-21T15:19:09.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "6289030ec9346b0004863361" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653146050000, + "dateString": "2022-05-21T15:14:10.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "628901e0c9346b000486335f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653145750000, + "dateString": "2022-05-21T15:09:10.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "628900b2c9346b000486335d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653145449000, + "dateString": "2022-05-21T15:04:09.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "6288ff9ec9346b000486335b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653145149000, + "dateString": "2022-05-21T14:59:09.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "_id": "6288fe56c9346b0004863359" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653144849000, + "dateString": "2022-05-21T14:54:09.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "_id": "6288fd270e0c880004d58de7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653144550000, + "dateString": "2022-05-21T14:49:10.000Z", + "isValid": true, + "sgv": 178, + "direction": "Flat", + "type": "sgv", + "_id": "6288fbf90e0c880004d58de5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653144249000, + "dateString": "2022-05-21T14:44:09.000Z", + "isValid": true, + "sgv": 180, + "direction": "Flat", + "type": "sgv", + "_id": "6288facb0e0c880004d58de3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653143949000, + "dateString": "2022-05-21T14:39:09.000Z", + "isValid": true, + "sgv": 184, + "direction": "Flat", + "type": "sgv", + "_id": "6288f9b60e0c880004d58de0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653143650000, + "dateString": "2022-05-21T14:34:10.000Z", + "isValid": true, + "sgv": 185, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f8880e0c880004d58dde" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653143349000, + "dateString": "2022-05-21T14:29:09.000Z", + "isValid": true, + "sgv": 182, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f75a0e0c880004d58ddb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653143049000, + "dateString": "2022-05-21T14:24:09.000Z", + "isValid": true, + "sgv": 174, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f62c0e0c880004d58dd8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653142749000, + "dateString": "2022-05-21T14:19:09.000Z", + "isValid": true, + "sgv": 166, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f4f72634cd0004296074" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653142449000, + "dateString": "2022-05-21T14:14:09.000Z", + "isValid": true, + "sgv": 160, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f3c92634cd0004296071" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653142149000, + "dateString": "2022-05-21T14:09:09.000Z", + "isValid": true, + "sgv": 155, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f29b2634cd000429606f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653141849000, + "dateString": "2022-05-21T14:04:09.000Z", + "isValid": true, + "sgv": 147, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f16d2634cd000429606c" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653141548000, + "dateString": "2022-05-21T13:59:08.000Z", + "isValid": true, + "sgv": 139, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288f03f2634cd000429606a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653141249000, + "dateString": "2022-05-21T13:54:09.000Z", + "isValid": true, + "sgv": 131, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288ef2a2634cd0004296067" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653140949000, + "dateString": "2022-05-21T13:49:09.000Z", + "isValid": true, + "sgv": 126, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288edfc2634cd0004296065" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653140648000, + "dateString": "2022-05-21T13:44:08.000Z", + "isValid": true, + "sgv": 121, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288ecca0f1be700041e5a0b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653140349000, + "dateString": "2022-05-21T13:39:09.000Z", + "isValid": true, + "sgv": 114, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288eb9d0f1be700041e5a09" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653140049000, + "dateString": "2022-05-21T13:34:09.000Z", + "isValid": true, + "sgv": 105, + "direction": "Flat", + "type": "sgv", + "_id": "6288ea6e0f1be700041e5a06" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653139749000, + "dateString": "2022-05-21T13:29:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "6288e9410f1be700041e5a03" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653139450000, + "dateString": "2022-05-21T13:24:10.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "6288e82c0f1be700041e5a00" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653139150000, + "dateString": "2022-05-21T13:19:10.000Z", + "isValid": true, + "sgv": 93, + "direction": "Flat", + "type": "sgv", + "_id": "6288e7030f1be700041e59fd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653138849000, + "dateString": "2022-05-21T13:14:09.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "6288e5d00f1be700041e59fb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653138549000, + "dateString": "2022-05-21T13:09:09.000Z", + "isValid": true, + "sgv": 95, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288e4900f1be700041e59f8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653138249000, + "dateString": "2022-05-21T13:04:09.000Z", + "isValid": true, + "sgv": 93, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288e3610f1be700041e59f6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653137949000, + "dateString": "2022-05-21T12:59:09.000Z", + "isValid": true, + "sgv": 86, + "direction": "Flat", + "type": "sgv", + "_id": "6288e24c0f1be700041e59f3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653137649000, + "dateString": "2022-05-21T12:54:09.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "_id": "6288e1040f1be700041e59f0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653137350000, + "dateString": "2022-05-21T12:49:10.000Z", + "isValid": true, + "sgv": 72, + "direction": "Flat", + "type": "sgv", + "_id": "6288dfd60f1be700041e59ee" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653137049000, + "dateString": "2022-05-21T12:44:09.000Z", + "isValid": true, + "sgv": 69, + "direction": "Flat", + "type": "sgv", + "_id": "6288df8a0f1be700041e59ec" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653136749000, + "dateString": "2022-05-21T12:39:09.000Z", + "isValid": true, + "sgv": 68, + "direction": "Flat", + "type": "sgv", + "_id": "6288de580f1be700041e59ea" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653136449000, + "dateString": "2022-05-21T12:34:09.000Z", + "isValid": true, + "sgv": 70, + "direction": "Flat", + "type": "sgv", + "_id": "6288dd270f1be700041e59e8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653136149000, + "dateString": "2022-05-21T12:29:09.000Z", + "isValid": true, + "sgv": 73, + "direction": "Flat", + "type": "sgv", + "_id": "6288db8a0f1be700041e59e5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653135849000, + "dateString": "2022-05-21T12:24:09.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "_id": "6288d9fb0f1be700041e59e2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653135549000, + "dateString": "2022-05-21T12:19:09.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "_id": "6288d8e00f1be700041e59e0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653135249000, + "dateString": "2022-05-21T12:14:09.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "_id": "6288d7ae0f1be700041e59de" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653134949000, + "dateString": "2022-05-21T12:09:09.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "_id": "6288d67f0f1be700041e59da" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653134649000, + "dateString": "2022-05-21T12:04:09.000Z", + "isValid": true, + "sgv": 77, + "direction": "Flat", + "type": "sgv", + "_id": "6288d5500f1be700041e59d7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653134349000, + "dateString": "2022-05-21T11:59:09.000Z", + "isValid": true, + "sgv": 76, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288d4220f1be700041e59d5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653134049000, + "dateString": "2022-05-21T11:54:09.000Z", + "isValid": true, + "sgv": 79, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288d3060f1be700041e59d2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653133749000, + "dateString": "2022-05-21T11:49:09.000Z", + "isValid": true, + "sgv": 87, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288d1d80f1be700041e59cf" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653133449000, + "dateString": "2022-05-21T11:44:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "_id": "6288d0a80f1be700041e59cb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653133149000, + "dateString": "2022-05-21T11:39:09.000Z", + "isValid": true, + "sgv": 114, + "direction": "Flat", + "type": "sgv", + "_id": "6288cf770f1be700041e59c8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653132849000, + "dateString": "2022-05-21T11:34:09.000Z", + "isValid": true, + "sgv": 121, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288ce548e9ed800049b39f7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653132549000, + "dateString": "2022-05-21T11:29:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288cd278e9ed800049b39f5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653132249000, + "dateString": "2022-05-21T11:24:09.000Z", + "isValid": true, + "sgv": 109, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "6288cbf98e9ed800049b39f2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653131948000, + "dateString": "2022-05-21T11:19:08.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "6288cacb8e9ed800049b39ec" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653131649000, + "dateString": "2022-05-21T11:14:09.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "_id": "6288c99e8e9ed800049b39e8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653131349000, + "dateString": "2022-05-21T11:09:09.000Z", + "isValid": true, + "sgv": 82, + "direction": "Flat", + "type": "sgv", + "_id": "6288c86f8e9ed800049b39e5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653131049000, + "dateString": "2022-05-21T11:04:09.000Z", + "isValid": true, + "sgv": 81, + "direction": "Flat", + "type": "sgv", + "_id": "6288c7418e9ed800049b39e3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653130748000, + "dateString": "2022-05-21T10:59:08.000Z", + "isValid": true, + "sgv": 84, + "direction": "Flat", + "type": "sgv", + "_id": "6288c61a1991280004dce468" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653130448000, + "dateString": "2022-05-21T10:54:08.000Z", + "isValid": true, + "sgv": 88, + "direction": "Flat", + "type": "sgv", + "_id": "6288c4ec1991280004dce464" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653130149000, + "dateString": "2022-05-21T10:49:09.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "_id": "6288c3be1991280004dce461" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653129848000, + "dateString": "2022-05-21T10:44:08.000Z", + "isValid": true, + "sgv": 93, + "direction": "Flat", + "type": "sgv", + "_id": "6288c2911991280004dce45e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653129548000, + "dateString": "2022-05-21T10:39:08.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "6288c1631991280004dce45b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653129249000, + "dateString": "2022-05-21T10:34:09.000Z", + "isValid": true, + "sgv": 96, + "direction": "Flat", + "type": "sgv", + "_id": "6288c0341991280004dce459" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653128948000, + "dateString": "2022-05-21T10:29:08.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "_id": "6288bf061991280004dce457" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653128649000, + "dateString": "2022-05-21T10:24:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "_id": "6288bde0abbef90004616cf8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653128349000, + "dateString": "2022-05-21T10:19:09.000Z", + "isValid": true, + "sgv": 104, + "direction": "Flat", + "type": "sgv", + "_id": "6288bcb2abbef90004616cf6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653128049000, + "dateString": "2022-05-21T10:14:09.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "_id": "6288bb84abbef90004616cf4" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653127748000, + "dateString": "2022-05-21T10:09:08.000Z", + "isValid": true, + "sgv": 115, + "direction": "Flat", + "type": "sgv", + "_id": "6288ba56abbef90004616cf2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653127449000, + "dateString": "2022-05-21T10:04:09.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "_id": "6288b941abbef90004616cf0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653127149000, + "dateString": "2022-05-21T09:59:09.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "_id": "6288b813abbef90004616ceb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653126849000, + "dateString": "2022-05-21T09:54:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "6288b6e9c9c02c00041f7f06" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653126549000, + "dateString": "2022-05-21T09:49:09.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "_id": "6288b5bbc9c02c00041f7f04" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653126249000, + "dateString": "2022-05-21T09:44:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "6288b48dc9c02c00041f7f02" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653125948000, + "dateString": "2022-05-21T09:39:08.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "6288b35fc9c02c00041f7f00" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653125649000, + "dateString": "2022-05-21T09:34:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "Flat", + "type": "sgv", + "_id": "6288b231c9c02c00041f7efe" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653125349000, + "dateString": "2022-05-21T09:29:09.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "_id": "6288b103c9c02c00041f7efc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653125048000, + "dateString": "2022-05-21T09:24:08.000Z", + "isValid": true, + "sgv": 122, + "direction": "Flat", + "type": "sgv", + "_id": "6288afd5c9c02c00041f7ef8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653124749000, + "dateString": "2022-05-21T09:19:09.000Z", + "isValid": true, + "sgv": 125, + "direction": "Flat", + "type": "sgv", + "_id": "6288aea799fc930004d6bdfb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653124448000, + "dateString": "2022-05-21T09:14:08.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "_id": "6288ad7999fc930004d6bdfa" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653124149000, + "dateString": "2022-05-21T09:09:09.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "_id": "6288ac4b99fc930004d6bdf8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653123849000, + "dateString": "2022-05-21T09:04:09.000Z", + "isValid": true, + "sgv": 113, + "direction": "Flat", + "type": "sgv", + "_id": "6288ab1d99fc930004d6bdf6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653123549000, + "dateString": "2022-05-21T08:59:09.000Z", + "isValid": true, + "sgv": 109, + "direction": "Flat", + "type": "sgv", + "_id": "6288a9f099fc930004d6bdf4" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653123248000, + "dateString": "2022-05-21T08:54:08.000Z", + "isValid": true, + "sgv": 107, + "direction": "Flat", + "type": "sgv", + "_id": "6288a8db99fc930004d6bdf1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653122949000, + "dateString": "2022-05-21T08:49:09.000Z", + "isValid": true, + "sgv": 108, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288a7ad99fc930004d6bdef" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653122649000, + "dateString": "2022-05-21T08:44:09.000Z", + "isValid": true, + "sgv": 111, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288a73099fc930004d6bded" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653122349000, + "dateString": "2022-05-21T08:39:09.000Z", + "isValid": true, + "sgv": 118, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288a55199fc930004d6bdeb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653122049000, + "dateString": "2022-05-21T08:34:09.000Z", + "isValid": true, + "sgv": 128, + "direction": "Flat", + "type": "sgv", + "_id": "6288a42099fc930004d6bde8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653121749000, + "dateString": "2022-05-21T08:29:09.000Z", + "isValid": true, + "sgv": 138, + "direction": "Flat", + "type": "sgv", + "_id": "6288a2fca4cc860004a251d2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653121449000, + "dateString": "2022-05-21T08:24:09.000Z", + "isValid": true, + "sgv": 145, + "direction": "Flat", + "type": "sgv", + "_id": "6288a1cda4cc860004a251d1" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653121149000, + "dateString": "2022-05-21T08:19:09.000Z", + "isValid": true, + "sgv": 147, + "direction": "Flat", + "type": "sgv", + "_id": "6288a09fa4cc860004a251ce" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653120849000, + "dateString": "2022-05-21T08:14:09.000Z", + "isValid": true, + "sgv": 148, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889f6fa4cc860004a251cc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653120548000, + "dateString": "2022-05-21T08:09:08.000Z", + "isValid": true, + "sgv": 146, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889e41a4cc860004a251cb" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653120249000, + "dateString": "2022-05-21T08:04:09.000Z", + "isValid": true, + "sgv": 141, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889d13a4cc860004a251c9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653119949000, + "dateString": "2022-05-21T07:59:09.000Z", + "isValid": true, + "sgv": 132, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889be4a4cc860004a251c7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653119649000, + "dateString": "2022-05-21T07:54:09.000Z", + "isValid": true, + "sgv": 123, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62889ac27ff1e700040f17dc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653119349000, + "dateString": "2022-05-21T07:49:09.000Z", + "isValid": true, + "sgv": 114, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "628899957ff1e700040f17d7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653119049000, + "dateString": "2022-05-21T07:44:09.000Z", + "isValid": true, + "sgv": 105, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "628898627ff1e700040f17d5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653118748000, + "dateString": "2022-05-21T07:39:08.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "_id": "628897357ff1e700040f17d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653118449000, + "dateString": "2022-05-21T07:34:09.000Z", + "isValid": true, + "sgv": 92, + "direction": "Flat", + "type": "sgv", + "_id": "6288961d7ff1e700040f17ce" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653118149000, + "dateString": "2022-05-21T07:29:09.000Z", + "isValid": true, + "sgv": 86, + "direction": "Flat", + "type": "sgv", + "_id": "628894d37ff1e700040f17cd" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653117848000, + "dateString": "2022-05-21T07:24:08.000Z", + "isValid": true, + "sgv": 82, + "direction": "Flat", + "type": "sgv", + "_id": "628893bd7ff1e700040f17c9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653117549000, + "dateString": "2022-05-21T07:19:09.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "628892907ff1e700040f17c7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653117249000, + "dateString": "2022-05-21T07:14:09.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "_id": "628891627ff1e700040f17c6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653116949000, + "dateString": "2022-05-21T07:09:09.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "_id": "62889024149196000412bf57" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653116649000, + "dateString": "2022-05-21T07:04:09.000Z", + "isValid": true, + "sgv": 74, + "direction": "Flat", + "type": "sgv", + "_id": "62888f0f149196000412bf54" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653116349000, + "dateString": "2022-05-21T06:59:09.000Z", + "isValid": true, + "sgv": 70, + "direction": "Flat", + "type": "sgv", + "_id": "62888de2149196000412bf51" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653116049000, + "dateString": "2022-05-21T06:54:09.000Z", + "isValid": true, + "sgv": 69, + "direction": "Flat", + "type": "sgv", + "_id": "62888ccc149196000412bf4f" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653115749000, + "dateString": "2022-05-21T06:49:09.000Z", + "isValid": true, + "sgv": 70, + "direction": "Flat", + "type": "sgv", + "_id": "62888b85149196000412bf4d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653115449000, + "dateString": "2022-05-21T06:44:09.000Z", + "isValid": true, + "sgv": 74, + "direction": "Flat", + "type": "sgv", + "_id": "62888a57149196000412bf4b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653115149000, + "dateString": "2022-05-21T06:39:09.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "_id": "6288892a149196000412bf49" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653114849000, + "dateString": "2022-05-21T06:34:09.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "_id": "628888018ff3530004dc6070" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653114549000, + "dateString": "2022-05-21T06:29:09.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "_id": "628886d28ff3530004dc606b" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653114249000, + "dateString": "2022-05-21T06:24:09.000Z", + "isValid": true, + "sgv": 85, + "direction": "Flat", + "type": "sgv", + "_id": "628885a48ff3530004dc6069" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653113949000, + "dateString": "2022-05-21T06:19:09.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "_id": "628884778ff3530004dc6067" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653113649000, + "dateString": "2022-05-21T06:14:09.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "_id": "6288834a8ff3530004dc6065" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653113349000, + "dateString": "2022-05-21T06:09:09.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "_id": "6288821b8ff3530004dc6062" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653113049000, + "dateString": "2022-05-21T06:04:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "_id": "628880ee8ff3530004dc6060" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653112749000, + "dateString": "2022-05-21T05:59:09.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "_id": "62887fcee964810004aa5666" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653112449000, + "dateString": "2022-05-21T05:54:09.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "_id": "62887ea1e964810004aa5664" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653112148000, + "dateString": "2022-05-21T05:49:08.000Z", + "isValid": true, + "sgv": 103, + "direction": "Flat", + "type": "sgv", + "_id": "62887d72e964810004aa5661" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653111849000, + "dateString": "2022-05-21T05:44:09.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "_id": "62887c44e964810004aa565d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653111549000, + "dateString": "2022-05-21T05:39:09.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "_id": "62887b17e964810004aa565a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653111249000, + "dateString": "2022-05-21T05:34:09.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "_id": "628879e9e964810004aa5657" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653110949000, + "dateString": "2022-05-21T05:29:09.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "_id": "628878bbe964810004aa5655" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653110649000, + "dateString": "2022-05-21T05:24:09.000Z", + "isValid": true, + "sgv": 98, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628877a5363e6c0004f710e0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653110348000, + "dateString": "2022-05-21T05:19:08.000Z", + "isValid": true, + "sgv": 102, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62887677363e6c0004f710de" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653110049000, + "dateString": "2022-05-21T05:14:09.000Z", + "isValid": true, + "sgv": 109, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62887549363e6c0004f710dc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653109748000, + "dateString": "2022-05-21T05:09:08.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "_id": "6288741c363e6c0004f710d9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653109448000, + "dateString": "2022-05-21T05:04:08.000Z", + "isValid": true, + "sgv": 125, + "direction": "Flat", + "type": "sgv", + "_id": "628872ef363e6c0004f710d6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653109148000, + "dateString": "2022-05-21T04:59:08.000Z", + "isValid": true, + "sgv": 129, + "direction": "Flat", + "type": "sgv", + "_id": "628871c1363e6c0004f710d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653108848000, + "dateString": "2022-05-21T04:54:08.000Z", + "isValid": true, + "sgv": 130, + "direction": "Flat", + "type": "sgv", + "_id": "62887093363e6c0004f710cf" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653108548000, + "dateString": "2022-05-21T04:49:08.000Z", + "isValid": true, + "sgv": 128, + "direction": "Flat", + "type": "sgv", + "_id": "62886f5719e2e60004989bbc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653108249000, + "dateString": "2022-05-21T04:44:09.000Z", + "isValid": true, + "sgv": 123, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62886e2919e2e60004989bba" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653107948000, + "dateString": "2022-05-21T04:39:08.000Z", + "isValid": true, + "sgv": 124, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62886cfc19e2e60004989bb8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653107648000, + "dateString": "2022-05-21T04:34:08.000Z", + "isValid": true, + "sgv": 132, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62886be719e2e60004989bb5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653107348000, + "dateString": "2022-05-21T04:29:08.000Z", + "isValid": true, + "sgv": 144, + "direction": "Flat", + "type": "sgv", + "_id": "62886ab919e2e60004989bb3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653107048000, + "dateString": "2022-05-21T04:24:08.000Z", + "isValid": true, + "sgv": 153, + "direction": "Flat", + "type": "sgv", + "_id": "6288698b19e2e60004989bb0" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653106749000, + "dateString": "2022-05-21T04:19:09.000Z", + "isValid": true, + "sgv": 157, + "direction": "Flat", + "type": "sgv", + "_id": "6288685d19e2e60004989bac" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653106449000, + "dateString": "2022-05-21T04:14:09.000Z", + "isValid": true, + "sgv": 155, + "direction": "Flat", + "type": "sgv", + "_id": "6288672f42c1220004f9573a" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653106149000, + "dateString": "2022-05-21T04:09:09.000Z", + "isValid": true, + "sgv": 151, + "direction": "Flat", + "type": "sgv", + "_id": "6288660142c1220004f95736" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653105848000, + "dateString": "2022-05-21T04:04:08.000Z", + "isValid": true, + "sgv": 146, + "direction": "Flat", + "type": "sgv", + "_id": "628864d342c1220004f95733" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653105549000, + "dateString": "2022-05-21T03:59:09.000Z", + "isValid": true, + "sgv": 146, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "628863a542c1220004f95730" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653105248000, + "dateString": "2022-05-21T03:54:08.000Z", + "isValid": true, + "sgv": 149, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288629042c1220004f9572e" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653104949000, + "dateString": "2022-05-21T03:49:09.000Z", + "isValid": true, + "sgv": 155, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288614942c1220004f9572c" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653104648000, + "dateString": "2022-05-21T03:44:08.000Z", + "isValid": true, + "sgv": 162, + "direction": "Flat", + "type": "sgv", + "_id": "6288601b42c1220004f95729" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653104349000, + "dateString": "2022-05-21T03:39:09.000Z", + "isValid": true, + "sgv": 167, + "direction": "Flat", + "type": "sgv", + "_id": "62885ef1293f3e00042c31e2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653104049000, + "dateString": "2022-05-21T03:34:09.000Z", + "isValid": true, + "sgv": 170, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62885dc3293f3e00042c31de" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653103748000, + "dateString": "2022-05-21T03:29:08.000Z", + "isValid": true, + "sgv": 171, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "62885c95293f3e00042c31db" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653103448000, + "dateString": "2022-05-21T03:24:08.000Z", + "isValid": true, + "sgv": 174, + "direction": "SingleDown", + "type": "sgv", + "_id": "62885b81293f3e00042c31d9" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653103149000, + "dateString": "2022-05-21T03:19:09.000Z", + "isValid": true, + "sgv": 182, + "direction": "SingleDown", + "type": "sgv", + "_id": "62885a52293f3e00042c31d7" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653102848000, + "dateString": "2022-05-21T03:14:08.000Z", + "isValid": true, + "sgv": 193, + "direction": "SingleDown", + "type": "sgv", + "_id": "62885924293f3e00042c31d5" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653102548000, + "dateString": "2022-05-21T03:09:08.000Z", + "isValid": true, + "sgv": 204, + "direction": "SingleDown", + "type": "sgv", + "_id": "628857f7293f3e00042c31d3" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653102249000, + "dateString": "2022-05-21T03:04:09.000Z", + "isValid": true, + "sgv": 216, + "direction": "SingleDown", + "type": "sgv", + "_id": "628856da5151b5000462a1ea" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653101948000, + "dateString": "2022-05-21T02:59:08.000Z", + "isValid": true, + "sgv": 228, + "direction": "SingleDown", + "type": "sgv", + "_id": "628855935151b5000462a1e8" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653101648000, + "dateString": "2022-05-21T02:54:08.000Z", + "isValid": true, + "sgv": 241, + "direction": "SingleDown", + "type": "sgv", + "_id": "6288547f5151b5000462a1e6" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653101348000, + "dateString": "2022-05-21T02:49:08.000Z", + "isValid": true, + "sgv": 253, + "direction": "SingleDown", + "type": "sgv", + "_id": "628853395151b5000462a1e4" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653101048000, + "dateString": "2022-05-21T02:44:08.000Z", + "isValid": true, + "sgv": 267, + "direction": "FortyFiveDown", + "type": "sgv", + "_id": "6288520b5151b5000462a1e2" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653100748000, + "dateString": "2022-05-21T02:39:08.000Z", + "isValid": true, + "sgv": 283, + "direction": "Flat", + "type": "sgv", + "_id": "628850de5151b5000462a1df" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653100449000, + "dateString": "2022-05-21T02:34:09.000Z", + "isValid": true, + "sgv": 297, + "direction": "Flat", + "type": "sgv", + "_id": "62884fb05151b5000462a1dc" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653100148000, + "dateString": "2022-05-21T02:29:08.000Z", + "isValid": true, + "sgv": 307, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62884e9493668c0004a30517" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653099848000, + "dateString": "2022-05-21T02:24:08.000Z", + "isValid": true, + "sgv": 308, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62884d6793668c0004a30514" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653099548000, + "dateString": "2022-05-21T02:19:08.000Z", + "isValid": true, + "sgv": 296, + "direction": "FortyFiveUp", + "type": "sgv", + "_id": "62884c3993668c0004a30510" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653099249000, + "dateString": "2022-05-21T02:14:09.000Z", + "isValid": true, + "sgv": 282, + "direction": "Flat", + "type": "sgv", + "_id": "62884b0c93668c0004a3050d" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653098948000, + "dateString": "2022-05-21T02:09:08.000Z", + "isValid": true, + "sgv": 271, + "direction": "Flat", + "type": "sgv", + "_id": "628849de93668c0004a30508" + }, + { + "device": "AndroidAPS-DexcomG6", + "date": 1653098648000, + "dateString": "2022-05-21T02:04:08.000Z", + "isValid": true, + "sgv": 271, + "direction": "Flat", + "type": "sgv", + "_id": "628848b093668c0004a30504" + } +] diff --git a/app/src/test/res/autotune/test3/aaps-treatments.2022-05-21.json b/app/src/test/res/autotune/test3/aaps-treatments.2022-05-21.json new file mode 100644 index 0000000000..b271cc80e4 --- /dev/null +++ b/app/src/test/res/autotune/test3/aaps-treatments.2022-05-21.json @@ -0,0 +1,3146 @@ +[ + { + "created_at": "2022-05-22T02:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 635539, + "type": "NORMAL", + "rate": 0.0742, + "percent": -90, + "pumpId": 454016, + "endId": 454021, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289982461a8290004740387" + }, + { + "created_at": "2022-05-22T01:55:40.718Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 259282, + "type": "NORMAL", + "rate": 0.0824, + "percent": -90, + "pumpId": 454016, + "endId": 454021, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289982461a8290004740387" + }, + { + "created_at": "2022-05-22T01:50:36.118Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303106, + "type": "NORMAL", + "rate": 0.1648, + "percent": -80, + "pumpId": 454013, + "endId": 454015, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628996f661a8290004740384" + }, + { + "created_at": "2022-05-22T01:45:35.222Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299405, + "type": "NORMAL", + "rate": 0.49439999999999995, + "percent": -40, + "pumpId": 454010, + "endId": 454012, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628995c761a8290004740381" + }, + { + "created_at": "2022-05-22T01:40:51.929Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 281796, + "type": "NORMAL", + "rate": 0.6592, + "percent": -20, + "pumpId": 454007, + "endId": 454009, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628994ab50e51d0004429e6f" + }, + { + "created_at": "2022-05-22T01:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 40, + "durationInMilliseconds": 2449437, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 454003, + "endId": 454006, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628988efda46aa0004d1e0f7" + }, + { + "created_at": "2022-05-22T00:50:32.326Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 567674, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 454003, + "endId": 454006, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628988efda46aa0004d1e0f7" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-22T00:45:47.966Z", + "date": 1653180347966, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21574, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628987c0da46aa0004d1e0f3" + }, + { + "created_at": "2022-05-22T00:45:45.232Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285608, + "type": "NORMAL", + "rate": 1.209, + "percent": 50, + "pumpId": 453998, + "endId": 454002, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628987c0da46aa0004d1e0f4" + }, + { + "created_at": "2022-05-22T00:35:30.702Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 613035, + "type": "NORMAL", + "rate": 1.0478, + "percent": 30, + "pumpId": 453995, + "endId": 453997, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62898563da46aa0004d1e0ec" + }, + { + "created_at": "2022-05-22T00:30:42.142Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 287064, + "type": "NORMAL", + "rate": 0.7254, + "percent": -10, + "pumpId": 453992, + "endId": 453994, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628984439d6f1800047cd0df" + }, + { + "created_at": "2022-05-22T00:20:44.045Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 595609, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453989, + "endId": 453991, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628981e59d6f1800047cd0da" + }, + { + "created_at": "2022-05-22T00:10:28.057Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 614498, + "type": "NORMAL", + "rate": 0.403, + "percent": -50, + "pumpId": 453986, + "endId": 453988, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897f879d6f1800047cd0d5" + }, + { + "created_at": "2022-05-22T00:06:13.096Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 252465, + "type": "NORMAL", + "rate": 0.403, + "percent": -50, + "pumpId": 453983, + "endId": 453985, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897e8b9d6f1800047cd0d2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-22T00:00:34.526Z", + "date": 1653177634526, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21573, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897d299d6f1800047cd0cd" + }, + { + "created_at": "2022-05-22T00:00:31.592Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 340013, + "type": "NORMAL", + "rate": 0.5642, + "percent": -30, + "pumpId": 453978, + "endId": 453982, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897d299d6f1800047cd0cf" + }, + { + "created_at": "2022-05-22T00:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 30096, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453974, + "endId": 453977, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897c139d6f1800047cd0ca" + }, + { + "created_at": "2022-05-21T23:55:56.658Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 243342, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453974, + "endId": 453977, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897c139d6f1800047cd0ca" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.54, + "created_at": "2022-05-21T23:50:30.757Z", + "date": 1653177030757, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21572, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62897ad171a363000480abcb" + }, + { + "created_at": "2022-05-21T23:46:13.228Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 573000, + "type": "FAKE_EXTENDED", + "rate": 2.561162303664922, + "absolute": 2.561162303664922, + "pumpId": 21571, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628979d571a363000480abc9" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-21T23:40:59.180Z", + "date": 1653176459180, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21570, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289788d71a363000480abc4" + }, + { + "created_at": "2022-05-21T23:40:57.936Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304306, + "type": "NORMAL", + "rate": 1.6842000000000001, + "percent": 110, + "pumpId": 453959, + "endId": 453963, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289788e71a363000480abc6" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-21T23:20:51.857Z", + "date": 1653175251857, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21569, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628973eb71a363000480abba" + }, + { + "created_at": "2022-05-21T23:16:23.121Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1472326, + "type": "NORMAL", + "rate": 1.1228, + "percent": 40, + "pumpId": 453954, + "endId": 453958, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628972de37d09a00043f2b24" + }, + { + "created_at": "2022-05-21T23:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 16, + "durationInMilliseconds": 983121, + "type": "NORMAL", + "rate": 0.802, + "percent": 0, + "_id": "neutral_1653171415806" + }, + { + "created_at": "2022-05-21T22:16:55.806Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 43, + "durationInMilliseconds": 2584194, + "type": "NORMAL", + "rate": 0.795, + "percent": 0, + "_id": "neutral_1653171415806" + }, + { + "created_at": "2022-05-21T22:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 16, + "durationInMilliseconds": 1015806, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453943, + "endId": 453951, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628957129bf1e6000482ff9a" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-21T21:24:43.261Z", + "date": 1653168283261, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21568, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628958a49bf1e6000482ff9c" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-21T21:17:49.628Z", + "date": 1653167869628, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21567, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628957109bf1e6000482ff99" + }, + { + "created_at": "2022-05-21T21:17:43.507Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 42, + "durationInMilliseconds": 2536493, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453943, + "endId": 453951, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628957129bf1e6000482ff9a" + }, + { + "created_at": "2022-05-21T21:10:55.350Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 6, + "durationInMilliseconds": 406671, + "type": "NORMAL", + "rate": 1.0049000000000001, + "percent": 30, + "pumpId": 453940, + "endId": 453942, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628955629bf1e6000482ff94" + }, + { + "created_at": "2022-05-21T21:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 653862, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453936, + "endId": 453939, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894e5580fc7e00041b22a2" + }, + { + "created_at": "2022-05-21T20:40:34.976Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1165024, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453936, + "endId": 453939, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894e5580fc7e00041b22a2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-21T20:30:40.892Z", + "date": 1653165040892, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21566, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894bf780fc7e00041b229d" + }, + { + "created_at": "2022-05-21T20:25:40.930Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 891567, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453931, + "endId": 453935, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894aca4493460004e63a3a" + }, + { + "eventType": "Meal Bolus", + "insulin": 9.4, + "created_at": "2022-05-21T20:19:54.209Z", + "date": 1653164394209, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21565, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628949824493460004e63a35" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-21T20:11:04.953Z", + "date": 1653163864953, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21564, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628947704493460004e63a30" + }, + { + "created_at": "2022-05-21T20:11:03.814Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 874625, + "type": "NORMAL", + "rate": 1.2563, + "percent": 70, + "pumpId": 453924, + "endId": 453930, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628947574493460004e63a2f" + }, + { + "created_at": "2022-05-21T20:00:37.912Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 623413, + "type": "NORMAL", + "rate": 0.9606999999999999, + "percent": 30, + "pumpId": 453921, + "endId": 453923, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628944fa4493460004e63a29" + }, + { + "created_at": "2022-05-21T20:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 35425, + "type": "NORMAL", + "rate": 0.2956, + "percent": -60, + "pumpId": 453917, + "endId": 453920, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894164598f780004bb3b2f" + }, + { + "created_at": "2022-05-21T19:45:25.759Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 874241, + "type": "NORMAL", + "rate": 0.2888, + "percent": -60, + "pumpId": 453917, + "endId": 453920, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62894164598f780004bb3b2f" + }, + { + "created_at": "2022-05-21T19:25:47.539Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1175731, + "type": "NORMAL", + "rate": 0.43320000000000003, + "percent": -40, + "pumpId": 453914, + "endId": 453916, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62893cc8598f780004bb3b25" + }, + { + "created_at": "2022-05-21T19:20:54.174Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293365, + "type": "NORMAL", + "rate": 0.722, + "percent": 0, + "_id": "neutral_1653160854174" + }, + { + "created_at": "2022-05-21T19:10:51.515Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 602659, + "type": "NORMAL", + "rate": 0.7942, + "percent": 10, + "pumpId": 453908, + "endId": 453910, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289394a22fbc8000495b821" + }, + { + "created_at": "2022-05-21T19:01:01.322Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 588703, + "type": "NORMAL", + "rate": 0.2888, + "percent": -60, + "pumpId": 453905, + "endId": 453907, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628936ef22fbc8000495b81c" + }, + { + "created_at": "2022-05-21T19:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 59826, + "type": "NORMAL", + "rate": 0.7942, + "percent": 10, + "pumpId": 453900, + "endId": 453904, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289349522fbc8000495b816" + }, + { + "created_at": "2022-05-21T18:50:58.216Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 541784, + "type": "NORMAL", + "rate": 0.77, + "percent": 10, + "pumpId": 453900, + "endId": 453904, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289349522fbc8000495b816" + }, + { + "created_at": "2022-05-21T18:46:12.499Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285717, + "type": "NORMAL", + "rate": 0.7, + "percent": 0, + "_id": "neutral_1653158772499" + }, + { + "created_at": "2022-05-21T18:30:30.651Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 941848, + "type": "NORMAL", + "rate": 0.91, + "percent": 30, + "pumpId": 453894, + "endId": 453896, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62892fda840d8d0004a20bfc" + }, + { + "created_at": "2022-05-21T18:20:44.275Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 584884, + "type": "NORMAL", + "rate": 0.28, + "percent": -60, + "pumpId": 453891, + "endId": 453893, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62892d80840d8d0004a20bf7" + }, + { + "created_at": "2022-05-21T18:15:30.389Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 312398, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453888, + "endId": 453890, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62892c52840d8d0004a20bf4" + }, + { + "created_at": "2022-05-21T18:00:33.832Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 895066, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453885, + "endId": 453887, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628928ca8809e60004c644e8" + }, + { + "created_at": "2022-05-21T18:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 32345, + "type": "NORMAL", + "rate": 0.35, + "percent": -50, + "pumpId": 453881, + "endId": 453884, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628927b58809e60004c644e5" + }, + { + "created_at": "2022-05-21T17:55:44.739Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 255261, + "type": "NORMAL", + "rate": 0.3295, + "percent": -50, + "pumpId": 453881, + "endId": 453884, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628927b58809e60004c644e5" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-21T17:45:48.032Z", + "date": 1653155148032, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21563, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628925588809e60004c644de" + }, + { + "created_at": "2022-05-21T17:45:45.750Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 597498, + "type": "NORMAL", + "rate": 1.5816, + "percent": 140, + "pumpId": 453876, + "endId": 453880, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628925588809e60004c644e0" + }, + { + "created_at": "2022-05-21T17:40:44.874Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299386, + "type": "NORMAL", + "rate": 0.8567, + "percent": 30, + "pumpId": 453873, + "endId": 453875, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289242b8809e60004c644db" + }, + { + "created_at": "2022-05-21T17:35:46.611Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 295766, + "type": "NORMAL", + "rate": 0.3295, + "percent": -50, + "pumpId": 453870, + "endId": 453872, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628922fe8809e60004c644d8" + }, + { + "created_at": "2022-05-21T17:25:37.912Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 607206, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453867, + "endId": 453869, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628920a41090500004ca4729" + }, + { + "created_at": "2022-05-21T17:20:42.063Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293355, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453864, + "endId": 453866, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62891f771090500004ca4726" + }, + { + "created_at": "2022-05-21T17:10:30.971Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 608601, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453861, + "endId": 453863, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62891d1b1090500004ca4721" + }, + { + "created_at": "2022-05-21T17:00:45.815Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 582673, + "type": "NORMAL", + "rate": 0.0659, + "percent": -90, + "pumpId": 453858, + "endId": 453860, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62891ac01090500004ca471c" + }, + { + "created_at": "2022-05-21T17:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 43325, + "type": "NORMAL", + "rate": 1.4498000000000002, + "percent": 120, + "pumpId": 453852, + "endId": 453857, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628918711090500004ca4716" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-21T16:55:53.346Z", + "date": 1653152153346, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21562, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289199e1090500004ca4718" + }, + { + "created_at": "2022-05-21T16:50:50.998Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 549002, + "type": "NORMAL", + "rate": 1.4322, + "percent": 120, + "pumpId": 453852, + "endId": 453857, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628918711090500004ca4716" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-21T16:45:50.105Z", + "date": 1653151550105, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21561, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628917431090500004ca4711" + }, + { + "created_at": "2022-05-21T16:45:47.200Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300314, + "type": "NORMAL", + "rate": 1.0415999999999999, + "percent": 60, + "pumpId": 453847, + "endId": 453851, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628917431090500004ca4713" + }, + { + "created_at": "2022-05-21T16:40:54.765Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 290944, + "type": "NORMAL", + "rate": 0.8463, + "percent": 30, + "pumpId": 453844, + "endId": 453846, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289161c1090500004ca470e" + }, + { + "created_at": "2022-05-21T16:35:35.684Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 317593, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453841, + "endId": 453843, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628914eb1090500004ca470b" + }, + { + "created_at": "2022-05-21T16:30:39.072Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 295126, + "type": "NORMAL", + "rate": 0.06509999999999999, + "percent": -90, + "pumpId": 453838, + "endId": 453840, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628913c01090500004ca4708" + }, + { + "created_at": "2022-05-21T16:25:35.342Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 301235, + "type": "NORMAL", + "rate": 0.06509999999999999, + "percent": -90, + "pumpId": 453835, + "endId": 453837, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628913141090500004ca4705" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-21T16:20:30.382Z", + "date": 1653150030382, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21560, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6289130f1090500004ca4700" + }, + { + "created_at": "2022-05-21T16:20:27.375Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 306478, + "type": "NORMAL", + "rate": 1.0415999999999999, + "percent": 60, + "pumpId": 453830, + "endId": 453834, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628913101090500004ca4702" + }, + { + "created_at": "2022-05-21T16:11:20.186Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 545699, + "type": "NORMAL", + "rate": 0.32550000000000007, + "percent": -50, + "pumpId": 453827, + "endId": 453829, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890f811090500004ca46fc" + }, + { + "created_at": "2022-05-21T16:06:52.798Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 265903, + "type": "NORMAL", + "rate": 0.26039999999999996, + "percent": -60, + "pumpId": 453824, + "endId": 453826, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890e29cf7ee10004a2b1e1" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-21T16:01:01.819Z", + "date": 1653148861819, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21559, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890cc9cf7ee10004a2b1dc" + }, + { + "created_at": "2022-05-21T16:00:58.172Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 344000, + "type": "FAKE_EXTENDED", + "rate": 1.9068139534883721, + "absolute": 1.9068139534883721, + "pumpId": 21558, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890cc9cf7ee10004a2b1dd" + }, + { + "created_at": "2022-05-21T16:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 46830, + "type": "NORMAL", + "rate": 0.06509999999999999, + "percent": -90, + "pumpId": 453811, + "endId": 453814, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890b82cf7ee10004a2b1d9" + }, + { + "created_at": "2022-05-21T15:55:39.147Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 260853, + "type": "NORMAL", + "rate": 0.0673, + "percent": -90, + "pumpId": 453811, + "endId": 453814, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890b82cf7ee10004a2b1d9" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-21T15:51:00.932Z", + "date": 1653148260932, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21557, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890a6dcf7ee10004a2b1d4" + }, + { + "created_at": "2022-05-21T15:50:58.818Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 278838, + "type": "NORMAL", + "rate": 1.1441000000000001, + "percent": 70, + "pumpId": 453806, + "endId": 453810, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890a6ecf7ee10004a2b1d6" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-21T15:40:59.961Z", + "date": 1653147659961, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21556, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890811cf7ee10004a2b1cf" + }, + { + "created_at": "2022-05-21T15:35:20.343Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 935989, + "type": "NORMAL", + "rate": 1.0095, + "percent": 50, + "pumpId": 453800, + "endId": 453805, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628906e3cf7ee10004a2b1cc" + }, + { + "created_at": "2022-05-21T15:31:00.492Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 258353, + "type": "NORMAL", + "rate": 0.0673, + "percent": -90, + "pumpId": 453797, + "endId": 453799, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628905b6c9346b0004863368" + }, + { + "created_at": "2022-05-21T15:25:55.840Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303154, + "type": "NORMAL", + "rate": 0.3365000000000001, + "percent": -50, + "pumpId": 453794, + "endId": 453796, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62890488c9346b0004863365" + }, + { + "created_at": "2022-05-21T15:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1553350, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453790, + "endId": 453793, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288fa1b0e0c880004d58de2" + }, + { + "created_at": "2022-05-21T14:41:07.802Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 18, + "durationInMilliseconds": 1132198, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453790, + "endId": 453793, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288fa1b0e0c880004d58de2" + }, + { + "created_at": "2022-05-21T14:30:59.772Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 605542, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453787, + "endId": 453789, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288f7a60e0c880004d58ddd" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-21T14:25:43.954Z", + "date": 1653143143954, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21555, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288f6770e0c880004d58dd9" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.78, + "created_at": "2022-05-21T14:15:46.926Z", + "date": 1653142546926, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21554, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288f4152634cd0004296072" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.86, + "created_at": "2022-05-21T14:05:34.493Z", + "date": 1653141934493, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21553, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288f1b82634cd000429606d" + }, + { + "created_at": "2022-05-21T14:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 30, + "durationInMilliseconds": 1857281, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453769, + "endId": 453786, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e8910f1be700041e5a02" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.58, + "created_at": "2022-05-21T13:55:47.615Z", + "date": 1653141347615, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21552, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288ef752634cd0004296068" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.98, + "created_at": "2022-05-21T13:45:57.753Z", + "date": 1653140757753, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21551, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288ed160f1be700041e5a0c" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.6, + "created_at": "2022-05-21T13:36:02.971Z", + "date": 1653140162971, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21550, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288ead30f1be700041e5a08" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.58, + "created_at": "2022-05-21T13:30:42.515Z", + "date": 1653139842515, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21549, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e98c0f1be700041e5a04" + }, + { + "created_at": "2022-05-21T13:26:18.959Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 33, + "durationInMilliseconds": 2021041, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453769, + "endId": 453786, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e8910f1be700041e5a02" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.74, + "created_at": "2022-05-21T13:10:43.719Z", + "date": 1653138643719, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21548, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e5520f1be700041e59f9" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.04, + "created_at": "2022-05-21T13:00:56.399Z", + "date": 1653138056399, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21547, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e2970f1be700041e59f4" + }, + { + "created_at": "2022-05-21T13:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 26, + "durationInMilliseconds": 1576482, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453759, + "endId": 453768, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288da470f1be700041e59e4" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.24, + "created_at": "2022-05-21T12:55:30.825Z", + "date": 1653137730825, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21546, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288e1500f1be700041e59f1" + }, + { + "created_at": "2022-05-21T12:25:26.042Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 34, + "durationInMilliseconds": 2073958, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453759, + "endId": 453768, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288da470f1be700041e59e4" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-21T12:10:34.513Z", + "date": 1653135034513, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21545, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288d6ca0f1be700041e59db" + }, + { + "created_at": "2022-05-21T12:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1523557, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453752, + "endId": 453758, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288cc5d8e9ed800049b39f4" + }, + { + "created_at": "2022-05-21T11:26:10.112Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 33, + "durationInMilliseconds": 2029888, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453752, + "endId": 453758, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288cc5d8e9ed800049b39f4" + }, + { + "eventType": "Meal Bolus", + "insulin": 8.22, + "created_at": "2022-05-21T11:23:36.043Z", + "date": 1653132216043, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21544, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288cbc78e9ed800049b39ef" + }, + { + "created_at": "2022-05-21T11:21:02.281Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299000, + "type": "FAKE_EXTENDED", + "rate": 1.6932107023411371, + "absolute": 1.6932107023411371, + "pumpId": 21543, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288cb308e9ed800049b39ee" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-21T11:15:45.765Z", + "date": 1653131745765, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21542, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c9e98e9ed800049b39e9" + }, + { + "created_at": "2022-05-21T11:15:43.070Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 308169, + "type": "NORMAL", + "rate": 1.533, + "percent": 110, + "pumpId": 453738, + "endId": 453742, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c9e98e9ed800049b39eb" + }, + { + "created_at": "2022-05-21T11:10:35.181Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 305390, + "type": "NORMAL", + "rate": 0.073, + "percent": -90, + "pumpId": 453735, + "endId": 453737, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c8bb8e9ed800049b39e7" + }, + { + "created_at": "2022-05-21T11:00:50.721Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 582968, + "type": "NORMAL", + "rate": 0.21899999999999997, + "percent": -70, + "pumpId": 453732, + "endId": 453734, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c6661991280004dce46a" + }, + { + "created_at": "2022-05-21T11:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 49281, + "type": "NORMAL", + "rate": 1.022, + "percent": 40, + "pumpId": 453728, + "endId": 453731, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c5381991280004dce466" + }, + { + "created_at": "2022-05-21T10:55:43.162Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 256838, + "type": "NORMAL", + "rate": 1.0248, + "percent": 40, + "pumpId": 453728, + "endId": 453731, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c5381991280004dce466" + }, + { + "created_at": "2022-05-21T10:50:29.463Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 312203, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453725, + "endId": 453727, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c40a1991280004dce463" + }, + { + "created_at": "2022-05-21T10:45:42.010Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285961, + "type": "NORMAL", + "rate": 0.0732, + "percent": -90, + "pumpId": 453722, + "endId": 453724, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c2dd1991280004dce460" + }, + { + "created_at": "2022-05-21T10:40:32.888Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 306629, + "type": "NORMAL", + "rate": 0.2928, + "percent": -60, + "pumpId": 453719, + "endId": 453721, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288c1ae1991280004dce45d" + }, + { + "created_at": "2022-05-21T10:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 40, + "durationInMilliseconds": 2430396, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453715, + "endId": 453718, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288b09fc9c02c00041f7efb" + }, + { + "created_at": "2022-05-21T09:27:51.738Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 32, + "durationInMilliseconds": 1928262, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453715, + "endId": 453718, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288b09fc9c02c00041f7efb" + }, + { + "created_at": "2022-05-21T09:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 27, + "durationInMilliseconds": 1670246, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453708, + "endId": 453714, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288a50699fc930004d6bdea" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-21T08:58:07.216Z", + "date": 1653123487216, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21541, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288a9a499fc930004d6bdf2" + }, + { + "created_at": "2022-05-21T08:38:27.621Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 21, + "durationInMilliseconds": 1292379, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453708, + "endId": 453714, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288a50699fc930004d6bdea" + }, + { + "created_at": "2022-05-21T08:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 38, + "durationInMilliseconds": 2306129, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453704, + "endId": 453707, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62889bb2a4cc860004a251c6" + }, + { + "created_at": "2022-05-21T07:58:04.003Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 1, + "durationInMilliseconds": 115997, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453704, + "endId": 453707, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62889bb2a4cc860004a251c6" + }, + { + "eventType": "Meal Bolus", + "insulin": 13.56, + "created_at": "2022-05-21T07:52:52.394Z", + "date": 1653119572394, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21540, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62889a5d7ff1e700040f17d9" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-21T07:38:42.955Z", + "date": 1653118722955, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21539, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288971c7ff1e700040f17d2" + }, + { + "created_at": "2022-05-21T07:38:40.317Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1153999, + "type": "FAKE_EXTENDED", + "rate": 2.251401644195532, + "absolute": 2.251401644195532, + "pumpId": 21538, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628897027ff1e700040f17d0" + }, + { + "created_at": "2022-05-21T07:28:33.763Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 595482, + "type": "NORMAL", + "rate": 0.377, + "percent": -50, + "pumpId": 453689, + "endId": 453691, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628894a17ff1e700040f17cc" + }, + { + "created_at": "2022-05-21T07:13:06.679Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 924592, + "type": "NORMAL", + "rate": 0.2262, + "percent": -70, + "pumpId": 453686, + "endId": 453688, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62889106149196000412bf59" + }, + { + "created_at": "2022-05-21T07:08:35.905Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 269284, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453683, + "endId": 453685, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288900b149196000412bf56" + }, + { + "created_at": "2022-05-21T07:03:41.224Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 292184, + "type": "NORMAL", + "rate": 0.0754, + "percent": -90, + "pumpId": 453680, + "endId": 453682, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62888edd149196000412bf53" + }, + { + "created_at": "2022-05-21T07:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 3, + "durationInMilliseconds": 219733, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453676, + "endId": 453679, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628887058ff3530004dc606e" + }, + { + "created_at": "2022-05-21T06:30:07.195Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1792805, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453676, + "endId": 453679, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628887058ff3530004dc606e" + }, + { + "created_at": "2022-05-21T06:12:44.359Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 17, + "durationInMilliseconds": 1041347, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453673, + "endId": 453675, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628882e48ff3530004dc6064" + }, + { + "created_at": "2022-05-21T06:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 12, + "durationInMilliseconds": 762867, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453669, + "endId": 453672, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887ea0e964810004aa5663" + }, + { + "created_at": "2022-05-21T05:54:16.341Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 343659, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453669, + "endId": 453672, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887ea0e964810004aa5663" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.44, + "created_at": "2022-05-21T05:47:59.042Z", + "date": 1653112079042, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21537, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887d27e964810004aa5660" + }, + { + "created_at": "2022-05-21T05:47:56.189Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 6, + "durationInMilliseconds": 371000, + "type": "FAKE_EXTENDED", + "rate": 3.305911051212938, + "absolute": 3.305911051212938, + "pumpId": 21536, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887d0ee964810004aa565f" + }, + { + "created_at": "2022-05-21T05:42:45.087Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299481, + "type": "NORMAL", + "rate": 0.8613000000000001, + "percent": 10, + "pumpId": 453657, + "endId": 453659, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887be0e964810004aa565c" + }, + { + "created_at": "2022-05-21T05:37:33.183Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 309411, + "type": "NORMAL", + "rate": 0.0783, + "percent": -90, + "pumpId": 453654, + "endId": 453656, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62887ab2e964810004aa5659" + }, + { + "created_at": "2022-05-21T05:12:51.790Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1479904, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453651, + "endId": 453653, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628874e5363e6c0004f710db" + }, + { + "created_at": "2022-05-21T05:07:46.012Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304280, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453648, + "endId": 453650, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628873b8363e6c0004f710d8" + }, + { + "created_at": "2022-05-21T05:02:53.773Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289742, + "type": "NORMAL", + "rate": 0.1566, + "percent": -80, + "pumpId": 453645, + "endId": 453647, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288728a363e6c0004f710d5" + }, + { + "created_at": "2022-05-21T05:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 171279, + "type": "NORMAL", + "rate": 1.5659999999999998, + "percent": 100, + "pumpId": 453639, + "endId": 453644, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288715d363e6c0004f710d2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-21T04:57:53.298Z", + "date": 1653109073298, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21535, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288715c363e6c0004f710d1" + }, + { + "created_at": "2022-05-21T04:57:50.147Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 129853, + "type": "NORMAL", + "rate": 1.472, + "percent": 100, + "pumpId": 453639, + "endId": 453644, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288715d363e6c0004f710d2" + }, + { + "created_at": "2022-05-21T04:52:45.360Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303299, + "type": "NORMAL", + "rate": 1.0304, + "percent": 40, + "pumpId": 453636, + "endId": 453638, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288702f363e6c0004f710ce" + }, + { + "created_at": "2022-05-21T04:37:34.478Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 909400, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453633, + "endId": 453635, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62886c9719e2e60004989bb7" + }, + { + "created_at": "2022-05-21T04:27:51.392Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 581589, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453630, + "endId": 453632, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62886a5519e2e60004989bb2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-21T04:23:04.285Z", + "date": 1653106984285, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21534, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288694019e2e60004989baf" + }, + { + "created_at": "2022-05-21T04:23:00.631Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289268, + "type": "NORMAL", + "rate": 0.4416, + "percent": -40, + "pumpId": 453625, + "endId": 453629, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288692719e2e60004989bae" + }, + { + "created_at": "2022-05-21T04:18:00.399Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 291000, + "type": "FAKE_EXTENDED", + "rate": 3.210226804123711, + "absolute": 3.210226804123711, + "pumpId": 21533, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288681219e2e60004989bab" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.66, + "created_at": "2022-05-21T04:13:03.102Z", + "date": 1653106383102, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21532, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628866e342c1220004f95738" + }, + { + "created_at": "2022-05-21T04:13:00.412Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299987, + "type": "FAKE_EXTENDED", + "rate": 3.3759999999999994, + "absolute": 3.3759999999999994, + "pumpId": 21531, + "endId": 21533, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628866e342c1220004f95739" + }, + { + "created_at": "2022-05-21T04:07:39.846Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 307758, + "type": "NORMAL", + "rate": 1.0304, + "percent": 40, + "pumpId": 453609, + "endId": 453611, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288659d42c1220004f95735" + }, + { + "created_at": "2022-05-21T04:02:57.240Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 280112, + "type": "NORMAL", + "rate": 0.368, + "percent": -50, + "pumpId": 453606, + "endId": 453608, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288648842c1220004f95732" + }, + { + "created_at": "2022-05-21T04:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 175749, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453602, + "endId": 453605, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628860fe42c1220004f9572b" + }, + { + "created_at": "2022-05-21T03:47:49.532Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 12, + "durationInMilliseconds": 730468, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453602, + "endId": 453605, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628860fe42c1220004f9572b" + }, + { + "created_at": "2022-05-21T03:43:04.365Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 283670, + "type": "NORMAL", + "rate": 0.7001999999999999, + "percent": -10, + "pumpId": 453599, + "endId": 453601, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62885fcf42c1220004f95728" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.52, + "created_at": "2022-05-21T03:38:07.812Z", + "date": 1653104287812, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21530, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62885ea5293f3e00042c31e0" + }, + { + "created_at": "2022-05-21T03:38:05.030Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 290000, + "type": "FAKE_EXTENDED", + "rate": 3.2607586206896553, + "absolute": 3.2607586206896553, + "pumpId": 21529, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62885ea5293f3e00042c31e1" + }, + { + "created_at": "2022-05-21T03:32:50.531Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303634, + "type": "NORMAL", + "rate": 0.2334, + "percent": -70, + "pumpId": 453587, + "endId": 453589, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62885d78293f3e00042c31dd" + }, + { + "created_at": "2022-05-21T03:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 32, + "durationInMilliseconds": 1969040, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453583, + "endId": 453586, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628851a75151b5000462a1e1" + }, + { + "created_at": "2022-05-21T02:42:42.383Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 17, + "durationInMilliseconds": 1037617, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453583, + "endId": 453586, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628851a75151b5000462a1e1" + }, + { + "created_at": "2022-05-21T02:37:54.170Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 286717, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453580, + "endId": 453582, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628850925151b5000462a1de" + }, + { + "created_at": "2022-05-21T02:32:55.252Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 297423, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453577, + "endId": 453579, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884f645151b5000462a1db" + }, + { + "created_at": "2022-05-21T02:28:10.152Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 283605, + "type": "NORMAL", + "rate": 0.2968, + "percent": -60, + "pumpId": 453574, + "endId": 453576, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884e4993668c0004a30516" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.5, + "created_at": "2022-05-21T02:23:08.766Z", + "date": 1653099788766, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21528, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884d1b93668c0004a30512" + }, + { + "created_at": "2022-05-21T02:23:06.229Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 294000, + "type": "FAKE_EXTENDED", + "rate": 7.10934693877551, + "absolute": 7.10934693877551, + "pumpId": 21527, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884d1b93668c0004a30513" + }, + { + "created_at": "2022-05-21T02:17:55.333Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299966, + "type": "NORMAL", + "rate": 0.5936, + "percent": -20, + "pumpId": 453562, + "endId": 453564, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884bd493668c0004a3050f" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.92, + "created_at": "2022-05-21T02:13:06.284Z", + "date": 1653099186284, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21526, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884ac093668c0004a3050b" + }, + { + "created_at": "2022-05-21T02:13:03.301Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 283000, + "type": "FAKE_EXTENDED", + "rate": 3.0317526501766783, + "absolute": 3.0317526501766783, + "pumpId": 21525, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62884ac093668c0004a3050c" + }, + { + "created_at": "2022-05-21T02:02:49.661Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 601864, + "type": "NORMAL", + "rate": 0.5201, + "percent": -30, + "pumpId": 453548, + "endId": 453552, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288484c93668c0004a30503" + }, + { + "created_at": "2022-05-21T02:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 168169, + "type": "NORMAL", + "rate": 0.6687000000000001, + "percent": -10, + "pumpId": 453542, + "endId": 453547, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288473793668c0004a30500" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-21T01:57:52.501Z", + "date": 1653098272501, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21524, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288473793668c0004a304ff" + }, + { + "created_at": "2022-05-21T01:57:50.546Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 129454, + "type": "NORMAL", + "rate": 0.7155, + "percent": -10, + "pumpId": 453542, + "endId": 453547, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288473793668c0004a30500" + }, + { + "created_at": "2022-05-21T01:52:49.925Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300621, + "type": "NORMAL", + "rate": 0.795, + "percent": 0, + "_id": "neutral_1653097969925" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.46, + "created_at": "2022-05-21T01:47:59.874Z", + "date": 1653097679874, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21523, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628844e49d7ff00004aaf0c0" + }, + { + "created_at": "2022-05-21T01:47:56.925Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293000, + "type": "FAKE_EXTENDED", + "rate": 3.00660409556314, + "absolute": 3.00660409556314, + "pumpId": 21522, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628844e49d7ff00004aaf0c1" + }, + { + "created_at": "2022-05-21T01:42:53.604Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 292860, + "type": "NORMAL", + "rate": 0.3975, + "percent": -50, + "pumpId": 453530, + "endId": 453532, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628843b79d7ff00004aaf0bd" + }, + { + "created_at": "2022-05-21T01:37:38.923Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 313186, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453527, + "endId": 453529, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628842709d7ff00004aaf0ba" + }, + { + "created_at": "2022-05-21T01:32:51.444Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 284984, + "type": "NORMAL", + "rate": 0.318, + "percent": -60, + "pumpId": 453524, + "endId": 453526, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288415b9d7ff00004aaf0b7" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.5, + "created_at": "2022-05-21T01:27:52.076Z", + "date": 1653096472076, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21521, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288402d9d7ff00004aaf0b4" + }, + { + "eventType": "Correction Bolus", + "insulin": 1.6, + "created_at": "2022-05-21T01:18:07.619Z", + "date": 1653095887619, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21520, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62883de332ad2e0004b68cca" + }, + { + "created_at": "2022-05-21T01:18:05.464Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 876000, + "type": "FAKE_EXTENDED", + "rate": 5.068972602739726, + "absolute": 5.068972602739726, + "pumpId": 21519, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62883de332ad2e0004b68cc9" + }, + { + "created_at": "2022-05-21T01:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 18, + "durationInMilliseconds": 1085464, + "type": "NORMAL", + "rate": 0.795, + "percent": 0, + "_id": "neutral_1653086276443" + }, + { + "created_at": "2022-05-21T00:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 60, + "durationInMilliseconds": 3600000, + "type": "NORMAL", + "rate": 0.76, + "percent": 0, + "_id": "neutral_1653086276443" + }, + { + "created_at": "2022-05-20T23:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 60, + "durationInMilliseconds": 3600000, + "type": "NORMAL", + "rate": 0.738, + "percent": 0, + "_id": "neutral_1653086276443" + }, + { + "created_at": "2022-05-20T22:37:56.443Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 22, + "durationInMilliseconds": 1323557, + "type": "NORMAL", + "rate": 0.7239999999999999, + "percent": 0, + "_id": "neutral_1653086276443" + }, + { + "created_at": "2022-05-20T22:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 37, + "durationInMilliseconds": 2276443, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453504, + "endId": 453510, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62880a6b1664860004cb51ad" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-20T21:38:36.984Z", + "date": 1653082716984, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21518, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62880a6b1664860004cb51ac" + }, + { + "created_at": "2022-05-20T21:38:35.831Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 21, + "durationInMilliseconds": 1284169, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453504, + "endId": 453510, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "62880a6b1664860004cb51ad" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-20T21:28:21.755Z", + "date": 1653082101755, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21517, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628807f71664860004cb51a6" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.18, + "created_at": "2022-05-20T21:18:34.069Z", + "date": 1653081514069, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21516, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "628805b61664860004cb51a2" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-20T21:08:33.702Z", + "date": 1653080913702, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21515, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288035c1664860004cb519c" + }, + { + "created_at": "2022-05-20T21:08:31.728Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 30, + "durationInMilliseconds": 1801610, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453495, + "endId": 453503, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6288035c1664860004cb519d" + }, + { + "created_at": "2022-05-20T21:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 8, + "durationInMilliseconds": 510237, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453478, + "endId": 453494, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287ece572b1ae0004593ff0" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-20T20:53:24.438Z", + "date": 1653080004438, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21514, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287ffd41664860004cb5195" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-20T20:43:26.220Z", + "date": 1653079406220, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21513, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287fd7ba2dcb700046b8728" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-20T20:33:38.526Z", + "date": 1653078818526, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21512, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287fb3aa2dcb700046b8724" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-20T20:22:54.311Z", + "date": 1653078174311, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21511, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287f8aba2dcb700046b871e" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-20T20:17:40.808Z", + "date": 1653077860808, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21510, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287f765a2dcb700046b871b" + }, + { + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-20T20:08:27.325Z", + "date": 1653077307325, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21509, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287f54db2af570004d8c046" + }, + { + "created_at": "2022-05-20T20:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 60, + "durationInMilliseconds": 3600000, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453478, + "endId": 453494, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287ece572b1ae0004593ff0" + }, + { + "created_at": "2022-05-20T19:32:50.116Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 27, + "durationInMilliseconds": 1629884, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453478, + "endId": 453494, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287ece572b1ae0004593ff0" + }, + { + "eventType": "Meal Bolus", + "insulin": 9.58, + "created_at": "2022-05-20T19:27:22.747Z", + "date": 1653074842747, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21508, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287eb9d72b1ae0004593fea" + }, + { + "created_at": "2022-05-20T19:08:06.145Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1481495, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453473, + "endId": 453477, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287e73072b1ae0004593fe2" + }, + { + "created_at": "2022-05-20T19:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 8, + "durationInMilliseconds": 484657, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453469, + "endId": 453472, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287dedc72b1ae0004593fd2" + }, + { + "created_at": "2022-05-20T18:33:00.960Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 26, + "durationInMilliseconds": 1619040, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 453469, + "endId": 453472, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287dedc72b1ae0004593fd2" + }, + { + "created_at": "2022-05-20T18:17:39.957Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 918518, + "type": "NORMAL", + "rate": 0.5591999999999999, + "percent": -20, + "pumpId": 453466, + "endId": 453468, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "_id": "6287db4963f1e20004e4e5a7" + }, + { + "created_at": "2022-05-20T18:00:00.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 17, + "durationInMilliseconds": 1059957, + "type": "NORMAL", + "rate": 0.699, + "percent": 0, + "_id": "neutral_1653069600000" + } +] diff --git a/app/src/test/res/autotune/test3/aapsorefautotune_recommendations.log b/app/src/test/res/autotune/test3/aapsorefautotune_recommendations.log new file mode 100644 index 0000000000..b17d6072da --- /dev/null +++ b/app/src/test/res/autotune/test3/aapsorefautotune_recommendations.log @@ -0,0 +1,53 @@ +Parameter | Pump | Autotune | Days Missing +--------------------------------------------------------- +ISF [mg/dL/U] | 86.200 | 93.589 | +Carb Ratio[g/U]| 5.750 | 5.750 | +Basals [U/hr] | - | | + 00:00 | 0.966 | 1.039 | 0 + 00:30 | | | + 01:00 | 0.977 | 1.091 | 0 + 01:30 | | | + 02:00 | 0.971 | 1.118 | 0 + 02:30 | | | + 03:00 | 1.111 | 1.321 | 0 + 03:30 | | | + 04:00 | 0.974 | 1.091 | 0 + 04:30 | | | + 05:00 | 0.923 | 0.965 | 0 + 05:30 | | | + 06:00 | 0.823 | 0.848 | 0 + 06:30 | | | + 07:00 | 0.855 | 1.112 | 0 + 07:30 | | | + 08:00 | 0.902 | 1.173 | 0 + 08:30 | | | + 09:00 | 0.934 | 1.214 | 0 + 09:30 | | | + 10:00 | 0.938 | 1.219 | 0 + 10:30 | | | + 11:00 | 0.903 | 1.070 | 0 + 11:30 | | | + 12:00 | 0.882 | 1.147 | 0 + 12:30 | | | + 13:00 | 0.874 | 1.136 | 0 + 13:30 | | | + 14:00 | 0.866 | 1.126 | 0 + 14:30 | | | + 15:00 | 0.848 | 1.102 | 0 + 15:30 | | | + 16:00 | 0.758 | 0.928 | 0 + 16:30 | | | + 17:00 | 0.650 | 0.710 | 0 + 17:30 | | | + 18:00 | 0.648 | 0.654 | 0 + 18:30 | | | + 19:00 | 0.738 | 0.878 | 0 + 19:30 | | | + 20:00 | 0.847 | 1.101 | 0 + 20:30 | | | + 21:00 | 0.861 | 1.119 | 0 + 21:30 | | | + 22:00 | 0.863 | 1.122 | 0 + 22:30 | | | + 23:00 | 0.843 | 1.047 | 0 + 23:30 | | | diff --git a/app/src/test/res/autotune/test3/aapsorefprofile.2022-05-21.json b/app/src/test/res/autotune/test3/aapsorefprofile.2022-05-21.json new file mode 100644 index 0000000000..eefadabacb --- /dev/null +++ b/app/src/test/res/autotune/test3/aapsorefprofile.2022-05-21.json @@ -0,0 +1,147 @@ +{ + "name": "Tuned Dyn2", + "min_5m_carbimpact": 8, + "dia": 6, + "curve": "ultra-rapid", + "useCustomPeakTime": true, + "insulinPeakTime": 45, + "basalprofile": [ + { + "start": "00:00:00", + "minutes": 0, + "rate": 0.966 + }, + { + "start": "01:00:00", + "minutes": 60, + "rate": 0.977 + }, + { + "start": "02:00:00", + "minutes": 120, + "rate": 0.971 + }, + { + "start": "03:00:00", + "minutes": 180, + "rate": 1.111 + }, + { + "start": "04:00:00", + "minutes": 240, + "rate": 0.974 + }, + { + "start": "05:00:00", + "minutes": 300, + "rate": 0.923 + }, + { + "start": "06:00:00", + "minutes": 360, + "rate": 0.823 + }, + { + "start": "07:00:00", + "minutes": 420, + "rate": 0.855 + }, + { + "start": "08:00:00", + "minutes": 480, + "rate": 0.902 + }, + { + "start": "09:00:00", + "minutes": 540, + "rate": 0.934 + }, + { + "start": "10:00:00", + "minutes": 600, + "rate": 0.938 + }, + { + "start": "11:00:00", + "minutes": 660, + "rate": 0.903 + }, + { + "start": "12:00:00", + "minutes": 720, + "rate": 0.882 + }, + { + "start": "13:00:00", + "minutes": 780, + "rate": 0.874 + }, + { + "start": "14:00:00", + "minutes": 840, + "rate": 0.866 + }, + { + "start": "15:00:00", + "minutes": 900, + "rate": 0.848 + }, + { + "start": "16:00:00", + "minutes": 960, + "rate": 0.758 + }, + { + "start": "17:00:00", + "minutes": 1020, + "rate": 0.65 + }, + { + "start": "18:00:00", + "minutes": 1080, + "rate": 0.648 + }, + { + "start": "19:00:00", + "minutes": 1140, + "rate": 0.738 + }, + { + "start": "20:00:00", + "minutes": 1200, + "rate": 0.847 + }, + { + "start": "21:00:00", + "minutes": 1260, + "rate": 0.861 + }, + { + "start": "22:00:00", + "minutes": 1320, + "rate": 0.863 + }, + { + "start": "23:00:00", + "minutes": 1380, + "rate": 0.843 + } + ], + "isfProfile": { + "sensitivities": [ + { + "i": 0, + "start": "00:00:00", + "sensitivity": 86.2, + "offset": 0, + "x": 0, + "endoffset": 1440 + } + ] + }, + "carb_ratio": 5.75, + "autosens_max": 1.3, + "autosens_min": 0.7, + "units": "mg/dl", + "timezone": "Europe/Paris" +} diff --git a/app/src/test/res/autotune/test3/aapsorefprofile.json b/app/src/test/res/autotune/test3/aapsorefprofile.json new file mode 100644 index 0000000000..e7ae1b4e0e --- /dev/null +++ b/app/src/test/res/autotune/test3/aapsorefprofile.json @@ -0,0 +1,173 @@ +{ + "autosens_max": 1.3, + "autosens_min": 0.7, + "basalprofile": [ + { + "i": 0, + "minutes": 0, + "rate": 1.039, + "start": "00:00:00" + }, + { + "i": 1, + "minutes": 60, + "rate": 1.091, + "start": "01:00:00" + }, + { + "i": 2, + "minutes": 120, + "rate": 1.118, + "start": "02:00:00" + }, + { + "i": 3, + "minutes": 180, + "rate": 1.321, + "start": "03:00:00" + }, + { + "i": 4, + "minutes": 240, + "rate": 1.091, + "start": "04:00:00" + }, + { + "i": 5, + "minutes": 300, + "rate": 0.965, + "start": "05:00:00" + }, + { + "i": 6, + "minutes": 360, + "rate": 0.848, + "start": "06:00:00" + }, + { + "i": 7, + "minutes": 420, + "rate": 1.112, + "start": "07:00:00" + }, + { + "i": 8, + "minutes": 480, + "rate": 1.173, + "start": "08:00:00" + }, + { + "i": 9, + "minutes": 540, + "rate": 1.214, + "start": "09:00:00" + }, + { + "i": 10, + "minutes": 600, + "rate": 1.219, + "start": "10:00:00" + }, + { + "i": 11, + "minutes": 660, + "rate": 1.07, + "start": "11:00:00" + }, + { + "i": 12, + "minutes": 720, + "rate": 1.147, + "start": "12:00:00" + }, + { + "i": 13, + "minutes": 780, + "rate": 1.136, + "start": "13:00:00" + }, + { + "i": 14, + "minutes": 840, + "rate": 1.126, + "start": "14:00:00" + }, + { + "i": 15, + "minutes": 900, + "rate": 1.102, + "start": "15:00:00" + }, + { + "i": 16, + "minutes": 960, + "rate": 0.928, + "start": "16:00:00" + }, + { + "i": 17, + "minutes": 1020, + "rate": 0.71, + "start": "17:00:00" + }, + { + "i": 18, + "minutes": 1080, + "rate": 0.654, + "start": "18:00:00" + }, + { + "i": 19, + "minutes": 1140, + "rate": 0.878, + "start": "19:00:00" + }, + { + "i": 20, + "minutes": 1200, + "rate": 1.101, + "start": "20:00:00" + }, + { + "i": 21, + "minutes": 1260, + "rate": 1.119, + "start": "21:00:00" + }, + { + "i": 22, + "minutes": 1320, + "rate": 1.122, + "start": "22:00:00" + }, + { + "i": 23, + "minutes": 1380, + "rate": 1.047, + "start": "23:00:00" + } + ], + "carb_ratio": 5.75, + "csf": 14.991, + "curve": "ultra-rapid", + "dia": 6, + "insulinPeakTime": 45, + "isfProfile": { + "sensitivities": [ + { + "endoffset": 1440, + "i": 0, + "offset": 0, + "sensitivity": 93.589, + "start": "00:00:00", + "x": 0 + } + ] + }, + "min_5m_carbimpact": 8, + "name": "Tuned Dyn2", + "sens": 93.589, + "timezone": "Europe/Paris", + "units": "mg/dl", + "useCustomPeakTime": true +} diff --git a/app/src/test/res/autotune/test3/autotune.2022-05-21.json b/app/src/test/res/autotune/test3/autotune.2022-05-21.json new file mode 100644 index 0000000000..deb6b431f6 --- /dev/null +++ b/app/src/test/res/autotune/test3/autotune.2022-05-21.json @@ -0,0 +1 @@ +{"CRData":[],"CSFGlucoseData":[],"ISFGlucoseData":[{"device":"AndroidAPS-DexcomG6","date":1653108249000,"dateString":"2022-05-21T04:44:09.000Z","isValid":true,"sgv":123,"direction":"FortyFiveDown","type":"sgv","_id":"62886e2919e2e60004989bba","glucose":123,"avgDelta":"-7.50","BGI":-7.59,"deviation":"0.09"},{"device":"AndroidAPS-DexcomG6","date":1653108548000,"dateString":"2022-05-21T04:49:08.000Z","isValid":true,"sgv":128,"direction":"Flat","type":"sgv","_id":"62886f5719e2e60004989bbc","glucose":128,"avgDelta":"-4.00","BGI":-7.2,"deviation":"3.20"},{"device":"AndroidAPS-DexcomG6","date":1653110649000,"dateString":"2022-05-21T05:24:09.000Z","isValid":true,"sgv":98,"direction":"FortyFiveDown","type":"sgv","_id":"628877a5363e6c0004f710e0","glucose":98,"avgDelta":"-6.75","BGI":-4.44,"deviation":"-2.31"},{"device":"AndroidAPS-DexcomG6","date":1653110949000,"dateString":"2022-05-21T05:29:09.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","_id":"628878bbe964810004aa5655","glucose":97,"avgDelta":"-5.00","BGI":-3.92,"deviation":"-1.08"},{"device":"AndroidAPS-DexcomG6","date":1653111249000,"dateString":"2022-05-21T05:34:09.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","_id":"628879e9e964810004aa5657","glucose":97,"avgDelta":"-3.00","BGI":-3.45,"deviation":"0.45"},{"device":"AndroidAPS-DexcomG6","date":1653111549000,"dateString":"2022-05-21T05:39:09.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","_id":"62887b17e964810004aa565a","glucose":100,"avgDelta":"-0.50","BGI":-2.84,"deviation":"2.34"},{"device":"AndroidAPS-DexcomG6","date":1653111849000,"dateString":"2022-05-21T05:44:09.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","_id":"62887c44e964810004aa565d","glucose":102,"avgDelta":"1.00","BGI":-2.37,"deviation":"3.37"},{"device":"AndroidAPS-DexcomG6","date":1653112148000,"dateString":"2022-05-21T05:49:08.000Z","isValid":true,"sgv":103,"direction":"Flat","type":"sgv","_id":"62887d72e964810004aa5661","glucose":103,"avgDelta":"1.50","BGI":-2.07,"deviation":"3.57"},{"device":"AndroidAPS-DexcomG6","date":1653112449000,"dateString":"2022-05-21T05:54:09.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","_id":"62887ea1e964810004aa5664","glucose":102,"avgDelta":"1.25","BGI":-2.28,"deviation":"3.53"},{"device":"AndroidAPS-DexcomG6","date":1653112749000,"dateString":"2022-05-21T05:59:09.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","_id":"62887fcee964810004aa5666","glucose":101,"avgDelta":"0.25","BGI":-2.46,"deviation":"2.71"},{"device":"AndroidAPS-DexcomG6","date":1653113049000,"dateString":"2022-05-21T06:04:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"628880ee8ff3530004dc6060","glucose":98,"avgDelta":"-1.00","BGI":-2.5,"deviation":"1.50"},{"device":"AndroidAPS-DexcomG6","date":1653113349000,"dateString":"2022-05-21T06:09:09.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"6288821b8ff3530004dc6062","glucose":94,"avgDelta":"-2.25","BGI":-2.46,"deviation":"0.21"},{"device":"AndroidAPS-DexcomG6","date":1653113649000,"dateString":"2022-05-21T06:14:09.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"6288834a8ff3530004dc6065","glucose":91,"avgDelta":"-2.75","BGI":-2.28,"deviation":"-0.47"},{"device":"AndroidAPS-DexcomG6","date":1653113949000,"dateString":"2022-05-21T06:19:09.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","_id":"628884778ff3530004dc6067","glucose":89,"avgDelta":"-3.00","BGI":-2.07,"deviation":"-0.93"},{"device":"AndroidAPS-DexcomG6","date":1653114249000,"dateString":"2022-05-21T06:24:09.000Z","isValid":true,"sgv":85,"direction":"Flat","type":"sgv","_id":"628885a48ff3530004dc6069","glucose":85,"avgDelta":"-3.25","BGI":-1.77,"deviation":"-1.48"},{"device":"AndroidAPS-DexcomG6","date":1653153249000,"dateString":"2022-05-21T17:14:09.000Z","isValid":true,"sgv":124,"direction":"FortyFiveDown","type":"sgv","_id":"62891dfd1090500004ca4722","glucose":124,"avgDelta":"-9.00","BGI":-4.05,"deviation":"-4.95"},{"device":"AndroidAPS-DexcomG6","date":1653153549000,"dateString":"2022-05-21T17:19:09.000Z","isValid":true,"sgv":110,"direction":"SingleDown","type":"sgv","_id":"62891f2b1090500004ca4724","glucose":110,"avgDelta":"-12.00","BGI":-3.79,"deviation":"-8.21"},{"device":"AndroidAPS-DexcomG6","date":1653153849000,"dateString":"2022-05-21T17:24:09.000Z","isValid":true,"sgv":96,"direction":"SingleDown","type":"sgv","_id":"628920591090500004ca4727","glucose":96,"avgDelta":"-13.25","BGI":-3.49,"deviation":"-9.76"},{"device":"AndroidAPS-DexcomG6","date":1653154149000,"dateString":"2022-05-21T17:29:09.000Z","isValid":true,"sgv":93,"direction":"SingleDown","type":"sgv","_id":"628921861090500004ca472b","glucose":93,"avgDelta":"-11.25","BGI":-3.19,"deviation":"-8.06"},{"device":"AndroidAPS-DexcomG6","date":1653154449000,"dateString":"2022-05-21T17:34:09.000Z","isValid":true,"sgv":97,"direction":"FortyFiveDown","type":"sgv","_id":"628922b18809e60004c644d6","glucose":97,"avgDelta":"-6.75","BGI":-2.84,"deviation":"-3.91"},{"device":"AndroidAPS-DexcomG6","date":1653154749000,"dateString":"2022-05-21T17:39:09.000Z","isValid":true,"sgv":108,"direction":"NONE","type":"sgv","_id":"628923df8809e60004c644d9","glucose":108,"avgDelta":"-0.50","BGI":-2.5,"deviation":"2.00"},{"device":"AndroidAPS-DexcomG6","date":1653156849000,"dateString":"2022-05-21T18:14:09.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","_id":"62892c06840d8d0004a20bf2","glucose":110,"avgDelta":"-3.50","BGI":-1.72,"deviation":"-1.78"},{"device":"AndroidAPS-DexcomG6","date":1653180849000,"dateString":"2022-05-22T00:54:09.000Z","isValid":true,"sgv":105,"direction":"SingleDown","type":"sgv","_id":"628989d2da46aa0004d1e0f8","glucose":105,"avgDelta":"-9.50","BGI":-3.1,"deviation":"-6.40"},{"device":"AndroidAPS-DexcomG6","date":1653181150000,"dateString":"2022-05-22T00:59:10.000Z","isValid":true,"sgv":97,"direction":"SingleDown","type":"sgv","_id":"62898b01da46aa0004d1e0fa","glucose":97,"avgDelta":"-11.50","BGI":-2.84,"deviation":"-8.66"},{"device":"AndroidAPS-DexcomG6","date":1653181450000,"dateString":"2022-05-22T01:04:10.000Z","isValid":true,"sgv":92,"direction":"FortyFiveDown","type":"sgv","_id":"62898c2fda46aa0004d1e0fc","glucose":92,"avgDelta":"-10.75","BGI":-2.5,"deviation":"-8.25"},{"device":"AndroidAPS-DexcomG6","date":1653181750000,"dateString":"2022-05-22T01:09:10.000Z","isValid":true,"sgv":87,"direction":"FortyFiveDown","type":"sgv","_id":"62898d4750e51d0004429e5f","glucose":87,"avgDelta":"-8.50","BGI":-2.11,"deviation":"-6.39"}],"basalGlucoseData":[{"device":"AndroidAPS-DexcomG6","date":1653114549000,"dateString":"2022-05-21T06:29:09.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","_id":"628886d28ff3530004dc606b","glucose":80,"avgDelta":"-3.50","BGI":-1.47,"deviation":"-2.03"},{"device":"AndroidAPS-DexcomG6","date":1653114849000,"dateString":"2022-05-21T06:34:09.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","_id":"628888018ff3530004dc6070","glucose":78,"avgDelta":"-3.25","BGI":-1.12,"deviation":"-2.13"},{"device":"AndroidAPS-DexcomG6","date":1653115149000,"dateString":"2022-05-21T06:39:09.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"6288892a149196000412bf49","glucose":76,"avgDelta":"-3.25","BGI":-0.78,"deviation":"-2.47"},{"device":"AndroidAPS-DexcomG6","date":1653115449000,"dateString":"2022-05-21T06:44:09.000Z","isValid":true,"sgv":74,"direction":"Flat","type":"sgv","_id":"62888a57149196000412bf4b","glucose":74,"avgDelta":"-2.75","BGI":-0.34,"deviation":"-2.41"},{"device":"AndroidAPS-DexcomG6","date":1653115749000,"dateString":"2022-05-21T06:49:09.000Z","isValid":true,"sgv":70,"direction":"Flat","type":"sgv","_id":"62888b85149196000412bf4d","glucose":70,"avgDelta":"-2.50","BGI":0,"deviation":"-2.50"},{"device":"AndroidAPS-DexcomG6","date":1653116049000,"dateString":"2022-05-21T06:54:09.000Z","isValid":true,"sgv":69,"direction":"Flat","type":"sgv","_id":"62888ccc149196000412bf4f","glucose":69,"avgDelta":"-2.25","BGI":0.43,"deviation":"-2.68"},{"device":"AndroidAPS-DexcomG6","date":1653116349000,"dateString":"2022-05-21T06:59:09.000Z","isValid":true,"sgv":70,"direction":"Flat","type":"sgv","_id":"62888de2149196000412bf51","glucose":70,"avgDelta":"-1.50","BGI":0.78,"deviation":"-2.28"},{"device":"AndroidAPS-DexcomG6","date":1653116649000,"dateString":"2022-05-21T07:04:09.000Z","isValid":true,"sgv":74,"direction":"Flat","type":"sgv","_id":"62888f0f149196000412bf54","glucose":74,"avgDelta":"0.00","BGI":1.12,"deviation":"-1.12"},{"device":"AndroidAPS-DexcomG6","date":1653116949000,"dateString":"2022-05-21T07:09:09.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"62889024149196000412bf57","glucose":76,"avgDelta":"1.50","BGI":1.47,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653117249000,"dateString":"2022-05-21T07:14:09.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"628891627ff1e700040f17c6","glucose":79,"avgDelta":"2.50","BGI":1.77,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653117549000,"dateString":"2022-05-21T07:19:09.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","_id":"628892907ff1e700040f17c7","glucose":80,"avgDelta":"2.50","BGI":2.11,"deviation":"0.39"},{"device":"AndroidAPS-DexcomG6","date":1653117848000,"dateString":"2022-05-21T07:24:08.000Z","isValid":true,"sgv":82,"direction":"Flat","type":"sgv","_id":"628893bd7ff1e700040f17c9","glucose":82,"avgDelta":"2.00","BGI":2.37,"deviation":"-0.37"},{"device":"AndroidAPS-DexcomG6","date":1653118149000,"dateString":"2022-05-21T07:29:09.000Z","isValid":true,"sgv":86,"direction":"Flat","type":"sgv","_id":"628894d37ff1e700040f17cd","glucose":86,"avgDelta":"2.50","BGI":2.63,"deviation":"-0.13"},{"device":"AndroidAPS-DexcomG6","date":1653118449000,"dateString":"2022-05-21T07:34:09.000Z","isValid":true,"sgv":92,"direction":"Flat","type":"sgv","_id":"6288961d7ff1e700040f17ce","glucose":92,"avgDelta":"3.25","BGI":2.84,"deviation":"0.41"},{"device":"AndroidAPS-DexcomG6","date":1653118748000,"dateString":"2022-05-21T07:39:08.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","_id":"628897357ff1e700040f17d3","glucose":97,"avgDelta":"4.25","BGI":3.06,"deviation":"1.19"},{"device":"AndroidAPS-DexcomG6","date":1653119049000,"dateString":"2022-05-21T07:44:09.000Z","isValid":true,"sgv":105,"direction":"FortyFiveUp","type":"sgv","_id":"628898627ff1e700040f17d5","glucose":105,"avgDelta":"5.75","BGI":2.76,"deviation":"2.99"},{"device":"AndroidAPS-DexcomG6","date":1653119349000,"dateString":"2022-05-21T07:49:09.000Z","isValid":true,"sgv":114,"direction":"FortyFiveUp","type":"sgv","_id":"628899957ff1e700040f17d7","glucose":114,"avgDelta":"7.00","BGI":2.37,"deviation":"4.63"},{"device":"AndroidAPS-DexcomG6","date":1653131349000,"dateString":"2022-05-21T11:09:09.000Z","isValid":true,"sgv":82,"direction":"Flat","type":"sgv","_id":"6288c86f8e9ed800049b39e5","glucose":82,"avgDelta":"-2.25","BGI":-1.25,"deviation":"-1.00"},{"device":"AndroidAPS-DexcomG6","date":1653131649000,"dateString":"2022-05-21T11:14:09.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","_id":"6288c99e8e9ed800049b39e8","glucose":89,"avgDelta":"0.25","BGI":-0.65,"deviation":"0.90"},{"device":"AndroidAPS-DexcomG6","date":1653131948000,"dateString":"2022-05-21T11:19:08.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"6288cacb8e9ed800049b39ec","glucose":98,"avgDelta":"3.50","BGI":-0.3,"deviation":"3.80"},{"device":"AndroidAPS-DexcomG6","date":1653157149000,"dateString":"2022-05-21T18:19:09.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"62892d34840d8d0004a20bf5","glucose":108,"avgDelta":"-3.75","BGI":-1.47,"deviation":"-2.28"},{"device":"AndroidAPS-DexcomG6","date":1653157449000,"dateString":"2022-05-21T18:24:09.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"62892e62840d8d0004a20bf8","glucose":108,"avgDelta":"-2.75","BGI":-1.21,"deviation":"-1.54"},{"device":"AndroidAPS-DexcomG6","date":1653157750000,"dateString":"2022-05-21T18:29:10.000Z","isValid":true,"sgv":106,"direction":"Flat","type":"sgv","_id":"62892f8f840d8d0004a20bfa","glucose":106,"avgDelta":"-2.00","BGI":-0.95,"deviation":"-1.05"},{"device":"AndroidAPS-DexcomG6","date":1653158049000,"dateString":"2022-05-21T18:34:09.000Z","isValid":true,"sgv":104,"direction":"Flat","type":"sgv","_id":"628930bc840d8d0004a20bfd","glucose":104,"avgDelta":"-1.50","BGI":-0.69,"deviation":"-0.81"},{"device":"AndroidAPS-DexcomG6","date":1653158349000,"dateString":"2022-05-21T18:39:09.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","_id":"628931e9840d8d0004a20bff","glucose":102,"avgDelta":"-1.50","BGI":-0.47,"deviation":"-1.03"},{"device":"AndroidAPS-DexcomG6","date":1653158649000,"dateString":"2022-05-21T18:44:09.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","_id":"6289331c22fbc8000495b813","glucose":101,"avgDelta":"-1.75","BGI":-0.3,"deviation":"-1.45"},{"device":"AndroidAPS-DexcomG6","date":1653158949000,"dateString":"2022-05-21T18:49:09.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","_id":"6289344a22fbc8000495b815","glucose":100,"avgDelta":"-1.50","BGI":-0.17,"deviation":"-1.33"},{"device":"AndroidAPS-DexcomG6","date":1653159249000,"dateString":"2022-05-21T18:54:09.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","_id":"6289357622fbc8000495b818","glucose":99,"avgDelta":"-1.25","BGI":-0.04,"deviation":"-1.21"},{"device":"AndroidAPS-DexcomG6","date":1653159549000,"dateString":"2022-05-21T18:59:09.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","_id":"628936a422fbc8000495b81a","glucose":99,"avgDelta":"-0.75","BGI":0.04,"deviation":"-0.79"},{"device":"AndroidAPS-DexcomG6","date":1653159849000,"dateString":"2022-05-21T19:04:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"628937b822fbc8000495b81d","glucose":98,"avgDelta":"-0.75","BGI":0.17,"deviation":"-0.92"},{"device":"AndroidAPS-DexcomG6","date":1653160150000,"dateString":"2022-05-21T19:09:10.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"628938fe22fbc8000495b81f","glucose":98,"avgDelta":"-0.50","BGI":0.3,"deviation":"-0.80"},{"device":"AndroidAPS-DexcomG6","date":1653160449000,"dateString":"2022-05-21T19:14:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"62893a1222fbc8000495b822","glucose":98,"avgDelta":"-0.25","BGI":0.43,"deviation":"-0.68"},{"device":"AndroidAPS-DexcomG6","date":1653160749000,"dateString":"2022-05-21T19:19:09.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","_id":"62893b4f598f780004bb3b22","glucose":97,"avgDelta":"-0.50","BGI":0.52,"deviation":"-1.02"},{"device":"AndroidAPS-DexcomG6","date":1653161049000,"dateString":"2022-05-21T19:24:09.000Z","isValid":true,"sgv":95,"direction":"Flat","type":"sgv","_id":"62893c7d598f780004bb3b24","glucose":95,"avgDelta":"-0.75","BGI":0.6,"deviation":"-1.35"},{"device":"AndroidAPS-DexcomG6","date":1653161350000,"dateString":"2022-05-21T19:29:10.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"62893daa598f780004bb3b27","glucose":94,"avgDelta":"-1.00","BGI":0.65,"deviation":"-1.65"},{"device":"AndroidAPS-DexcomG6","date":1653161649000,"dateString":"2022-05-21T19:34:09.000Z","isValid":true,"sgv":93,"direction":"Flat","type":"sgv","_id":"62893ed7598f780004bb3b29","glucose":93,"avgDelta":"-1.25","BGI":0.73,"deviation":"-1.98"},{"device":"AndroidAPS-DexcomG6","date":1653161950000,"dateString":"2022-05-21T19:39:10.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"62893feb598f780004bb3b2b","glucose":91,"avgDelta":"-1.50","BGI":0.86,"deviation":"-2.36"},{"device":"AndroidAPS-DexcomG6","date":1653162250000,"dateString":"2022-05-21T19:44:10.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","_id":"62894118598f780004bb3b2d","glucose":89,"avgDelta":"-1.50","BGI":0.99,"deviation":"-2.49"},{"device":"AndroidAPS-DexcomG6","date":1653162549000,"dateString":"2022-05-21T19:49:09.000Z","isValid":true,"sgv":88,"direction":"Flat","type":"sgv","_id":"6289425f598f780004bb3b30","glucose":88,"avgDelta":"-1.50","BGI":1.12,"deviation":"-2.62"},{"device":"AndroidAPS-DexcomG6","date":1653162850000,"dateString":"2022-05-21T19:54:10.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","_id":"6289437f4493460004e63a25","glucose":89,"avgDelta":"-1.00","BGI":1.25,"deviation":"-2.25"},{"device":"AndroidAPS-DexcomG6","date":1653163150000,"dateString":"2022-05-21T19:59:10.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"628944ae4493460004e63a27","glucose":91,"avgDelta":"0.00","BGI":1.38,"deviation":"-1.38"},{"device":"AndroidAPS-DexcomG6","date":1653163449000,"dateString":"2022-05-21T20:04:09.000Z","isValid":true,"sgv":95,"direction":"Flat","type":"sgv","_id":"628945dc4493460004e63a2a","glucose":95,"avgDelta":"1.50","BGI":1.51,"deviation":"-0.01"},{"device":"AndroidAPS-DexcomG6","date":1653163749000,"dateString":"2022-05-21T20:09:09.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","_id":"6289470c4493460004e63a2d","glucose":100,"avgDelta":"3.00","BGI":1.55,"deviation":"1.45"},{"device":"AndroidAPS-DexcomG6","date":1653164049000,"dateString":"2022-05-21T20:14:09.000Z","isValid":true,"sgv":109,"direction":"Flat","type":"sgv","_id":"628948214493460004e63a31","glucose":109,"avgDelta":"5.00","BGI":1.51,"deviation":"3.49"},{"device":"AndroidAPS-DexcomG6","date":1653164350000,"dateString":"2022-05-21T20:19:10.000Z","isValid":true,"sgv":120,"direction":"FortyFiveUp","type":"sgv","_id":"6289496a4493460004e63a34","glucose":120,"avgDelta":"7.25","BGI":1.34,"deviation":"5.91"},{"device":"AndroidAPS-DexcomG6","date":1653182050000,"dateString":"2022-05-22T01:14:10.000Z","isValid":true,"sgv":81,"direction":"FortyFiveDown","type":"sgv","_id":"62898e7650e51d0004429e63","glucose":81,"avgDelta":"-6.00","BGI":-1.68,"deviation":"-4.32"},{"device":"AndroidAPS-DexcomG6","date":1653182349000,"dateString":"2022-05-22T01:19:09.000Z","isValid":true,"sgv":77,"direction":"FortyFiveDown","type":"sgv","_id":"62898fa550e51d0004429e65","glucose":77,"avgDelta":"-5.00","BGI":-1.25,"deviation":"-3.75"},{"device":"AndroidAPS-DexcomG6","date":1653182650000,"dateString":"2022-05-22T01:24:10.000Z","isValid":true,"sgv":74,"direction":"FortyFiveDown","type":"sgv","_id":"628990d350e51d0004429e67","glucose":74,"avgDelta":"-4.50","BGI":-0.78,"deviation":"-3.72"},{"device":"AndroidAPS-DexcomG6","date":1653182949000,"dateString":"2022-05-22T01:29:09.000Z","isValid":true,"sgv":72,"direction":"Flat","type":"sgv","_id":"6289920150e51d0004429e69","glucose":72,"avgDelta":"-3.75","BGI":-0.3,"deviation":"-3.45"},{"device":"AndroidAPS-DexcomG6","date":1653183249000,"dateString":"2022-05-22T01:34:09.000Z","isValid":true,"sgv":73,"direction":"Flat","type":"sgv","_id":"6289933050e51d0004429e6b","glucose":73,"avgDelta":"-2.00","BGI":0.22,"deviation":"-2.22"},{"device":"AndroidAPS-DexcomG6","date":1653183550000,"dateString":"2022-05-22T01:39:10.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"6289945f50e51d0004429e6d","glucose":76,"avgDelta":"-0.25","BGI":0.69,"deviation":"-0.94"},{"device":"AndroidAPS-DexcomG6","date":1653183850000,"dateString":"2022-05-22T01:44:10.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"6289957b61a829000474037f","glucose":79,"avgDelta":"1.25","BGI":1.12,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653184150000,"dateString":"2022-05-22T01:49:10.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","_id":"628996a961a8290004740382","glucose":80,"avgDelta":"2.00","BGI":1.55,"deviation":"0.45"},{"device":"AndroidAPS-DexcomG6","date":1653184450000,"dateString":"2022-05-22T01:54:10.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","_id":"628997d861a8290004740385","glucose":80,"avgDelta":"1.75","BGI":1.9,"deviation":"-0.15"},{"device":"AndroidAPS-DexcomG6","date":1653099848000,"dateString":"2022-05-21T02:24:08.000Z","isValid":true,"sgv":308,"direction":"FortyFiveUp","type":"sgv","_id":"62884d6793668c0004a30514","glucose":308,"avgDelta":"9.25","BGI":-16.85,"deviation":"26.10","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653100148000,"dateString":"2022-05-21T02:29:08.000Z","isValid":true,"sgv":307,"direction":"FortyFiveUp","type":"sgv","_id":"62884e9493668c0004a30517","glucose":307,"avgDelta":"9.00","BGI":-18.88,"deviation":"27.88"},{"device":"AndroidAPS-DexcomG6","date":1653100449000,"dateString":"2022-05-21T02:34:09.000Z","isValid":true,"sgv":297,"direction":"Flat","type":"sgv","_id":"62884fb05151b5000462a1dc","glucose":297,"avgDelta":"3.75","BGI":-20.26,"deviation":"24.01"},{"device":"AndroidAPS-DexcomG6","date":1653100748000,"dateString":"2022-05-21T02:39:08.000Z","isValid":true,"sgv":283,"direction":"Flat","type":"sgv","_id":"628850de5151b5000462a1df","glucose":283,"avgDelta":"-3.25","BGI":-21.08,"deviation":"17.83"},{"device":"AndroidAPS-DexcomG6","date":1653101048000,"dateString":"2022-05-21T02:44:08.000Z","isValid":true,"sgv":267,"direction":"FortyFiveDown","type":"sgv","_id":"6288520b5151b5000462a1e2","glucose":267,"avgDelta":"-10.25","BGI":-21.46,"deviation":"11.21"},{"device":"AndroidAPS-DexcomG6","date":1653101348000,"dateString":"2022-05-21T02:49:08.000Z","isValid":true,"sgv":253,"direction":"SingleDown","type":"sgv","_id":"628853395151b5000462a1e4","glucose":253,"avgDelta":"-13.50","BGI":-21.46,"deviation":"7.96"},{"device":"AndroidAPS-DexcomG6","date":1653101648000,"dateString":"2022-05-21T02:54:08.000Z","isValid":true,"sgv":241,"direction":"SingleDown","type":"sgv","_id":"6288547f5151b5000462a1e6","glucose":241,"avgDelta":"-14.00","BGI":-21.16,"deviation":"7.16"},{"device":"AndroidAPS-DexcomG6","date":1653101948000,"dateString":"2022-05-21T02:59:08.000Z","isValid":true,"sgv":228,"direction":"SingleDown","type":"sgv","_id":"628855935151b5000462a1e8","glucose":228,"avgDelta":"-13.75","BGI":-20.52,"deviation":"6.77"},{"device":"AndroidAPS-DexcomG6","date":1653102249000,"dateString":"2022-05-21T03:04:09.000Z","isValid":true,"sgv":216,"direction":"SingleDown","type":"sgv","_id":"628856da5151b5000462a1ea","glucose":216,"avgDelta":"-12.75","BGI":-19.7,"deviation":"6.95"},{"device":"AndroidAPS-DexcomG6","date":1653102548000,"dateString":"2022-05-21T03:09:08.000Z","isValid":true,"sgv":204,"direction":"SingleDown","type":"sgv","_id":"628857f7293f3e00042c31d3","glucose":204,"avgDelta":"-12.25","BGI":-18.79,"deviation":"6.54"},{"device":"AndroidAPS-DexcomG6","date":1653102848000,"dateString":"2022-05-21T03:14:08.000Z","isValid":true,"sgv":193,"direction":"SingleDown","type":"sgv","_id":"62885924293f3e00042c31d5","glucose":193,"avgDelta":"-12.00","BGI":-17.71,"deviation":"5.71"},{"device":"AndroidAPS-DexcomG6","date":1653103149000,"dateString":"2022-05-21T03:19:09.000Z","isValid":true,"sgv":182,"direction":"SingleDown","type":"sgv","_id":"62885a52293f3e00042c31d7","glucose":182,"avgDelta":"-11.50","BGI":-16.64,"deviation":"5.14"},{"device":"AndroidAPS-DexcomG6","date":1653103448000,"dateString":"2022-05-21T03:24:08.000Z","isValid":true,"sgv":174,"direction":"SingleDown","type":"sgv","_id":"62885b81293f3e00042c31d9","glucose":174,"avgDelta":"-10.50","BGI":-15.43,"deviation":"4.93"},{"device":"AndroidAPS-DexcomG6","date":1653103748000,"dateString":"2022-05-21T03:29:08.000Z","isValid":true,"sgv":171,"direction":"FortyFiveDown","type":"sgv","_id":"62885c95293f3e00042c31db","glucose":171,"avgDelta":"-8.25","BGI":-14.31,"deviation":"6.06"},{"device":"AndroidAPS-DexcomG6","date":1653104049000,"dateString":"2022-05-21T03:34:09.000Z","isValid":true,"sgv":170,"direction":"FortyFiveDown","type":"sgv","_id":"62885dc3293f3e00042c31de","glucose":170,"avgDelta":"-5.75","BGI":-13.1,"deviation":"7.35"},{"device":"AndroidAPS-DexcomG6","date":1653104349000,"dateString":"2022-05-21T03:39:09.000Z","isValid":true,"sgv":167,"direction":"Flat","type":"sgv","_id":"62885ef1293f3e00042c31e2","glucose":167,"avgDelta":"-3.75","BGI":-12.07,"deviation":"8.32"},{"device":"AndroidAPS-DexcomG6","date":1653104648000,"dateString":"2022-05-21T03:44:08.000Z","isValid":true,"sgv":162,"direction":"Flat","type":"sgv","_id":"6288601b42c1220004f95729","glucose":162,"avgDelta":"-3.00","BGI":-11.64,"deviation":"8.64"},{"device":"AndroidAPS-DexcomG6","date":1653104949000,"dateString":"2022-05-21T03:49:09.000Z","isValid":true,"sgv":155,"direction":"FortyFiveDown","type":"sgv","_id":"6288614942c1220004f9572c","glucose":155,"avgDelta":"-4.00","BGI":-11.12,"deviation":"7.12"},{"device":"AndroidAPS-DexcomG6","date":1653105248000,"dateString":"2022-05-21T03:54:08.000Z","isValid":true,"sgv":149,"direction":"FortyFiveDown","type":"sgv","_id":"6288629042c1220004f9572e","glucose":149,"avgDelta":"-5.25","BGI":-10.56,"deviation":"5.31"},{"device":"AndroidAPS-DexcomG6","date":1653105549000,"dateString":"2022-05-21T03:59:09.000Z","isValid":true,"sgv":146,"direction":"FortyFiveDown","type":"sgv","_id":"628863a542c1220004f95730","glucose":146,"avgDelta":"-5.25","BGI":-9.87,"deviation":"4.62"},{"device":"AndroidAPS-DexcomG6","date":1653105848000,"dateString":"2022-05-21T04:04:08.000Z","isValid":true,"sgv":146,"direction":"Flat","type":"sgv","_id":"628864d342c1220004f95733","glucose":146,"avgDelta":"-4.00","BGI":-9.14,"deviation":"5.14"},{"device":"AndroidAPS-DexcomG6","date":1653106149000,"dateString":"2022-05-21T04:09:09.000Z","isValid":true,"sgv":151,"direction":"Flat","type":"sgv","_id":"6288660142c1220004f95736","glucose":151,"avgDelta":"-1.00","BGI":-8.36,"deviation":"7.36"},{"device":"AndroidAPS-DexcomG6","date":1653106449000,"dateString":"2022-05-21T04:14:09.000Z","isValid":true,"sgv":155,"direction":"Flat","type":"sgv","_id":"6288672f42c1220004f9573a","glucose":155,"avgDelta":"1.50","BGI":-7.8,"deviation":"9.30"},{"device":"AndroidAPS-DexcomG6","date":1653106749000,"dateString":"2022-05-21T04:19:09.000Z","isValid":true,"sgv":157,"direction":"Flat","type":"sgv","_id":"6288685d19e2e60004989bac","glucose":157,"avgDelta":"2.75","BGI":-7.93,"deviation":"10.68"},{"device":"AndroidAPS-DexcomG6","date":1653107048000,"dateString":"2022-05-21T04:24:08.000Z","isValid":true,"sgv":153,"direction":"Flat","type":"sgv","_id":"6288698b19e2e60004989bb0","glucose":153,"avgDelta":"1.75","BGI":-8.06,"deviation":"9.81"},{"device":"AndroidAPS-DexcomG6","date":1653107348000,"dateString":"2022-05-21T04:29:08.000Z","isValid":true,"sgv":144,"direction":"Flat","type":"sgv","_id":"62886ab919e2e60004989bb3","glucose":144,"avgDelta":"-1.75","BGI":-8.19,"deviation":"6.44"},{"device":"AndroidAPS-DexcomG6","date":1653107648000,"dateString":"2022-05-21T04:34:08.000Z","isValid":true,"sgv":132,"direction":"FortyFiveDown","type":"sgv","_id":"62886be719e2e60004989bb5","glucose":132,"avgDelta":"-5.75","BGI":-8.1,"deviation":"2.35"},{"device":"AndroidAPS-DexcomG6","date":1653107948000,"dateString":"2022-05-21T04:39:08.000Z","isValid":true,"sgv":124,"direction":"FortyFiveDown","type":"sgv","_id":"62886cfc19e2e60004989bb8","glucose":124,"avgDelta":"-8.25","BGI":-7.89,"deviation":"-0.36"},{"device":"AndroidAPS-DexcomG6","date":1653108848000,"dateString":"2022-05-21T04:54:08.000Z","isValid":true,"sgv":130,"direction":"Flat","type":"sgv","_id":"62887093363e6c0004f710cf","glucose":130,"avgDelta":"-0.50","BGI":-6.72,"deviation":"6.22","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653109148000,"dateString":"2022-05-21T04:59:08.000Z","isValid":true,"sgv":129,"direction":"Flat","type":"sgv","_id":"628871c1363e6c0004f710d3","glucose":129,"avgDelta":"1.25","BGI":-6.34,"deviation":"7.59"},{"device":"AndroidAPS-DexcomG6","date":1653109448000,"dateString":"2022-05-21T05:04:08.000Z","isValid":true,"sgv":125,"direction":"Flat","type":"sgv","_id":"628872ef363e6c0004f710d6","glucose":125,"avgDelta":"0.50","BGI":-6.08,"deviation":"6.58"},{"device":"AndroidAPS-DexcomG6","date":1653109748000,"dateString":"2022-05-21T05:09:08.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","_id":"6288741c363e6c0004f710d9","glucose":117,"avgDelta":"-2.75","BGI":-5.73,"deviation":"2.98"},{"device":"AndroidAPS-DexcomG6","date":1653110049000,"dateString":"2022-05-21T05:14:09.000Z","isValid":true,"sgv":109,"direction":"FortyFiveDown","type":"sgv","_id":"62887549363e6c0004f710dc","glucose":109,"avgDelta":"-5.25","BGI":-5.34,"deviation":"0.09"},{"device":"AndroidAPS-DexcomG6","date":1653110348000,"dateString":"2022-05-21T05:19:08.000Z","isValid":true,"sgv":102,"direction":"FortyFiveDown","type":"sgv","_id":"62887677363e6c0004f710de","glucose":102,"avgDelta":"-6.75","BGI":-4.91,"deviation":"-1.84"},{"device":"AndroidAPS-DexcomG6","date":1653119649000,"dateString":"2022-05-21T07:54:09.000Z","isValid":true,"sgv":123,"direction":"FortyFiveUp","type":"sgv","_id":"62889ac27ff1e700040f17dc","glucose":123,"avgDelta":"7.75","BGI":-0.99,"deviation":"8.74","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653119949000,"dateString":"2022-05-21T07:59:09.000Z","isValid":true,"sgv":132,"direction":"FortyFiveUp","type":"sgv","_id":"62889be4a4cc860004a251c7","glucose":132,"avgDelta":"8.75","BGI":-14.27,"deviation":"23.02"},{"device":"AndroidAPS-DexcomG6","date":1653120249000,"dateString":"2022-05-21T08:04:09.000Z","isValid":true,"sgv":141,"direction":"FortyFiveUp","type":"sgv","_id":"62889d13a4cc860004a251c9","glucose":141,"avgDelta":"9.00","BGI":-24.7,"deviation":"33.70"},{"device":"AndroidAPS-DexcomG6","date":1653120548000,"dateString":"2022-05-21T08:09:08.000Z","isValid":true,"sgv":146,"direction":"FortyFiveUp","type":"sgv","_id":"62889e41a4cc860004a251cb","glucose":146,"avgDelta":"8.00","BGI":-32.76,"deviation":"40.76"},{"device":"AndroidAPS-DexcomG6","date":1653120849000,"dateString":"2022-05-21T08:14:09.000Z","isValid":true,"sgv":148,"direction":"FortyFiveUp","type":"sgv","_id":"62889f6fa4cc860004a251cc","glucose":148,"avgDelta":"6.25","BGI":-38.79,"deviation":"45.04"},{"device":"AndroidAPS-DexcomG6","date":1653121149000,"dateString":"2022-05-21T08:19:09.000Z","isValid":true,"sgv":147,"direction":"Flat","type":"sgv","_id":"6288a09fa4cc860004a251ce","glucose":147,"avgDelta":"3.75","BGI":-43.14,"deviation":"46.89"},{"device":"AndroidAPS-DexcomG6","date":1653121449000,"dateString":"2022-05-21T08:24:09.000Z","isValid":true,"sgv":145,"direction":"Flat","type":"sgv","_id":"6288a1cda4cc860004a251d1","glucose":145,"avgDelta":"1.00","BGI":-46.03,"deviation":"47.03"},{"device":"AndroidAPS-DexcomG6","date":1653121749000,"dateString":"2022-05-21T08:29:09.000Z","isValid":true,"sgv":138,"direction":"Flat","type":"sgv","_id":"6288a2fca4cc860004a251d2","glucose":138,"avgDelta":"-2.00","BGI":-47.84,"deviation":"45.84"},{"device":"AndroidAPS-DexcomG6","date":1653122049000,"dateString":"2022-05-21T08:34:09.000Z","isValid":true,"sgv":128,"direction":"Flat","type":"sgv","_id":"6288a42099fc930004d6bde8","glucose":128,"avgDelta":"-5.00","BGI":-48.66,"deviation":"43.66"},{"device":"AndroidAPS-DexcomG6","date":1653122349000,"dateString":"2022-05-21T08:39:09.000Z","isValid":true,"sgv":118,"direction":"FortyFiveDown","type":"sgv","_id":"6288a55199fc930004d6bdeb","glucose":118,"avgDelta":"-7.25","BGI":-48.66,"deviation":"41.41"},{"device":"AndroidAPS-DexcomG6","date":1653122649000,"dateString":"2022-05-21T08:44:09.000Z","isValid":true,"sgv":111,"direction":"FortyFiveDown","type":"sgv","_id":"6288a73099fc930004d6bded","glucose":111,"avgDelta":"-8.50","BGI":-48.01,"deviation":"39.51"},{"device":"AndroidAPS-DexcomG6","date":1653122949000,"dateString":"2022-05-21T08:49:09.000Z","isValid":true,"sgv":108,"direction":"FortyFiveDown","type":"sgv","_id":"6288a7ad99fc930004d6bdef","glucose":108,"avgDelta":"-7.50","BGI":-46.89,"deviation":"39.39"},{"device":"AndroidAPS-DexcomG6","date":1653123248000,"dateString":"2022-05-21T08:54:08.000Z","isValid":true,"sgv":107,"direction":"Flat","type":"sgv","_id":"6288a8db99fc930004d6bdf1","glucose":107,"avgDelta":"-5.25","BGI":-45.38,"deviation":"40.13"},{"device":"AndroidAPS-DexcomG6","date":1653123549000,"dateString":"2022-05-21T08:59:09.000Z","isValid":true,"sgv":109,"direction":"Flat","type":"sgv","_id":"6288a9f099fc930004d6bdf4","glucose":109,"avgDelta":"-2.25","BGI":-43.62,"deviation":"41.37"},{"device":"AndroidAPS-DexcomG6","date":1653123849000,"dateString":"2022-05-21T09:04:09.000Z","isValid":true,"sgv":113,"direction":"Flat","type":"sgv","_id":"6288ab1d99fc930004d6bdf6","glucose":113,"avgDelta":"0.50","BGI":-41.85,"deviation":"42.35"},{"device":"AndroidAPS-DexcomG6","date":1653124149000,"dateString":"2022-05-21T09:09:09.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","_id":"6288ac4b99fc930004d6bdf8","glucose":119,"avgDelta":"2.75","BGI":-39.95,"deviation":"42.70"},{"device":"AndroidAPS-DexcomG6","date":1653124448000,"dateString":"2022-05-21T09:14:08.000Z","isValid":true,"sgv":124,"direction":"Flat","type":"sgv","_id":"6288ad7999fc930004d6bdfa","glucose":124,"avgDelta":"4.25","BGI":-37.84,"deviation":"42.09"},{"device":"AndroidAPS-DexcomG6","date":1653124749000,"dateString":"2022-05-21T09:19:09.000Z","isValid":true,"sgv":125,"direction":"Flat","type":"sgv","_id":"6288aea799fc930004d6bdfb","glucose":125,"avgDelta":"4.00","BGI":-35.69,"deviation":"39.69"},{"device":"AndroidAPS-DexcomG6","date":1653125048000,"dateString":"2022-05-21T09:24:08.000Z","isValid":true,"sgv":122,"direction":"Flat","type":"sgv","_id":"6288afd5c9c02c00041f7ef8","glucose":122,"avgDelta":"2.25","BGI":-33.4,"deviation":"35.65"},{"device":"AndroidAPS-DexcomG6","date":1653125349000,"dateString":"2022-05-21T09:29:09.000Z","isValid":true,"sgv":120,"direction":"Flat","type":"sgv","_id":"6288b103c9c02c00041f7efc","glucose":120,"avgDelta":"0.25","BGI":-31.2,"deviation":"31.45"},{"device":"AndroidAPS-DexcomG6","date":1653125649000,"dateString":"2022-05-21T09:34:09.000Z","isValid":true,"sgv":118,"direction":"Flat","type":"sgv","_id":"6288b231c9c02c00041f7efe","glucose":118,"avgDelta":"-1.50","BGI":-28.96,"deviation":"27.46"},{"device":"AndroidAPS-DexcomG6","date":1653125948000,"dateString":"2022-05-21T09:39:08.000Z","isValid":true,"sgv":118,"direction":"Flat","type":"sgv","_id":"6288b35fc9c02c00041f7f00","glucose":118,"avgDelta":"-1.75","BGI":-26.77,"deviation":"25.02"},{"device":"AndroidAPS-DexcomG6","date":1653126249000,"dateString":"2022-05-21T09:44:09.000Z","isValid":true,"sgv":118,"direction":"Flat","type":"sgv","_id":"6288b48dc9c02c00041f7f02","glucose":118,"avgDelta":"-1.00","BGI":-24.61,"deviation":"23.61"},{"device":"AndroidAPS-DexcomG6","date":1653126549000,"dateString":"2022-05-21T09:49:09.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","_id":"6288b5bbc9c02c00041f7f04","glucose":117,"avgDelta":"-0.75","BGI":-22.5,"deviation":"21.75"},{"device":"AndroidAPS-DexcomG6","date":1653126849000,"dateString":"2022-05-21T09:54:09.000Z","isValid":true,"sgv":118,"direction":"Flat","type":"sgv","_id":"6288b6e9c9c02c00041f7f06","glucose":118,"avgDelta":"0.00","BGI":-20.52,"deviation":"20.52"},{"device":"AndroidAPS-DexcomG6","date":1653127149000,"dateString":"2022-05-21T09:59:09.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","_id":"6288b813abbef90004616ceb","glucose":119,"avgDelta":"0.25","BGI":-18.58,"deviation":"18.83"},{"device":"AndroidAPS-DexcomG6","date":1653127449000,"dateString":"2022-05-21T10:04:09.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","_id":"6288b941abbef90004616cf0","glucose":119,"avgDelta":"0.25","BGI":-16.72,"deviation":"16.97"},{"device":"AndroidAPS-DexcomG6","date":1653127748000,"dateString":"2022-05-21T10:09:08.000Z","isValid":true,"sgv":115,"direction":"Flat","type":"sgv","_id":"6288ba56abbef90004616cf2","glucose":115,"avgDelta":"-0.50","BGI":-14.96,"deviation":"14.46"},{"device":"AndroidAPS-DexcomG6","date":1653128049000,"dateString":"2022-05-21T10:14:09.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","_id":"6288bb84abbef90004616cf4","glucose":110,"avgDelta":"-2.00","BGI":-13.32,"deviation":"11.32"},{"device":"AndroidAPS-DexcomG6","date":1653128349000,"dateString":"2022-05-21T10:19:09.000Z","isValid":true,"sgv":104,"direction":"Flat","type":"sgv","_id":"6288bcb2abbef90004616cf6","glucose":104,"avgDelta":"-3.75","BGI":-11.72,"deviation":"7.97"},{"device":"AndroidAPS-DexcomG6","date":1653128649000,"dateString":"2022-05-21T10:24:09.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","_id":"6288bde0abbef90004616cf8","glucose":101,"avgDelta":"-4.50","BGI":-10.3,"deviation":"5.80"},{"device":"AndroidAPS-DexcomG6","date":1653128948000,"dateString":"2022-05-21T10:29:08.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","_id":"6288bf061991280004dce457","glucose":99,"avgDelta":"-4.00","BGI":-8.88,"deviation":"4.88"},{"device":"AndroidAPS-DexcomG6","date":1653129249000,"dateString":"2022-05-21T10:34:09.000Z","isValid":true,"sgv":96,"direction":"Flat","type":"sgv","_id":"6288c0341991280004dce459","glucose":96,"avgDelta":"-3.50","BGI":-7.59,"deviation":"4.09"},{"device":"AndroidAPS-DexcomG6","date":1653129548000,"dateString":"2022-05-21T10:39:08.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"6288c1631991280004dce45b","glucose":94,"avgDelta":"-2.50","BGI":-6.38,"deviation":"3.88"},{"device":"AndroidAPS-DexcomG6","date":1653129848000,"dateString":"2022-05-21T10:44:08.000Z","isValid":true,"sgv":93,"direction":"Flat","type":"sgv","_id":"6288c2911991280004dce45e","glucose":93,"avgDelta":"-2.00","BGI":-5.26,"deviation":"3.26"},{"device":"AndroidAPS-DexcomG6","date":1653130149000,"dateString":"2022-05-21T10:49:09.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","_id":"6288c3be1991280004dce461","glucose":91,"avgDelta":"-2.00","BGI":-4.27,"deviation":"2.27"},{"device":"AndroidAPS-DexcomG6","date":1653130448000,"dateString":"2022-05-21T10:54:08.000Z","isValid":true,"sgv":88,"direction":"Flat","type":"sgv","_id":"6288c4ec1991280004dce464","glucose":88,"avgDelta":"-2.00","BGI":-3.36,"deviation":"1.36"},{"device":"AndroidAPS-DexcomG6","date":1653130748000,"dateString":"2022-05-21T10:59:08.000Z","isValid":true,"sgv":84,"direction":"Flat","type":"sgv","_id":"6288c61a1991280004dce468","glucose":84,"avgDelta":"-2.50","BGI":-2.59,"deviation":"0.09"},{"device":"AndroidAPS-DexcomG6","date":1653131049000,"dateString":"2022-05-21T11:04:09.000Z","isValid":true,"sgv":81,"direction":"Flat","type":"sgv","_id":"6288c7418e9ed800049b39e3","glucose":81,"avgDelta":"-3.00","BGI":-1.9,"deviation":"-1.10"},{"device":"AndroidAPS-DexcomG6","date":1653132249000,"dateString":"2022-05-21T11:24:09.000Z","isValid":true,"sgv":109,"direction":"FortyFiveUp","type":"sgv","_id":"6288cbf98e9ed800049b39f2","glucose":109,"avgDelta":"7.00","BGI":-1.94,"deviation":"8.94","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653132549000,"dateString":"2022-05-21T11:29:09.000Z","isValid":true,"sgv":118,"direction":"FortyFiveUp","type":"sgv","_id":"6288cd278e9ed800049b39f5","glucose":118,"avgDelta":"9.00","BGI":-9.57,"deviation":"18.57"},{"device":"AndroidAPS-DexcomG6","date":1653132849000,"dateString":"2022-05-21T11:34:09.000Z","isValid":true,"sgv":121,"direction":"FortyFiveUp","type":"sgv","_id":"6288ce548e9ed800049b39f7","glucose":121,"avgDelta":"8.00","BGI":-15.47,"deviation":"23.47"},{"device":"AndroidAPS-DexcomG6","date":1653133149000,"dateString":"2022-05-21T11:39:09.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","_id":"6288cf770f1be700041e59c8","glucose":114,"avgDelta":"4.00","BGI":-20.04,"deviation":"24.04"},{"device":"AndroidAPS-DexcomG6","date":1653133449000,"dateString":"2022-05-21T11:44:09.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","_id":"6288d0a80f1be700041e59cb","glucose":101,"avgDelta":"-2.00","BGI":-23.32,"deviation":"21.32"},{"device":"AndroidAPS-DexcomG6","date":1653133749000,"dateString":"2022-05-21T11:49:09.000Z","isValid":true,"sgv":87,"direction":"FortyFiveDown","type":"sgv","_id":"6288d1d80f1be700041e59cf","glucose":87,"avgDelta":"-7.75","BGI":-25.69,"deviation":"17.94"},{"device":"AndroidAPS-DexcomG6","date":1653134049000,"dateString":"2022-05-21T11:54:09.000Z","isValid":true,"sgv":79,"direction":"FortyFiveDown","type":"sgv","_id":"6288d3060f1be700041e59d2","glucose":79,"avgDelta":"-10.50","BGI":-27.28,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134349000,"dateString":"2022-05-21T11:59:09.000Z","isValid":true,"sgv":76,"direction":"FortyFiveDown","type":"sgv","_id":"6288d4220f1be700041e59d5","glucose":76,"avgDelta":"-9.50","BGI":-28.06,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134649000,"dateString":"2022-05-21T12:04:09.000Z","isValid":true,"sgv":77,"direction":"Flat","type":"sgv","_id":"6288d5500f1be700041e59d7","glucose":77,"avgDelta":"-6.00","BGI":-28.32,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653134949000,"dateString":"2022-05-21T12:09:09.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","_id":"6288d67f0f1be700041e59da","glucose":78,"avgDelta":"-2.25","BGI":-28.14,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135249000,"dateString":"2022-05-21T12:14:09.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"6288d7ae0f1be700041e59de","glucose":79,"avgDelta":"0.00","BGI":-27.76,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135549000,"dateString":"2022-05-21T12:19:09.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","_id":"6288d8e00f1be700041e59e0","glucose":78,"avgDelta":"0.50","BGI":-27.02,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653135849000,"dateString":"2022-05-21T12:24:09.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","_id":"6288d9fb0f1be700041e59e2","glucose":76,"avgDelta":"-0.25","BGI":-26.12,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136149000,"dateString":"2022-05-21T12:29:09.000Z","isValid":true,"sgv":73,"direction":"Flat","type":"sgv","_id":"6288db8a0f1be700041e59e5","glucose":73,"avgDelta":"-1.25","BGI":-25,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136449000,"dateString":"2022-05-21T12:34:09.000Z","isValid":true,"sgv":70,"direction":"Flat","type":"sgv","_id":"6288dd270f1be700041e59e8","glucose":70,"avgDelta":"-2.25","BGI":-23.7,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653136749000,"dateString":"2022-05-21T12:39:09.000Z","isValid":true,"sgv":68,"direction":"Flat","type":"sgv","_id":"6288de580f1be700041e59ea","glucose":68,"avgDelta":"-2.50","BGI":-22.37,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137049000,"dateString":"2022-05-21T12:44:09.000Z","isValid":true,"sgv":69,"direction":"Flat","type":"sgv","_id":"6288df8a0f1be700041e59ec","glucose":69,"avgDelta":"-1.75","BGI":-20.95,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137350000,"dateString":"2022-05-21T12:49:10.000Z","isValid":true,"sgv":72,"direction":"Flat","type":"sgv","_id":"6288dfd60f1be700041e59ee","glucose":72,"avgDelta":"-0.25","BGI":-19.52,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137649000,"dateString":"2022-05-21T12:54:09.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","_id":"6288e1040f1be700041e59f0","glucose":79,"avgDelta":"2.25","BGI":-18.02,"deviation":"0.00"},{"device":"AndroidAPS-DexcomG6","date":1653137949000,"dateString":"2022-05-21T12:59:09.000Z","isValid":true,"sgv":86,"direction":"Flat","type":"sgv","_id":"6288e24c0f1be700041e59f3","glucose":86,"avgDelta":"4.50","BGI":-17.54,"deviation":"22.04"},{"device":"AndroidAPS-DexcomG6","date":1653138249000,"dateString":"2022-05-21T13:04:09.000Z","isValid":true,"sgv":93,"direction":"FortyFiveUp","type":"sgv","_id":"6288e3610f1be700041e59f6","glucose":93,"avgDelta":"6.00","BGI":-17.8,"deviation":"23.80"},{"device":"AndroidAPS-DexcomG6","date":1653138549000,"dateString":"2022-05-21T13:09:09.000Z","isValid":true,"sgv":95,"direction":"FortyFiveUp","type":"sgv","_id":"6288e4900f1be700041e59f8","glucose":95,"avgDelta":"5.75","BGI":-18.1,"deviation":"23.85"},{"device":"AndroidAPS-DexcomG6","date":1653138849000,"dateString":"2022-05-21T13:14:09.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"6288e5d00f1be700041e59fb","glucose":94,"avgDelta":"3.75","BGI":-18.53,"deviation":"22.28"},{"device":"AndroidAPS-DexcomG6","date":1653139150000,"dateString":"2022-05-21T13:19:10.000Z","isValid":true,"sgv":93,"direction":"Flat","type":"sgv","_id":"6288e7030f1be700041e59fd","glucose":93,"avgDelta":"1.75","BGI":-18.83,"deviation":"20.58"},{"device":"AndroidAPS-DexcomG6","date":1653139450000,"dateString":"2022-05-21T13:24:10.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","_id":"6288e82c0f1be700041e5a00","glucose":94,"avgDelta":"0.25","BGI":-18.83,"deviation":"19.08"},{"device":"AndroidAPS-DexcomG6","date":1653139749000,"dateString":"2022-05-21T13:29:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"6288e9410f1be700041e5a03","glucose":98,"avgDelta":"0.75","BGI":-18.58,"deviation":"19.33"},{"device":"AndroidAPS-DexcomG6","date":1653140049000,"dateString":"2022-05-21T13:34:09.000Z","isValid":true,"sgv":105,"direction":"Flat","type":"sgv","_id":"6288ea6e0f1be700041e5a06","glucose":105,"avgDelta":"2.75","BGI":-18.45,"deviation":"21.20"},{"device":"AndroidAPS-DexcomG6","date":1653140349000,"dateString":"2022-05-21T13:39:09.000Z","isValid":true,"sgv":114,"direction":"FortyFiveUp","type":"sgv","_id":"6288eb9d0f1be700041e5a09","glucose":114,"avgDelta":"5.25","BGI":-18.58,"deviation":"23.83"},{"device":"AndroidAPS-DexcomG6","date":1653140648000,"dateString":"2022-05-21T13:44:08.000Z","isValid":true,"sgv":121,"direction":"FortyFiveUp","type":"sgv","_id":"6288ecca0f1be700041e5a0b","glucose":121,"avgDelta":"6.75","BGI":-18.71,"deviation":"25.46"},{"device":"AndroidAPS-DexcomG6","date":1653140949000,"dateString":"2022-05-21T13:49:09.000Z","isValid":true,"sgv":126,"direction":"FortyFiveUp","type":"sgv","_id":"6288edfc2634cd0004296065","glucose":126,"avgDelta":"7.00","BGI":-19.05,"deviation":"26.05"},{"device":"AndroidAPS-DexcomG6","date":1653141249000,"dateString":"2022-05-21T13:54:09.000Z","isValid":true,"sgv":131,"direction":"FortyFiveUp","type":"sgv","_id":"6288ef2a2634cd0004296067","glucose":131,"avgDelta":"6.50","BGI":-19.48,"deviation":"25.98"},{"device":"AndroidAPS-DexcomG6","date":1653141548000,"dateString":"2022-05-21T13:59:08.000Z","isValid":true,"sgv":139,"direction":"FortyFiveUp","type":"sgv","_id":"6288f03f2634cd000429606a","glucose":139,"avgDelta":"6.25","BGI":-19.91,"deviation":"26.16"},{"device":"AndroidAPS-DexcomG6","date":1653141849000,"dateString":"2022-05-21T14:04:09.000Z","isValid":true,"sgv":147,"direction":"FortyFiveUp","type":"sgv","_id":"6288f16d2634cd000429606c","glucose":147,"avgDelta":"6.50","BGI":-20.17,"deviation":"26.67"},{"device":"AndroidAPS-DexcomG6","date":1653142149000,"dateString":"2022-05-21T14:09:09.000Z","isValid":true,"sgv":155,"direction":"FortyFiveUp","type":"sgv","_id":"6288f29b2634cd000429606f","glucose":155,"avgDelta":"7.25","BGI":-20.73,"deviation":"27.98"},{"device":"AndroidAPS-DexcomG6","date":1653142449000,"dateString":"2022-05-21T14:14:09.000Z","isValid":true,"sgv":160,"direction":"FortyFiveUp","type":"sgv","_id":"6288f3c92634cd0004296071","glucose":160,"avgDelta":"7.25","BGI":-21.08,"deviation":"28.33"},{"device":"AndroidAPS-DexcomG6","date":1653142749000,"dateString":"2022-05-21T14:19:09.000Z","isValid":true,"sgv":166,"direction":"FortyFiveUp","type":"sgv","_id":"6288f4f72634cd0004296074","glucose":166,"avgDelta":"6.75","BGI":-21.55,"deviation":"28.30"},{"device":"AndroidAPS-DexcomG6","date":1653143049000,"dateString":"2022-05-21T14:24:09.000Z","isValid":true,"sgv":174,"direction":"FortyFiveUp","type":"sgv","_id":"6288f62c0e0c880004d58dd8","glucose":174,"avgDelta":"6.75","BGI":-21.89,"deviation":"28.64"},{"device":"AndroidAPS-DexcomG6","date":1653143349000,"dateString":"2022-05-21T14:29:09.000Z","isValid":true,"sgv":182,"direction":"FortyFiveUp","type":"sgv","_id":"6288f75a0e0c880004d58ddb","glucose":182,"avgDelta":"6.75","BGI":-21.98,"deviation":"28.73"},{"device":"AndroidAPS-DexcomG6","date":1653143650000,"dateString":"2022-05-21T14:34:10.000Z","isValid":true,"sgv":185,"direction":"FortyFiveUp","type":"sgv","_id":"6288f8880e0c880004d58dde","glucose":185,"avgDelta":"6.25","BGI":-21.85,"deviation":"28.10"},{"device":"AndroidAPS-DexcomG6","date":1653143949000,"dateString":"2022-05-21T14:39:09.000Z","isValid":true,"sgv":184,"direction":"Flat","type":"sgv","_id":"6288f9b60e0c880004d58de0","glucose":184,"avgDelta":"4.50","BGI":-21.46,"deviation":"25.96"},{"device":"AndroidAPS-DexcomG6","date":1653144249000,"dateString":"2022-05-21T14:44:09.000Z","isValid":true,"sgv":180,"direction":"Flat","type":"sgv","_id":"6288facb0e0c880004d58de3","glucose":180,"avgDelta":"1.50","BGI":-20.82,"deviation":"22.32"},{"device":"AndroidAPS-DexcomG6","date":1653144550000,"dateString":"2022-05-21T14:49:10.000Z","isValid":true,"sgv":178,"direction":"Flat","type":"sgv","_id":"6288fbf90e0c880004d58de5","glucose":178,"avgDelta":"-1.00","BGI":-20,"deviation":"19.00"},{"device":"AndroidAPS-DexcomG6","date":1653144849000,"dateString":"2022-05-21T14:54:09.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","_id":"6288fd270e0c880004d58de7","glucose":177,"avgDelta":"-2.00","BGI":-19.01,"deviation":"17.01"},{"device":"AndroidAPS-DexcomG6","date":1653145149000,"dateString":"2022-05-21T14:59:09.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","_id":"6288fe56c9346b0004863359","glucose":176,"avgDelta":"-2.00","BGI":-17.97,"deviation":"15.97"},{"device":"AndroidAPS-DexcomG6","date":1653145449000,"dateString":"2022-05-21T15:04:09.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","_id":"6288ff9ec9346b000486335b","glucose":177,"avgDelta":"-0.75","BGI":-16.85,"deviation":"16.10"},{"device":"AndroidAPS-DexcomG6","date":1653145750000,"dateString":"2022-05-21T15:09:10.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","_id":"628900b2c9346b000486335d","glucose":177,"avgDelta":"-0.25","BGI":-15.73,"deviation":"15.48"},{"device":"AndroidAPS-DexcomG6","date":1653146050000,"dateString":"2022-05-21T15:14:10.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","_id":"628901e0c9346b000486335f","glucose":177,"avgDelta":"0.00","BGI":-14.57,"deviation":"14.57"},{"device":"AndroidAPS-DexcomG6","date":1653146349000,"dateString":"2022-05-21T15:19:09.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","_id":"6289030ec9346b0004863361","glucose":177,"avgDelta":"0.25","BGI":-13.45,"deviation":"13.70"},{"device":"AndroidAPS-DexcomG6","date":1653146650000,"dateString":"2022-05-21T15:24:10.000Z","isValid":true,"sgv":178,"direction":"Flat","type":"sgv","_id":"6289043cc9346b0004863363","glucose":178,"avgDelta":"0.25","BGI":-12.33,"deviation":"12.58"},{"device":"AndroidAPS-DexcomG6","date":1653146949000,"dateString":"2022-05-21T15:29:09.000Z","isValid":true,"sgv":178,"direction":"Flat","type":"sgv","_id":"6289056ac9346b0004863366","glucose":178,"avgDelta":"0.25","BGI":-11.29,"deviation":"11.54"},{"device":"AndroidAPS-DexcomG6","date":1653147249000,"dateString":"2022-05-21T15:34:09.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","_id":"6289067fc9346b0004863369","glucose":177,"avgDelta":"0.00","BGI":-10.17,"deviation":"10.17"},{"device":"AndroidAPS-DexcomG6","date":1653147549000,"dateString":"2022-05-21T15:39:09.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","_id":"628907c5cf7ee10004a2b1ce","glucose":176,"avgDelta":"-0.25","BGI":-9.27,"deviation":"9.02"},{"device":"AndroidAPS-DexcomG6","date":1653147849000,"dateString":"2022-05-21T15:44:09.000Z","isValid":true,"sgv":175,"direction":"Flat","type":"sgv","_id":"628908f3cf7ee10004a2b1d1","glucose":175,"avgDelta":"-0.75","BGI":-8.49,"deviation":"7.74"},{"device":"AndroidAPS-DexcomG6","date":1653148149000,"dateString":"2022-05-21T15:49:09.000Z","isValid":true,"sgv":174,"direction":"Flat","type":"sgv","_id":"62890a21cf7ee10004a2b1d3","glucose":174,"avgDelta":"-1.00","BGI":-7.89,"deviation":"6.89"},{"device":"AndroidAPS-DexcomG6","date":1653148450000,"dateString":"2022-05-21T15:54:10.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","_id":"62890b36cf7ee10004a2b1d7","glucose":176,"avgDelta":"-0.25","BGI":-7.37,"deviation":"7.12"},{"device":"AndroidAPS-DexcomG6","date":1653148749000,"dateString":"2022-05-21T15:59:09.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","_id":"62890c64cf7ee10004a2b1da","glucose":176,"avgDelta":"0.00","BGI":-6.94,"deviation":"6.94"},{"device":"AndroidAPS-DexcomG6","date":1653149049000,"dateString":"2022-05-21T16:04:09.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","_id":"62890daccf7ee10004a2b1de","glucose":176,"avgDelta":"0.25","BGI":-6.72,"deviation":"6.97"},{"device":"AndroidAPS-DexcomG6","date":1653149349000,"dateString":"2022-05-21T16:09:09.000Z","isValid":true,"sgv":174,"direction":"Flat","type":"sgv","_id":"62890edacf7ee10004a2b1e2","glucose":174,"avgDelta":"0.00","BGI":-6.64,"deviation":"6.64"},{"device":"AndroidAPS-DexcomG6","date":1653149650000,"dateString":"2022-05-21T16:14:10.000Z","isValid":true,"sgv":173,"direction":"Flat","type":"sgv","_id":"62890fff1090500004ca46fd","glucose":173,"avgDelta":"-0.75","BGI":-6.42,"deviation":"5.67"},{"device":"AndroidAPS-DexcomG6","date":1653149949000,"dateString":"2022-05-21T16:19:09.000Z","isValid":true,"sgv":172,"direction":"Flat","type":"sgv","_id":"6289130f1090500004ca46ff","glucose":172,"avgDelta":"-1.00","BGI":-6.12,"deviation":"5.12"},{"device":"AndroidAPS-DexcomG6","date":1653150249000,"dateString":"2022-05-21T16:24:09.000Z","isValid":true,"sgv":170,"direction":"Flat","type":"sgv","_id":"628913111090500004ca4704","glucose":170,"avgDelta":"-1.50","BGI":-5.95,"deviation":"4.45"},{"device":"AndroidAPS-DexcomG6","date":1653150549000,"dateString":"2022-05-21T16:29:09.000Z","isValid":true,"sgv":165,"direction":"Flat","type":"sgv","_id":"628913731090500004ca4706","glucose":165,"avgDelta":"-2.25","BGI":-5.73,"deviation":"3.48"},{"device":"AndroidAPS-DexcomG6","date":1653150849000,"dateString":"2022-05-21T16:34:09.000Z","isValid":true,"sgv":161,"direction":"Flat","type":"sgv","_id":"628914d01090500004ca4709","glucose":161,"avgDelta":"-3.00","BGI":-5.47,"deviation":"2.47"},{"device":"AndroidAPS-DexcomG6","date":1653151149000,"dateString":"2022-05-21T16:39:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"628915ce1090500004ca470c","glucose":158,"avgDelta":"-3.50","BGI":-5.09,"deviation":"1.59"},{"device":"AndroidAPS-DexcomG6","date":1653151449000,"dateString":"2022-05-21T16:44:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"628916f81090500004ca4710","glucose":158,"avgDelta":"-3.00","BGI":-4.74,"deviation":"1.74"},{"device":"AndroidAPS-DexcomG6","date":1653151749000,"dateString":"2022-05-21T16:49:09.000Z","isValid":true,"sgv":159,"direction":"Flat","type":"sgv","_id":"628918261090500004ca4714","glucose":159,"avgDelta":"-1.50","BGI":-4.53,"deviation":"3.03"},{"device":"AndroidAPS-DexcomG6","date":1653152049000,"dateString":"2022-05-21T16:54:09.000Z","isValid":true,"sgv":160,"direction":"Flat","type":"sgv","_id":"628919531090500004ca4717","glucose":160,"avgDelta":"-0.25","BGI":-4.35,"deviation":"4.10"},{"device":"AndroidAPS-DexcomG6","date":1653152349000,"dateString":"2022-05-21T16:59:09.000Z","isValid":true,"sgv":158,"direction":"Flat","type":"sgv","_id":"62891a811090500004ca471a","glucose":158,"avgDelta":"0.00","BGI":-4.35,"deviation":"4.35"},{"device":"AndroidAPS-DexcomG6","date":1653152649000,"dateString":"2022-05-21T17:04:09.000Z","isValid":true,"sgv":149,"direction":"Flat","type":"sgv","_id":"62891ba31090500004ca471d","glucose":149,"avgDelta":"-2.25","BGI":-4.35,"deviation":"2.10"},{"device":"AndroidAPS-DexcomG6","date":1653152949000,"dateString":"2022-05-21T17:09:09.000Z","isValid":true,"sgv":138,"direction":"FortyFiveDown","type":"sgv","_id":"62891cd01090500004ca471f","glucose":138,"avgDelta":"-5.25","BGI":-4.22,"deviation":"-1.03"},{"device":"AndroidAPS-DexcomG6","date":1653155049000,"dateString":"2022-05-21T17:44:09.000Z","isValid":true,"sgv":116,"direction":"NONE","type":"sgv","_id":"6289250d8809e60004c644dd","glucose":116,"avgDelta":"5.00","BGI":-2.16,"deviation":"7.16","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653155349000,"dateString":"2022-05-21T17:49:09.000Z","isValid":true,"sgv":123,"direction":"NONE","type":"sgv","_id":"6289263c8809e60004c644e1","glucose":123,"avgDelta":"7.50","BGI":-2.07,"deviation":"9.57"},{"device":"AndroidAPS-DexcomG6","date":1653155649000,"dateString":"2022-05-21T17:54:09.000Z","isValid":true,"sgv":124,"direction":"Flat","type":"sgv","_id":"6289276a8809e60004c644e3","glucose":124,"avgDelta":"6.75","BGI":-2.11,"deviation":"8.86"},{"device":"AndroidAPS-DexcomG6","date":1653155950000,"dateString":"2022-05-21T17:59:10.000Z","isValid":true,"sgv":123,"direction":"Flat","type":"sgv","_id":"6289287e8809e60004c644e6","glucose":123,"avgDelta":"3.75","BGI":-2.16,"deviation":"5.91"},{"device":"AndroidAPS-DexcomG6","date":1653156250000,"dateString":"2022-05-21T18:04:10.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","_id":"628929ac8809e60004c644e9","glucose":119,"avgDelta":"0.75","BGI":-2.07,"deviation":"2.82"},{"device":"AndroidAPS-DexcomG6","date":1653156549000,"dateString":"2022-05-21T18:09:09.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","_id":"62892af2840d8d0004a20bf0","glucose":114,"avgDelta":"-2.25","BGI":-1.9,"deviation":"-0.35"},{"device":"AndroidAPS-DexcomG6","date":1653164649000,"dateString":"2022-05-21T20:24:09.000Z","isValid":true,"sgv":133,"direction":"FortyFiveUp","type":"sgv","_id":"62894a7e4493460004e63a38","glucose":133,"avgDelta":"9.50","BGI":-6.46,"deviation":"15.96","uamAbsorption":"start"},{"device":"AndroidAPS-DexcomG6","date":1653164950000,"dateString":"2022-05-21T20:29:10.000Z","isValid":true,"sgv":143,"direction":"SingleUp","type":"sgv","_id":"62894bab80fc7e00041b229b","glucose":143,"avgDelta":"10.75","BGI":-14.31,"deviation":"25.06"},{"device":"AndroidAPS-DexcomG6","date":1653165249000,"dateString":"2022-05-21T20:34:09.000Z","isValid":true,"sgv":145,"direction":"FortyFiveUp","type":"sgv","_id":"62894cdb80fc7e00041b229e","glucose":145,"avgDelta":"9.00","BGI":-20.43,"deviation":"29.43"},{"device":"AndroidAPS-DexcomG6","date":1653165550000,"dateString":"2022-05-21T20:39:10.000Z","isValid":true,"sgv":139,"direction":"Flat","type":"sgv","_id":"62894e0980fc7e00041b22a0","glucose":139,"avgDelta":"4.75","BGI":-25.17,"deviation":"29.92"},{"device":"AndroidAPS-DexcomG6","date":1653165850000,"dateString":"2022-05-21T20:44:10.000Z","isValid":true,"sgv":128,"direction":"Flat","type":"sgv","_id":"62894f3880fc7e00041b22a3","glucose":128,"avgDelta":"-1.25","BGI":-28.62,"deviation":"27.37"},{"device":"AndroidAPS-DexcomG6","date":1653166149000,"dateString":"2022-05-21T20:49:09.000Z","isValid":true,"sgv":118,"direction":"FortyFiveDown","type":"sgv","_id":"6289506680fc7e00041b22a5","glucose":118,"avgDelta":"-6.25","BGI":-30.95,"deviation":"24.70"},{"device":"AndroidAPS-DexcomG6","date":1653166450000,"dateString":"2022-05-21T20:54:10.000Z","isValid":true,"sgv":110,"direction":"FortyFiveDown","type":"sgv","_id":"6289519580fc7e00041b22a7","glucose":110,"avgDelta":"-8.75","BGI":-32.45,"deviation":"23.70"},{"device":"AndroidAPS-DexcomG6","date":1653166749000,"dateString":"2022-05-21T20:59:09.000Z","isValid":true,"sgv":104,"direction":"FortyFiveDown","type":"sgv","_id":"628952c680fc7e00041b22a9","glucose":104,"avgDelta":"-8.75","BGI":-33.27,"deviation":"24.52"},{"device":"AndroidAPS-DexcomG6","date":1653167049000,"dateString":"2022-05-21T21:04:09.000Z","isValid":true,"sgv":101,"direction":"FortyFiveDown","type":"sgv","_id":"628953e79bf1e6000482ff90","glucose":101,"avgDelta":"-6.75","BGI":-33.45,"deviation":"26.70"},{"device":"AndroidAPS-DexcomG6","date":1653167350000,"dateString":"2022-05-21T21:09:10.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","_id":"628955179bf1e6000482ff92","glucose":99,"avgDelta":"-4.75","BGI":-33.14,"deviation":"28.39"},{"device":"AndroidAPS-DexcomG6","date":1653167650000,"dateString":"2022-05-21T21:14:10.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"628956919bf1e6000482ff96","glucose":98,"avgDelta":"-3.00","BGI":-32.5,"deviation":"29.50"},{"device":"AndroidAPS-DexcomG6","date":1653167949000,"dateString":"2022-05-21T21:19:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"6289583f9bf1e6000482ff9b","glucose":98,"avgDelta":"-1.50","BGI":-31.64,"deviation":"30.14"},{"device":"AndroidAPS-DexcomG6","date":1653168250000,"dateString":"2022-05-21T21:24:10.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"628959ed9bf1e6000482ff9e","glucose":98,"avgDelta":"-0.75","BGI":-30.69,"deviation":"29.94"},{"device":"AndroidAPS-DexcomG6","date":1653168549000,"dateString":"2022-05-21T21:29:09.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","_id":"62895b9a9bf1e6000482ffa1","glucose":98,"avgDelta":"-0.25","BGI":-29.74,"deviation":"29.49"},{"device":"AndroidAPS-DexcomG6","date":1653168849000,"dateString":"2022-05-21T21:34:09.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","_id":"62895d98fb144900043c34e5","glucose":100,"avgDelta":"0.50","BGI":-28.58,"deviation":"29.08"},{"device":"AndroidAPS-DexcomG6","date":1653169150000,"dateString":"2022-05-21T21:39:10.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","_id":"62895f5ffb144900043c34e8","glucose":102,"avgDelta":"1.00","BGI":-27.28,"deviation":"28.28"},{"device":"AndroidAPS-DexcomG6","date":1653169449000,"dateString":"2022-05-21T21:44:09.000Z","isValid":true,"sgv":105,"direction":"Flat","type":"sgv","_id":"628961a4fb144900043c34ea","glucose":105,"avgDelta":"1.75","BGI":-25.82,"deviation":"27.57"},{"device":"AndroidAPS-DexcomG6","date":1653169749000,"dateString":"2022-05-21T21:49:09.000Z","isValid":true,"sgv":107,"direction":"Flat","type":"sgv","_id":"628964906a5ecf00042d546b","glucose":107,"avgDelta":"2.25","BGI":-24.39,"deviation":"26.64"},{"device":"AndroidAPS-DexcomG6","date":1653170049000,"dateString":"2022-05-21T21:54:09.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","_id":"628967a06a5ecf00042d546e","glucose":110,"avgDelta":"2.50","BGI":-22.84,"deviation":"25.34"},{"device":"AndroidAPS-DexcomG6","date":1653170350000,"dateString":"2022-05-21T21:59:10.000Z","isValid":true,"sgv":112,"direction":"Flat","type":"sgv","_id":"628969016a5ecf00042d5470","glucose":112,"avgDelta":"2.50","BGI":-21.29,"deviation":"23.79"},{"device":"AndroidAPS-DexcomG6","date":1653170650000,"dateString":"2022-05-21T22:04:10.000Z","isValid":true,"sgv":115,"direction":"Flat","type":"sgv","_id":"628969fd6a5ecf00042d5471","glucose":115,"avgDelta":"2.50","BGI":-19.7,"deviation":"22.20"},{"device":"AndroidAPS-DexcomG6","date":1653170950000,"dateString":"2022-05-21T22:09:10.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","_id":"62896ac76a5ecf00042d5472","glucose":117,"avgDelta":"2.50","BGI":-18.15,"deviation":"20.65"},{"device":"AndroidAPS-DexcomG6","date":1653171250000,"dateString":"2022-05-21T22:14:10.000Z","isValid":true,"sgv":118,"direction":"Flat","type":"sgv","_id":"62896b5f6a5ecf00042d5474","glucose":118,"avgDelta":"2.00","BGI":-16.59,"deviation":"18.59"},{"device":"AndroidAPS-DexcomG6","date":1653171549000,"dateString":"2022-05-21T22:19:09.000Z","isValid":true,"sgv":120,"direction":"Flat","type":"sgv","_id":"62896c1037d09a00043f2b13","glucose":120,"avgDelta":"2.00","BGI":-15.13,"deviation":"17.13"},{"device":"AndroidAPS-DexcomG6","date":1653171849000,"dateString":"2022-05-21T22:24:09.000Z","isValid":true,"sgv":122,"direction":"Flat","type":"sgv","_id":"62896c7537d09a00043f2b14","glucose":122,"avgDelta":"1.75","BGI":-13.75,"deviation":"15.50"},{"device":"AndroidAPS-DexcomG6","date":1653172150000,"dateString":"2022-05-21T22:29:10.000Z","isValid":true,"sgv":124,"direction":"Flat","type":"sgv","_id":"62896cda37d09a00043f2b16","glucose":124,"avgDelta":"1.75","BGI":-12.41,"deviation":"14.16"},{"device":"AndroidAPS-DexcomG6","date":1653172450000,"dateString":"2022-05-21T22:34:10.000Z","isValid":true,"sgv":124,"direction":"Flat","type":"sgv","_id":"62896d8b37d09a00043f2b17","glucose":124,"avgDelta":"1.50","BGI":-11.21,"deviation":"12.71"},{"device":"AndroidAPS-DexcomG6","date":1653172749000,"dateString":"2022-05-21T22:39:09.000Z","isValid":true,"sgv":120,"direction":"Flat","type":"sgv","_id":"62896e8937d09a00043f2b19","glucose":120,"avgDelta":"0.00","BGI":-10.13,"deviation":"10.13"},{"device":"AndroidAPS-DexcomG6","date":1653173050000,"dateString":"2022-05-21T22:44:10.000Z","isValid":true,"sgv":115,"direction":"Flat","type":"sgv","_id":"62896f8537d09a00043f2b1a","glucose":115,"avgDelta":"-1.75","BGI":-9.05,"deviation":"7.30"},{"device":"AndroidAPS-DexcomG6","date":1653173350000,"dateString":"2022-05-21T22:49:10.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","_id":"62896fb837d09a00043f2b1b","glucose":110,"avgDelta":"-3.50","BGI":-8.15,"deviation":"4.65"},{"device":"AndroidAPS-DexcomG6","date":1653173650000,"dateString":"2022-05-21T22:54:10.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"6289717d37d09a00043f2b1e","glucose":108,"avgDelta":"-4.00","BGI":-7.28,"deviation":"3.28"},{"device":"AndroidAPS-DexcomG6","date":1653173949000,"dateString":"2022-05-21T22:59:09.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","_id":"6289721437d09a00043f2b1f","glucose":108,"avgDelta":"-3.00","BGI":-6.42,"deviation":"3.42"},{"device":"AndroidAPS-DexcomG6","date":1653174249000,"dateString":"2022-05-21T23:04:09.000Z","isValid":true,"sgv":111,"direction":"Flat","type":"sgv","_id":"6289726037d09a00043f2b20","glucose":111,"avgDelta":"-1.00","BGI":-5.69,"deviation":"4.69"},{"device":"AndroidAPS-DexcomG6","date":1653174550000,"dateString":"2022-05-21T23:09:10.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","_id":"6289727937d09a00043f2b21","glucose":114,"avgDelta":"1.00","BGI":-4.96,"deviation":"5.96"},{"device":"AndroidAPS-DexcomG6","date":1653174850000,"dateString":"2022-05-21T23:14:10.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","_id":"6289727a37d09a00043f2b22","glucose":117,"avgDelta":"2.25","BGI":-4.35,"deviation":"6.60"},{"device":"AndroidAPS-DexcomG6","date":1653175149000,"dateString":"2022-05-21T23:19:09.000Z","isValid":true,"sgv":120,"direction":"Flat","type":"sgv","_id":"6289738f37d09a00043f2b26","glucose":120,"avgDelta":"3.00","BGI":-3.84,"deviation":"6.84"},{"device":"AndroidAPS-DexcomG6","date":1653175450000,"dateString":"2022-05-21T23:24:10.000Z","isValid":true,"sgv":123,"direction":"Flat","type":"sgv","_id":"628974b671a363000480abbc","glucose":123,"avgDelta":"3.00","BGI":-3.4,"deviation":"6.40"},{"device":"AndroidAPS-DexcomG6","date":1653175750000,"dateString":"2022-05-21T23:29:10.000Z","isValid":true,"sgv":124,"direction":"Flat","type":"sgv","_id":"628975e471a363000480abbe","glucose":124,"avgDelta":"2.50","BGI":-3.19,"deviation":"5.69"},{"device":"AndroidAPS-DexcomG6","date":1653176050000,"dateString":"2022-05-21T23:34:10.000Z","isValid":true,"sgv":127,"direction":"Flat","type":"sgv","_id":"6289771371a363000480abc1","glucose":127,"avgDelta":"2.50","BGI":-2.93,"deviation":"5.43"},{"device":"AndroidAPS-DexcomG6","date":1653176350000,"dateString":"2022-05-21T23:39:10.000Z","isValid":true,"sgv":132,"direction":"Flat","type":"sgv","_id":"6289784271a363000480abc3","glucose":132,"avgDelta":"3.00","BGI":-2.67,"deviation":"5.67"},{"device":"AndroidAPS-DexcomG6","date":1653176650000,"dateString":"2022-05-21T23:44:10.000Z","isValid":true,"sgv":139,"direction":"Flat","type":"sgv","_id":"6289797071a363000480abc7","glucose":139,"avgDelta":"4.00","BGI":-2.59,"deviation":"6.59"},{"device":"AndroidAPS-DexcomG6","date":1653176950000,"dateString":"2022-05-21T23:49:10.000Z","isValid":true,"sgv":143,"direction":"FortyFiveUp","type":"sgv","_id":"62897a8771a363000480abca","glucose":143,"avgDelta":"4.75","BGI":-2.63,"deviation":"7.38"},{"device":"AndroidAPS-DexcomG6","date":1653177250000,"dateString":"2022-05-21T23:54:10.000Z","isValid":true,"sgv":146,"direction":"Flat","type":"sgv","_id":"62897bc89d6f1800047cd0c9","glucose":146,"avgDelta":"4.75","BGI":-3.23,"deviation":"7.98"},{"device":"AndroidAPS-DexcomG6","date":1653177550000,"dateString":"2022-05-21T23:59:10.000Z","isValid":true,"sgv":147,"direction":"Flat","type":"sgv","_id":"62897cde9d6f1800047cd0cc","glucose":147,"avgDelta":"3.75","BGI":-3.79,"deviation":"7.54"},{"device":"AndroidAPS-DexcomG6","date":1653177850000,"dateString":"2022-05-22T00:04:10.000Z","isValid":true,"sgv":149,"direction":"Flat","type":"sgv","_id":"62897e0c9d6f1800047cd0d0","glucose":149,"avgDelta":"2.50","BGI":-4.22,"deviation":"6.72"},{"device":"AndroidAPS-DexcomG6","date":1653178149000,"dateString":"2022-05-22T00:09:09.000Z","isValid":true,"sgv":149,"direction":"Flat","type":"sgv","_id":"62897f3b9d6f1800047cd0d3","glucose":149,"avgDelta":"1.50","BGI":-4.48,"deviation":"5.98"},{"device":"AndroidAPS-DexcomG6","date":1653178449000,"dateString":"2022-05-22T00:14:09.000Z","isValid":true,"sgv":147,"direction":"Flat","type":"sgv","_id":"6289806a9d6f1800047cd0d6","glucose":147,"avgDelta":"0.25","BGI":-4.61,"deviation":"4.86"},{"device":"AndroidAPS-DexcomG6","date":1653178750000,"dateString":"2022-05-22T00:19:10.000Z","isValid":true,"sgv":144,"direction":"Flat","type":"sgv","_id":"628981999d6f1800047cd0d8","glucose":144,"avgDelta":"-0.75","BGI":-4.57,"deviation":"3.82"},{"device":"AndroidAPS-DexcomG6","date":1653179050000,"dateString":"2022-05-22T00:24:10.000Z","isValid":true,"sgv":142,"direction":"Flat","type":"sgv","_id":"628982c89d6f1800047cd0db","glucose":142,"avgDelta":"-1.75","BGI":-4.48,"deviation":"2.73"},{"device":"AndroidAPS-DexcomG6","date":1653179350000,"dateString":"2022-05-22T00:29:10.000Z","isValid":true,"sgv":142,"direction":"Flat","type":"sgv","_id":"628983f69d6f1800047cd0dd","glucose":142,"avgDelta":"-1.75","BGI":-4.27,"deviation":"2.52"},{"device":"AndroidAPS-DexcomG6","date":1653179649000,"dateString":"2022-05-22T00:34:09.000Z","isValid":true,"sgv":143,"direction":"Flat","type":"sgv","_id":"62898517da46aa0004d1e0ea","glucose":143,"avgDelta":"-1.00","BGI":-4.01,"deviation":"3.01"},{"device":"AndroidAPS-DexcomG6","date":1653179949000,"dateString":"2022-05-22T00:39:09.000Z","isValid":true,"sgv":143,"direction":"Flat","type":"sgv","_id":"62898645da46aa0004d1e0ee","glucose":143,"avgDelta":"-0.25","BGI":-3.75,"deviation":"3.50"},{"device":"AndroidAPS-DexcomG6","date":1653180250000,"dateString":"2022-05-22T00:44:10.000Z","isValid":true,"sgv":135,"direction":"Flat","type":"sgv","_id":"62898774da46aa0004d1e0f1","glucose":135,"avgDelta":"-1.75","BGI":-3.49,"deviation":"1.74"},{"device":"AndroidAPS-DexcomG6","date":1653180549000,"dateString":"2022-05-22T00:49:09.000Z","isValid":true,"sgv":121,"direction":"FortyFiveDown","type":"sgv","_id":"628988a3da46aa0004d1e0f5","glucose":121,"avgDelta":"-5.25","BGI":-3.32,"deviation":"-1.93"}]} diff --git a/app/src/test/res/autotune/test3/autotune.2022-06-25-111350.log b/app/src/test/res/autotune/test3/autotune.2022-06-25-111350.log new file mode 100644 index 0000000000..49e1010a9a --- /dev/null +++ b/app/src/test/res/autotune/test3/autotune.2022-06-25-111350.log @@ -0,0 +1,425 @@ +Autotune disk usage: +160K . +Overall disk used/avail: +Filesystem Size Used Avail Use% Mounted on +rootfs 930G 431G 500G 47% / +Grabbing AAPS treatments.json and entries/sgv.json for date range... +oref0-autotune-prep --categorize_uam_as_basal ns-treatments.2022-05-21.json profile.json ns-entries.2022-05-21.json profile.pump.json > autotune.2022-05-21.json +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -16.9 IOB: 5.249 Activity: 0.0391 at 04:24:08 dev: 26.10 avgDelta: 9.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -18.9 IOB: 5.292 Activity: 0.0438 at 04:29:08 dev: 27.88 avgDelta: 9.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -20.3 IOB: 4.964 Activity: 0.047 at 04:34:09 dev: 24.01 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -21.1 IOB: 4.674 Activity: 0.0489 at 04:39:08 dev: 17.83 avgDelta: -3.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -21.5 IOB: 4.377 Activity: 0.0498 at 04:44:08 dev: 11.21 avgDelta: -10.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -21.5 IOB: 4.077 Activity: 0.0498 at 04:49:08 dev: 7.96 avgDelta: -13.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -21.2 IOB: 3.73 Activity: 0.0491 at 04:54:08 dev: 7.16 avgDelta: -14.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -20.5 IOB: 3.389 Activity: 0.0476 at 04:59:08 dev: 6.77 avgDelta: -13.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -19.7 IOB: 3.055 Activity: 0.0457 at 05:04:09 dev: 6.95 avgDelta: -12.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -18.8 IOB: 2.782 Activity: 0.0436 at 05:09:08 dev: 6.54 avgDelta: -12.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -17.7 IOB: 2.47 Activity: 0.0411 at 05:14:08 dev: 5.71 avgDelta: -12.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -16.6 IOB: 2.22 Activity: 0.0386 at 05:19:09 dev: 5.14 avgDelta: -11.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -15.4 IOB: 1.935 Activity: 0.0358 at 05:24:08 dev: 4.93 avgDelta: -10.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -14.3 IOB: 1.711 Activity: 0.0332 at 05:29:08 dev: 6.06 avgDelta: -8.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -13.1 IOB: 1.452 Activity: 0.0304 at 05:34:09 dev: 7.35 avgDelta: -5.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -12.1 IOB: 1.927 Activity: 0.028 at 05:39:09 dev: 8.32 avgDelta: -3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -11.6 IOB: 1.84 Activity: 0.027 at 05:44:08 dev: 8.64 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -11.1 IOB: 1.658 Activity: 0.0258 at 05:49:09 dev: 7.12 avgDelta: -4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -10.6 IOB: 1.482 Activity: 0.0245 at 05:54:08 dev: 5.31 avgDelta: -5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.6 BGI: -9.9 IOB: 1.264 Activity: 0.0229 at 05:59:09 dev: 4.62 avgDelta: -5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -9.1 IOB: 1.104 Activity: 0.0212 at 06:04:08 dev: 5.14 avgDelta: -4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -8.4 IOB: 0.952 Activity: 0.0194 at 06:09:09 dev: 7.36 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.8 IOB: 1.619 Activity: 0.0181 at 06:14:09 dev: 9.30 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.9 IOB: 1.678 Activity: 0.0184 at 06:19:09 dev: 10.68 avgDelta: 2.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -8.1 IOB: 1.775 Activity: 0.0187 at 06:24:08 dev: 9.81 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -8.2 IOB: 1.581 Activity: 0.019 at 06:29:08 dev: 6.44 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -8.1 IOB: 1.437 Activity: 0.0188 at 06:34:08 dev: 2.35 avgDelta: -5.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.9 IOB: 1.294 Activity: 0.0183 at 06:39:08 dev: -0.36 avgDelta: -8.25 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.6 IOB: 1.153 Activity: 0.0176 at 06:44:09 dev: 0.09 avgDelta: -7.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -7.2 IOB: 1.017 Activity: 0.0167 at 06:49:08 dev: 3.20 avgDelta: -4.00 ISF +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -6.7 IOB: 0.887 Activity: 0.0156 at 06:54:08 dev: 6.22 avgDelta: -0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -6.3 IOB: 1.011 Activity: 0.0147 at 06:59:08 dev: 7.59 avgDelta: 1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -6.1 IOB: 0.889 Activity: 0.0141 at 07:04:08 dev: 6.58 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -5.7 IOB: 0.771 Activity: 0.0133 at 07:09:08 dev: 2.98 avgDelta: -2.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -5.3 IOB: 0.656 Activity: 0.0124 at 07:14:09 dev: 0.09 avgDelta: -5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -4.9 IOB: 0.547 Activity: 0.0114 at 07:19:08 dev: -1.84 avgDelta: -6.75 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -4.4 IOB: 0.392 Activity: 0.0103 at 07:24:09 dev: -2.31 avgDelta: -6.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -3.9 IOB: 0.294 Activity: 0.0091 at 07:29:09 dev: -1.08 avgDelta: -5.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -3.5 IOB: 0.2 Activity: 0.008 at 07:34:09 dev: 0.45 avgDelta: -3.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.8 IOB: 0.065 Activity: 0.0066 at 07:39:09 dev: 2.34 avgDelta: -0.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.4 IOB: 0.034 Activity: 0.0055 at 07:44:09 dev: 3.37 avgDelta: 1.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.1 IOB: 0.549 Activity: 0.0048 at 07:49:08 dev: 3.57 avgDelta: 1.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.3 IOB: 0.674 Activity: 0.0053 at 07:54:09 dev: 3.53 avgDelta: 1.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.5 IOB: 0.597 Activity: 0.0057 at 07:59:09 dev: 2.71 avgDelta: 0.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -2.5 IOB: 0.468 Activity: 0.0058 at 08:04:09 dev: 1.50 avgDelta: -1.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -2.5 IOB: 0.389 Activity: 0.0057 at 08:09:09 dev: 0.21 avgDelta: -2.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -2.3 IOB: 0.262 Activity: 0.0053 at 08:14:09 dev: -0.47 avgDelta: -2.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -2.1 IOB: 0.186 Activity: 0.0048 at 08:19:09 dev: -0.93 avgDelta: -3.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -1.8 IOB: 0.064 Activity: 0.0041 at 08:24:09 dev: -1.48 avgDelta: -3.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -1.5 IOB: -0.005 Activity: 0.0034 at 08:29:09 dev: -2.03 avgDelta: -3.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -1.1 IOB: -0.12 Activity: 0.0026 at 08:34:09 dev: -2.13 avgDelta: -3.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -0.8 IOB: -0.181 Activity: 0.0018 at 08:39:09 dev: -2.47 avgDelta: -3.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -0.3 IOB: -0.287 Activity: 0.0008 at 08:44:09 dev: -2.41 avgDelta: -2.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 0.0 IOB: -0.34 Activity: 0 at 08:49:09 dev: -2.50 avgDelta: -2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 0.4 IOB: -0.436 Activity: -0.001 at 08:54:09 dev: -2.68 avgDelta: -2.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 0.8 IOB: -0.48 Activity: -0.0018 at 08:59:09 dev: -2.28 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 1.1 IOB: -0.519 Activity: -0.0026 at 09:04:09 dev: -1.12 avgDelta: 0.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 1.5 IOB: -0.554 Activity: -0.0034 at 09:09:09 dev: 0.00 avgDelta: 1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 1.8 IOB: -0.585 Activity: -0.0041 at 09:14:09 dev: 0.00 avgDelta: 2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.1 IOB: -0.662 Activity: -0.0049 at 09:19:09 dev: 0.39 avgDelta: 2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.4 IOB: -0.687 Activity: -0.0055 at 09:24:08 dev: -0.37 avgDelta: 2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.6 IOB: -0.708 Activity: -0.0061 at 09:29:09 dev: -0.13 avgDelta: 2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.8 IOB: -0.726 Activity: -0.0066 at 09:34:09 dev: 0.41 avgDelta: 3.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 3.1 IOB: -0.351 Activity: -0.0071 at 09:39:08 dev: 1.19 avgDelta: 4.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.8 IOB: -0.218 Activity: -0.0064 at 09:44:09 dev: 2.99 avgDelta: 5.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: 2.4 IOB: -0.088 Activity: -0.0055 at 09:49:09 dev: 4.63 avgDelta: 7.00 basal +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -1.0 IOB: 13.594 Activity: 0.0023 at 09:54:09 dev: 8.74 avgDelta: 7.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -14.3 IOB: 13.552 Activity: 0.0331 at 09:59:09 dev: 23.02 avgDelta: 8.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -24.7 IOB: 13.224 Activity: 0.0573 at 10:04:09 dev: 33.70 avgDelta: 9.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -32.8 IOB: 12.838 Activity: 0.076 at 10:09:08 dev: 40.76 avgDelta: 8.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -38.8 IOB: 12.322 Activity: 0.09 at 10:14:09 dev: 45.04 avgDelta: 6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -43.1 IOB: 11.794 Activity: 0.1001 at 10:19:09 dev: 46.89 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -46.0 IOB: 11.177 Activity: 0.1068 at 10:24:09 dev: 47.03 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -47.8 IOB: 10.58 Activity: 0.111 at 10:29:09 dev: 45.84 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -48.7 IOB: 9.919 Activity: 0.1129 at 10:34:09 dev: 43.66 avgDelta: -5.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -48.7 IOB: 9.254 Activity: 0.1129 at 10:39:09 dev: 41.41 avgDelta: -7.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -48.0 IOB: 8.643 Activity: 0.1114 at 10:44:09 dev: 39.51 avgDelta: -8.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -46.9 IOB: 7.992 Activity: 0.1088 at 10:49:09 dev: 39.39 avgDelta: -7.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -45.4 IOB: 7.406 Activity: 0.1053 at 10:54:08 dev: 40.13 avgDelta: -5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.7 BGI: -43.6 IOB: 7.111 Activity: 0.1012 at 10:59:09 dev: 41.37 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -41.9 IOB: 6.515 Activity: 0.0971 at 11:04:09 dev: 42.35 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -40.0 IOB: 5.99 Activity: 0.0927 at 11:09:09 dev: 42.70 avgDelta: 2.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -37.8 IOB: 5.439 Activity: 0.0878 at 11:14:08 dev: 42.09 avgDelta: 4.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -35.7 IOB: 4.962 Activity: 0.0828 at 11:19:09 dev: 39.69 avgDelta: 4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -33.4 IOB: 4.462 Activity: 0.0775 at 11:24:08 dev: 35.65 avgDelta: 2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -31.2 IOB: 4.036 Activity: 0.0724 at 11:29:09 dev: 31.45 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -29.0 IOB: 3.638 Activity: 0.0672 at 11:34:09 dev: 27.46 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -26.8 IOB: 3.214 Activity: 0.0621 at 11:39:08 dev: 25.02 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -24.6 IOB: 2.866 Activity: 0.0571 at 11:44:09 dev: 23.61 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -22.5 IOB: 2.494 Activity: 0.0522 at 11:49:09 dev: 21.75 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -20.5 IOB: 2.193 Activity: 0.0476 at 11:54:09 dev: 20.52 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: -18.6 IOB: 1.867 Activity: 0.0431 at 11:59:09 dev: 18.83 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -16.7 IOB: 1.563 Activity: 0.0388 at 12:04:09 dev: 16.97 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -15.0 IOB: 1.329 Activity: 0.0347 at 12:09:08 dev: 14.46 avgDelta: -0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -13.3 IOB: 1.115 Activity: 0.0309 at 12:14:09 dev: 11.32 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -11.7 IOB: 0.87 Activity: 0.0272 at 12:19:09 dev: 7.97 avgDelta: -3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -10.3 IOB: 0.692 Activity: 0.0239 at 12:24:09 dev: 5.80 avgDelta: -4.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -8.9 IOB: 0.482 Activity: 0.0206 at 12:29:08 dev: 4.88 avgDelta: -4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -7.6 IOB: 0.287 Activity: 0.0176 at 12:34:09 dev: 4.09 avgDelta: -3.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -6.4 IOB: 0.156 Activity: 0.0148 at 12:39:08 dev: 3.88 avgDelta: -2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -5.3 IOB: 0.038 Activity: 0.0122 at 12:44:08 dev: 3.26 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -4.3 IOB: -0.067 Activity: 0.0099 at 12:49:09 dev: 2.27 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -3.4 IOB: -0.161 Activity: 0.0078 at 12:54:08 dev: 1.36 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -2.6 IOB: -0.195 Activity: 0.006 at 12:59:08 dev: 0.09 avgDelta: -2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -1.9 IOB: -0.271 Activity: 0.0044 at 13:04:09 dev: -1.10 avgDelta: -3.00 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -1.3 IOB: -0.339 Activity: 0.0029 at 13:09:09 dev: -1.00 avgDelta: -2.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -0.7 IOB: -0.4 Activity: 0.0015 at 13:14:09 dev: 0.90 avgDelta: 0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -0.3 IOB: -0.155 Activity: 0.0007 at 13:19:08 dev: 3.80 avgDelta: 3.50 basal +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -1.9 IOB: 8.11 Activity: 0.0045 at 13:24:09 dev: 8.94 avgDelta: 7.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -9.6 IOB: 7.992 Activity: 0.0222 at 13:29:09 dev: 18.57 avgDelta: 9.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -15.5 IOB: 7.745 Activity: 0.0359 at 13:34:09 dev: 23.47 avgDelta: 8.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -20.0 IOB: 7.488 Activity: 0.0465 at 13:39:09 dev: 24.04 avgDelta: 4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -23.3 IOB: 7.136 Activity: 0.0541 at 13:44:09 dev: 21.32 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -25.7 IOB: 6.8 Activity: 0.0596 at 13:49:09 dev: 17.94 avgDelta: -7.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -27.3 IOB: 6.441 Activity: 0.0633 at 13:54:09 dev: 0.00 avgDelta: -10.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.3 BGI: -28.1 IOB: 6.022 Activity: 0.0651 at 13:59:09 dev: 0.00 avgDelta: -9.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -28.3 IOB: 5.644 Activity: 0.0657 at 14:04:09 dev: 0.00 avgDelta: -6.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -28.1 IOB: 5.216 Activity: 0.0653 at 14:09:09 dev: 0.00 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -27.8 IOB: 4.962 Activity: 0.0644 at 14:14:09 dev: 0.00 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -27.0 IOB: 4.544 Activity: 0.0627 at 14:19:09 dev: 0.00 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -26.1 IOB: 4.185 Activity: 0.0606 at 14:24:09 dev: 0.00 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -25.0 IOB: 3.839 Activity: 0.058 at 14:29:09 dev: 0.00 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -23.7 IOB: 3.456 Activity: 0.055 at 14:34:09 dev: 0.00 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -22.4 IOB: 3.139 Activity: 0.0519 at 14:39:09 dev: 0.00 avgDelta: -2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -20.9 IOB: 2.788 Activity: 0.0486 at 14:44:09 dev: 0.00 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -19.5 IOB: 2.503 Activity: 0.0453 at 14:49:10 dev: 0.00 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -18.0 IOB: 2.186 Activity: 0.0418 at 14:54:09 dev: 0.00 avgDelta: 2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -17.5 IOB: 3.17 Activity: 0.0407 at 14:59:09 dev: 22.04 avgDelta: 4.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -17.8 IOB: 3.956 Activity: 0.0413 at 15:04:09 dev: 23.80 avgDelta: 6.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.1 IOB: 3.648 Activity: 0.042 at 15:09:09 dev: 23.85 avgDelta: 5.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.5 IOB: 4.126 Activity: 0.043 at 15:14:09 dev: 22.28 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.8 IOB: 3.81 Activity: 0.0437 at 15:19:10 dev: 20.58 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.8 IOB: 3.541 Activity: 0.0437 at 15:24:10 dev: 19.08 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.6 IOB: 3.272 Activity: 0.0431 at 15:29:09 dev: 19.33 avgDelta: 0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.4 IOB: 3.588 Activity: 0.0428 at 15:34:09 dev: 21.20 avgDelta: 2.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.6 IOB: 3.875 Activity: 0.0431 at 15:39:09 dev: 23.83 avgDelta: 5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -18.7 IOB: 3.608 Activity: 0.0434 at 15:44:08 dev: 25.46 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -19.1 IOB: 4.271 Activity: 0.0442 at 15:49:09 dev: 26.05 avgDelta: 7.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -19.5 IOB: 3.996 Activity: 0.0452 at 15:54:09 dev: 25.98 avgDelta: 6.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -19.9 IOB: 4.298 Activity: 0.0462 at 15:59:08 dev: 26.16 avgDelta: 6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -20.2 IOB: 4.015 Activity: 0.0468 at 16:04:09 dev: 26.67 avgDelta: 6.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -20.7 IOB: 4.538 Activity: 0.0481 at 16:09:09 dev: 27.98 avgDelta: 7.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.1 IOB: 4.245 Activity: 0.0489 at 16:14:09 dev: 28.33 avgDelta: 7.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.6 IOB: 4.729 Activity: 0.05 at 16:19:09 dev: 28.30 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.9 IOB: 4.426 Activity: 0.0508 at 16:24:09 dev: 28.64 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -22.0 IOB: 4.353 Activity: 0.051 at 16:29:09 dev: 28.73 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.9 IOB: 4.049 Activity: 0.0507 at 16:34:10 dev: 28.10 avgDelta: 6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -21.5 IOB: 3.747 Activity: 0.0498 at 16:39:09 dev: 25.96 avgDelta: 4.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -20.8 IOB: 3.402 Activity: 0.0483 at 16:44:09 dev: 22.32 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -20.0 IOB: 3.115 Activity: 0.0464 at 16:49:10 dev: 19.00 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -19.0 IOB: 2.788 Activity: 0.0441 at 16:54:09 dev: 17.01 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -18.0 IOB: 2.524 Activity: 0.0417 at 16:59:09 dev: 15.97 avgDelta: -2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -16.9 IOB: 2.271 Activity: 0.0391 at 17:04:09 dev: 16.10 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -15.7 IOB: 2.033 Activity: 0.0365 at 17:09:10 dev: 15.48 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -14.6 IOB: 1.807 Activity: 0.0338 at 17:14:10 dev: 14.57 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -13.4 IOB: 1.594 Activity: 0.0312 at 17:19:09 dev: 13.70 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -12.3 IOB: 1.395 Activity: 0.0286 at 17:24:10 dev: 12.58 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -11.3 IOB: 1.258 Activity: 0.0262 at 17:29:09 dev: 11.54 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -10.2 IOB: 1.034 Activity: 0.0236 at 17:34:09 dev: 10.17 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -9.3 IOB: 0.971 Activity: 0.0215 at 17:39:09 dev: 9.02 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -8.5 IOB: 1.008 Activity: 0.0197 at 17:44:09 dev: 7.74 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -7.9 IOB: 0.963 Activity: 0.0183 at 17:49:09 dev: 6.89 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -7.4 IOB: 1.046 Activity: 0.0171 at 17:54:10 dev: 7.12 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.9 IOB: 0.912 Activity: 0.0161 at 17:59:09 dev: 6.94 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.7 IOB: 1.254 Activity: 0.0156 at 18:04:09 dev: 6.97 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.6 IOB: 1.176 Activity: 0.0154 at 18:09:09 dev: 6.64 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.4 IOB: 1.051 Activity: 0.0149 at 18:14:10 dev: 5.67 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.1 IOB: 0.928 Activity: 0.0142 at 18:19:09 dev: 5.12 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -6.0 IOB: 1.008 Activity: 0.0138 at 18:24:09 dev: 4.45 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -5.7 IOB: 0.89 Activity: 0.0133 at 18:29:09 dev: 3.48 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -5.5 IOB: 0.775 Activity: 0.0127 at 18:34:09 dev: 2.47 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -5.1 IOB: 0.664 Activity: 0.0118 at 18:39:09 dev: 1.59 avgDelta: -3.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -4.7 IOB: 0.606 Activity: 0.011 at 18:44:09 dev: 1.74 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -4.5 IOB: 0.703 Activity: 0.0105 at 18:49:09 dev: 3.03 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -4.3 IOB: 0.702 Activity: 0.0101 at 18:54:09 dev: 4.10 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 4.7 BGI: -4.3 IOB: 0.902 Activity: 0.0101 at 18:59:09 dev: 4.35 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -4.3 IOB: 0.801 Activity: 0.0101 at 19:04:09 dev: 2.10 avgDelta: -2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -4.2 IOB: 0.701 Activity: 0.0098 at 19:09:09 dev: -1.03 avgDelta: -5.25 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -4.0 IOB: 0.603 Activity: 0.0094 at 19:14:09 dev: -4.95 avgDelta: -9.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -3.8 IOB: 0.508 Activity: 0.0088 at 19:19:09 dev: -8.21 avgDelta: -12.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -3.5 IOB: 0.415 Activity: 0.0081 at 19:24:09 dev: -9.76 avgDelta: -13.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -3.2 IOB: 0.327 Activity: 0.0074 at 19:29:09 dev: -8.06 avgDelta: -11.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.8 IOB: 0.242 Activity: 0.0066 at 19:34:09 dev: -3.91 avgDelta: -6.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.5 IOB: 0.161 Activity: 0.0058 at 19:39:09 dev: 2.00 avgDelta: -0.50 ISF +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.2 IOB: 0.134 Activity: 0.005 at 19:44:09 dev: 7.16 avgDelta: 5.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.1 IOB: 0.4 Activity: 0.0048 at 19:49:09 dev: 9.57 avgDelta: 7.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.1 IOB: 0.475 Activity: 0.0049 at 19:54:09 dev: 8.86 avgDelta: 6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.3 BGI: -2.2 IOB: 0.401 Activity: 0.005 at 19:59:10 dev: 5.91 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.1 IOB: 0.327 Activity: 0.0048 at 20:04:10 dev: 2.82 avgDelta: 0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.9 IOB: 0.203 Activity: 0.0044 at 20:09:09 dev: -0.35 avgDelta: -2.25 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.7 IOB: 0.132 Activity: 0.004 at 20:14:09 dev: -1.78 avgDelta: -3.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.5 IOB: 0.064 Activity: 0.0034 at 20:19:09 dev: -2.28 avgDelta: -3.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.2 IOB: -0.002 Activity: 0.0028 at 20:24:09 dev: -1.54 avgDelta: -2.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.9 IOB: -0.064 Activity: 0.0022 at 20:29:10 dev: -1.05 avgDelta: -2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.7 IOB: -0.073 Activity: 0.0016 at 20:34:09 dev: -0.81 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.5 IOB: -0.08 Activity: 0.0011 at 20:39:09 dev: -1.03 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.3 IOB: -0.085 Activity: 0.0007 at 20:44:09 dev: -1.45 avgDelta: -1.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.2 IOB: -0.087 Activity: 0.0004 at 20:49:09 dev: -1.33 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.0 IOB: -0.088 Activity: 0.0001 at 20:54:09 dev: -1.21 avgDelta: -1.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: 0.0 IOB: -0.088 Activity: -0.0001 at 20:59:09 dev: -0.79 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.2 IOB: -0.137 Activity: -0.0004 at 21:04:09 dev: -0.92 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.3 IOB: -0.184 Activity: -0.0007 at 21:09:10 dev: -0.80 avgDelta: -0.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.4 IOB: -0.18 Activity: -0.001 at 21:14:09 dev: -0.68 avgDelta: -0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.5 IOB: -0.175 Activity: -0.0012 at 21:19:09 dev: -1.02 avgDelta: -0.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.6 IOB: -0.168 Activity: -0.0014 at 21:24:09 dev: -1.35 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.7 IOB: -0.211 Activity: -0.0015 at 21:29:10 dev: -1.65 avgDelta: -1.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.7 IOB: -0.203 Activity: -0.0017 at 21:34:09 dev: -1.98 avgDelta: -1.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 0.9 IOB: -0.243 Activity: -0.002 at 21:39:10 dev: -2.36 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.0 IOB: -0.282 Activity: -0.0023 at 21:44:10 dev: -2.49 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.1 IOB: -0.32 Activity: -0.0026 at 21:49:09 dev: -2.62 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.3 IOB: -0.357 Activity: -0.0029 at 21:54:10 dev: -2.25 avgDelta: -1.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.4 IOB: -0.391 Activity: -0.0032 at 21:59:10 dev: -1.38 avgDelta: 0.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.5 IOB: -0.375 Activity: -0.0035 at 22:04:09 dev: -0.01 avgDelta: 1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.6 IOB: -0.357 Activity: -0.0036 at 22:09:09 dev: 1.45 avgDelta: 3.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.5 IOB: -0.149 Activity: -0.0035 at 22:14:09 dev: 3.49 avgDelta: 5.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: 1.3 IOB: -0.132 Activity: -0.0031 at 22:19:10 dev: 5.91 avgDelta: 7.25 basal +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -6.5 IOB: 9.296 Activity: 0.015 at 22:24:09 dev: 15.96 avgDelta: 9.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -14.3 IOB: 9.123 Activity: 0.0332 at 22:29:10 dev: 25.06 avgDelta: 10.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -20.4 IOB: 8.96 Activity: 0.0474 at 22:34:09 dev: 29.43 avgDelta: 9.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -25.2 IOB: 8.644 Activity: 0.0584 at 22:39:10 dev: 29.92 avgDelta: 4.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -28.6 IOB: 8.282 Activity: 0.0664 at 22:44:10 dev: 27.37 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -30.9 IOB: 7.835 Activity: 0.0718 at 22:49:09 dev: 24.70 avgDelta: -6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -32.5 IOB: 7.416 Activity: 0.0753 at 22:54:10 dev: 23.70 avgDelta: -8.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.2 BGI: -33.3 IOB: 6.984 Activity: 0.0772 at 22:59:09 dev: 24.52 avgDelta: -8.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -33.5 IOB: 6.547 Activity: 0.0776 at 23:04:09 dev: 26.70 avgDelta: -6.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -33.1 IOB: 6.061 Activity: 0.0769 at 23:09:10 dev: 28.39 avgDelta: -4.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -32.5 IOB: 5.68 Activity: 0.0754 at 23:14:10 dev: 29.50 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -31.6 IOB: 5.458 Activity: 0.0734 at 23:19:09 dev: 30.14 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -30.7 IOB: 5.046 Activity: 0.0712 at 23:24:10 dev: 29.94 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -29.7 IOB: 4.925 Activity: 0.069 at 23:29:09 dev: 29.49 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -28.6 IOB: 4.487 Activity: 0.0663 at 23:34:09 dev: 29.08 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -27.3 IOB: 4.113 Activity: 0.0633 at 23:39:10 dev: 28.28 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -25.8 IOB: 3.706 Activity: 0.0599 at 23:44:09 dev: 27.57 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -24.4 IOB: 3.363 Activity: 0.0566 at 23:49:09 dev: 26.64 avgDelta: 2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -22.8 IOB: 3.039 Activity: 0.053 at 23:54:09 dev: 25.34 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -21.3 IOB: 2.733 Activity: 0.0494 at 23:59:10 dev: 23.79 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -19.7 IOB: 2.395 Activity: 0.0457 at 00:04:10 dev: 22.20 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -18.1 IOB: 2.126 Activity: 0.0421 at 00:09:10 dev: 20.65 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -16.6 IOB: 1.824 Activity: 0.0385 at 00:14:10 dev: 18.59 avgDelta: 2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -15.1 IOB: 1.64 Activity: 0.0351 at 00:19:09 dev: 17.13 avgDelta: 2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -13.8 IOB: 1.473 Activity: 0.0319 at 00:24:09 dev: 15.50 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -12.4 IOB: 1.273 Activity: 0.0288 at 00:29:10 dev: 14.16 avgDelta: 1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -11.2 IOB: 1.136 Activity: 0.026 at 00:34:10 dev: 12.71 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -10.1 IOB: 1.011 Activity: 0.0235 at 00:39:09 dev: 10.13 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -9.1 IOB: 0.852 Activity: 0.021 at 00:44:10 dev: 7.30 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -8.2 IOB: 0.752 Activity: 0.0189 at 00:49:10 dev: 4.65 avgDelta: -3.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -7.3 IOB: 0.662 Activity: 0.0169 at 00:54:10 dev: 3.28 avgDelta: -4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.9 BGI: -6.4 IOB: 0.534 Activity: 0.0149 at 00:59:09 dev: 3.42 avgDelta: -3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -5.7 IOB: 0.463 Activity: 0.0132 at 01:04:09 dev: 4.69 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -5.0 IOB: 0.352 Activity: 0.0115 at 01:09:10 dev: 5.96 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.3 IOB: 0.298 Activity: 0.0101 at 01:14:10 dev: 6.60 avgDelta: 2.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.8 IOB: 0.25 Activity: 0.0089 at 01:19:09 dev: 6.84 avgDelta: 3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.4 IOB: 0.329 Activity: 0.0079 at 01:24:10 dev: 6.40 avgDelta: 3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.2 IOB: 0.34 Activity: 0.0074 at 01:29:10 dev: 5.69 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.9 IOB: 0.304 Activity: 0.0068 at 01:34:10 dev: 5.43 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.7 IOB: 0.272 Activity: 0.0062 at 01:39:10 dev: 5.67 avgDelta: 3.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.6 IOB: 0.512 Activity: 0.006 at 01:44:10 dev: 6.59 avgDelta: 4.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.6 IOB: 0.581 Activity: 0.0061 at 01:49:10 dev: 7.38 avgDelta: 4.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.2 IOB: 1.238 Activity: 0.0075 at 01:54:10 dev: 7.98 avgDelta: 4.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.8 IOB: 1.147 Activity: 0.0088 at 01:59:10 dev: 7.54 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.2 IOB: 1.151 Activity: 0.0098 at 02:04:10 dev: 6.72 avgDelta: 2.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.5 IOB: 1.05 Activity: 0.0104 at 02:09:09 dev: 5.98 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.6 IOB: 0.947 Activity: 0.0107 at 02:14:09 dev: 4.86 avgDelta: 0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.6 IOB: 0.844 Activity: 0.0106 at 02:19:10 dev: 3.82 avgDelta: -0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.5 IOB: 0.741 Activity: 0.0104 at 02:24:10 dev: 2.73 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.3 IOB: 0.59 Activity: 0.0099 at 02:29:10 dev: 2.52 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -4.0 IOB: 0.542 Activity: 0.0093 at 02:34:09 dev: 3.01 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.8 IOB: 0.497 Activity: 0.0087 at 02:39:09 dev: 3.50 avgDelta: -0.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.5 IOB: 0.456 Activity: 0.0081 at 02:44:10 dev: 1.74 avgDelta: -1.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.3 IOB: 0.516 Activity: 0.0077 at 02:49:09 dev: -1.93 avgDelta: -5.25 uam +end unannounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -3.1 IOB: 0.429 Activity: 0.0072 at 02:54:09 dev: -6.40 avgDelta: -9.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 7.0 BGI: -2.8 IOB: 0.294 Activity: 0.0066 at 02:59:10 dev: -8.66 avgDelta: -11.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -2.5 IOB: 0.163 Activity: 0.0058 at 03:04:10 dev: -8.25 avgDelta: -10.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -2.1 IOB: 0.037 Activity: 0.0049 at 03:09:10 dev: -6.39 avgDelta: -8.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -1.7 IOB: -0.085 Activity: 0.0039 at 03:14:10 dev: -4.32 avgDelta: -6.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -1.3 IOB: -0.153 Activity: 0.0029 at 03:19:09 dev: -3.75 avgDelta: -5.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -0.8 IOB: -0.265 Activity: 0.0018 at 03:24:10 dev: -3.72 avgDelta: -4.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: -0.3 IOB: -0.371 Activity: 0.0007 at 03:29:09 dev: -3.45 avgDelta: -3.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 0.2 IOB: -0.471 Activity: -0.0005 at 03:34:09 dev: -2.22 avgDelta: -2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 0.7 IOB: -0.566 Activity: -0.0016 at 03:39:10 dev: -0.94 avgDelta: -0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 1.1 IOB: -0.606 Activity: -0.0026 at 03:44:10 dev: 0.00 avgDelta: 1.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 1.6 IOB: -0.64 Activity: -0.0036 at 03:49:10 dev: 0.45 avgDelta: 2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 8.0 BGI: 1.9 IOB: -0.67 Activity: -0.0044 at 03:54:10 dev: -0.15 avgDelta: 1.75 basal +--categorize-uam-as-basal=true set: categorizing all UAM data as basal. +oref0-autotune-core autotune.2022-05-21.json profile.json profile.pump.json > newprofile.2022-05-21.json +CRTotalCarbs: 0 CRTotalInsulin: 0 totalCR: NaN +Hour 0 total deviations: 149.72 mg/dL +Hour 0 basal adjustment needed: 0.35 U/hr +Hour 1 total deviations: 76.77 mg/dL +Hour 1 basal adjustment needed: 0.18 U/hr +Hour 2 total deviations: 32.95 mg/dL +Hour 2 basal adjustment needed: 0.08 U/hr +Hour 3 total deviations: -18.1 mg/dL +Hour 3 basal adjustment needed: -0.04 U/hr +Hour 4 total deviations: 128.92 mg/dL +Hour 4 basal adjustment needed: 0.3 U/hr +Hour 5 total deviations: 76.69 mg/dL +Hour 5 basal adjustment needed: 0.18 U/hr +Hour 6 total deviations: 64.53 mg/dL +Hour 6 basal adjustment needed: 0.15 U/hr +Hour 7 total deviations: 7.81 mg/dL +Hour 7 basal adjustment needed: 0.02 U/hr +Hour 8 total deviations: -16.5 mg/dL +Hour 8 basal adjustment needed: -0.04 U/hr +Hour 9 total deviations: 39.75 mg/dL +Hour 9 basal adjustment needed: 0.09 U/hr +Hour 10 total deviations: 504.73 mg/dL +Hour 10 basal adjustment needed: 1.17 U/hr +Hour 11 total deviations: 371.12 mg/dL +Hour 11 basal adjustment needed: 0.86 U/hr +Hour 12 total deviations: 76.35 mg/dL +Hour 12 basal adjustment needed: 0.18 U/hr +Hour 13 total deviations: 116.88 mg/dL +Hour 13 basal adjustment needed: 0.27 U/hr +Hour 14 total deviations: 22.04 mg/dL +Hour 14 basal adjustment needed: 0.05 U/hr +Hour 15 total deviations: 277.6 mg/dL +Hour 15 basal adjustment needed: 0.64 U/hr +Hour 16 total deviations: 297.01 mg/dL +Hour 16 basal adjustment needed: 0.69 U/hr +Hour 17 total deviations: 131.85 mg/dL +Hour 17 basal adjustment needed: 0.31 U/hr +Hour 18 total deviations: 49.61 mg/dL +Hour 18 basal adjustment needed: 0.12 U/hr +Hour 19 total deviations: 32.57 mg/dL +Hour 19 basal adjustment needed: 0.08 U/hr +Hour 20 total deviations: -9.02 mg/dL +Hour 20 basal adjustment needed: -0.02 U/hr +Hour 21 total deviations: -19.5 mg/dL +Hour 21 basal adjustment needed: -0.05 U/hr +Hour 22 total deviations: 211.5 mg/dL +Hour 22 basal adjustment needed: 0.49 U/hr +Hour 23 total deviations: 334.86 mg/dL +Hour 23 basal adjustment needed: 0.78 U/hr +Limiting hour 7 basal to 1.11 (which is 1.3 * pump basal of 0.855 ) +Limiting hour 8 basal to 1.17 (which is 1.3 * pump basal of 0.902 ) +Limiting hour 9 basal to 1.21 (which is 1.3 * pump basal of 0.934 ) +Limiting hour 10 basal to 1.22 (which is 1.3 * pump basal of 0.938 ) +Limiting hour 12 basal to 1.15 (which is 1.3 * pump basal of 0.882 ) +Limiting hour 13 basal to 1.14 (which is 1.3 * pump basal of 0.874 ) +Limiting hour 14 basal to 1.13 (which is 1.3 * pump basal of 0.866 ) +Limiting hour 15 basal to 1.10 (which is 1.3 * pump basal of 0.848 ) +Limiting hour 20 basal to 1.10 (which is 1.3 * pump basal of 0.847 ) +Limiting hour 21 basal to 1.12 (which is 1.3 * pump basal of 0.861 ) +Limiting hour 22 basal to 1.12 (which is 1.3 * pump basal of 0.863 ) +[ { start: '00:00:00', minutes: 0, rate: 1.039, i: 0 }, + { start: '01:00:00', minutes: 60, rate: 1.091, i: 1 }, + { start: '02:00:00', minutes: 120, rate: 1.118, i: 2 }, + { start: '03:00:00', minutes: 180, rate: 1.321, i: 3 }, + { start: '04:00:00', minutes: 240, rate: 1.091, i: 4 }, + { start: '05:00:00', minutes: 300, rate: 0.965, i: 5 }, + { start: '06:00:00', minutes: 360, rate: 0.848, i: 6 }, + { start: '07:00:00', minutes: 420, rate: 1.112, i: 7 }, + { start: '08:00:00', minutes: 480, rate: 1.173, i: 8 }, + { start: '09:00:00', minutes: 540, rate: 1.214, i: 9 }, + { start: '10:00:00', minutes: 600, rate: 1.219, i: 10 }, + { start: '11:00:00', minutes: 660, rate: 1.07, i: 11 }, + { start: '12:00:00', minutes: 720, rate: 1.147, i: 12 }, + { start: '13:00:00', minutes: 780, rate: 1.136, i: 13 }, + { start: '14:00:00', minutes: 840, rate: 1.126, i: 14 }, + { start: '15:00:00', minutes: 900, rate: 1.102, i: 15 }, + { start: '16:00:00', minutes: 960, rate: 0.928, i: 16 }, + { start: '17:00:00', minutes: 1020, rate: 0.71, i: 17 }, + { start: '18:00:00', minutes: 1080, rate: 0.654, i: 18 }, + { start: '19:00:00', minutes: 1140, rate: 0.878, i: 19 }, + { start: '20:00:00', minutes: 1200, rate: 1.101, i: 20 }, + { start: '21:00:00', minutes: 1260, rate: 1.119, i: 21 }, + { start: '22:00:00', minutes: 1320, rate: 1.122, i: 22 }, + { start: '23:00:00', minutes: 1380, rate: 1.047, i: 23 } ] +totalMealCarbs: 0 totalDeviations: 0 oldCSF 14.991 fullNewCSF: 14.991304347826087 newCSF: 14.991 +oldCR: 5.75 fullNewCR: NaN newCR: NaN +Limiting adjusted ISF of 124.90 to 123.14 (which is pump ISF of 86.2 / 0.7 ) +p50deviation: -0.93 p50BGI -2.5 p50ratios: 1.449 Old ISF: 86.2 fullNewISF: 124.904 adjustedISF: 123.143 newISF: 93.589 newDIA: 6 newPeak: 45 + +Autotune pump profile recommendations: +--------------------------------------------------------- +Recommendations Log File: /home/titi/aaps/autotune/aapsorefautotune_recommendations.log + +Parameter | Pump | Autotune | Days Missing +--------------------------------------------------------- +ISF [mg/dL/U] | 86.200 | 93.589 | +Carb Ratio[g/U]| 5.750 | 5.750 | + 00:00 | 0.966 | 1.039 | 0 + 01:00 | 0.977 | 1.091 | 0 + 02:00 | 0.971 | 1.118 | 0 + 03:00 | 1.111 | 1.321 | 0 + 04:00 | 0.974 | 1.091 | 0 + 05:00 | 0.923 | 0.965 | 0 + 06:00 | 0.823 | 0.848 | 0 + 07:00 | 0.855 | 1.112 | 0 + 08:00 | 0.902 | 1.173 | 0 + 09:00 | 0.934 | 1.214 | 0 + 10:00 | 0.938 | 1.219 | 0 + 11:00 | 0.903 | 1.070 | 0 + 12:00 | 0.882 | 1.147 | 0 + 13:00 | 0.874 | 1.136 | 0 + 14:00 | 0.866 | 1.126 | 0 + 15:00 | 0.848 | 1.102 | 0 + 16:00 | 0.758 | 0.928 | 0 + 17:00 | 0.650 | 0.710 | 0 + 18:00 | 0.648 | 0.654 | 0 + 19:00 | 0.738 | 0.878 | 0 + 20:00 | 0.847 | 1.101 | 0 + 21:00 | 0.861 | 1.119 | 0 + 22:00 | 0.863 | 1.122 | 0 + 23:00 | 0.843 | 1.047 | 0 diff --git a/app/src/test/res/autotune/test3/newaapsorefprofile.2022-05-21.json b/app/src/test/res/autotune/test3/newaapsorefprofile.2022-05-21.json new file mode 100644 index 0000000000..e7ae1b4e0e --- /dev/null +++ b/app/src/test/res/autotune/test3/newaapsorefprofile.2022-05-21.json @@ -0,0 +1,173 @@ +{ + "autosens_max": 1.3, + "autosens_min": 0.7, + "basalprofile": [ + { + "i": 0, + "minutes": 0, + "rate": 1.039, + "start": "00:00:00" + }, + { + "i": 1, + "minutes": 60, + "rate": 1.091, + "start": "01:00:00" + }, + { + "i": 2, + "minutes": 120, + "rate": 1.118, + "start": "02:00:00" + }, + { + "i": 3, + "minutes": 180, + "rate": 1.321, + "start": "03:00:00" + }, + { + "i": 4, + "minutes": 240, + "rate": 1.091, + "start": "04:00:00" + }, + { + "i": 5, + "minutes": 300, + "rate": 0.965, + "start": "05:00:00" + }, + { + "i": 6, + "minutes": 360, + "rate": 0.848, + "start": "06:00:00" + }, + { + "i": 7, + "minutes": 420, + "rate": 1.112, + "start": "07:00:00" + }, + { + "i": 8, + "minutes": 480, + "rate": 1.173, + "start": "08:00:00" + }, + { + "i": 9, + "minutes": 540, + "rate": 1.214, + "start": "09:00:00" + }, + { + "i": 10, + "minutes": 600, + "rate": 1.219, + "start": "10:00:00" + }, + { + "i": 11, + "minutes": 660, + "rate": 1.07, + "start": "11:00:00" + }, + { + "i": 12, + "minutes": 720, + "rate": 1.147, + "start": "12:00:00" + }, + { + "i": 13, + "minutes": 780, + "rate": 1.136, + "start": "13:00:00" + }, + { + "i": 14, + "minutes": 840, + "rate": 1.126, + "start": "14:00:00" + }, + { + "i": 15, + "minutes": 900, + "rate": 1.102, + "start": "15:00:00" + }, + { + "i": 16, + "minutes": 960, + "rate": 0.928, + "start": "16:00:00" + }, + { + "i": 17, + "minutes": 1020, + "rate": 0.71, + "start": "17:00:00" + }, + { + "i": 18, + "minutes": 1080, + "rate": 0.654, + "start": "18:00:00" + }, + { + "i": 19, + "minutes": 1140, + "rate": 0.878, + "start": "19:00:00" + }, + { + "i": 20, + "minutes": 1200, + "rate": 1.101, + "start": "20:00:00" + }, + { + "i": 21, + "minutes": 1260, + "rate": 1.119, + "start": "21:00:00" + }, + { + "i": 22, + "minutes": 1320, + "rate": 1.122, + "start": "22:00:00" + }, + { + "i": 23, + "minutes": 1380, + "rate": 1.047, + "start": "23:00:00" + } + ], + "carb_ratio": 5.75, + "csf": 14.991, + "curve": "ultra-rapid", + "dia": 6, + "insulinPeakTime": 45, + "isfProfile": { + "sensitivities": [ + { + "endoffset": 1440, + "i": 0, + "offset": 0, + "sensitivity": 93.589, + "start": "00:00:00", + "x": 0 + } + ] + }, + "min_5m_carbimpact": 8, + "name": "Tuned Dyn2", + "sens": 93.589, + "timezone": "Europe/Paris", + "units": "mg/dl", + "useCustomPeakTime": true +} diff --git a/app/src/test/res/autotune/test3/oaps-iobCalc.2022-05-21.json b/app/src/test/res/autotune/test3/oaps-iobCalc.2022-05-21.json new file mode 100644 index 0000000000..92304dbf45 --- /dev/null +++ b/app/src/test/res/autotune/test3/oaps-iobCalc.2022-05-21.json @@ -0,0 +1,286 @@ +[ + { "iob": 5.249, "activity": 0.0391, "date": 1653099848000}, + { "iob": 5.292, "activity": 0.0438, "date": 1653100148000}, + { "iob": 4.964, "activity": 0.047, "date": 1653100449000}, + { "iob": 4.674, "activity": 0.0489, "date": 1653100748000}, + { "iob": 4.377, "activity": 0.0498, "date": 1653101048000}, + { "iob": 4.077, "activity": 0.0498, "date": 1653101348000}, + { "iob": 3.73, "activity": 0.0491, "date": 1653101648000}, + { "iob": 3.389, "activity": 0.0476, "date": 1653101948000}, + { "iob": 3.055, "activity": 0.0457, "date": 1653102249000}, + { "iob": 2.782, "activity": 0.0436, "date": 1653102548000}, + { "iob": 2.47, "activity": 0.0411, "date": 1653102848000}, + { "iob": 2.22, "activity": 0.0386, "date": 1653103149000}, + { "iob": 1.935, "activity": 0.0358, "date": 1653103448000}, + { "iob": 1.711, "activity": 0.0332, "date": 1653103748000}, + { "iob": 1.452, "activity": 0.0304, "date": 1653104049000}, + { "iob": 1.927, "activity": 0.028, "date": 1653104349000}, + { "iob": 1.84, "activity": 0.027, "date": 1653104648000}, + { "iob": 1.658, "activity": 0.0258, "date": 1653104949000}, + { "iob": 1.482, "activity": 0.0245, "date": 1653105248000}, + { "iob": 1.264, "activity": 0.0229, "date": 1653105549000}, + { "iob": 1.104, "activity": 0.0212, "date": 1653105848000}, + { "iob": 0.952, "activity": 0.0194, "date": 1653106149000}, + { "iob": 1.619, "activity": 0.0181, "date": 1653106449000}, + { "iob": 1.678, "activity": 0.0184, "date": 1653106749000}, + { "iob": 1.775, "activity": 0.0187, "date": 1653107048000}, + { "iob": 1.581, "activity": 0.019, "date": 1653107348000}, + { "iob": 1.437, "activity": 0.0188, "date": 1653107648000}, + { "iob": 1.294, "activity": 0.0183, "date": 1653107948000}, + { "iob": 1.153, "activity": 0.0176, "date": 1653108249000}, + { "iob": 1.017, "activity": 0.0167, "date": 1653108548000}, + { "iob": 0.887, "activity": 0.0156, "date": 1653108848000}, + { "iob": 1.011, "activity": 0.0147, "date": 1653109148000}, + { "iob": 0.889, "activity": 0.0141, "date": 1653109448000}, + { "iob": 0.771, "activity": 0.0133, "date": 1653109748000}, + { "iob": 0.656, "activity": 0.0124, "date": 1653110049000}, + { "iob": 0.547, "activity": 0.0114, "date": 1653110348000}, + { "iob": 0.392, "activity": 0.0103, "date": 1653110649000}, + { "iob": 0.294, "activity": 0.0091, "date": 1653110949000}, + { "iob": 0.2, "activity": 0.008, "date": 1653111249000}, + { "iob": 0.065, "activity": 0.0066, "date": 1653111549000}, + { "iob": 0.034, "activity": 0.0055, "date": 1653111849000}, + { "iob": 0.549, "activity": 0.0048, "date": 1653112148000}, + { "iob": 0.674, "activity": 0.0053, "date": 1653112449000}, + { "iob": 0.597, "activity": 0.0057, "date": 1653112749000}, + { "iob": 0.468, "activity": 0.0058, "date": 1653113049000}, + { "iob": 0.389, "activity": 0.0057, "date": 1653113349000}, + { "iob": 0.262, "activity": 0.0053, "date": 1653113649000}, + { "iob": 0.186, "activity": 0.0048, "date": 1653113949000}, + { "iob": 0.064, "activity": 0.0041, "date": 1653114249000}, + { "iob": -0.005, "activity": 0.0034, "date": 1653114549000}, + { "iob": -0.12, "activity": 0.0026, "date": 1653114849000}, + { "iob": -0.181, "activity": 0.0018, "date": 1653115149000}, + { "iob": -0.287, "activity": 0.0008, "date": 1653115449000}, + { "iob": -0.34, "activity": 0, "date": 1653115749000}, + { "iob": -0.436, "activity": -0.001, "date": 1653116049000}, + { "iob": -0.48, "activity": -0.0018, "date": 1653116349000}, + { "iob": -0.519, "activity": -0.0026, "date": 1653116649000}, + { "iob": -0.554, "activity": -0.0034, "date": 1653116949000}, + { "iob": -0.585, "activity": -0.0041, "date": 1653117249000}, + { "iob": -0.662, "activity": -0.0049, "date": 1653117549000}, + { "iob": -0.687, "activity": -0.0055, "date": 1653117848000}, + { "iob": -0.708, "activity": -0.0061, "date": 1653118149000}, + { "iob": -0.726, "activity": -0.0066, "date": 1653118449000}, + { "iob": -0.351, "activity": -0.0071, "date": 1653118748000}, + { "iob": -0.218, "activity": -0.0064, "date": 1653119049000}, + { "iob": -0.088, "activity": -0.0055, "date": 1653119349000}, + { "iob": 13.594, "activity": 0.0023, "date": 1653119649000}, + { "iob": 13.552, "activity": 0.0331, "date": 1653119949000}, + { "iob": 13.224, "activity": 0.0573, "date": 1653120249000}, + { "iob": 12.838, "activity": 0.076, "date": 1653120548000}, + { "iob": 12.322, "activity": 0.09, "date": 1653120849000}, + { "iob": 11.794, "activity": 0.1001, "date": 1653121149000}, + { "iob": 11.177, "activity": 0.1068, "date": 1653121449000}, + { "iob": 10.58, "activity": 0.111, "date": 1653121749000}, + { "iob": 9.919, "activity": 0.1129, "date": 1653122049000}, + { "iob": 9.254, "activity": 0.1129, "date": 1653122349000}, + { "iob": 8.643, "activity": 0.1114, "date": 1653122649000}, + { "iob": 7.992, "activity": 0.1088, "date": 1653122949000}, + { "iob": 7.406, "activity": 0.1053, "date": 1653123248000}, + { "iob": 7.111, "activity": 0.1012, "date": 1653123549000}, + { "iob": 6.515, "activity": 0.0971, "date": 1653123849000}, + { "iob": 5.99, "activity": 0.0927, "date": 1653124149000}, + { "iob": 5.439, "activity": 0.0878, "date": 1653124448000}, + { "iob": 4.962, "activity": 0.0828, "date": 1653124749000}, + { "iob": 4.462, "activity": 0.0775, "date": 1653125048000}, + { "iob": 4.036, "activity": 0.0724, "date": 1653125349000}, + { "iob": 3.638, "activity": 0.0672, "date": 1653125649000}, + { "iob": 3.214, "activity": 0.0621, "date": 1653125948000}, + { "iob": 2.866, "activity": 0.0571, "date": 1653126249000}, + { "iob": 2.494, "activity": 0.0522, "date": 1653126549000}, + { "iob": 2.193, "activity": 0.0476, "date": 1653126849000}, + { "iob": 1.867, "activity": 0.0431, "date": 1653127149000}, + { "iob": 1.563, "activity": 0.0388, "date": 1653127449000}, + { "iob": 1.329, "activity": 0.0347, "date": 1653127748000}, + { "iob": 1.115, "activity": 0.0309, "date": 1653128049000}, + { "iob": 0.87, "activity": 0.0272, "date": 1653128349000}, + { "iob": 0.692, "activity": 0.0239, "date": 1653128649000}, + { "iob": 0.482, "activity": 0.0206, "date": 1653128948000}, + { "iob": 0.287, "activity": 0.0176, "date": 1653129249000}, + { "iob": 0.156, "activity": 0.0148, "date": 1653129548000}, + { "iob": 0.038, "activity": 0.0122, "date": 1653129848000}, + { "iob": -0.067, "activity": 0.0099, "date": 1653130149000}, + { "iob": -0.161, "activity": 0.0078, "date": 1653130448000}, + { "iob": -0.195, "activity": 0.006, "date": 1653130748000}, + { "iob": -0.271, "activity": 0.0044, "date": 1653131049000}, + { "iob": -0.339, "activity": 0.0029, "date": 1653131349000}, + { "iob": -0.4, "activity": 0.0015, "date": 1653131649000}, + { "iob": -0.155, "activity": 0.0007, "date": 1653131948000}, + { "iob": 8.11, "activity": 0.0045, "date": 1653132249000}, + { "iob": 7.992, "activity": 0.0222, "date": 1653132549000}, + { "iob": 7.745, "activity": 0.0359, "date": 1653132849000}, + { "iob": 7.488, "activity": 0.0465, "date": 1653133149000}, + { "iob": 7.136, "activity": 0.0541, "date": 1653133449000}, + { "iob": 6.8, "activity": 0.0596, "date": 1653133749000}, + { "iob": 6.441, "activity": 0.0633, "date": 1653134049000}, + { "iob": 6.022, "activity": 0.0651, "date": 1653134349000}, + { "iob": 5.644, "activity": 0.0657, "date": 1653134649000}, + { "iob": 5.216, "activity": 0.0653, "date": 1653134949000}, + { "iob": 4.962, "activity": 0.0644, "date": 1653135249000}, + { "iob": 4.544, "activity": 0.0627, "date": 1653135549000}, + { "iob": 4.185, "activity": 0.0606, "date": 1653135849000}, + { "iob": 3.839, "activity": 0.058, "date": 1653136149000}, + { "iob": 3.456, "activity": 0.055, "date": 1653136449000}, + { "iob": 3.139, "activity": 0.0519, "date": 1653136749000}, + { "iob": 2.788, "activity": 0.0486, "date": 1653137049000}, + { "iob": 2.503, "activity": 0.0453, "date": 1653137350000}, + { "iob": 2.186, "activity": 0.0418, "date": 1653137649000}, + { "iob": 3.17, "activity": 0.0407, "date": 1653137949000}, + { "iob": 3.956, "activity": 0.0413, "date": 1653138249000}, + { "iob": 3.648, "activity": 0.042, "date": 1653138549000}, + { "iob": 4.126, "activity": 0.043, "date": 1653138849000}, + { "iob": 3.81, "activity": 0.0437, "date": 1653139150000}, + { "iob": 3.541, "activity": 0.0437, "date": 1653139450000}, + { "iob": 3.272, "activity": 0.0431, "date": 1653139749000}, + { "iob": 3.588, "activity": 0.0428, "date": 1653140049000}, + { "iob": 3.875, "activity": 0.0431, "date": 1653140349000}, + { "iob": 3.608, "activity": 0.0434, "date": 1653140648000}, + { "iob": 4.271, "activity": 0.0442, "date": 1653140949000}, + { "iob": 3.996, "activity": 0.0452, "date": 1653141249000}, + { "iob": 4.298, "activity": 0.0462, "date": 1653141548000}, + { "iob": 4.015, "activity": 0.0468, "date": 1653141849000}, + { "iob": 4.538, "activity": 0.0481, "date": 1653142149000}, + { "iob": 4.245, "activity": 0.0489, "date": 1653142449000}, + { "iob": 4.729, "activity": 0.05, "date": 1653142749000}, + { "iob": 4.426, "activity": 0.0508, "date": 1653143049000}, + { "iob": 4.353, "activity": 0.051, "date": 1653143349000}, + { "iob": 4.049, "activity": 0.0507, "date": 1653143650000}, + { "iob": 3.747, "activity": 0.0498, "date": 1653143949000}, + { "iob": 3.402, "activity": 0.0483, "date": 1653144249000}, + { "iob": 3.115, "activity": 0.0464, "date": 1653144550000}, + { "iob": 2.788, "activity": 0.0441, "date": 1653144849000}, + { "iob": 2.524, "activity": 0.0417, "date": 1653145149000}, + { "iob": 2.271, "activity": 0.0391, "date": 1653145449000}, + { "iob": 2.033, "activity": 0.0365, "date": 1653145750000}, + { "iob": 1.807, "activity": 0.0338, "date": 1653146050000}, + { "iob": 1.594, "activity": 0.0312, "date": 1653146349000}, + { "iob": 1.395, "activity": 0.0286, "date": 1653146650000}, + { "iob": 1.258, "activity": 0.0262, "date": 1653146949000}, + { "iob": 1.034, "activity": 0.0236, "date": 1653147249000}, + { "iob": 0.971, "activity": 0.0215, "date": 1653147549000}, + { "iob": 1.008, "activity": 0.0197, "date": 1653147849000}, + { "iob": 0.963, "activity": 0.0183, "date": 1653148149000}, + { "iob": 1.046, "activity": 0.0171, "date": 1653148450000}, + { "iob": 0.912, "activity": 0.0161, "date": 1653148749000}, + { "iob": 1.254, "activity": 0.0156, "date": 1653149049000}, + { "iob": 1.176, "activity": 0.0154, "date": 1653149349000}, + { "iob": 1.051, "activity": 0.0149, "date": 1653149650000}, + { "iob": 0.928, "activity": 0.0142, "date": 1653149949000}, + { "iob": 1.008, "activity": 0.0138, "date": 1653150249000}, + { "iob": 0.89, "activity": 0.0133, "date": 1653150549000}, + { "iob": 0.775, "activity": 0.0127, "date": 1653150849000}, + { "iob": 0.664, "activity": 0.0118, "date": 1653151149000}, + { "iob": 0.606, "activity": 0.011, "date": 1653151449000}, + { "iob": 0.703, "activity": 0.0105, "date": 1653151749000}, + { "iob": 0.702, "activity": 0.0101, "date": 1653152049000}, + { "iob": 0.902, "activity": 0.0101, "date": 1653152349000}, + { "iob": 0.801, "activity": 0.0101, "date": 1653152649000}, + { "iob": 0.701, "activity": 0.0098, "date": 1653152949000}, + { "iob": 0.603, "activity": 0.0094, "date": 1653153249000}, + { "iob": 0.508, "activity": 0.0088, "date": 1653153549000}, + { "iob": 0.415, "activity": 0.0081, "date": 1653153849000}, + { "iob": 0.327, "activity": 0.0074, "date": 1653154149000}, + { "iob": 0.242, "activity": 0.0066, "date": 1653154449000}, + { "iob": 0.161, "activity": 0.0058, "date": 1653154749000}, + { "iob": 0.134, "activity": 0.005, "date": 1653155049000}, + { "iob": 0.4, "activity": 0.0048, "date": 1653155349000}, + { "iob": 0.475, "activity": 0.0049, "date": 1653155649000}, + { "iob": 0.401, "activity": 0.005, "date": 1653155950000}, + { "iob": 0.327, "activity": 0.0048, "date": 1653156250000}, + { "iob": 0.203, "activity": 0.0044, "date": 1653156549000}, + { "iob": 0.132, "activity": 0.004, "date": 1653156849000}, + { "iob": 0.064, "activity": 0.0034, "date": 1653157149000}, + { "iob": -0.002, "activity": 0.0028, "date": 1653157449000}, + { "iob": -0.064, "activity": 0.0022, "date": 1653157750000}, + { "iob": -0.073, "activity": 0.0016, "date": 1653158049000}, + { "iob": -0.08, "activity": 0.0011, "date": 1653158349000}, + { "iob": -0.085, "activity": 0.0007, "date": 1653158649000}, + { "iob": -0.087, "activity": 0.0004, "date": 1653158949000}, + { "iob": -0.088, "activity": 0.0001, "date": 1653159249000}, + { "iob": -0.088, "activity": -0.0001, "date": 1653159549000}, + { "iob": -0.137, "activity": -0.0004, "date": 1653159849000}, + { "iob": -0.184, "activity": -0.0007, "date": 1653160150000}, + { "iob": -0.18, "activity": -0.001, "date": 1653160449000}, + { "iob": -0.175, "activity": -0.0012, "date": 1653160749000}, + { "iob": -0.168, "activity": -0.0014, "date": 1653161049000}, + { "iob": -0.211, "activity": -0.0015, "date": 1653161350000}, + { "iob": -0.203, "activity": -0.0017, "date": 1653161649000}, + { "iob": -0.243, "activity": -0.002, "date": 1653161950000}, + { "iob": -0.282, "activity": -0.0023, "date": 1653162250000}, + { "iob": -0.32, "activity": -0.0026, "date": 1653162549000}, + { "iob": -0.357, "activity": -0.0029, "date": 1653162850000}, + { "iob": -0.391, "activity": -0.0032, "date": 1653163150000}, + { "iob": -0.375, "activity": -0.0035, "date": 1653163449000}, + { "iob": -0.357, "activity": -0.0036, "date": 1653163749000}, + { "iob": -0.149, "activity": -0.0035, "date": 1653164049000}, + { "iob": -0.132, "activity": -0.0031, "date": 1653164350000}, + { "iob": 9.296, "activity": 0.015, "date": 1653164649000}, + { "iob": 9.123, "activity": 0.0332, "date": 1653164950000}, + { "iob": 8.96, "activity": 0.0474, "date": 1653165249000}, + { "iob": 8.644, "activity": 0.0584, "date": 1653165550000}, + { "iob": 8.282, "activity": 0.0664, "date": 1653165850000}, + { "iob": 7.835, "activity": 0.0718, "date": 1653166149000}, + { "iob": 7.416, "activity": 0.0753, "date": 1653166450000}, + { "iob": 6.984, "activity": 0.0772, "date": 1653166749000}, + { "iob": 6.547, "activity": 0.0776, "date": 1653167049000}, + { "iob": 6.061, "activity": 0.0769, "date": 1653167350000}, + { "iob": 5.68, "activity": 0.0754, "date": 1653167650000}, + { "iob": 5.458, "activity": 0.0734, "date": 1653167949000}, + { "iob": 5.046, "activity": 0.0712, "date": 1653168250000}, + { "iob": 4.925, "activity": 0.069, "date": 1653168549000}, + { "iob": 4.487, "activity": 0.0663, "date": 1653168849000}, + { "iob": 4.113, "activity": 0.0633, "date": 1653169150000}, + { "iob": 3.706, "activity": 0.0599, "date": 1653169449000}, + { "iob": 3.363, "activity": 0.0566, "date": 1653169749000}, + { "iob": 3.039, "activity": 0.053, "date": 1653170049000}, + { "iob": 2.733, "activity": 0.0494, "date": 1653170350000}, + { "iob": 2.395, "activity": 0.0457, "date": 1653170650000}, + { "iob": 2.126, "activity": 0.0421, "date": 1653170950000}, + { "iob": 1.824, "activity": 0.0385, "date": 1653171250000}, + { "iob": 1.64, "activity": 0.0351, "date": 1653171549000}, + { "iob": 1.473, "activity": 0.0319, "date": 1653171849000}, + { "iob": 1.273, "activity": 0.0288, "date": 1653172150000}, + { "iob": 1.136, "activity": 0.026, "date": 1653172450000}, + { "iob": 1.011, "activity": 0.0235, "date": 1653172749000}, + { "iob": 0.852, "activity": 0.021, "date": 1653173050000}, + { "iob": 0.752, "activity": 0.0189, "date": 1653173350000}, + { "iob": 0.662, "activity": 0.0169, "date": 1653173650000}, + { "iob": 0.534, "activity": 0.0149, "date": 1653173949000}, + { "iob": 0.463, "activity": 0.0132, "date": 1653174249000}, + { "iob": 0.352, "activity": 0.0115, "date": 1653174550000}, + { "iob": 0.298, "activity": 0.0101, "date": 1653174850000}, + { "iob": 0.25, "activity": 0.0089, "date": 1653175149000}, + { "iob": 0.329, "activity": 0.0079, "date": 1653175450000}, + { "iob": 0.34, "activity": 0.0074, "date": 1653175750000}, + { "iob": 0.304, "activity": 0.0068, "date": 1653176050000}, + { "iob": 0.272, "activity": 0.0062, "date": 1653176350000}, + { "iob": 0.512, "activity": 0.006, "date": 1653176650000}, + { "iob": 0.581, "activity": 0.0061, "date": 1653176950000}, + { "iob": 1.238, "activity": 0.0075, "date": 1653177250000}, + { "iob": 1.147, "activity": 0.0088, "date": 1653177550000}, + { "iob": 1.151, "activity": 0.0098, "date": 1653177850000}, + { "iob": 1.05, "activity": 0.0104, "date": 1653178149000}, + { "iob": 0.947, "activity": 0.0107, "date": 1653178449000}, + { "iob": 0.844, "activity": 0.0106, "date": 1653178750000}, + { "iob": 0.741, "activity": 0.0104, "date": 1653179050000}, + { "iob": 0.59, "activity": 0.0099, "date": 1653179350000}, + { "iob": 0.542, "activity": 0.0093, "date": 1653179649000}, + { "iob": 0.497, "activity": 0.0087, "date": 1653179949000}, + { "iob": 0.456, "activity": 0.0081, "date": 1653180250000}, + { "iob": 0.516, "activity": 0.0077, "date": 1653180549000}, + { "iob": 0.429, "activity": 0.0072, "date": 1653180849000}, + { "iob": 0.294, "activity": 0.0066, "date": 1653181150000}, + { "iob": 0.163, "activity": 0.0058, "date": 1653181450000}, + { "iob": 0.037, "activity": 0.0049, "date": 1653181750000}, + { "iob": -0.085, "activity": 0.0039, "date": 1653182050000}, + { "iob": -0.153, "activity": 0.0029, "date": 1653182349000}, + { "iob": -0.265, "activity": 0.0018, "date": 1653182650000}, + { "iob": -0.371, "activity": 0.0007, "date": 1653182949000}, + { "iob": -0.471, "activity": -0.0005, "date": 1653183249000}, + { "iob": -0.566, "activity": -0.0016, "date": 1653183550000}, + { "iob": -0.606, "activity": -0.0026, "date": 1653183850000}, + { "iob": -0.64, "activity": -0.0036, "date": 1653184150000}, + { "iob": -0.67, "activity": -0.0044, "date": 1653184450000} +] + diff --git a/app/src/test/res/autotune/test3/profile.pump.json b/app/src/test/res/autotune/test3/profile.pump.json new file mode 100644 index 0000000000..eefadabacb --- /dev/null +++ b/app/src/test/res/autotune/test3/profile.pump.json @@ -0,0 +1,147 @@ +{ + "name": "Tuned Dyn2", + "min_5m_carbimpact": 8, + "dia": 6, + "curve": "ultra-rapid", + "useCustomPeakTime": true, + "insulinPeakTime": 45, + "basalprofile": [ + { + "start": "00:00:00", + "minutes": 0, + "rate": 0.966 + }, + { + "start": "01:00:00", + "minutes": 60, + "rate": 0.977 + }, + { + "start": "02:00:00", + "minutes": 120, + "rate": 0.971 + }, + { + "start": "03:00:00", + "minutes": 180, + "rate": 1.111 + }, + { + "start": "04:00:00", + "minutes": 240, + "rate": 0.974 + }, + { + "start": "05:00:00", + "minutes": 300, + "rate": 0.923 + }, + { + "start": "06:00:00", + "minutes": 360, + "rate": 0.823 + }, + { + "start": "07:00:00", + "minutes": 420, + "rate": 0.855 + }, + { + "start": "08:00:00", + "minutes": 480, + "rate": 0.902 + }, + { + "start": "09:00:00", + "minutes": 540, + "rate": 0.934 + }, + { + "start": "10:00:00", + "minutes": 600, + "rate": 0.938 + }, + { + "start": "11:00:00", + "minutes": 660, + "rate": 0.903 + }, + { + "start": "12:00:00", + "minutes": 720, + "rate": 0.882 + }, + { + "start": "13:00:00", + "minutes": 780, + "rate": 0.874 + }, + { + "start": "14:00:00", + "minutes": 840, + "rate": 0.866 + }, + { + "start": "15:00:00", + "minutes": 900, + "rate": 0.848 + }, + { + "start": "16:00:00", + "minutes": 960, + "rate": 0.758 + }, + { + "start": "17:00:00", + "minutes": 1020, + "rate": 0.65 + }, + { + "start": "18:00:00", + "minutes": 1080, + "rate": 0.648 + }, + { + "start": "19:00:00", + "minutes": 1140, + "rate": 0.738 + }, + { + "start": "20:00:00", + "minutes": 1200, + "rate": 0.847 + }, + { + "start": "21:00:00", + "minutes": 1260, + "rate": 0.861 + }, + { + "start": "22:00:00", + "minutes": 1320, + "rate": 0.863 + }, + { + "start": "23:00:00", + "minutes": 1380, + "rate": 0.843 + } + ], + "isfProfile": { + "sensitivities": [ + { + "i": 0, + "start": "00:00:00", + "sensitivity": 86.2, + "offset": 0, + "x": 0, + "endoffset": 1440 + } + ] + }, + "carb_ratio": 5.75, + "autosens_max": 1.3, + "autosens_min": 0.7, + "units": "mg/dl", + "timezone": "Europe/Paris" +} diff --git a/app/src/test/res/autotune/test4/autotune.2022-05-30.json b/app/src/test/res/autotune/test4/autotune.2022-05-30.json new file mode 100644 index 0000000000..461ffc542c --- /dev/null +++ b/app/src/test/res/autotune/test4/autotune.2022-05-30.json @@ -0,0 +1 @@ +{"CRData":[{"CRInitialIOB":-0.087,"CRInitialBG":92,"CRInitialCarbTime":"2022-05-30T06:09:21.000Z","CREndIOB":0.396,"CREndBG":131,"CREndTime":"2022-05-30T09:29:21.000Z","CRCarbs":75,"CRInsulin":14.47},{"CRInitialIOB":-0.454,"CRInitialBG":77,"CRInitialCarbTime":"2022-05-30T10:44:21.000Z","CREndIOB":0.339,"CREndBG":100,"CREndTime":"2022-05-30T14:14:22.000Z","CRCarbs":50,"CRInsulin":10.84},{"CRInitialIOB":-0.947,"CRInitialBG":87,"CRInitialCarbTime":"2022-05-30T16:04:22.000Z","CREndIOB":-0.346,"CREndBG":130,"CREndTime":"2022-05-30T17:44:22.000Z","CRCarbs":10,"CRInsulin":0.01}],"CSFGlucoseData":[{"_id":"62945faad2cadd0004350d89","device":"AndroidAPS-DexcomG6","date":1653890961000,"dateString":"2022-05-30T06:09:21.000Z","isValid":true,"sgv":92,"direction":"Flat","type":"sgv","created_at":"2022-05-30T06:09:46.664Z","glucose":92,"avgDelta":"-0.50","BGI":-0.62,"deviation":"0.12","mealAbsorption":"start","mealCarbs":75},{"_id":"629460cdb82b320004ef5ec4","device":"AndroidAPS-DexcomG6","date":1653891261000,"dateString":"2022-05-30T06:14:21.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","created_at":"2022-05-30T06:14:37.040Z","glucose":101,"avgDelta":"2.25","BGI":-0.42,"deviation":"2.67","mealCarbs":75},{"_id":"62946214b82b320004ef5ec6","device":"AndroidAPS-DexcomG6","date":1653891561000,"dateString":"2022-05-30T06:19:21.000Z","isValid":true,"sgv":118,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T06:20:04.840Z","glucose":118,"avgDelta":"7.00","BGI":-0.21,"deviation":"7.21","mealCarbs":75},{"_id":"6294632ab82b320004ef5ecc","device":"AndroidAPS-DexcomG6","date":1653891861000,"dateString":"2022-05-30T06:24:21.000Z","isValid":true,"sgv":137,"direction":"SingleUp","type":"sgv","created_at":"2022-05-30T06:24:42.093Z","glucose":137,"avgDelta":"12.00","BGI":-12.66,"deviation":"24.66","mealCarbs":75},{"_id":"62946458b82b320004ef5ecf","device":"AndroidAPS-DexcomG6","date":1653892161000,"dateString":"2022-05-30T06:29:21.000Z","isValid":true,"sgv":157,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T06:29:44.223Z","glucose":157,"avgDelta":"16.25","BGI":-25.36,"deviation":"41.61","mealCarbs":75},{"_id":"62946586b82b320004ef5ed1","device":"AndroidAPS-DexcomG6","date":1653892461000,"dateString":"2022-05-30T06:34:21.000Z","isValid":true,"sgv":173,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T06:34:46.169Z","glucose":173,"avgDelta":"18.00","BGI":-35.2,"deviation":"53.20","mealCarbs":75},{"_id":"629466b3b82b320004ef5ed3","device":"AndroidAPS-DexcomG6","date":1653892761000,"dateString":"2022-05-30T06:39:21.000Z","isValid":true,"sgv":185,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T06:39:47.469Z","glucose":185,"avgDelta":"16.75","BGI":-42.67,"deviation":"59.42","mealCarbs":75},{"_id":"629467e1b82b320004ef5ed5","device":"AndroidAPS-DexcomG6","date":1653893061000,"dateString":"2022-05-30T06:44:21.000Z","isValid":true,"sgv":193,"direction":"SingleUp","type":"sgv","created_at":"2022-05-30T06:44:49.181Z","glucose":193,"avgDelta":"14.00","BGI":-48.07,"deviation":"62.07","mealCarbs":75},{"_id":"629469166e1b8e0004363dfc","device":"AndroidAPS-DexcomG6","date":1653893361000,"dateString":"2022-05-30T06:49:21.000Z","isValid":true,"sgv":198,"direction":"SingleUp","type":"sgv","created_at":"2022-05-30T06:49:58.419Z","glucose":198,"avgDelta":"10.25","BGI":-51.84,"deviation":"62.09","mealCarbs":75},{"_id":"62946a5e6e1b8e0004363dfe","device":"AndroidAPS-DexcomG6","date":1653893661000,"dateString":"2022-05-30T06:54:21.000Z","isValid":true,"sgv":201,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T06:55:26.117Z","glucose":201,"avgDelta":"7.00","BGI":-54.17,"deviation":"61.17","mealCarbs":75},{"_id":"62946b8a6e1b8e0004363e01","device":"AndroidAPS-DexcomG6","date":1653893961000,"dateString":"2022-05-30T06:59:21.000Z","isValid":true,"sgv":203,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T07:00:26.210Z","glucose":203,"avgDelta":"4.50","BGI":-55.41,"deviation":"59.91","mealCarbs":75},{"_id":"62946c9e6e1b8e0004363e03","device":"AndroidAPS-DexcomG6","date":1653894260000,"dateString":"2022-05-30T07:04:20.000Z","isValid":true,"sgv":203,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:05:02.549Z","glucose":203,"avgDelta":"2.50","BGI":-55.7,"deviation":"58.20","mealCarbs":75},{"_id":"62946db36e1b8e0004363e05","device":"AndroidAPS-DexcomG6","date":1653894562000,"dateString":"2022-05-30T07:09:22.000Z","isValid":true,"sgv":202,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:09:39.329Z","glucose":202,"avgDelta":"1.00","BGI":-55.25,"deviation":"56.25","mealCarbs":75},{"_id":"62946ee06e1b8e0004363e07","device":"AndroidAPS-DexcomG6","date":1653894861000,"dateString":"2022-05-30T07:14:21.000Z","isValid":true,"sgv":201,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:14:40.201Z","glucose":201,"avgDelta":"0.00","BGI":-54.21,"deviation":"54.21","mealCarbs":75},{"_id":"6294700d6e1b8e0004363e09","device":"AndroidAPS-DexcomG6","date":1653895162000,"dateString":"2022-05-30T07:19:22.000Z","isValid":true,"sgv":202,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:19:41.498Z","glucose":202,"avgDelta":"-0.25","BGI":-52.63,"deviation":"52.38","mealCarbs":75},{"_id":"629471377e1237000471bf42","device":"AndroidAPS-DexcomG6","date":1653895461000,"dateString":"2022-05-30T07:24:21.000Z","isValid":true,"sgv":204,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:24:39.113Z","glucose":204,"avgDelta":"0.25","BGI":-50.76,"deviation":"51.01","mealCarbs":75},{"_id":"629472647e1237000471bf44","device":"AndroidAPS-DexcomG6","date":1653895761000,"dateString":"2022-05-30T07:29:21.000Z","isValid":true,"sgv":208,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:29:40.917Z","glucose":208,"avgDelta":"1.50","BGI":-48.56,"deviation":"50.06","mealCarbs":75},{"_id":"629473927e1237000471bf46","device":"AndroidAPS-DexcomG6","date":1653896061000,"dateString":"2022-05-30T07:34:21.000Z","isValid":true,"sgv":213,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:34:42.398Z","glucose":213,"avgDelta":"3.00","BGI":-46.24,"deviation":"49.24","mealCarbs":75},{"_id":"629474c07e1237000471bf48","device":"AndroidAPS-DexcomG6","date":1653896361000,"dateString":"2022-05-30T07:39:21.000Z","isValid":true,"sgv":217,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:39:44.449Z","glucose":217,"avgDelta":"3.75","BGI":-43.87,"deviation":"47.62","mealCarbs":75},{"_id":"629475ed7e1237000471bf4a","device":"AndroidAPS-DexcomG6","date":1653896662000,"dateString":"2022-05-30T07:44:22.000Z","isValid":true,"sgv":218,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:44:45.778Z","glucose":218,"avgDelta":"3.50","BGI":-41.47,"deviation":"44.97","mealCarbs":75},{"_id":"6294771a7e1237000471bf4c","device":"AndroidAPS-DexcomG6","date":1653896961000,"dateString":"2022-05-30T07:49:21.000Z","isValid":true,"sgv":219,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:49:46.684Z","glucose":219,"avgDelta":"2.75","BGI":-39.06,"deviation":"41.81","mealCarbs":75},{"_id":"629478477e1237000471bf4e","device":"AndroidAPS-DexcomG6","date":1653897262000,"dateString":"2022-05-30T07:54:22.000Z","isValid":true,"sgv":219,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:54:47.898Z","glucose":219,"avgDelta":"1.50","BGI":-36.69,"deviation":"38.19","mealCarbs":75},{"_id":"62947975d10aeb0004cd3fe5","device":"AndroidAPS-DexcomG6","date":1653897561000,"dateString":"2022-05-30T07:59:21.000Z","isValid":true,"sgv":217,"direction":"Flat","type":"sgv","created_at":"2022-05-30T07:59:49.147Z","glucose":217,"avgDelta":"0.00","BGI":-33.21,"deviation":"33.21","mealCarbs":75},{"_id":"62947aa2d10aeb0004cd3fe7","device":"AndroidAPS-DexcomG6","date":1653897861000,"dateString":"2022-05-30T08:04:21.000Z","isValid":true,"sgv":213,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:04:50.320Z","glucose":213,"avgDelta":"-1.25","BGI":-30.67,"deviation":"29.42","mealCarbs":75},{"_id":"62947bcfd10aeb0004cd3fe9","device":"AndroidAPS-DexcomG6","date":1653898161000,"dateString":"2022-05-30T08:09:21.000Z","isValid":true,"sgv":209,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:09:51.204Z","glucose":209,"avgDelta":"-2.50","BGI":-28.22,"deviation":"25.72","mealCarbs":75},{"_id":"62947cfcd10aeb0004cd3feb","device":"AndroidAPS-DexcomG6","date":1653898461000,"dateString":"2022-05-30T08:14:21.000Z","isValid":true,"sgv":207,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:14:52.631Z","glucose":207,"avgDelta":"-3.00","BGI":-25.86,"deviation":"22.86","mealCarbs":75},{"_id":"62947e29d10aeb0004cd3fed","device":"AndroidAPS-DexcomG6","date":1653898761000,"dateString":"2022-05-30T08:19:21.000Z","isValid":true,"sgv":206,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:19:53.852Z","glucose":206,"avgDelta":"-2.75","BGI":-23.58,"deviation":"20.83","mealCarbs":75},{"_id":"62947f56d10aeb0004cd3ff0","device":"AndroidAPS-DexcomG6","date":1653899062000,"dateString":"2022-05-30T08:24:22.000Z","isValid":true,"sgv":205,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:24:54.980Z","glucose":205,"avgDelta":"-2.00","BGI":-21.42,"deviation":"19.42","mealCarbs":75},{"_id":"62948083d10aeb0004cd3ff4","device":"AndroidAPS-DexcomG6","date":1653899361000,"dateString":"2022-05-30T08:29:21.000Z","isValid":true,"sgv":202,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:29:55.869Z","glucose":202,"avgDelta":"-1.75","BGI":-19.47,"deviation":"17.72","mealCarbs":75},{"_id":"629481a58ecbb3000401e2cd","device":"AndroidAPS-DexcomG6","date":1653899661000,"dateString":"2022-05-30T08:34:21.000Z","isValid":true,"sgv":199,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:34:45.627Z","glucose":199,"avgDelta":"-2.00","BGI":-17.72,"deviation":"15.72","mealCarbs":75},{"_id":"629482d28ecbb3000401e2d0","device":"AndroidAPS-DexcomG6","date":1653899961000,"dateString":"2022-05-30T08:39:21.000Z","isValid":true,"sgv":197,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:39:46.821Z","glucose":197,"avgDelta":"-2.25","BGI":-16.02,"deviation":"13.77","mealCarbs":75},{"_id":"629484008ecbb3000401e2d3","device":"AndroidAPS-DexcomG6","date":1653900261000,"dateString":"2022-05-30T08:44:21.000Z","isValid":true,"sgv":195,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:44:48.348Z","glucose":195,"avgDelta":"-2.50","BGI":-14.49,"deviation":"11.99","mealCarbs":75},{"_id":"6294852d8ecbb3000401e2d7","device":"AndroidAPS-DexcomG6","date":1653900561000,"dateString":"2022-05-30T08:49:21.000Z","isValid":true,"sgv":193,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:49:49.550Z","glucose":193,"avgDelta":"-2.25","BGI":-13.28,"deviation":"11.03","mealCarbs":75},{"_id":"6294865a8ecbb3000401e2da","device":"AndroidAPS-DexcomG6","date":1653900861000,"dateString":"2022-05-30T08:54:21.000Z","isValid":true,"sgv":189,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:54:50.449Z","glucose":189,"avgDelta":"-2.50","BGI":-12.2,"deviation":"9.70","mealCarbs":75},{"_id":"629487878ecbb3000401e2dc","device":"AndroidAPS-DexcomG6","date":1653901161000,"dateString":"2022-05-30T08:59:21.000Z","isValid":true,"sgv":183,"direction":"Flat","type":"sgv","created_at":"2022-05-30T08:59:51.963Z","glucose":183,"avgDelta":"-3.50","BGI":-11.21,"deviation":"7.71","mealCarbs":75},{"_id":"629488b58ecbb3000401e2de","device":"AndroidAPS-DexcomG6","date":1653901461000,"dateString":"2022-05-30T09:04:21.000Z","isValid":true,"sgv":175,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:04:53.220Z","glucose":175,"avgDelta":"-5.00","BGI":-10.29,"deviation":"5.29","mealCarbs":75},{"_id":"62948a0776174b0004fbd21d","device":"AndroidAPS-DexcomG6","date":1653901761000,"dateString":"2022-05-30T09:09:21.000Z","isValid":true,"sgv":166,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:10:31.409Z","glucose":166,"avgDelta":"-6.75","BGI":-9.38,"deviation":"2.63","mealCarbs":75},{"_id":"62948b0276174b0004fbd21f","device":"AndroidAPS-DexcomG6","date":1653902061000,"dateString":"2022-05-30T09:14:21.000Z","isValid":true,"sgv":156,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:14:42.378Z","glucose":156,"avgDelta":"-8.25","BGI":-8.47,"deviation":"0.22","mealCarbs":75},{"_id":"62948c4876174b0004fbd222","device":"AndroidAPS-DexcomG6","date":1653902361000,"dateString":"2022-05-30T09:19:21.000Z","isValid":true,"sgv":146,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:20:08.645Z","glucose":146,"avgDelta":"-9.25","BGI":-7.6,"deviation":"-1.65","mealCarbs":0,"mealAbsorption":"end"},{"_id":"6294a02dc2e464000413b7a6","device":"AndroidAPS-DexcomG6","date":1653907461000,"dateString":"2022-05-30T10:44:21.000Z","isValid":true,"sgv":77,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:45:01.559Z","glucose":77,"avgDelta":"-1.25","BGI":1.45,"deviation":"-2.70","mealAbsorption":"start","mealCarbs":50},{"_id":"6294a15bc2e464000413b7a8","device":"AndroidAPS-DexcomG6","date":1653907762000,"dateString":"2022-05-30T10:49:22.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:50:03.007Z","glucose":76,"avgDelta":"-1.00","BGI":1.66,"deviation":"-2.66","mealCarbs":50},{"_id":"6294a274ac54000004308874","device":"AndroidAPS-DexcomG6","date":1653908062000,"dateString":"2022-05-30T10:54:22.000Z","isValid":true,"sgv":77,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:54:44.532Z","glucose":77,"avgDelta":"-0.50","BGI":1.78,"deviation":"-2.28","mealCarbs":50},{"_id":"6294a3a3ac54000004308877","device":"AndroidAPS-DexcomG6","date":1653908361000,"dateString":"2022-05-30T10:59:21.000Z","isValid":true,"sgv":81,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:59:47.232Z","glucose":81,"avgDelta":"0.75","BGI":1.87,"deviation":"-1.12","mealCarbs":50},{"_id":"6294a4d1ac5400000430887a","device":"AndroidAPS-DexcomG6","date":1653908662000,"dateString":"2022-05-30T11:04:22.000Z","isValid":true,"sgv":88,"direction":"Flat","type":"sgv","created_at":"2022-05-30T11:04:49.434Z","glucose":88,"avgDelta":"2.75","BGI":1.95,"deviation":"0.80","mealCarbs":50},{"_id":"6294a60eac5400000430887d","device":"AndroidAPS-DexcomG6","date":1653908962000,"dateString":"2022-05-30T11:09:22.000Z","isValid":true,"sgv":102,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T11:10:06.733Z","glucose":102,"avgDelta":"6.50","BGI":1.99,"deviation":"4.51","mealCarbs":50},{"_id":"6294a723ac54000004308881","device":"AndroidAPS-DexcomG6","date":1653909261000,"dateString":"2022-05-30T11:14:21.000Z","isValid":true,"sgv":122,"direction":"SingleUp","type":"sgv","created_at":"2022-05-30T11:14:43.529Z","glucose":122,"avgDelta":"11.25","BGI":1.66,"deviation":"9.59","mealCarbs":50},{"_id":"6294a851ac54000004308883","device":"AndroidAPS-DexcomG6","date":1653909561000,"dateString":"2022-05-30T11:19:21.000Z","isValid":true,"sgv":146,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T11:19:45.466Z","glucose":146,"avgDelta":"16.25","BGI":1,"deviation":"15.25","mealCarbs":50},{"_id":"6294a97eac54000004308887","device":"AndroidAPS-DexcomG6","date":1653909861000,"dateString":"2022-05-30T11:24:21.000Z","isValid":true,"sgv":172,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T11:24:46.490Z","glucose":172,"avgDelta":"21.00","BGI":-0.46,"deviation":"21.46","mealCarbs":50},{"_id":"6294aaabac5400000430888a","device":"AndroidAPS-DexcomG6","date":1653910161000,"dateString":"2022-05-30T11:29:21.000Z","isValid":true,"sgv":195,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T11:29:47.695Z","glucose":195,"avgDelta":"23.25","BGI":-2.2,"deviation":"25.45","mealCarbs":50},{"_id":"6294abd9ac5400000430888e","device":"AndroidAPS-DexcomG6","date":1653910462000,"dateString":"2022-05-30T11:34:22.000Z","isValid":true,"sgv":215,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T11:34:49.146Z","glucose":215,"avgDelta":"23.25","BGI":-3.86,"deviation":"27.11","mealCarbs":50},{"_id":"6294ad1b0f39100004ec41e2","device":"AndroidAPS-DexcomG6","date":1653910761000,"dateString":"2022-05-30T11:39:21.000Z","isValid":true,"sgv":230,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T11:40:11.205Z","glucose":230,"avgDelta":"21.00","BGI":-5.27,"deviation":"26.27","mealCarbs":50},{"_id":"6294ae2f0f39100004ec41e7","device":"AndroidAPS-DexcomG6","date":1653911061000,"dateString":"2022-05-30T11:44:21.000Z","isValid":true,"sgv":240,"direction":"DoubleUp","type":"sgv","created_at":"2022-05-30T11:44:47.323Z","glucose":240,"avgDelta":"17.00","BGI":-14.24,"deviation":"31.24","mealCarbs":50},{"_id":"6294af5c0f39100004ec41ed","device":"AndroidAPS-DexcomG6","date":1653911361000,"dateString":"2022-05-30T11:49:21.000Z","isValid":true,"sgv":246,"direction":"SingleUp","type":"sgv","created_at":"2022-05-30T11:49:48.926Z","glucose":246,"avgDelta":"12.75","BGI":-22.99,"deviation":"35.74","mealCarbs":50},{"_id":"6294b08a0f39100004ec41ef","device":"AndroidAPS-DexcomG6","date":1653911662000,"dateString":"2022-05-30T11:54:22.000Z","isValid":true,"sgv":249,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T11:54:50.545Z","glucose":249,"avgDelta":"8.50","BGI":-29.72,"deviation":"38.22","mealCarbs":50},{"_id":"6294b1d10f39100004ec41f1","device":"AndroidAPS-DexcomG6","date":1653911961000,"dateString":"2022-05-30T11:59:21.000Z","isValid":true,"sgv":251,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T12:00:17.223Z","glucose":251,"avgDelta":"5.25","BGI":-34.7,"deviation":"39.95","mealCarbs":50},{"_id":"6294b2e50f39100004ec41f3","device":"AndroidAPS-DexcomG6","date":1653912261000,"dateString":"2022-05-30T12:04:21.000Z","isValid":true,"sgv":251,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T12:04:53.216Z","glucose":251,"avgDelta":"2.75","BGI":-38.27,"deviation":"41.02","mealCarbs":50},{"_id":"6294b4130f39100004ec41f5","device":"AndroidAPS-DexcomG6","date":1653912562000,"dateString":"2022-05-30T12:09:22.000Z","isValid":true,"sgv":248,"direction":"Flat","type":"sgv","created_at":"2022-05-30T12:09:55.708Z","glucose":248,"avgDelta":"0.50","BGI":-40.64,"deviation":"41.14","mealCarbs":50},{"_id":"6294b53dff39db0004546852","device":"AndroidAPS-DexcomG6","date":1653912862000,"dateString":"2022-05-30T12:14:22.000Z","isValid":true,"sgv":242,"direction":"Flat","type":"sgv","created_at":"2022-05-30T12:14:53.986Z","glucose":242,"avgDelta":"-1.75","BGI":-42.05,"deviation":"40.30","mealCarbs":50},{"_id":"6294b66bff39db0004546853","device":"AndroidAPS-DexcomG6","date":1653913162000,"dateString":"2022-05-30T12:19:22.000Z","isValid":true,"sgv":232,"direction":"Flat","type":"sgv","created_at":"2022-05-30T12:19:55.640Z","glucose":232,"avgDelta":"-4.75","BGI":-42.67,"deviation":"37.92","mealCarbs":50},{"_id":"6294b799ff39db0004546858","device":"AndroidAPS-DexcomG6","date":1653913462000,"dateString":"2022-05-30T12:24:22.000Z","isValid":true,"sgv":223,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T12:24:57.749Z","glucose":223,"avgDelta":"-7.00","BGI":-42.63,"deviation":"35.63","mealCarbs":50},{"_id":"6294b8c7ff39db000454685b","device":"AndroidAPS-DexcomG6","date":1653913762000,"dateString":"2022-05-30T12:29:22.000Z","isValid":true,"sgv":213,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T12:29:59.741Z","glucose":213,"avgDelta":"-8.75","BGI":-42.09,"deviation":"33.34","mealCarbs":50},{"_id":"6294b9f6ff39db000454685e","device":"AndroidAPS-DexcomG6","date":1653914062000,"dateString":"2022-05-30T12:34:22.000Z","isValid":true,"sgv":203,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T12:35:02.052Z","glucose":203,"avgDelta":"-9.75","BGI":-41.09,"deviation":"31.34","mealCarbs":50},{"_id":"6294bb0bff39db0004546861","device":"AndroidAPS-DexcomG6","date":1653914362000,"dateString":"2022-05-30T12:39:22.000Z","isValid":true,"sgv":195,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T12:39:39.194Z","glucose":195,"avgDelta":"-9.25","BGI":-39.72,"deviation":"30.47","mealCarbs":50},{"_id":"6294bc52ff39db0004546864","device":"AndroidAPS-DexcomG6","date":1653914661000,"dateString":"2022-05-30T12:44:21.000Z","isValid":true,"sgv":188,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T12:45:06.129Z","glucose":188,"avgDelta":"-8.75","BGI":-38.19,"deviation":"29.44","mealCarbs":50},{"_id":"6294bd7352bed20004c9a2ac","device":"AndroidAPS-DexcomG6","date":1653914962000,"dateString":"2022-05-30T12:49:22.000Z","isValid":true,"sgv":182,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T12:49:55.775Z","glucose":182,"avgDelta":"-7.75","BGI":-36.4,"deviation":"28.65","mealCarbs":50},{"_id":"6294bea052bed20004c9a2af","device":"AndroidAPS-DexcomG6","date":1653915262000,"dateString":"2022-05-30T12:54:22.000Z","isValid":true,"sgv":176,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T12:54:56.765Z","glucose":176,"avgDelta":"-6.75","BGI":-34.41,"deviation":"27.66","mealCarbs":50},{"_id":"6294bfce52bed20004c9a2b2","device":"AndroidAPS-DexcomG6","date":1653915561000,"dateString":"2022-05-30T12:59:21.000Z","isValid":true,"sgv":170,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T12:59:58.302Z","glucose":170,"avgDelta":"-6.25","BGI":-32.42,"deviation":"26.17","mealCarbs":50},{"_id":"6294c0fb52bed20004c9a2b5","device":"AndroidAPS-DexcomG6","date":1653915862000,"dateString":"2022-05-30T13:04:22.000Z","isValid":true,"sgv":164,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:04:59.247Z","glucose":164,"avgDelta":"-6.00","BGI":-30.38,"deviation":"24.38","mealCarbs":50},{"_id":"6294c22852bed20004c9a2b7","device":"AndroidAPS-DexcomG6","date":1653916162000,"dateString":"2022-05-30T13:09:22.000Z","isValid":true,"sgv":158,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:10:00.478Z","glucose":158,"avgDelta":"-6.00","BGI":-28.31,"deviation":"22.31","mealCarbs":50},{"_id":"6294c35552bed20004c9a2ba","device":"AndroidAPS-DexcomG6","date":1653916461000,"dateString":"2022-05-30T13:14:21.000Z","isValid":true,"sgv":152,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:15:01.720Z","glucose":152,"avgDelta":"-6.00","BGI":-26.23,"deviation":"20.23","mealCarbs":50},{"_id":"6294c48252bed20004c9a2bc","device":"AndroidAPS-DexcomG6","date":1653916762000,"dateString":"2022-05-30T13:19:22.000Z","isValid":true,"sgv":147,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:20:02.947Z","glucose":147,"avgDelta":"-5.75","BGI":-24.2,"deviation":"18.45","mealCarbs":50},{"_id":"6294c5a6b8c0c10004ff0007","device":"AndroidAPS-DexcomG6","date":1653917062000,"dateString":"2022-05-30T13:24:22.000Z","isValid":true,"sgv":141,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:24:54.571Z","glucose":141,"avgDelta":"-5.75","BGI":-22.21,"deviation":"16.46","mealCarbs":50},{"_id":"6294c6d3b8c0c10004ff0009","device":"AndroidAPS-DexcomG6","date":1653917362000,"dateString":"2022-05-30T13:29:22.000Z","isValid":true,"sgv":136,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:29:55.794Z","glucose":136,"avgDelta":"-5.50","BGI":-20.34,"deviation":"14.84","mealCarbs":50},{"_id":"6294c801b8c0c10004ff000b","device":"AndroidAPS-DexcomG6","date":1653917662000,"dateString":"2022-05-30T13:34:22.000Z","isValid":true,"sgv":130,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:34:57.267Z","glucose":130,"avgDelta":"-5.50","BGI":-18.47,"deviation":"12.97","mealCarbs":50},{"_id":"6294c92eb8c0c10004ff000d","device":"AndroidAPS-DexcomG6","date":1653917962000,"dateString":"2022-05-30T13:39:22.000Z","isValid":true,"sgv":126,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:39:58.439Z","glucose":126,"avgDelta":"-5.25","BGI":-16.73,"deviation":"11.48","mealCarbs":50},{"_id":"6294ca5bb8c0c10004ff0010","device":"AndroidAPS-DexcomG6","date":1653918262000,"dateString":"2022-05-30T13:44:22.000Z","isValid":true,"sgv":121,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T13:44:59.703Z","glucose":121,"avgDelta":"-5.00","BGI":-15.11,"deviation":"10.11","mealCarbs":50},{"_id":"6294cb88b8c0c10004ff0012","device":"AndroidAPS-DexcomG6","date":1653918561000,"dateString":"2022-05-30T13:49:21.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","created_at":"2022-05-30T13:50:00.678Z","glucose":117,"avgDelta":"-4.75","BGI":-13.49,"deviation":"8.74","mealCarbs":50},{"_id":"6294cc9cb8c0c10004ff0014","device":"AndroidAPS-DexcomG6","date":1653918862000,"dateString":"2022-05-30T13:54:22.000Z","isValid":true,"sgv":113,"direction":"Flat","type":"sgv","created_at":"2022-05-30T13:54:36.799Z","glucose":113,"avgDelta":"-4.25","BGI":-12.04,"deviation":"7.79","mealCarbs":50},{"_id":"6294cdccdac1e20004fde58d","device":"AndroidAPS-DexcomG6","date":1653919161000,"dateString":"2022-05-30T13:59:21.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","created_at":"2022-05-30T13:59:40.487Z","glucose":110,"avgDelta":"-4.00","BGI":-10.63,"deviation":"6.63","mealCarbs":50},{"_id":"6294cf12dac1e20004fde58f","device":"AndroidAPS-DexcomG6","date":1653919462000,"dateString":"2022-05-30T14:04:22.000Z","isValid":true,"sgv":106,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:05:06.902Z","glucose":106,"avgDelta":"-3.75","BGI":-9.26,"deviation":"5.51","mealCarbs":50},{"_id":"6294d026dac1e20004fde592","device":"AndroidAPS-DexcomG6","date":1653919761000,"dateString":"2022-05-30T14:09:21.000Z","isValid":true,"sgv":103,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:09:42.740Z","glucose":103,"avgDelta":"-3.50","BGI":-7.97,"deviation":"4.47","mealCarbs":50},{"_id":"6294d154dac1e20004fde594","device":"AndroidAPS-DexcomG6","date":1653920062000,"dateString":"2022-05-30T14:14:22.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:14:44.142Z","glucose":100,"avgDelta":"-3.25","BGI":-6.85,"deviation":"3.60","mealCarbs":0,"mealAbsorption":"end"},{"_id":"6294eb2bb23f340004e841d8","device":"AndroidAPS-DexcomG6","date":1653926662000,"dateString":"2022-05-30T16:04:22.000Z","isValid":true,"sgv":87,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:04:59.310Z","glucose":87,"avgDelta":"2.25","BGI":3.86,"deviation":"-1.61","mealAbsorption":"start","mealCarbs":10},{"_id":"6294ec59b23f340004e841da","device":"AndroidAPS-DexcomG6","date":1653926962000,"dateString":"2022-05-30T16:09:22.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:10:01.438Z","glucose":97,"avgDelta":"4.50","BGI":4.03,"deviation":"0.47","mealCarbs":10},{"_id":"6294ed6eb23f340004e841de","device":"AndroidAPS-DexcomG6","date":1653927262000,"dateString":"2022-05-30T16:14:22.000Z","isValid":true,"sgv":111,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T16:14:38.319Z","glucose":111,"avgDelta":"7.50","BGI":4.07,"deviation":"3.43","mealCarbs":10},{"_id":"6294eeb5b23f340004e841e1","device":"AndroidAPS-DexcomG6","date":1653927562000,"dateString":"2022-05-30T16:19:22.000Z","isValid":true,"sgv":123,"direction":"SingleUp","type":"sgv","created_at":"2022-05-30T16:20:05.391Z","glucose":123,"avgDelta":"10.25","BGI":3.94,"deviation":"6.31","mealCarbs":10},{"_id":"6294efcab23f340004e841e5","device":"AndroidAPS-DexcomG6","date":1653927861000,"dateString":"2022-05-30T16:24:21.000Z","isValid":true,"sgv":131,"direction":"SingleUp","type":"sgv","created_at":"2022-05-30T16:24:42.057Z","glucose":131,"avgDelta":"11.00","BGI":3.49,"deviation":"7.51","mealCarbs":10},{"_id":"6294f0f8b23f340004e841e8","device":"AndroidAPS-DexcomG6","date":1653928161000,"dateString":"2022-05-30T16:29:21.000Z","isValid":true,"sgv":133,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T16:29:44.123Z","glucose":133,"avgDelta":"9.00","BGI":2.91,"deviation":"6.09","mealCarbs":10},{"_id":"6294f23fb23f340004e841eb","device":"AndroidAPS-DexcomG6","date":1653928462000,"dateString":"2022-05-30T16:34:22.000Z","isValid":true,"sgv":132,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:35:11.666Z","glucose":132,"avgDelta":"5.25","BGI":2.49,"deviation":"2.76","mealCarbs":10},{"_id":"6294f35555b9dd00048a547a","device":"AndroidAPS-DexcomG6","date":1653928761000,"dateString":"2022-05-30T16:39:21.000Z","isValid":true,"sgv":128,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:39:49.489Z","glucose":128,"avgDelta":"1.25","BGI":2.2,"deviation":"-0.95","mealCarbs":10},{"_id":"6294f4db55b9dd00048a547d","device":"AndroidAPS-DexcomG6","date":1653929062000,"dateString":"2022-05-30T16:44:22.000Z","isValid":true,"sgv":125,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:46:19.989Z","glucose":125,"avgDelta":"-1.50","BGI":1.95,"deviation":"-3.45","mealCarbs":10},{"_id":"6294f5bd55b9dd00048a547f","device":"AndroidAPS-DexcomG6","date":1653929361000,"dateString":"2022-05-30T16:49:21.000Z","isValid":true,"sgv":123,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:50:05.068Z","glucose":123,"avgDelta":"-2.50","BGI":1.83,"deviation":"-4.33","mealCarbs":10},{"_id":"6294f6ea55b9dd00048a5481","device":"AndroidAPS-DexcomG6","date":1653929662000,"dateString":"2022-05-30T16:54:22.000Z","isValid":true,"sgv":121,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:55:06.087Z","glucose":121,"avgDelta":"-2.75","BGI":1.83,"deviation":"-4.58","mealCarbs":10},{"_id":"6294f7fe55b9dd00048a5483","device":"AndroidAPS-DexcomG6","date":1653929962000,"dateString":"2022-05-30T16:59:22.000Z","isValid":true,"sgv":120,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:59:42.653Z","glucose":120,"avgDelta":"-2.00","BGI":1.78,"deviation":"-3.78","mealCarbs":10},{"_id":"6294f92d55b9dd00048a5486","device":"AndroidAPS-DexcomG6","date":1653930261000,"dateString":"2022-05-30T17:04:21.000Z","isValid":true,"sgv":120,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:04:45.622Z","glucose":120,"avgDelta":"-1.25","BGI":1.78,"deviation":"-3.03","mealCarbs":10},{"_id":"6294fa6255b9dd00048a5488","device":"AndroidAPS-DexcomG6","date":1653930562000,"dateString":"2022-05-30T17:09:22.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:09:54.701Z","glucose":119,"avgDelta":"-1.00","BGI":1.91,"deviation":"-2.91","mealCarbs":10},{"_id":"6294fb9155b9dd00048a548a","device":"AndroidAPS-DexcomG6","date":1653930862000,"dateString":"2022-05-30T17:14:22.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:14:57.054Z","glucose":119,"avgDelta":"-0.50","BGI":1.95,"deviation":"-2.45","mealCarbs":10},{"_id":"6294fcbf55b9dd00048a548c","device":"AndroidAPS-DexcomG6","date":1653931162000,"dateString":"2022-05-30T17:19:22.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:19:59.153Z","glucose":119,"avgDelta":"-0.25","BGI":1.99,"deviation":"-2.24","mealCarbs":10},{"_id":"6294fded55b9dd00048a548e","device":"AndroidAPS-DexcomG6","date":1653931462000,"dateString":"2022-05-30T17:24:22.000Z","isValid":true,"sgv":121,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:25:01.436Z","glucose":121,"avgDelta":"0.25","BGI":2.03,"deviation":"-1.78","mealCarbs":10},{"_id":"6294ff1c55b9dd00048a5490","device":"AndroidAPS-DexcomG6","date":1653931761000,"dateString":"2022-05-30T17:29:21.000Z","isValid":true,"sgv":123,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:30:04.244Z","glucose":123,"avgDelta":"1.00","BGI":1.99,"deviation":"-0.99","mealCarbs":10},{"_id":"6295003055b9dd00048a5493","device":"AndroidAPS-DexcomG6","date":1653932061000,"dateString":"2022-05-30T17:34:21.000Z","isValid":true,"sgv":125,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:34:40.905Z","glucose":125,"avgDelta":"1.50","BGI":1.95,"deviation":"-0.45","mealCarbs":10},{"_id":"6295015e55b9dd00048a5495","device":"AndroidAPS-DexcomG6","date":1653932362000,"dateString":"2022-05-30T17:39:22.000Z","isValid":true,"sgv":127,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:39:42.833Z","glucose":127,"avgDelta":"2.00","BGI":1.99,"deviation":"0.01","mealCarbs":10},{"_id":"6295029d409703000484d1b7","device":"AndroidAPS-DexcomG6","date":1653932662000,"dateString":"2022-05-30T17:44:22.000Z","isValid":true,"sgv":130,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:45:01.816Z","glucose":130,"avgDelta":"2.25","BGI":1.95,"deviation":"0.30","mealCarbs":0,"mealAbsorption":"end"},{"_id":"62953178e3aedd00046f3879","device":"AndroidAPS-DexcomG6","date":1653944662000,"dateString":"2022-05-30T21:04:22.000Z","isValid":true,"sgv":163,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:04:56.492Z","glucose":163,"avgDelta":"-2.50","BGI":-6.64,"deviation":"4.14","mealAbsorption":"start","mealCarbs":35},{"_id":"629532a6e3aedd00046f387c","device":"AndroidAPS-DexcomG6","date":1653944962000,"dateString":"2022-05-30T21:09:22.000Z","isValid":true,"sgv":161,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:09:58.543Z","glucose":161,"avgDelta":"-2.50","BGI":-11.7,"deviation":"9.20","mealCarbs":35},{"_id":"629533d3e3aedd00046f387e","device":"AndroidAPS-DexcomG6","date":1653945263000,"dateString":"2022-05-30T21:14:23.000Z","isValid":true,"sgv":162,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:14:59.957Z","glucose":162,"avgDelta":"-1.75","BGI":-15.52,"deviation":"13.77","mealCarbs":35},{"_id":"62953501e3aedd00046f3880","device":"AndroidAPS-DexcomG6","date":1653945562000,"dateString":"2022-05-30T21:19:22.000Z","isValid":true,"sgv":167,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:20:01.384Z","glucose":167,"avgDelta":"0.25","BGI":-18.39,"deviation":"18.64","mealCarbs":35},{"_id":"6295362fe3aedd00046f3884","device":"AndroidAPS-DexcomG6","date":1653945863000,"dateString":"2022-05-30T21:24:23.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:25:03.893Z","glucose":176,"avgDelta":"3.25","BGI":-20.5,"deviation":"23.75","mealCarbs":35},{"_id":"6295374986a3df0004eb44f6","device":"AndroidAPS-DexcomG6","date":1653946162000,"dateString":"2022-05-30T21:29:22.000Z","isValid":true,"sgv":187,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T21:29:45.117Z","glucose":187,"avgDelta":"6.50","BGI":-21.87,"deviation":"28.37","mealCarbs":35},{"_id":"6295387786a3df0004eb44f9","device":"AndroidAPS-DexcomG6","date":1653946462000,"dateString":"2022-05-30T21:34:22.000Z","isValid":true,"sgv":192,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T21:34:47.953Z","glucose":192,"avgDelta":"7.50","BGI":-22.83,"deviation":"30.33","mealCarbs":35},{"_id":"629539a586a3df0004eb44fb","device":"AndroidAPS-DexcomG6","date":1653946762000,"dateString":"2022-05-30T21:39:22.000Z","isValid":true,"sgv":188,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:39:49.822Z","glucose":188,"avgDelta":"5.25","BGI":-23.37,"deviation":"28.62","mealCarbs":35},{"_id":"62953ad486a3df0004eb44fd","device":"AndroidAPS-DexcomG6","date":1653947062000,"dateString":"2022-05-30T21:44:22.000Z","isValid":true,"sgv":181,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:44:52.471Z","glucose":181,"avgDelta":"1.25","BGI":-23.33,"deviation":"24.58","mealCarbs":35},{"_id":"62953c0286a3df0004eb4500","device":"AndroidAPS-DexcomG6","date":1653947361000,"dateString":"2022-05-30T21:49:21.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:49:54.555Z","glucose":177,"avgDelta":"-2.50","BGI":-23.08,"deviation":"20.58","mealCarbs":35},{"_id":"62953d3086a3df0004eb4502","device":"AndroidAPS-DexcomG6","date":1653947662000,"dateString":"2022-05-30T21:54:22.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:54:56.505Z","glucose":177,"avgDelta":"-3.75","BGI":-22.5,"deviation":"18.75","mealCarbs":35},{"_id":"62953e5d86a3df0004eb4504","device":"AndroidAPS-DexcomG6","date":1653947962000,"dateString":"2022-05-30T21:59:22.000Z","isValid":true,"sgv":181,"direction":"Flat","type":"sgv","created_at":"2022-05-30T21:59:57.963Z","glucose":181,"avgDelta":"-1.75","BGI":-21.71,"deviation":"19.96","mealCarbs":35},{"_id":"62953f7e1ded00000454b737","device":"AndroidAPS-DexcomG6","date":1653948262000,"dateString":"2022-05-30T22:04:22.000Z","isValid":true,"sgv":185,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:04:46.798Z","glucose":185,"avgDelta":"1.00","BGI":-20.8,"deviation":"21.80","mealCarbs":35},{"_id":"629540ac1ded00000454b739","device":"AndroidAPS-DexcomG6","date":1653948562000,"dateString":"2022-05-30T22:09:22.000Z","isValid":true,"sgv":188,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:09:48.384Z","glucose":188,"avgDelta":"2.75","BGI":-19.72,"deviation":"22.47","mealCarbs":35},{"_id":"629541da1ded00000454b73d","device":"AndroidAPS-DexcomG6","date":1653948861000,"dateString":"2022-05-30T22:14:21.000Z","isValid":true,"sgv":189,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:14:50.845Z","glucose":189,"avgDelta":"3.00","BGI":-18.64,"deviation":"21.64","mealCarbs":35},{"_id":"629543081ded00000454b740","device":"AndroidAPS-DexcomG6","date":1653949162000,"dateString":"2022-05-30T22:19:22.000Z","isValid":true,"sgv":188,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:19:52.210Z","glucose":188,"avgDelta":"1.75","BGI":-17.47,"deviation":"19.22","mealCarbs":35},{"_id":"629544361ded00000454b742","device":"AndroidAPS-DexcomG6","date":1653949462000,"dateString":"2022-05-30T22:24:22.000Z","isValid":true,"sgv":186,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:24:54.381Z","glucose":186,"avgDelta":"0.25","BGI":-16.27,"deviation":"16.52","mealCarbs":35},{"_id":"629545651ded00000454b744","device":"AndroidAPS-DexcomG6","date":1653949762000,"dateString":"2022-05-30T22:29:22.000Z","isValid":true,"sgv":183,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:29:57.528Z","glucose":183,"avgDelta":"-1.25","BGI":-15.03,"deviation":"13.78","mealCarbs":35},{"_id":"629546941ded00000454b746","device":"AndroidAPS-DexcomG6","date":1653950062000,"dateString":"2022-05-30T22:34:22.000Z","isValid":true,"sgv":180,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:35:00.013Z","glucose":180,"avgDelta":"-2.25","BGI":-13.82,"deviation":"11.57","mealCarbs":35},{"_id":"629547acf89bc40004df9f57","device":"AndroidAPS-DexcomG6","date":1653950362000,"dateString":"2022-05-30T22:39:22.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:39:40.750Z","glucose":177,"avgDelta":"-2.75","BGI":-12.58,"deviation":"9.83","mealCarbs":35},{"_id":"629548f3f89bc40004df9f5a","device":"AndroidAPS-DexcomG6","date":1653950662000,"dateString":"2022-05-30T22:44:22.000Z","isValid":true,"sgv":174,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:45:07.405Z","glucose":174,"avgDelta":"-3.00","BGI":-11.41,"deviation":"8.41","mealCarbs":35},{"_id":"62954a21f89bc40004df9f5d","device":"AndroidAPS-DexcomG6","date":1653950961000,"dateString":"2022-05-30T22:49:21.000Z","isValid":true,"sgv":172,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:50:09.405Z","glucose":172,"avgDelta":"-2.75","BGI":-10.34,"deviation":"7.59","mealCarbs":35},{"_id":"62954b36f89bc40004df9f60","device":"AndroidAPS-DexcomG6","date":1653951262000,"dateString":"2022-05-30T22:54:22.000Z","isValid":true,"sgv":170,"direction":"Flat","type":"sgv","created_at":"2022-05-30T22:54:46.692Z","glucose":170,"avgDelta":"-2.50","BGI":-9.3,"deviation":"6.80","mealCarbs":35},{"_id":"6295687de4f1e400046e05b4","device":"AndroidAPS-DexcomG6","date":1653958762000,"dateString":"2022-05-31T00:59:22.000Z","isValid":true,"sgv":121,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-31T00:59:41.709Z","glucose":121,"avgDelta":"-14.00","BGI":-0.91,"deviation":"-13.09","mealCarbs":35},{"_id":"629569abe4f1e400046e05b8","device":"AndroidAPS-DexcomG6","date":1653959062000,"dateString":"2022-05-31T01:04:22.000Z","isValid":true,"sgv":117,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-31T01:04:43.046Z","glucose":117,"avgDelta":"-14.25","BGI":-0.95,"deviation":"-13.30","mealCarbs":35},{"_id":"62956adae4f1e400046e05bb","device":"AndroidAPS-DexcomG6","date":1653959362000,"dateString":"2022-05-31T01:09:22.000Z","isValid":true,"sgv":112,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-31T01:09:46.322Z","glucose":112,"avgDelta":"-15.00","BGI":-1,"deviation":"-14.00","mealCarbs":35},{"_id":"62956c07e4f1e400046e05be","device":"AndroidAPS-DexcomG6","date":1653959662000,"dateString":"2022-05-31T01:14:22.000Z","isValid":true,"sgv":108,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-31T01:14:47.990Z","glucose":108,"avgDelta":"-15.50","BGI":-1,"deviation":"-14.50","mealCarbs":35},{"_id":"62956d35e4f1e400046e05c1","device":"AndroidAPS-DexcomG6","date":1653959962000,"dateString":"2022-05-31T01:19:22.000Z","isValid":true,"sgv":105,"direction":"Flat","type":"sgv","created_at":"2022-05-31T01:19:49.260Z","glucose":105,"avgDelta":"-4.00","BGI":-0.91,"deviation":"-3.09","mealCarbs":35},{"_id":"62956e62e4f1e400046e05c3","device":"AndroidAPS-DexcomG6","date":1653960262000,"dateString":"2022-05-31T01:24:22.000Z","isValid":true,"sgv":107,"direction":"Flat","type":"sgv","created_at":"2022-05-31T01:24:50.951Z","glucose":107,"avgDelta":"-2.50","BGI":-0.75,"deviation":"-1.75","mealCarbs":35},{"_id":"62956f90e4f1e400046e05c7","device":"AndroidAPS-DexcomG6","date":1653960561000,"dateString":"2022-05-31T01:29:21.000Z","isValid":true,"sgv":112,"direction":"Flat","type":"sgv","created_at":"2022-05-31T01:29:52.070Z","glucose":112,"avgDelta":"0.00","BGI":-0.54,"deviation":"0.54","mealCarbs":35},{"_id":"629570bb9bc0370004b42b77","device":"AndroidAPS-DexcomG6","date":1653960862000,"dateString":"2022-05-31T01:34:22.000Z","isValid":true,"sgv":116,"direction":"Flat","type":"sgv","created_at":"2022-05-31T01:34:51.145Z","glucose":116,"avgDelta":"2.00","BGI":-0.5,"deviation":"2.50","mealCarbs":35},{"_id":"629571e89bc0370004b42b7a","device":"AndroidAPS-DexcomG6","date":1653961162000,"dateString":"2022-05-31T01:39:22.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","created_at":"2022-05-31T01:39:52.509Z","glucose":119,"avgDelta":"3.50","BGI":-0.58,"deviation":"4.08","mealCarbs":35},{"_id":"629573159bc0370004b42b7d","device":"AndroidAPS-DexcomG6","date":1653961462000,"dateString":"2022-05-31T01:44:22.000Z","isValid":true,"sgv":117,"direction":"Flat","type":"sgv","created_at":"2022-05-31T01:44:53.650Z","glucose":117,"avgDelta":"2.50","BGI":-0.71,"deviation":"3.21","mealCarbs":35},{"_id":"629574429bc0370004b42b80","device":"AndroidAPS-DexcomG6","date":1653961763000,"dateString":"2022-05-31T01:49:23.000Z","isValid":true,"sgv":112,"direction":"Flat","type":"sgv","created_at":"2022-05-31T01:49:54.739Z","glucose":112,"avgDelta":"0.00","BGI":-0.83,"deviation":"0.83","mealCarbs":35},{"_id":"6295756f9bc0370004b42b83","device":"AndroidAPS-DexcomG6","date":1653962062000,"dateString":"2022-05-31T01:54:22.000Z","isValid":true,"sgv":103,"direction":"Flat","type":"sgv","created_at":"2022-05-31T01:54:55.893Z","glucose":103,"avgDelta":"-3.25","BGI":-0.83,"deviation":"-2.42","mealCarbs":35}],"ISFGlucoseData":[{"_id":"62943b53a743da00044e28e2","device":"AndroidAPS-DexcomG6","date":1653881661000,"dateString":"2022-05-30T03:34:21.000Z","isValid":true,"sgv":131,"direction":"Flat","type":"sgv","created_at":"2022-05-30T03:34:43.850Z","glucose":131,"avgDelta":"1.50","BGI":-1.62,"deviation":"3.12"},{"_id":"62943c81a743da00044e28e5","device":"AndroidAPS-DexcomG6","date":1653881961000,"dateString":"2022-05-30T03:39:21.000Z","isValid":true,"sgv":128,"direction":"Flat","type":"sgv","created_at":"2022-05-30T03:39:45.390Z","glucose":128,"avgDelta":"0.00","BGI":-2.32,"deviation":"2.32"},{"_id":"62943daea743da00044e28e7","device":"AndroidAPS-DexcomG6","date":1653882261000,"dateString":"2022-05-30T03:44:21.000Z","isValid":true,"sgv":126,"direction":"Flat","type":"sgv","created_at":"2022-05-30T03:44:46.579Z","glucose":126,"avgDelta":"-1.25","BGI":-2.78,"deviation":"1.53"},{"_id":"62943edca743da00044e28e9","device":"AndroidAPS-DexcomG6","date":1653882561000,"dateString":"2022-05-30T03:49:21.000Z","isValid":true,"sgv":124,"direction":"Flat","type":"sgv","created_at":"2022-05-30T03:49:48.266Z","glucose":124,"avgDelta":"-1.75","BGI":-3.07,"deviation":"1.32"},{"_id":"6294400aa743da00044e28eb","device":"AndroidAPS-DexcomG6","date":1653882861000,"dateString":"2022-05-30T03:54:21.000Z","isValid":true,"sgv":121,"direction":"Flat","type":"sgv","created_at":"2022-05-30T03:54:50.162Z","glucose":121,"avgDelta":"-2.50","BGI":-3.15,"deviation":"0.65"},{"_id":"6294413fc319020004344fb0","device":"AndroidAPS-DexcomG6","date":1653883161000,"dateString":"2022-05-30T03:59:21.000Z","isValid":true,"sgv":119,"direction":"Flat","type":"sgv","created_at":"2022-05-30T03:59:59.474Z","glucose":119,"avgDelta":"-2.25","BGI":-3.15,"deviation":"0.90"},{"_id":"6294426dc319020004344fb4","device":"AndroidAPS-DexcomG6","date":1653883461000,"dateString":"2022-05-30T04:04:21.000Z","isValid":true,"sgv":116,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:05:01.284Z","glucose":116,"avgDelta":"-2.50","BGI":-3.07,"deviation":"0.57"},{"_id":"6294439ac319020004344fb7","device":"AndroidAPS-DexcomG6","date":1653883761000,"dateString":"2022-05-30T04:09:21.000Z","isValid":true,"sgv":115,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:10:02.526Z","glucose":115,"avgDelta":"-2.25","BGI":-2.95,"deviation":"0.70"},{"_id":"629444afc319020004344fba","device":"AndroidAPS-DexcomG6","date":1653884061000,"dateString":"2022-05-30T04:14:21.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:14:39.235Z","glucose":114,"avgDelta":"-1.75","BGI":-2.82,"deviation":"1.07"},{"_id":"629445f6c319020004344fbe","device":"AndroidAPS-DexcomG6","date":1653884361000,"dateString":"2022-05-30T04:19:21.000Z","isValid":true,"sgv":115,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:20:06.094Z","glucose":115,"avgDelta":"-1.00","BGI":-2.78,"deviation":"1.78"},{"_id":"6294470ac319020004344fc1","device":"AndroidAPS-DexcomG6","date":1653884661000,"dateString":"2022-05-30T04:24:21.000Z","isValid":true,"sgv":114,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:24:42.523Z","glucose":114,"avgDelta":"-0.50","BGI":-2.82,"deviation":"2.32"},{"_id":"62944846c0f24700048ea5e4","device":"AndroidAPS-DexcomG6","date":1653884961000,"dateString":"2022-05-30T04:29:21.000Z","isValid":true,"sgv":112,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:29:58.536Z","glucose":112,"avgDelta":"-0.75","BGI":-2.99,"deviation":"2.24"},{"_id":"62944973c0f24700048ea5e7","device":"AndroidAPS-DexcomG6","date":1653885261000,"dateString":"2022-05-30T04:34:21.000Z","isValid":true,"sgv":112,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:34:59.937Z","glucose":112,"avgDelta":"-0.50","BGI":-3.03,"deviation":"2.53"},{"_id":"62944aa1c0f24700048ea5e9","device":"AndroidAPS-DexcomG6","date":1653885561000,"dateString":"2022-05-30T04:39:21.000Z","isValid":true,"sgv":112,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:40:01.830Z","glucose":112,"avgDelta":"-0.75","BGI":-2.99,"deviation":"2.24"},{"_id":"62944bb6c0f24700048ea5ee","device":"AndroidAPS-DexcomG6","date":1653885861000,"dateString":"2022-05-30T04:44:21.000Z","isValid":true,"sgv":112,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:44:38.372Z","glucose":112,"avgDelta":"-0.50","BGI":-3.03,"deviation":"2.53"},{"_id":"62944ce3c0f24700048ea5f1","device":"AndroidAPS-DexcomG6","date":1653886161000,"dateString":"2022-05-30T04:49:21.000Z","isValid":true,"sgv":110,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:49:39.435Z","glucose":110,"avgDelta":"-0.50","BGI":-3.11,"deviation":"2.61"},{"_id":"62944e11c0f24700048ea5f3","device":"AndroidAPS-DexcomG6","date":1653886461000,"dateString":"2022-05-30T04:54:21.000Z","isValid":true,"sgv":108,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:54:41.186Z","glucose":108,"avgDelta":"-1.00","BGI":-3.07,"deviation":"2.07"},{"_id":"62944f3fc0f24700048ea5f6","device":"AndroidAPS-DexcomG6","date":1653886761000,"dateString":"2022-05-30T04:59:21.000Z","isValid":true,"sgv":105,"direction":"Flat","type":"sgv","created_at":"2022-05-30T04:59:43.617Z","glucose":105,"avgDelta":"-1.75","BGI":-2.95,"deviation":"1.20"},{"_id":"6294506dc0f24700048ea5f8","device":"AndroidAPS-DexcomG6","date":1653887061000,"dateString":"2022-05-30T05:04:21.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:04:45.582Z","glucose":102,"avgDelta":"-2.50","BGI":-2.82,"deviation":"0.32"},{"_id":"629451ab13be4d00048f99d4","device":"AndroidAPS-DexcomG6","date":1653887361000,"dateString":"2022-05-30T05:09:21.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:10:03.174Z","glucose":99,"avgDelta":"-2.75","BGI":-2.66,"deviation":"-0.09"},{"_id":"629452bf13be4d00048f99d7","device":"AndroidAPS-DexcomG6","date":1653887661000,"dateString":"2022-05-30T05:14:21.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:14:39.295Z","glucose":98,"avgDelta":"-2.50","BGI":-2.45,"deviation":"-0.05"},{"_id":"6294540513be4d00048f99d9","device":"AndroidAPS-DexcomG6","date":1653887961000,"dateString":"2022-05-30T05:19:21.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:20:05.981Z","glucose":99,"avgDelta":"-1.50","BGI":-2.2,"deviation":"0.70"},{"_id":"6294551a13be4d00048f99dd","device":"AndroidAPS-DexcomG6","date":1653888261000,"dateString":"2022-05-30T05:24:21.000Z","isValid":true,"sgv":100,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:24:42.074Z","glucose":100,"avgDelta":"-0.50","BGI":-1.99,"deviation":"1.49"},{"_id":"6294564813be4d00048f99e0","device":"AndroidAPS-DexcomG6","date":1653888561000,"dateString":"2022-05-30T05:29:21.000Z","isValid":true,"sgv":101,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:29:44.188Z","glucose":101,"avgDelta":"0.50","BGI":-1.99,"deviation":"2.49"},{"_id":"6294577513be4d00048f99e3","device":"AndroidAPS-DexcomG6","date":1653888862000,"dateString":"2022-05-30T05:34:22.000Z","isValid":true,"sgv":99,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:34:45.547Z","glucose":99,"avgDelta":"0.25","BGI":-1.91,"deviation":"2.16"},{"_id":"629458b0d2cadd0004350d76","device":"AndroidAPS-DexcomG6","date":1653889161000,"dateString":"2022-05-30T05:39:21.000Z","isValid":true,"sgv":98,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:40:00.401Z","glucose":98,"avgDelta":"-0.25","BGI":-1.83,"deviation":"1.58"},{"_id":"629459ddd2cadd0004350d7a","device":"AndroidAPS-DexcomG6","date":1653889461000,"dateString":"2022-05-30T05:44:21.000Z","isValid":true,"sgv":96,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:45:01.449Z","glucose":96,"avgDelta":"-1.00","BGI":-1.66,"deviation":"0.66"},{"_id":"62945b0bd2cadd0004350d7d","device":"AndroidAPS-DexcomG6","date":1653889761000,"dateString":"2022-05-30T05:49:21.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:50:03.127Z","glucose":94,"avgDelta":"-1.75","BGI":-1.49,"deviation":"-0.26"},{"_id":"62948d5d76174b0004fbd225","device":"AndroidAPS-DexcomG6","date":1653902661000,"dateString":"2022-05-30T09:24:21.000Z","isValid":true,"sgv":138,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:24:45.006Z","glucose":138,"avgDelta":"-9.25","BGI":-6.77,"deviation":"-2.48"},{"_id":"62948ebc76174b0004fbd227","device":"AndroidAPS-DexcomG6","date":1653902961000,"dateString":"2022-05-30T09:29:21.000Z","isValid":true,"sgv":131,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:30:36.089Z","glucose":131,"avgDelta":"-8.75","BGI":-5.94,"deviation":"-2.81"},{"_id":"62948fb776174b0004fbd229","device":"AndroidAPS-DexcomG6","date":1653903261000,"dateString":"2022-05-30T09:34:21.000Z","isValid":true,"sgv":125,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:34:47.315Z","glucose":125,"avgDelta":"-7.75","BGI":-5.19,"deviation":"-2.56"},{"_id":"629490e476174b0004fbd22b","device":"AndroidAPS-DexcomG6","date":1653903561000,"dateString":"2022-05-30T09:39:21.000Z","isValid":true,"sgv":119,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:39:48.475Z","glucose":119,"avgDelta":"-6.75","BGI":-4.44,"deviation":"-2.31"},{"_id":"6294920b5989a90004f0c223","device":"AndroidAPS-DexcomG6","date":1653903861000,"dateString":"2022-05-30T09:44:21.000Z","isValid":true,"sgv":112,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:44:43.997Z","glucose":112,"avgDelta":"-6.50","BGI":-3.65,"deviation":"-2.85"},{"_id":"629493395989a90004f0c225","device":"AndroidAPS-DexcomG6","date":1653904161000,"dateString":"2022-05-30T09:49:21.000Z","isValid":true,"sgv":107,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:49:45.193Z","glucose":107,"avgDelta":"-6.00","BGI":-2.99,"deviation":"-3.01"},{"_id":"629494665989a90004f0c228","device":"AndroidAPS-DexcomG6","date":1653904461000,"dateString":"2022-05-30T09:54:21.000Z","isValid":true,"sgv":102,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T09:54:46.582Z","glucose":102,"avgDelta":"-5.75","BGI":-2.32,"deviation":"-3.43"},{"_id":"629495ac5989a90004f0c22a","device":"AndroidAPS-DexcomG6","date":1653904761000,"dateString":"2022-05-30T09:59:21.000Z","isValid":true,"sgv":99,"direction":"FortyFiveDown","type":"sgv","created_at":"2022-05-30T10:00:12.873Z","glucose":99,"avgDelta":"-5.00","BGI":-1.66,"deviation":"-3.34"},{"_id":"6294d281dac1e20004fde596","device":"AndroidAPS-DexcomG6","date":1653920361000,"dateString":"2022-05-30T14:19:21.000Z","isValid":true,"sgv":97,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:19:45.303Z","glucose":97,"avgDelta":"-3.25","BGI":-5.85,"deviation":"2.60"},{"_id":"6294d3aedac1e20004fde598","device":"AndroidAPS-DexcomG6","date":1653920661000,"dateString":"2022-05-30T14:24:21.000Z","isValid":true,"sgv":93,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:24:46.261Z","glucose":93,"avgDelta":"-3.25","BGI":-4.98,"deviation":"1.73"},{"_id":"6294d4dbdac1e20004fde59a","device":"AndroidAPS-DexcomG6","date":1653920961000,"dateString":"2022-05-30T14:29:21.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:29:47.439Z","glucose":89,"avgDelta":"-3.50","BGI":-4.23,"deviation":"0.73"},{"_id":"6294d6005f047100042886ba","device":"AndroidAPS-DexcomG6","date":1653921261000,"dateString":"2022-05-30T14:34:21.000Z","isValid":true,"sgv":87,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:34:40.716Z","glucose":87,"avgDelta":"-3.25","BGI":-3.53,"deviation":"0.28"},{"_id":"6294d72e5f047100042886bc","device":"AndroidAPS-DexcomG6","date":1653921561000,"dateString":"2022-05-30T14:39:21.000Z","isValid":true,"sgv":85,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:39:42.170Z","glucose":85,"avgDelta":"-3.00","BGI":-2.82,"deviation":"-0.18"},{"_id":"6294d85b5f047100042886be","device":"AndroidAPS-DexcomG6","date":1653921862000,"dateString":"2022-05-30T14:44:22.000Z","isValid":true,"sgv":84,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:44:43.154Z","glucose":84,"avgDelta":"-2.25","BGI":-2.2,"deviation":"-0.05"},{"_id":"6294da065f047100042886c0","device":"AndroidAPS-DexcomG6","date":1653922161000,"dateString":"2022-05-30T14:49:21.000Z","isValid":true,"sgv":82,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:51:50.006Z","glucose":82,"avgDelta":"-1.75","BGI":-1.62,"deviation":"-0.13"}],"basalGlucoseData":[{"_id":"62942af6ee9e6e00046d7fe8","device":"AndroidAPS-DexcomG6","date":1653877461000,"dateString":"2022-05-30T02:24:21.000Z","isValid":true,"sgv":76,"direction":"Flat","type":"sgv","created_at":"2022-05-30T02:24:54.787Z","glucose":76,"avgDelta":"2.25","BGI":6.52,"deviation":"-4.27"},{"_id":"62942c24ee9e6e00046d7fea","device":"AndroidAPS-DexcomG6","date":1653877761000,"dateString":"2022-05-30T02:29:21.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","created_at":"2022-05-30T02:29:56.392Z","glucose":78,"avgDelta":"1.75","BGI":6.56,"deviation":"-4.81"},{"_id":"62942d51ee9e6e00046d7fec","device":"AndroidAPS-DexcomG6","date":1653878061000,"dateString":"2022-05-30T02:34:21.000Z","isValid":true,"sgv":82,"direction":"Flat","type":"sgv","created_at":"2022-05-30T02:34:57.498Z","glucose":82,"avgDelta":"2.00","BGI":6.56,"deviation":"-4.56"},{"_id":"62942e7fee9e6e00046d7fef","device":"AndroidAPS-DexcomG6","date":1653878361000,"dateString":"2022-05-30T02:39:21.000Z","isValid":true,"sgv":86,"direction":"Flat","type":"sgv","created_at":"2022-05-30T02:39:59.070Z","glucose":86,"avgDelta":"2.75","BGI":6.56,"deviation":"-3.81"},{"_id":"62942facee9e6e00046d7ff2","device":"AndroidAPS-DexcomG6","date":1653878661000,"dateString":"2022-05-30T02:44:21.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","created_at":"2022-05-30T02:45:00.369Z","glucose":91,"avgDelta":"3.75","BGI":6.52,"deviation":"-2.77"},{"_id":"629430c1ee9e6e00046d7ff7","device":"AndroidAPS-DexcomG6","date":1653878961000,"dateString":"2022-05-30T02:49:21.000Z","isValid":true,"sgv":96,"direction":"Flat","type":"sgv","created_at":"2022-05-30T02:49:37.117Z","glucose":96,"avgDelta":"4.50","BGI":6.27,"deviation":"-1.77"},{"_id":"629431f9a365640004d83cb9","device":"AndroidAPS-DexcomG6","date":1653879261000,"dateString":"2022-05-30T02:54:21.000Z","isValid":true,"sgv":102,"direction":"Flat","type":"sgv","created_at":"2022-05-30T02:54:49.321Z","glucose":102,"avgDelta":"5.00","BGI":5.77,"deviation":"-0.77"},{"_id":"62943327a365640004d83cbe","device":"AndroidAPS-DexcomG6","date":1653879561000,"dateString":"2022-05-30T02:59:21.000Z","isValid":true,"sgv":108,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T02:59:51.442Z","glucose":108,"avgDelta":"5.50","BGI":5.11,"deviation":"0.39"},{"_id":"62943454a365640004d83cc0","device":"AndroidAPS-DexcomG6","date":1653879861000,"dateString":"2022-05-30T03:04:21.000Z","isValid":true,"sgv":114,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T03:04:52.790Z","glucose":114,"avgDelta":"5.75","BGI":4.23,"deviation":"1.52"},{"_id":"62943582a365640004d83cc3","device":"AndroidAPS-DexcomG6","date":1653880161000,"dateString":"2022-05-30T03:09:21.000Z","isValid":true,"sgv":119,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T03:09:54.494Z","glucose":119,"avgDelta":"5.75","BGI":3.32,"deviation":"2.43"},{"_id":"629436b0a365640004d83cc5","device":"AndroidAPS-DexcomG6","date":1653880461000,"dateString":"2022-05-30T03:14:21.000Z","isValid":true,"sgv":125,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T03:14:56.027Z","glucose":125,"avgDelta":"5.75","BGI":2.41,"deviation":"3.34"},{"_id":"629437dfa365640004d83cc9","device":"AndroidAPS-DexcomG6","date":1653880761000,"dateString":"2022-05-30T03:19:21.000Z","isValid":true,"sgv":128,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T03:19:59.695Z","glucose":128,"avgDelta":"5.00","BGI":1.37,"deviation":"3.63"},{"_id":"629438f8a743da00044e28dc","device":"AndroidAPS-DexcomG6","date":1653881062000,"dateString":"2022-05-30T03:24:22.000Z","isValid":true,"sgv":131,"direction":"Flat","type":"sgv","created_at":"2022-05-30T03:24:40.834Z","glucose":131,"avgDelta":"4.25","BGI":0.17,"deviation":"4.08"},{"_id":"62943a26a743da00044e28de","device":"AndroidAPS-DexcomG6","date":1653881361000,"dateString":"2022-05-30T03:29:21.000Z","isValid":true,"sgv":131,"direction":"Flat","type":"sgv","created_at":"2022-05-30T03:29:42.328Z","glucose":131,"avgDelta":"3.00","BGI":-0.75,"deviation":"3.75"},{"_id":"62945c38d2cadd0004350d80","device":"AndroidAPS-DexcomG6","date":1653890061000,"dateString":"2022-05-30T05:54:21.000Z","isValid":true,"sgv":92,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:55:04.735Z","glucose":92,"avgDelta":"-1.75","BGI":-1.25,"deviation":"-0.50"},{"_id":"62945d4dd2cadd0004350d83","device":"AndroidAPS-DexcomG6","date":1653890361000,"dateString":"2022-05-30T05:59:21.000Z","isValid":true,"sgv":90,"direction":"Flat","type":"sgv","created_at":"2022-05-30T05:59:41.863Z","glucose":90,"avgDelta":"-2.00","BGI":-1.08,"deviation":"-0.92"},{"_id":"62945e7cd2cadd0004350d86","device":"AndroidAPS-DexcomG6","date":1653890661000,"dateString":"2022-05-30T06:04:21.000Z","isValid":true,"sgv":89,"direction":"Flat","type":"sgv","created_at":"2022-05-30T06:04:44.141Z","glucose":89,"avgDelta":"-1.75","BGI":-0.83,"deviation":"-0.92"},{"_id":"629496c15989a90004f0c22d","device":"AndroidAPS-DexcomG6","date":1653905061000,"dateString":"2022-05-30T10:04:21.000Z","isValid":true,"sgv":94,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:04:49.010Z","glucose":94,"avgDelta":"-4.50","BGI":-1.12,"deviation":"-3.38"},{"_id":"629497ee5989a90004f0c230","device":"AndroidAPS-DexcomG6","date":1653905362000,"dateString":"2022-05-30T10:09:22.000Z","isValid":true,"sgv":91,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:09:50.202Z","glucose":91,"avgDelta":"-4.00","BGI":-0.62,"deviation":"-3.38"},{"_id":"6294991b5989a90004f0c233","device":"AndroidAPS-DexcomG6","date":1653905661000,"dateString":"2022-05-30T10:14:21.000Z","isValid":true,"sgv":87,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:14:51.432Z","glucose":87,"avgDelta":"-3.75","BGI":-0.21,"deviation":"-3.54"},{"_id":"62949a4ac2e464000413b79a","device":"AndroidAPS-DexcomG6","date":1653905961000,"dateString":"2022-05-30T10:19:21.000Z","isValid":true,"sgv":84,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:19:54.421Z","glucose":84,"avgDelta":"-3.75","BGI":0.17,"deviation":"-3.92"},{"_id":"62949b77c2e464000413b79d","device":"AndroidAPS-DexcomG6","date":1653906262000,"dateString":"2022-05-30T10:24:22.000Z","isValid":true,"sgv":82,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:24:55.547Z","glucose":82,"avgDelta":"-3.00","BGI":0.46,"deviation":"-3.46"},{"_id":"62949ca4c2e464000413b79f","device":"AndroidAPS-DexcomG6","date":1653906561000,"dateString":"2022-05-30T10:29:21.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:29:56.711Z","glucose":80,"avgDelta":"-2.75","BGI":0.79,"deviation":"-3.54"},{"_id":"62949debc2e464000413b7a1","device":"AndroidAPS-DexcomG6","date":1653906861000,"dateString":"2022-05-30T10:34:21.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:35:23.163Z","glucose":79,"avgDelta":"-2.00","BGI":1,"deviation":"-3.00"},{"_id":"62949f00c2e464000413b7a3","device":"AndroidAPS-DexcomG6","date":1653907162000,"dateString":"2022-05-30T10:39:22.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","created_at":"2022-05-30T10:40:00.055Z","glucose":78,"avgDelta":"-1.50","BGI":1.29,"deviation":"-2.79"},{"_id":"6294db4c5f047100042886c3","device":"AndroidAPS-DexcomG6","date":1653922461000,"dateString":"2022-05-30T14:54:21.000Z","isValid":true,"sgv":81,"direction":"Flat","type":"sgv","created_at":"2022-05-30T14:57:16.389Z","glucose":81,"avgDelta":"-1.50","BGI":-1,"deviation":"-0.50"},{"_id":"6294dcde5f047100042886c5","device":"AndroidAPS-DexcomG6","date":1653922761000,"dateString":"2022-05-30T14:59:21.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:03:58.124Z","glucose":79,"avgDelta":"-1.50","BGI":-0.46,"deviation":"-1.04"},{"_id":"6294ddc7706f120004b7d152","device":"AndroidAPS-DexcomG6","date":1653923061000,"dateString":"2022-05-30T15:04:21.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:07:51.780Z","glucose":79,"avgDelta":"-1.25","BGI":0.04,"deviation":"-1.29"},{"_id":"6294df40706f120004b7d154","device":"AndroidAPS-DexcomG6","date":1653923361000,"dateString":"2022-05-30T15:09:21.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:14:08.395Z","glucose":79,"avgDelta":"-0.75","BGI":0.5,"deviation":"-1.25"},{"_id":"6294dfbd706f120004b7d156","device":"AndroidAPS-DexcomG6","date":1653923662000,"dateString":"2022-05-30T15:14:22.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:16:13.728Z","glucose":80,"avgDelta":"-0.25","BGI":0.95,"deviation":"-1.20"},{"_id":"6294e09f706f120004b7d158","device":"AndroidAPS-DexcomG6","date":1653923961000,"dateString":"2022-05-30T15:19:21.000Z","isValid":true,"sgv":80,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:19:59.752Z","glucose":80,"avgDelta":"0.25","BGI":1.33,"deviation":"-1.08"},{"_id":"6294e1cd706f120004b7d15a","device":"AndroidAPS-DexcomG6","date":1653924262000,"dateString":"2022-05-30T15:24:22.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:25:01.236Z","glucose":79,"avgDelta":"0.00","BGI":1.66,"deviation":"-1.66"},{"_id":"6294e2fa706f120004b7d15c","device":"AndroidAPS-DexcomG6","date":1653924562000,"dateString":"2022-05-30T15:29:22.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:30:02.194Z","glucose":78,"avgDelta":"-0.25","BGI":2.08,"deviation":"-2.33"},{"_id":"6294e427706f120004b7d15f","device":"AndroidAPS-DexcomG6","date":1653924862000,"dateString":"2022-05-30T15:34:22.000Z","isValid":true,"sgv":77,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:35:03.426Z","glucose":77,"avgDelta":"-0.75","BGI":2.41,"deviation":"-3.16"},{"_id":"6294e554706f120004b7d161","device":"AndroidAPS-DexcomG6","date":1653925162000,"dateString":"2022-05-30T15:39:22.000Z","isValid":true,"sgv":77,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:40:04.657Z","glucose":77,"avgDelta":"-0.75","BGI":2.7,"deviation":"-3.45"},{"_id":"6294e66eb23f340004e841cf","device":"AndroidAPS-DexcomG6","date":1653925462000,"dateString":"2022-05-30T15:44:22.000Z","isValid":true,"sgv":78,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:44:46.677Z","glucose":78,"avgDelta":"-0.25","BGI":2.99,"deviation":"-3.24"},{"_id":"6294e79bb23f340004e841d1","device":"AndroidAPS-DexcomG6","date":1653925761000,"dateString":"2022-05-30T15:49:21.000Z","isValid":true,"sgv":79,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:49:47.886Z","glucose":79,"avgDelta":"0.25","BGI":3.24,"deviation":"-2.99"},{"_id":"6294e8c9b23f340004e841d3","device":"AndroidAPS-DexcomG6","date":1653926062000,"dateString":"2022-05-30T15:54:22.000Z","isValid":true,"sgv":81,"direction":"Flat","type":"sgv","created_at":"2022-05-30T15:54:49.400Z","glucose":81,"avgDelta":"1.00","BGI":3.4,"deviation":"-2.40"},{"_id":"6294ea10b23f340004e841d5","device":"AndroidAPS-DexcomG6","date":1653926362000,"dateString":"2022-05-30T15:59:22.000Z","isValid":true,"sgv":82,"direction":"Flat","type":"sgv","created_at":"2022-05-30T16:00:16.597Z","glucose":82,"avgDelta":"1.25","BGI":3.69,"deviation":"-2.44"},{"_id":"629503cb409703000484d1ba","device":"AndroidAPS-DexcomG6","date":1653932962000,"dateString":"2022-05-30T17:49:22.000Z","isValid":true,"sgv":133,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:50:03.997Z","glucose":133,"avgDelta":"2.50","BGI":1.87,"deviation":"0.63"},{"_id":"629504e1409703000484d1be","device":"AndroidAPS-DexcomG6","date":1653933262000,"dateString":"2022-05-30T17:54:22.000Z","isValid":true,"sgv":135,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:54:41.141Z","glucose":135,"avgDelta":"2.50","BGI":1.74,"deviation":"0.76"},{"_id":"6295060f409703000484d1c1","device":"AndroidAPS-DexcomG6","date":1653933562000,"dateString":"2022-05-30T17:59:22.000Z","isValid":true,"sgv":136,"direction":"Flat","type":"sgv","created_at":"2022-05-30T17:59:43.089Z","glucose":136,"avgDelta":"2.25","BGI":1.62,"deviation":"0.63"},{"_id":"6295073d409703000484d1c4","device":"AndroidAPS-DexcomG6","date":1653933862000,"dateString":"2022-05-30T18:04:22.000Z","isValid":true,"sgv":137,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:04:45.808Z","glucose":137,"avgDelta":"1.75","BGI":1.58,"deviation":"0.17"},{"_id":"6295086b409703000484d1c6","device":"AndroidAPS-DexcomG6","date":1653934162000,"dateString":"2022-05-30T18:09:22.000Z","isValid":true,"sgv":140,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:09:47.806Z","glucose":140,"avgDelta":"1.75","BGI":1.49,"deviation":"0.26"},{"_id":"6295099a409703000484d1c9","device":"AndroidAPS-DexcomG6","date":1653934461000,"dateString":"2022-05-30T18:14:21.000Z","isValid":true,"sgv":144,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:14:50.027Z","glucose":144,"avgDelta":"2.25","BGI":1.45,"deviation":"0.80"},{"_id":"62950acb0f8c2e000428308d","device":"AndroidAPS-DexcomG6","date":1653934761000,"dateString":"2022-05-30T18:19:21.000Z","isValid":true,"sgv":147,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:19:55.662Z","glucose":147,"avgDelta":"2.75","BGI":1.37,"deviation":"1.38"},{"_id":"62950bf90f8c2e0004283091","device":"AndroidAPS-DexcomG6","date":1653935062000,"dateString":"2022-05-30T18:24:22.000Z","isValid":true,"sgv":150,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:24:57.761Z","glucose":150,"avgDelta":"3.25","BGI":1.16,"deviation":"2.09"},{"_id":"62950d280f8c2e0004283094","device":"AndroidAPS-DexcomG6","date":1653935363000,"dateString":"2022-05-30T18:29:23.000Z","isValid":true,"sgv":156,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:30:00.224Z","glucose":156,"avgDelta":"4.00","BGI":0.91,"deviation":"3.09"},{"_id":"62950e3d0f8c2e0004283099","device":"AndroidAPS-DexcomG6","date":1653935663000,"dateString":"2022-05-30T18:34:23.000Z","isValid":true,"sgv":164,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T18:34:37.460Z","glucose":164,"avgDelta":"5.00","BGI":0.58,"deviation":"4.42"},{"_id":"62950f6b0f8c2e000428309c","device":"AndroidAPS-DexcomG6","date":1653935962000,"dateString":"2022-05-30T18:39:22.000Z","isValid":true,"sgv":172,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T18:39:39.460Z","glucose":172,"avgDelta":"6.25","BGI":0.12,"deviation":"6.13","uamAbsorption":"start"},{"_id":"629510990f8c2e000428309f","device":"AndroidAPS-DexcomG6","date":1653936262000,"dateString":"2022-05-30T18:44:22.000Z","isValid":true,"sgv":175,"direction":"FortyFiveUp","type":"sgv","created_at":"2022-05-30T18:44:41.570Z","glucose":175,"avgDelta":"6.25","BGI":-1.04,"deviation":"7.29"},{"_id":"629511c70f8c2e00042830a2","device":"AndroidAPS-DexcomG6","date":1653936563000,"dateString":"2022-05-30T18:49:23.000Z","isValid":true,"sgv":177,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:49:43.497Z","glucose":177,"avgDelta":"5.25","BGI":-2.08,"deviation":"7.33"},{"_id":"629512fcf63c010004ea5cf7","device":"AndroidAPS-DexcomG6","date":1653936863000,"dateString":"2022-05-30T18:54:23.000Z","isValid":true,"sgv":179,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:54:52.395Z","glucose":179,"avgDelta":"3.75","BGI":-2.86,"deviation":"6.61"},{"_id":"6295142af63c010004ea5cfa","device":"AndroidAPS-DexcomG6","date":1653937162000,"dateString":"2022-05-30T18:59:22.000Z","isValid":true,"sgv":180,"direction":"Flat","type":"sgv","created_at":"2022-05-30T18:59:54.428Z","glucose":180,"avgDelta":"2.00","BGI":-3.45,"deviation":"5.45"},{"_id":"62951558f63c010004ea5cfc","device":"AndroidAPS-DexcomG6","date":1653937462000,"dateString":"2022-05-30T19:04:22.000Z","isValid":true,"sgv":181,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:04:56.708Z","glucose":181,"avgDelta":"1.50","BGI":-3.78,"deviation":"5.28"},{"_id":"62951683f63c010004ea5cff","device":"AndroidAPS-DexcomG6","date":1653937762000,"dateString":"2022-05-30T19:09:22.000Z","isValid":true,"sgv":181,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:09:55.010Z","glucose":181,"avgDelta":"1.00","BGI":-4.03,"deviation":"5.03"},{"_id":"629517b0f63c010004ea5d01","device":"AndroidAPS-DexcomG6","date":1653938062000,"dateString":"2022-05-30T19:14:22.000Z","isValid":true,"sgv":182,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:14:56.712Z","glucose":182,"avgDelta":"0.75","BGI":-4.11,"deviation":"4.86"},{"_id":"629518def63c010004ea5d04","device":"AndroidAPS-DexcomG6","date":1653938362000,"dateString":"2022-05-30T19:19:22.000Z","isValid":true,"sgv":183,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:19:58.457Z","glucose":183,"avgDelta":"0.75","BGI":-4.11,"deviation":"4.86"},{"_id":"62951a0ef63c010004ea5d08","device":"AndroidAPS-DexcomG6","date":1653938661000,"dateString":"2022-05-30T19:24:21.000Z","isValid":true,"sgv":184,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:25:02.070Z","glucose":184,"avgDelta":"0.75","BGI":-4.23,"deviation":"4.98"},{"_id":"62951b23f63c010004ea5d0b","device":"AndroidAPS-DexcomG6","date":1653938962000,"dateString":"2022-05-30T19:29:22.000Z","isValid":true,"sgv":185,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:29:39.093Z","glucose":185,"avgDelta":"1.00","BGI":-4.32,"deviation":"5.32"},{"_id":"62951c51f63c010004ea5d0f","device":"AndroidAPS-DexcomG6","date":1653939262000,"dateString":"2022-05-30T19:34:22.000Z","isValid":true,"sgv":186,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:34:41.514Z","glucose":186,"avgDelta":"1.00","BGI":-4.48,"deviation":"5.48"},{"_id":"62951d7ff63c010004ea5d12","device":"AndroidAPS-DexcomG6","date":1653939561000,"dateString":"2022-05-30T19:39:21.000Z","isValid":true,"sgv":187,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:39:43.397Z","glucose":187,"avgDelta":"1.00","BGI":-4.57,"deviation":"5.57"},{"_id":"62951eddf63c010004ea5d16","device":"AndroidAPS-DexcomG6","date":1653939861000,"dateString":"2022-05-30T19:44:21.000Z","isValid":true,"sgv":186,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:45:33.306Z","glucose":186,"avgDelta":"0.50","BGI":-4.73,"deviation":"5.23"},{"_id":"62951fd8f63c010004ea5d1a","device":"AndroidAPS-DexcomG6","date":1653940161000,"dateString":"2022-05-30T19:49:21.000Z","isValid":true,"sgv":185,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:49:44.530Z","glucose":185,"avgDelta":"0.00","BGI":-4.9,"deviation":"4.90"},{"_id":"6295211ef63c010004ea5d1c","device":"AndroidAPS-DexcomG6","date":1653940461000,"dateString":"2022-05-30T19:54:21.000Z","isValid":true,"sgv":184,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:55:10.510Z","glucose":184,"avgDelta":"-0.50","BGI":-4.98,"deviation":"4.48"},{"_id":"62952232f63c010004ea5d1f","device":"AndroidAPS-DexcomG6","date":1653940762000,"dateString":"2022-05-30T19:59:22.000Z","isValid":true,"sgv":183,"direction":"Flat","type":"sgv","created_at":"2022-05-30T19:59:46.536Z","glucose":183,"avgDelta":"-1.00","BGI":-4.94,"deviation":"3.94"},{"_id":"62952379f63c010004ea5d22","device":"AndroidAPS-DexcomG6","date":1653941062000,"dateString":"2022-05-30T20:04:22.000Z","isValid":true,"sgv":182,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:05:13.099Z","glucose":182,"avgDelta":"-1.00","BGI":-4.77,"deviation":"3.77"},{"_id":"629524a6f63c010004ea5d26","device":"AndroidAPS-DexcomG6","date":1653941361000,"dateString":"2022-05-30T20:09:21.000Z","isValid":true,"sgv":181,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:10:14.057Z","glucose":181,"avgDelta":"-1.00","BGI":-4.65,"deviation":"3.65"},{"_id":"629525baf63c010004ea5d29","device":"AndroidAPS-DexcomG6","date":1653941662000,"dateString":"2022-05-30T20:14:22.000Z","isValid":true,"sgv":180,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:14:50.164Z","glucose":180,"avgDelta":"-1.00","BGI":-4.44,"deviation":"3.44"},{"_id":"629526eee3aedd00046f3855","device":"AndroidAPS-DexcomG6","date":1653941961000,"dateString":"2022-05-30T20:19:21.000Z","isValid":true,"sgv":179,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:19:58.496Z","glucose":179,"avgDelta":"-1.00","BGI":-4.36,"deviation":"3.36"},{"_id":"6295284ee3aedd00046f3858","device":"AndroidAPS-DexcomG6","date":1653942262000,"dateString":"2022-05-30T20:24:22.000Z","isValid":true,"sgv":178,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:25:50.333Z","glucose":178,"avgDelta":"-1.00","BGI":-4.32,"deviation":"3.32"},{"_id":"62952949e3aedd00046f385c","device":"AndroidAPS-DexcomG6","date":1653942563000,"dateString":"2022-05-30T20:29:23.000Z","isValid":true,"sgv":176,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:30:01.193Z","glucose":176,"avgDelta":"-1.25","BGI":-4.28,"deviation":"3.03"},{"_id":"62952a5de3aedd00046f385f","device":"AndroidAPS-DexcomG6","date":1653942863000,"dateString":"2022-05-30T20:34:23.000Z","isValid":true,"sgv":175,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:34:37.302Z","glucose":175,"avgDelta":"-1.25","BGI":-4.28,"deviation":"3.03"},{"_id":"62952b89e3aedd00046f3866","device":"AndroidAPS-DexcomG6","date":1653943162000,"dateString":"2022-05-30T20:39:22.000Z","isValid":true,"sgv":174,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:39:37.778Z","glucose":174,"avgDelta":"-1.25","BGI":-4.23,"deviation":"2.98"},{"_id":"62952cb7e3aedd00046f386a","device":"AndroidAPS-DexcomG6","date":1653943462000,"dateString":"2022-05-30T20:44:22.000Z","isValid":true,"sgv":173,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:44:39.868Z","glucose":173,"avgDelta":"-1.25","BGI":-4.19,"deviation":"2.94"},{"_id":"62952de5e3aedd00046f386d","device":"AndroidAPS-DexcomG6","date":1653943762000,"dateString":"2022-05-30T20:49:22.000Z","isValid":true,"sgv":171,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:49:41.125Z","glucose":171,"avgDelta":"-1.25","BGI":-4.28,"deviation":"3.03"},{"_id":"62952f1be3aedd00046f3871","device":"AndroidAPS-DexcomG6","date":1653944062000,"dateString":"2022-05-30T20:54:22.000Z","isValid":true,"sgv":169,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:54:51.953Z","glucose":169,"avgDelta":"-1.50","BGI":-4.32,"deviation":"2.82"},{"_id":"62953049e3aedd00046f3874","device":"AndroidAPS-DexcomG6","date":1653944362000,"dateString":"2022-05-30T20:59:22.000Z","isValid":true,"sgv":166,"direction":"Flat","type":"sgv","created_at":"2022-05-30T20:59:53.874Z","glucose":166,"avgDelta":"-2.00","BGI":-4.32,"deviation":"2.32"}]} diff --git a/app/src/test/res/autotune/test4/autotune.2022-06-25-195325.log b/app/src/test/res/autotune/test4/autotune.2022-06-25-195325.log new file mode 100644 index 0000000000..02c7015e02 --- /dev/null +++ b/app/src/test/res/autotune/test4/autotune.2022-06-25-195325.log @@ -0,0 +1,454 @@ +Compressing old json and log files to save space... +gzip: ns-*.json: No such file or directory +gzip: autotune*.json: No such file or directory +Autotune disk usage: +8.0K . +Overall disk used/avail: +Filesystem Size Used Avail Use% Mounted on +rootfs 930G 432G 499G 47% / +Grabbing NIGHTSCOUT treatments.json and entries/sgv.json for date range... +Query: https://xxxxxxxxxxxx.com entries/sgv.json find%5Bdate%5D%5B%24gte%5D=1653444000000&find%5Bdate%5D%5B%24lte%5D=1653530400000&count=1500 +-rw-r--r-- 1 titi titi 82011 Jun 25 19:53 ns-entries.2022-05-25.json +Query: https://xxxxxxxxxxxx.com treatments.json find%5Bcreated_at%5D%5B%24gte%5D=2022-05-24T06:00+02:00&find%5Bcreated_at%5D%5B%24lte%5D=2022-05-26T18:00+02:00 +-rw-r--r-- 1 titi titi 216847 Jun 25 19:53 ns-treatments.2022-05-25.json + +Log information from 2022-05-25 to 2022-05-29 removed for unit test + +Query: https://xxxxxxxxxxxx.com entries/sgv.json find%5Bdate%5D%5B%24gte%5D=1653876000000&find%5Bdate%5D%5B%24lte%5D=1653962400000&count=1500 +-rw-r--r-- 1 titi titi 75423 Jun 25 19:53 ns-entries.2022-05-30.json +Query: https://xxxxxxxxxxxx.com treatments.json find%5Bcreated_at%5D%5B%24gte%5D=2022-05-29T06:00+02:00&find%5Bcreated_at%5D%5B%24lte%5D=2022-05-31T18:00+02:00 +-rw-r--r-- 1 titi titi 229319 Jun 25 19:53 ns-treatments.2022-05-30.json +oref0-autotune-prep ns-treatments.2022-05-30.json profile.json ns-entries.2022-05-30.json profile.pump.json > autotune.2022-05-30.json +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 6.5 IOB: -1.341 Activity: -0.0157 at 04:24:21 dev: -4.27 avgDelta: 2.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 6.6 IOB: -1.362 Activity: -0.0158 at 04:29:21 dev: -4.81 avgDelta: 1.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 6.6 IOB: -1.333 Activity: -0.0158 at 04:34:21 dev: -4.56 avgDelta: 2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 6.6 IOB: -1.304 Activity: -0.0158 at 04:39:21 dev: -3.81 avgDelta: 2.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 6.5 IOB: -1.275 Activity: -0.0157 at 04:44:21 dev: -2.77 avgDelta: 3.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 6.3 IOB: -0.888 Activity: -0.0151 at 04:49:21 dev: -1.77 avgDelta: 4.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 5.8 IOB: -0.715 Activity: -0.0139 at 04:54:21 dev: -0.77 avgDelta: 5.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.5 BGI: 5.1 IOB: -0.279 Activity: -0.0123 at 04:59:21 dev: 0.39 avgDelta: 5.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: 4.2 IOB: -0.073 Activity: -0.0102 at 05:04:21 dev: 1.52 avgDelta: 5.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: 3.3 IOB: 0.233 Activity: -0.008 at 05:09:21 dev: 2.43 avgDelta: 5.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: 2.4 IOB: 0.367 Activity: -0.0058 at 05:14:21 dev: 3.34 avgDelta: 5.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: 1.4 IOB: 1.021 Activity: -0.0033 at 05:19:21 dev: 3.63 avgDelta: 5.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: 0.2 IOB: 0.98 Activity: -0.0004 at 05:24:22 dev: 4.08 avgDelta: 4.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.8 IOB: 0.926 Activity: 0.0018 at 05:29:21 dev: 3.75 avgDelta: 3.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -1.6 IOB: 1.122 Activity: 0.0039 at 05:34:21 dev: 3.12 avgDelta: 1.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.3 IOB: 1.048 Activity: 0.0056 at 05:39:21 dev: 2.32 avgDelta: 0.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -2.8 IOB: 0.917 Activity: 0.0067 at 05:44:21 dev: 1.53 avgDelta: -1.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -3.1 IOB: 0.832 Activity: 0.0074 at 05:49:21 dev: 1.32 avgDelta: -1.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -3.1 IOB: 0.695 Activity: 0.0076 at 05:54:21 dev: 0.65 avgDelta: -2.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -3.1 IOB: 0.606 Activity: 0.0076 at 05:59:21 dev: 0.90 avgDelta: -2.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.1 IOB: 0.518 Activity: 0.0074 at 06:04:21 dev: 0.57 avgDelta: -2.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.0 IOB: 0.482 Activity: 0.0071 at 06:09:21 dev: 0.70 avgDelta: -2.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -2.8 IOB: 0.447 Activity: 0.0068 at 06:14:21 dev: 1.07 avgDelta: -1.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -2.8 IOB: 0.584 Activity: 0.0067 at 06:19:21 dev: 1.78 avgDelta: -1.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -2.8 IOB: 0.67 Activity: 0.0068 at 06:24:21 dev: 2.32 avgDelta: -0.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.0 IOB: 0.685 Activity: 0.0072 at 06:29:21 dev: 2.24 avgDelta: -0.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.0 IOB: 0.649 Activity: 0.0073 at 06:34:21 dev: 2.53 avgDelta: -0.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.0 IOB: 0.563 Activity: 0.0072 at 06:39:21 dev: 2.24 avgDelta: -0.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.0 IOB: 0.737 Activity: 0.0073 at 06:44:21 dev: 2.53 avgDelta: -0.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.1 IOB: 0.65 Activity: 0.0075 at 06:49:21 dev: 2.61 avgDelta: -0.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.1 IOB: 0.562 Activity: 0.0074 at 06:54:21 dev: 2.07 avgDelta: -1.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: -3.0 IOB: 0.476 Activity: 0.0071 at 06:59:21 dev: 1.20 avgDelta: -1.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -2.8 IOB: 0.441 Activity: 0.0068 at 07:04:21 dev: 0.32 avgDelta: -2.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -2.7 IOB: 0.358 Activity: 0.0064 at 07:09:21 dev: -0.09 avgDelta: -2.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -2.5 IOB: 0.277 Activity: 0.0059 at 07:14:21 dev: -0.05 avgDelta: -2.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -2.2 IOB: 0.199 Activity: 0.0053 at 07:19:21 dev: 0.70 avgDelta: -1.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -2.0 IOB: 0.274 Activity: 0.0048 at 07:24:21 dev: 1.49 avgDelta: -0.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -2.0 IOB: 0.35 Activity: 0.0048 at 07:29:21 dev: 2.49 avgDelta: 0.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -1.9 IOB: 0.327 Activity: 0.0046 at 07:34:22 dev: 2.16 avgDelta: 0.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -1.8 IOB: 0.254 Activity: 0.0044 at 07:39:21 dev: 1.58 avgDelta: -0.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -1.7 IOB: 0.183 Activity: 0.004 at 07:44:21 dev: 0.66 avgDelta: -1.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -1.5 IOB: 0.114 Activity: 0.0036 at 07:49:21 dev: -0.26 avgDelta: -1.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -1.3 IOB: 0.048 Activity: 0.003 at 07:54:21 dev: -0.50 avgDelta: -1.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -1.1 IOB: 0.034 Activity: 0.0026 at 07:59:21 dev: -0.92 avgDelta: -2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.1 BGI: -0.8 IOB: -0.028 Activity: 0.002 at 08:04:21 dev: -0.92 avgDelta: -1.75 basal +CRInitialIOB: -0.087 CRInitialBG: 92 CRInitialCarbTime: 2022-05-30T06:09:21.000Z +start carb absorption +0 mealCOB: 74.5 mealCarbs: 75 basalBGI: 6.1 BGI: -0.6 IOB: -0.087 Activity: 0.0015 at 08:09:21 dev: 0.12 avgDelta: -0.50 csf +0 mealCOB: 74.0 mealCarbs: 75 basalBGI: 6.1 BGI: -0.4 IOB: -0.093 Activity: 0.001 at 08:14:21 dev: 2.67 avgDelta: 2.25 csf +0 mealCOB: 73.5 mealCarbs: 75 basalBGI: 6.1 BGI: -0.2 IOB: -0.147 Activity: 0.0005 at 08:19:21 dev: 7.21 avgDelta: 7.00 csf +1 mealCOB: 72.1 mealCarbs: 75 basalBGI: 6.1 BGI: -12.7 IOB: 16.05 Activity: 0.0305 at 08:24:21 dev: 24.66 avgDelta: 12.00 csf +1 mealCOB: 69.5 mealCarbs: 75 basalBGI: 6.1 BGI: -25.4 IOB: 15.767 Activity: 0.0611 at 08:29:21 dev: 41.61 avgDelta: 16.25 csf +1 mealCOB: 66.3 mealCarbs: 75 basalBGI: 6.1 BGI: -35.2 IOB: 15.3 Activity: 0.0848 at 08:34:21 dev: 53.20 avgDelta: 18.00 csf +1 mealCOB: 62.7 mealCarbs: 75 basalBGI: 6.1 BGI: -42.7 IOB: 14.779 Activity: 0.1028 at 08:39:21 dev: 59.42 avgDelta: 16.75 csf +1 mealCOB: 59.0 mealCarbs: 75 basalBGI: 6.1 BGI: -48.1 IOB: 14.131 Activity: 0.1158 at 08:44:21 dev: 62.07 avgDelta: 14.00 csf +1 mealCOB: 55.2 mealCarbs: 75 basalBGI: 6.1 BGI: -51.8 IOB: 13.477 Activity: 0.1249 at 08:49:21 dev: 62.09 avgDelta: 10.25 csf +1 mealCOB: 51.5 mealCarbs: 75 basalBGI: 6.1 BGI: -54.2 IOB: 12.739 Activity: 0.1305 at 08:54:21 dev: 61.17 avgDelta: 7.00 csf +1 mealCOB: 47.9 mealCarbs: 75 basalBGI: 6.1 BGI: -55.4 IOB: 12.027 Activity: 0.1335 at 08:59:21 dev: 59.91 avgDelta: 4.50 csf +1 mealCOB: 44.4 mealCarbs: 75 basalBGI: 6.1 BGI: -55.7 IOB: 11.307 Activity: 0.1342 at 09:04:20 dev: 58.20 avgDelta: 2.50 csf +1 mealCOB: 41.0 mealCarbs: 75 basalBGI: 6.1 BGI: -55.3 IOB: 10.538 Activity: 0.1331 at 09:09:22 dev: 56.25 avgDelta: 1.00 csf +1 mealCOB: 37.7 mealCarbs: 75 basalBGI: 6.1 BGI: -54.2 IOB: 9.828 Activity: 0.1306 at 09:14:21 dev: 54.21 avgDelta: 0.00 csf +1 mealCOB: 34.5 mealCarbs: 75 basalBGI: 6.1 BGI: -52.6 IOB: 9.085 Activity: 0.1268 at 09:19:22 dev: 52.38 avgDelta: -0.25 csf +1 mealCOB: 31.4 mealCarbs: 75 basalBGI: 6.1 BGI: -50.8 IOB: 8.411 Activity: 0.1223 at 09:24:21 dev: 51.01 avgDelta: 0.25 csf +1 mealCOB: 28.4 mealCarbs: 75 basalBGI: 6.1 BGI: -48.6 IOB: 7.764 Activity: 0.117 at 09:29:21 dev: 50.06 avgDelta: 1.50 csf +1 mealCOB: 25.4 mealCarbs: 75 basalBGI: 6.1 BGI: -46.2 IOB: 7.193 Activity: 0.1114 at 09:34:21 dev: 49.24 avgDelta: 3.00 csf +1 mealCOB: 22.6 mealCarbs: 75 basalBGI: 6.1 BGI: -43.9 IOB: 6.65 Activity: 0.1057 at 09:39:21 dev: 47.62 avgDelta: 3.75 csf +1 mealCOB: 19.8 mealCarbs: 75 basalBGI: 6.1 BGI: -41.5 IOB: 6.136 Activity: 0.0999 at 09:44:22 dev: 44.97 avgDelta: 3.50 csf +1 mealCOB: 17.3 mealCarbs: 75 basalBGI: 6.1 BGI: -39.1 IOB: 5.651 Activity: 0.0941 at 09:49:21 dev: 41.81 avgDelta: 2.75 csf +1 mealCOB: 15.0 mealCarbs: 75 basalBGI: 6.1 BGI: -36.7 IOB: 5.194 Activity: 0.0884 at 09:54:22 dev: 38.19 avgDelta: 1.50 csf +1 mealCOB: 13.0 mealCarbs: 75 basalBGI: 6.1 BGI: -33.2 IOB: 4.302 Activity: 0.08 at 09:59:21 dev: 33.21 avgDelta: 0.00 csf +1 mealCOB: 11.2 mealCarbs: 75 basalBGI: 6.1 BGI: -30.7 IOB: 3.868 Activity: 0.0739 at 10:04:21 dev: 29.42 avgDelta: -1.25 csf +1 mealCOB: 9.7 mealCarbs: 75 basalBGI: 6.1 BGI: -28.2 IOB: 3.413 Activity: 0.068 at 10:09:21 dev: 25.72 avgDelta: -2.50 csf +1 mealCOB: 8.3 mealCarbs: 75 basalBGI: 6.1 BGI: -25.9 IOB: 3.037 Activity: 0.0623 at 10:14:21 dev: 22.86 avgDelta: -3.00 csf +1 mealCOB: 7.0 mealCarbs: 75 basalBGI: 6.1 BGI: -23.6 IOB: 2.64 Activity: 0.0568 at 10:19:21 dev: 20.83 avgDelta: -2.75 csf +1 mealCOB: 5.8 mealCarbs: 75 basalBGI: 6.1 BGI: -21.4 IOB: 2.319 Activity: 0.0516 at 10:24:22 dev: 19.42 avgDelta: -2.00 csf +1 mealCOB: 4.8 mealCarbs: 75 basalBGI: 6.1 BGI: -19.5 IOB: 2.193 Activity: 0.0469 at 10:29:21 dev: 17.72 avgDelta: -1.75 csf +1 mealCOB: 3.8 mealCarbs: 75 basalBGI: 6.1 BGI: -17.7 IOB: 1.919 Activity: 0.0427 at 10:34:21 dev: 15.72 avgDelta: -2.00 csf +1 mealCOB: 3.0 mealCarbs: 75 basalBGI: 6.1 BGI: -16.0 IOB: 1.666 Activity: 0.0386 at 10:39:21 dev: 13.77 avgDelta: -2.25 csf +1 mealCOB: 2.3 mealCarbs: 75 basalBGI: 6.1 BGI: -14.5 IOB: 1.483 Activity: 0.0349 at 10:44:21 dev: 11.99 avgDelta: -2.50 csf +1 mealCOB: 1.6 mealCarbs: 75 basalBGI: 6.1 BGI: -13.3 IOB: 1.606 Activity: 0.032 at 10:49:21 dev: 11.03 avgDelta: -2.25 csf +1 mealCOB: 1.0 mealCarbs: 75 basalBGI: 6.1 BGI: -12.2 IOB: 1.452 Activity: 0.0294 at 10:54:21 dev: 9.70 avgDelta: -2.50 csf +1 mealCOB: 0.5 mealCarbs: 75 basalBGI: 6.1 BGI: -11.2 IOB: 1.311 Activity: 0.027 at 10:59:21 dev: 7.71 avgDelta: -3.50 csf +1 mealCOB: 0.0 mealCarbs: 75 basalBGI: 6.0 BGI: -10.3 IOB: 1.182 Activity: 0.0248 at 11:04:21 dev: 5.29 avgDelta: -5.00 csf +1 mealCOB: 0.0 mealCarbs: 75 basalBGI: 6.0 BGI: -9.4 IOB: 1.013 Activity: 0.0226 at 11:09:21 dev: 2.63 avgDelta: -6.75 csf +1 mealCOB: 0.0 mealCarbs: 75 basalBGI: 6.0 BGI: -8.5 IOB: 0.856 Activity: 0.0204 at 11:14:21 dev: 0.22 avgDelta: -8.25 csf +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -7.6 IOB: 0.709 Activity: 0.0183 at 11:19:21 dev: -1.65 avgDelta: -9.25 csf +end carb absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -6.8 IOB: 0.572 Activity: 0.0163 at 11:24:21 dev: -2.48 avgDelta: -9.25 ISF +CREndIOB: 0.396 CREndBG: 131 CREndTime: 2022-05-30T09:29:21.000Z +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -5.9 IOB: 0.396 Activity: 0.0143 at 11:29:21 dev: -2.81 avgDelta: -8.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -5.2 IOB: 0.278 Activity: 0.0125 at 11:34:21 dev: -2.56 avgDelta: -7.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -4.4 IOB: 0.17 Activity: 0.0107 at 11:39:21 dev: -2.31 avgDelta: -6.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -3.6 IOB: 0.022 Activity: 0.0088 at 11:44:21 dev: -2.85 avgDelta: -6.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -3.0 IOB: -0.068 Activity: 0.0072 at 11:49:21 dev: -3.01 avgDelta: -6.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -2.3 IOB: -0.15 Activity: 0.0056 at 11:54:21 dev: -3.43 avgDelta: -5.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -1.7 IOB: -0.274 Activity: 0.004 at 11:59:21 dev: -3.34 avgDelta: -5.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -1.1 IOB: -0.29 Activity: 0.0027 at 12:04:21 dev: -3.38 avgDelta: -4.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -0.6 IOB: -0.301 Activity: 0.0015 at 12:09:22 dev: -3.38 avgDelta: -4.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: -0.2 IOB: -0.356 Activity: 0.0005 at 12:14:21 dev: -3.54 avgDelta: -3.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: 0.2 IOB: -0.356 Activity: -0.0004 at 12:19:21 dev: -3.92 avgDelta: -3.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: 0.5 IOB: -0.402 Activity: -0.0011 at 12:24:22 dev: -3.46 avgDelta: -3.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: 0.8 IOB: -0.445 Activity: -0.0019 at 12:29:21 dev: -3.54 avgDelta: -2.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: 1.0 IOB: -0.435 Activity: -0.0024 at 12:34:21 dev: -3.00 avgDelta: -2.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 6.0 BGI: 1.3 IOB: -0.47 Activity: -0.0031 at 12:39:22 dev: -2.79 avgDelta: -1.50 basal +CRInitialIOB: -0.454 CRInitialBG: 77 CRInitialCarbTime: 2022-05-30T10:44:21.000Z +start carb absorption +0 mealCOB: 49.5 mealCarbs: 50 basalBGI: 6.0 BGI: 1.4 IOB: -0.454 Activity: -0.0035 at 12:44:21 dev: -2.70 avgDelta: -1.25 csf +0 mealCOB: 49.0 mealCarbs: 50 basalBGI: 6.0 BGI: 1.7 IOB: -0.484 Activity: -0.004 at 12:49:22 dev: -2.66 avgDelta: -1.00 csf +0 mealCOB: 48.5 mealCarbs: 50 basalBGI: 6.0 BGI: 1.8 IOB: -0.464 Activity: -0.0043 at 12:54:22 dev: -2.28 avgDelta: -0.50 csf +0 mealCOB: 48.1 mealCarbs: 50 basalBGI: 6.0 BGI: 1.9 IOB: -0.442 Activity: -0.0045 at 12:59:21 dev: -1.12 avgDelta: 0.75 csf +0 mealCOB: 47.6 mealCarbs: 50 basalBGI: 5.9 BGI: 1.9 IOB: -0.469 Activity: -0.0047 at 13:04:22 dev: 0.80 avgDelta: 2.75 csf +0 mealCOB: 47.1 mealCarbs: 50 basalBGI: 5.9 BGI: 2.0 IOB: -0.445 Activity: -0.0048 at 13:09:22 dev: 4.51 avgDelta: 6.50 csf +0 mealCOB: 46.5 mealCarbs: 50 basalBGI: 5.9 BGI: 1.7 IOB: 0.287 Activity: -0.004 at 13:14:21 dev: 9.59 avgDelta: 11.25 csf +1 mealCOB: 45.6 mealCarbs: 50 basalBGI: 5.9 BGI: 1.0 IOB: 0.453 Activity: -0.0024 at 13:19:21 dev: 15.25 avgDelta: 16.25 csf +1 mealCOB: 44.3 mealCarbs: 50 basalBGI: 5.9 BGI: -0.5 IOB: 1.958 Activity: 0.0011 at 13:24:21 dev: 21.46 avgDelta: 21.00 csf +1 mealCOB: 42.8 mealCarbs: 50 basalBGI: 5.9 BGI: -2.2 IOB: 1.892 Activity: 0.0053 at 13:29:21 dev: 25.45 avgDelta: 23.25 csf +1 mealCOB: 41.1 mealCarbs: 50 basalBGI: 5.9 BGI: -3.9 IOB: 2.367 Activity: 0.0093 at 13:34:22 dev: 27.11 avgDelta: 23.25 csf +1 mealCOB: 39.5 mealCarbs: 50 basalBGI: 5.9 BGI: -5.3 IOB: 2.261 Activity: 0.0127 at 13:39:21 dev: 26.27 avgDelta: 21.00 csf +1 mealCOB: 37.6 mealCarbs: 50 basalBGI: 5.9 BGI: -14.2 IOB: 12.271 Activity: 0.0343 at 13:44:21 dev: 31.24 avgDelta: 17.00 csf +1 mealCOB: 35.5 mealCarbs: 50 basalBGI: 5.9 BGI: -23.0 IOB: 11.995 Activity: 0.0554 at 13:49:21 dev: 35.74 avgDelta: 12.75 csf +1 mealCOB: 33.2 mealCarbs: 50 basalBGI: 5.9 BGI: -29.7 IOB: 11.576 Activity: 0.0716 at 13:54:22 dev: 38.22 avgDelta: 8.50 csf +1 mealCOB: 30.7 mealCarbs: 50 basalBGI: 5.9 BGI: -34.7 IOB: 11.136 Activity: 0.0836 at 13:59:21 dev: 39.95 avgDelta: 5.25 csf +1 mealCOB: 28.3 mealCarbs: 50 basalBGI: 5.9 BGI: -38.3 IOB: 10.645 Activity: 0.0922 at 14:04:21 dev: 41.02 avgDelta: 2.75 csf +1 mealCOB: 25.8 mealCarbs: 50 basalBGI: 5.9 BGI: -40.6 IOB: 10.069 Activity: 0.0979 at 14:09:22 dev: 41.14 avgDelta: 0.50 csf +1 mealCOB: 23.3 mealCarbs: 50 basalBGI: 5.9 BGI: -42.0 IOB: 9.52 Activity: 0.1013 at 14:14:22 dev: 40.30 avgDelta: -1.75 csf +1 mealCOB: 21.0 mealCarbs: 50 basalBGI: 5.9 BGI: -42.7 IOB: 9.009 Activity: 0.1028 at 14:19:22 dev: 37.92 avgDelta: -4.75 csf +1 mealCOB: 18.9 mealCarbs: 50 basalBGI: 5.9 BGI: -42.6 IOB: 8.445 Activity: 0.1027 at 14:24:22 dev: 35.63 avgDelta: -7.00 csf +1 mealCOB: 16.9 mealCarbs: 50 basalBGI: 5.9 BGI: -42.1 IOB: 7.834 Activity: 0.1014 at 14:29:22 dev: 33.34 avgDelta: -8.75 csf +1 mealCOB: 15.0 mealCarbs: 50 basalBGI: 5.9 BGI: -41.1 IOB: 7.283 Activity: 0.099 at 14:34:22 dev: 31.34 avgDelta: -9.75 csf +1 mealCOB: 13.1 mealCarbs: 50 basalBGI: 5.9 BGI: -39.7 IOB: 6.696 Activity: 0.0957 at 14:39:22 dev: 30.47 avgDelta: -9.25 csf +1 mealCOB: 11.4 mealCarbs: 50 basalBGI: 5.9 BGI: -38.2 IOB: 6.176 Activity: 0.092 at 14:44:21 dev: 29.44 avgDelta: -8.75 csf +1 mealCOB: 9.6 mealCarbs: 50 basalBGI: 5.9 BGI: -36.4 IOB: 5.676 Activity: 0.0877 at 14:49:22 dev: 28.65 avgDelta: -7.75 csf +1 mealCOB: 8.0 mealCarbs: 50 basalBGI: 5.9 BGI: -34.4 IOB: 5.152 Activity: 0.0829 at 14:54:22 dev: 27.66 avgDelta: -6.75 csf +1 mealCOB: 6.4 mealCarbs: 50 basalBGI: 5.9 BGI: -32.4 IOB: 4.65 Activity: 0.0781 at 14:59:21 dev: 26.17 avgDelta: -6.25 csf +1 mealCOB: 4.9 mealCarbs: 50 basalBGI: 5.9 BGI: -30.4 IOB: 4.222 Activity: 0.0732 at 15:04:22 dev: 24.38 avgDelta: -6.00 csf +1 mealCOB: 3.5 mealCarbs: 50 basalBGI: 5.9 BGI: -28.3 IOB: 3.769 Activity: 0.0682 at 15:09:22 dev: 22.31 avgDelta: -6.00 csf +1 mealCOB: 2.3 mealCarbs: 50 basalBGI: 5.9 BGI: -26.2 IOB: 3.39 Activity: 0.0632 at 15:14:21 dev: 20.23 avgDelta: -6.00 csf +1 mealCOB: 1.2 mealCarbs: 50 basalBGI: 5.9 BGI: -24.2 IOB: 2.987 Activity: 0.0583 at 15:19:22 dev: 18.45 avgDelta: -5.75 csf +1 mealCOB: 0.2 mealCarbs: 50 basalBGI: 5.9 BGI: -22.2 IOB: 2.657 Activity: 0.0535 at 15:24:22 dev: 16.46 avgDelta: -5.75 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.9 BGI: -20.3 IOB: 2.351 Activity: 0.049 at 15:29:22 dev: 14.84 avgDelta: -5.50 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.9 BGI: -18.5 IOB: 2.018 Activity: 0.0445 at 15:34:22 dev: 12.97 avgDelta: -5.50 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.9 BGI: -16.7 IOB: 1.755 Activity: 0.0403 at 15:39:22 dev: 11.48 avgDelta: -5.25 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.9 BGI: -15.1 IOB: 1.513 Activity: 0.0364 at 15:44:22 dev: 10.11 avgDelta: -5.00 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.9 BGI: -13.5 IOB: 1.241 Activity: 0.0325 at 15:49:21 dev: 8.74 avgDelta: -4.75 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.9 BGI: -12.0 IOB: 1.037 Activity: 0.029 at 15:54:22 dev: 7.79 avgDelta: -4.25 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.9 BGI: -10.6 IOB: 0.851 Activity: 0.0256 at 15:59:21 dev: 6.63 avgDelta: -4.00 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.7 BGI: -9.3 IOB: 0.632 Activity: 0.0223 at 16:04:22 dev: 5.51 avgDelta: -3.75 csf +1 mealCOB: 0.0 mealCarbs: 50 basalBGI: 5.7 BGI: -8.0 IOB: 0.428 Activity: 0.0192 at 16:09:21 dev: 4.47 avgDelta: -3.50 csf +CREndIOB: 0.339 CREndBG: 100 CREndTime: 2022-05-30T14:14:22.000Z +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -6.8 IOB: 0.339 Activity: 0.0165 at 16:14:22 dev: 3.60 avgDelta: -3.25 csf +end carb absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -5.8 IOB: 0.262 Activity: 0.0141 at 16:19:21 dev: 2.60 avgDelta: -3.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -5.0 IOB: 0.197 Activity: 0.012 at 16:24:21 dev: 1.73 avgDelta: -3.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -4.2 IOB: 0.142 Activity: 0.0102 at 16:29:21 dev: 0.73 avgDelta: -3.50 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -3.5 IOB: 0.046 Activity: 0.0085 at 16:34:21 dev: 0.28 avgDelta: -3.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -2.8 IOB: -0.093 Activity: 0.0068 at 16:39:21 dev: -0.18 avgDelta: -3.00 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -2.2 IOB: -0.173 Activity: 0.0053 at 16:44:22 dev: -0.05 avgDelta: -2.25 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -1.6 IOB: -0.246 Activity: 0.0039 at 16:49:21 dev: -0.13 avgDelta: -1.75 ISF +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -1.0 IOB: -0.361 Activity: 0.0024 at 16:54:21 dev: -0.50 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.7 BGI: -0.5 IOB: -0.42 Activity: 0.0011 at 16:59:21 dev: -1.04 avgDelta: -1.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 0.0 IOB: -0.474 Activity: -0.0001 at 17:04:21 dev: -1.29 avgDelta: -1.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 0.5 IOB: -0.52 Activity: -0.0012 at 17:09:21 dev: -1.25 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 0.9 IOB: -0.611 Activity: -0.0023 at 17:14:22 dev: -1.20 avgDelta: -0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 1.3 IOB: -0.648 Activity: -0.0032 at 17:19:21 dev: -1.08 avgDelta: 0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 1.7 IOB: -0.68 Activity: -0.004 at 17:24:22 dev: -1.66 avgDelta: 0.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 2.1 IOB: -0.755 Activity: -0.005 at 17:29:22 dev: -2.33 avgDelta: -0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 2.4 IOB: -0.778 Activity: -0.0058 at 17:34:22 dev: -3.16 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 2.7 IOB: -0.798 Activity: -0.0065 at 17:39:22 dev: -3.45 avgDelta: -0.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 3.0 IOB: -0.863 Activity: -0.0072 at 17:44:22 dev: -3.24 avgDelta: -0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 3.2 IOB: -0.877 Activity: -0.0078 at 17:49:21 dev: -2.99 avgDelta: 0.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 3.4 IOB: -0.887 Activity: -0.0082 at 17:54:22 dev: -2.40 avgDelta: 1.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.4 BGI: 3.7 IOB: -0.942 Activity: -0.0089 at 17:59:22 dev: -2.44 avgDelta: 1.25 basal +CRInitialIOB: -0.947 CRInitialBG: 87 CRInitialCarbTime: 2022-05-30T16:04:22.000Z +start carb absorption +0 mealCOB: 9.5 mealCarbs: 10 basalBGI: 5.4 BGI: 3.9 IOB: -0.947 Activity: -0.0093 at 18:04:22 dev: -1.61 avgDelta: 2.25 csf +0 mealCOB: 9.0 mealCarbs: 10 basalBGI: 5.4 BGI: 4.0 IOB: -0.949 Activity: -0.0097 at 18:09:22 dev: 0.47 avgDelta: 4.50 csf +0 mealCOB: 8.5 mealCarbs: 10 basalBGI: 5.4 BGI: 4.1 IOB: -0.78 Activity: -0.0098 at 18:14:22 dev: 3.43 avgDelta: 7.50 csf +0 mealCOB: 8.1 mealCarbs: 10 basalBGI: 5.4 BGI: 3.9 IOB: -0.682 Activity: -0.0095 at 18:19:22 dev: 6.31 avgDelta: 10.25 csf +0 mealCOB: 7.6 mealCarbs: 10 basalBGI: 5.4 BGI: 3.5 IOB: -0.097 Activity: -0.0084 at 18:24:21 dev: 7.51 avgDelta: 11.00 csf +0 mealCOB: 7.1 mealCarbs: 10 basalBGI: 5.4 BGI: 2.9 IOB: -0.108 Activity: -0.007 at 18:29:21 dev: 6.09 avgDelta: 9.00 csf +0 mealCOB: 6.6 mealCarbs: 10 basalBGI: 5.4 BGI: 2.5 IOB: -0.126 Activity: -0.006 at 18:34:22 dev: 2.76 avgDelta: 5.25 csf +0 mealCOB: 6.1 mealCarbs: 10 basalBGI: 5.4 BGI: 2.2 IOB: -0.198 Activity: -0.0053 at 18:39:21 dev: -0.95 avgDelta: 1.25 csf +0 mealCOB: 5.6 mealCarbs: 10 basalBGI: 5.4 BGI: 1.9 IOB: -0.223 Activity: -0.0047 at 18:44:22 dev: -3.45 avgDelta: -1.50 csf +0 mealCOB: 5.2 mealCarbs: 10 basalBGI: 5.4 BGI: 1.8 IOB: -0.25 Activity: -0.0044 at 18:49:21 dev: -4.33 avgDelta: -2.50 csf +0 mealCOB: 4.7 mealCarbs: 10 basalBGI: 5.4 BGI: 1.8 IOB: -0.328 Activity: -0.0044 at 18:54:22 dev: -4.58 avgDelta: -2.75 csf +0 mealCOB: 4.2 mealCarbs: 10 basalBGI: 5.4 BGI: 1.8 IOB: -0.356 Activity: -0.0043 at 18:59:22 dev: -3.78 avgDelta: -2.00 csf +0 mealCOB: 3.7 mealCarbs: 10 basalBGI: 5.6 BGI: 1.8 IOB: -0.386 Activity: -0.0043 at 19:04:21 dev: -3.03 avgDelta: -1.25 csf +0 mealCOB: 3.2 mealCarbs: 10 basalBGI: 5.6 BGI: 1.9 IOB: -0.463 Activity: -0.0046 at 19:09:22 dev: -2.91 avgDelta: -1.00 csf +0 mealCOB: 2.7 mealCarbs: 10 basalBGI: 5.6 BGI: 1.9 IOB: -0.44 Activity: -0.0047 at 19:14:22 dev: -2.45 avgDelta: -0.50 csf +0 mealCOB: 2.3 mealCarbs: 10 basalBGI: 5.6 BGI: 2.0 IOB: -0.416 Activity: -0.0048 at 19:19:22 dev: -2.24 avgDelta: -0.25 csf +0 mealCOB: 1.8 mealCarbs: 10 basalBGI: 5.6 BGI: 2.0 IOB: -0.392 Activity: -0.0049 at 19:24:22 dev: -1.78 avgDelta: 0.25 csf +0 mealCOB: 1.3 mealCarbs: 10 basalBGI: 5.6 BGI: 2.0 IOB: -0.368 Activity: -0.0048 at 19:29:21 dev: -0.99 avgDelta: 1.00 csf +0 mealCOB: 0.8 mealCarbs: 10 basalBGI: 5.6 BGI: 1.9 IOB: -0.344 Activity: -0.0047 at 19:34:21 dev: -0.45 avgDelta: 1.50 csf +0 mealCOB: 0.3 mealCarbs: 10 basalBGI: 5.6 BGI: 2.0 IOB: -0.37 Activity: -0.0048 at 19:39:22 dev: 0.01 avgDelta: 2.00 csf +CREndIOB: -0.346 CREndBG: 130 CREndTime: 2022-05-30T17:44:22.000Z +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.6 BGI: 1.9 IOB: -0.346 Activity: -0.0047 at 19:44:22 dev: 0.30 avgDelta: 2.25 csf +end carb absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.6 BGI: 1.9 IOB: -0.323 Activity: -0.0045 at 19:49:22 dev: 0.63 avgDelta: 2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.6 BGI: 1.7 IOB: -0.201 Activity: -0.0042 at 19:54:22 dev: 0.76 avgDelta: 2.50 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.6 BGI: 1.6 IOB: -0.18 Activity: -0.0039 at 19:59:22 dev: 0.63 avgDelta: 2.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: 1.6 IOB: -0.261 Activity: -0.0038 at 20:04:22 dev: 0.17 avgDelta: 1.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: 1.5 IOB: -0.242 Activity: -0.0036 at 20:09:22 dev: 0.26 avgDelta: 1.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: 1.4 IOB: -0.225 Activity: -0.0035 at 20:14:21 dev: 0.80 avgDelta: 2.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: 1.4 IOB: -0.208 Activity: -0.0033 at 20:19:21 dev: 1.38 avgDelta: 2.75 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: 1.2 IOB: 0.048 Activity: -0.0028 at 20:24:22 dev: 2.09 avgDelta: 3.25 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: 0.9 IOB: 0.01 Activity: -0.0022 at 20:29:23 dev: 3.09 avgDelta: 4.00 basal +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: 0.6 IOB: 0.269 Activity: -0.0014 at 20:34:23 dev: 4.42 avgDelta: 5.00 basal +start uannnounced meal absorption +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: 0.1 IOB: 0.474 Activity: -0.0003 at 20:39:22 dev: 6.13 avgDelta: 6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -1.0 IOB: 1.379 Activity: 0.0025 at 20:44:22 dev: 7.29 avgDelta: 6.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -2.1 IOB: 1.31 Activity: 0.005 at 20:49:23 dev: 7.33 avgDelta: 5.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -2.9 IOB: 1.229 Activity: 0.0069 at 20:54:23 dev: 6.61 avgDelta: 3.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -3.5 IOB: 1.141 Activity: 0.0083 at 20:59:22 dev: 5.45 avgDelta: 2.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -3.8 IOB: 1.048 Activity: 0.0091 at 21:04:22 dev: 5.28 avgDelta: 1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.0 IOB: 1 Activity: 0.0097 at 21:09:22 dev: 5.03 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.1 IOB: 0.902 Activity: 0.0099 at 21:14:22 dev: 4.86 avgDelta: 0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.1 IOB: 0.803 Activity: 0.0099 at 21:19:22 dev: 4.86 avgDelta: 0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.2 IOB: 1.047 Activity: 0.0102 at 21:24:21 dev: 4.98 avgDelta: 0.75 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.3 IOB: 0.941 Activity: 0.0104 at 21:29:22 dev: 5.32 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.5 IOB: 1.078 Activity: 0.0108 at 21:34:22 dev: 5.48 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.6 IOB: 0.978 Activity: 0.011 at 21:39:21 dev: 5.57 avgDelta: 1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.7 IOB: 1.112 Activity: 0.0114 at 21:44:21 dev: 5.23 avgDelta: 0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.9 IOB: 1.144 Activity: 0.0118 at 21:49:21 dev: 4.90 avgDelta: 0.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -5.0 IOB: 1.034 Activity: 0.012 at 21:54:21 dev: 4.48 avgDelta: -0.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.9 IOB: 0.921 Activity: 0.0119 at 21:59:22 dev: 3.94 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.8 IOB: 0.812 Activity: 0.0115 at 22:04:22 dev: 3.77 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.7 IOB: 0.809 Activity: 0.0112 at 22:09:21 dev: 3.65 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.4 IOB: 0.701 Activity: 0.0107 at 22:14:22 dev: 3.44 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.4 IOB: 0.881 Activity: 0.0105 at 22:19:21 dev: 3.36 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.3 IOB: 0.776 Activity: 0.0104 at 22:24:22 dev: 3.32 avgDelta: -1.00 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.3 IOB: 0.935 Activity: 0.0103 at 22:29:23 dev: 3.03 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.3 IOB: 0.833 Activity: 0.0103 at 22:34:23 dev: 3.03 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.2 IOB: 0.782 Activity: 0.0102 at 22:39:22 dev: 2.98 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.2 IOB: 1.001 Activity: 0.0101 at 22:44:22 dev: 2.94 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.3 IOB: 0.9 Activity: 0.0103 at 22:49:22 dev: 3.03 avgDelta: -1.25 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.3 IOB: 0.919 Activity: 0.0104 at 22:54:22 dev: 2.82 avgDelta: -1.50 uam +0 mealCOB: 0.0 mealCarbs: 0 basalBGI: 5.9 BGI: -4.3 IOB: 0.816 Activity: 0.0104 at 22:59:22 dev: 2.32 avgDelta: -2.00 uam +CRInitialIOB: 6.729 CRInitialBG: 163 CRInitialCarbTime: 2022-05-30T21:04:22.000Z +start carb absorption +1 mealCOB: 34.5 mealCarbs: 35 basalBGI: 5.8 BGI: -6.6 IOB: 6.729 Activity: 0.016 at 23:04:22 dev: 4.14 avgDelta: -2.50 csf +1 mealCOB: 34.0 mealCarbs: 35 basalBGI: 5.8 BGI: -11.7 IOB: 6.567 Activity: 0.0282 at 23:09:22 dev: 9.20 avgDelta: -2.50 csf +1 mealCOB: 33.1 mealCarbs: 35 basalBGI: 5.8 BGI: -15.5 IOB: 6.302 Activity: 0.0374 at 23:14:23 dev: 13.77 avgDelta: -1.75 csf +1 mealCOB: 32.0 mealCarbs: 35 basalBGI: 5.8 BGI: -18.4 IOB: 6.047 Activity: 0.0443 at 23:19:22 dev: 18.64 avgDelta: 0.25 csf +1 mealCOB: 30.6 mealCarbs: 35 basalBGI: 5.8 BGI: -20.5 IOB: 5.862 Activity: 0.0494 at 23:24:23 dev: 23.75 avgDelta: 3.25 csf +1 mealCOB: 28.8 mealCarbs: 35 basalBGI: 5.8 BGI: -21.9 IOB: 5.506 Activity: 0.0527 at 23:29:22 dev: 28.37 avgDelta: 6.50 csf +1 mealCOB: 27.0 mealCarbs: 35 basalBGI: 5.8 BGI: -22.8 IOB: 5.346 Activity: 0.055 at 23:34:22 dev: 30.33 avgDelta: 7.50 csf +1 mealCOB: 25.3 mealCarbs: 35 basalBGI: 5.8 BGI: -23.4 IOB: 5.017 Activity: 0.0563 at 23:39:22 dev: 28.62 avgDelta: 5.25 csf +1 mealCOB: 23.8 mealCarbs: 35 basalBGI: 5.8 BGI: -23.3 IOB: 4.636 Activity: 0.0562 at 23:44:22 dev: 24.58 avgDelta: 1.25 csf +1 mealCOB: 22.6 mealCarbs: 35 basalBGI: 5.8 BGI: -23.1 IOB: 4.307 Activity: 0.0556 at 23:49:21 dev: 20.58 avgDelta: -2.50 csf +1 mealCOB: 21.4 mealCarbs: 35 basalBGI: 5.8 BGI: -22.5 IOB: 3.932 Activity: 0.0542 at 23:54:22 dev: 18.75 avgDelta: -3.75 csf +1 mealCOB: 20.2 mealCarbs: 35 basalBGI: 5.8 BGI: -21.7 IOB: 3.616 Activity: 0.0523 at 23:59:22 dev: 19.96 avgDelta: -1.75 csf +1 mealCOB: 18.9 mealCarbs: 35 basalBGI: 6.8 BGI: -20.8 IOB: 3.309 Activity: 0.0501 at 00:04:22 dev: 21.80 avgDelta: 1.00 csf +1 mealCOB: 17.5 mealCarbs: 35 basalBGI: 6.8 BGI: -19.7 IOB: 2.965 Activity: 0.0475 at 00:09:22 dev: 22.47 avgDelta: 2.75 csf +1 mealCOB: 16.2 mealCarbs: 35 basalBGI: 6.8 BGI: -18.6 IOB: 2.735 Activity: 0.0449 at 00:14:21 dev: 21.64 avgDelta: 3.00 csf +1 mealCOB: 15.1 mealCarbs: 35 basalBGI: 6.8 BGI: -17.5 IOB: 2.467 Activity: 0.0421 at 00:19:22 dev: 19.22 avgDelta: 1.75 csf +1 mealCOB: 14.1 mealCarbs: 35 basalBGI: 6.8 BGI: -16.3 IOB: 2.163 Activity: 0.0392 at 00:24:22 dev: 16.52 avgDelta: 0.25 csf +1 mealCOB: 13.2 mealCarbs: 35 basalBGI: 6.8 BGI: -15.0 IOB: 1.875 Activity: 0.0362 at 00:29:22 dev: 13.78 avgDelta: -1.25 csf +1 mealCOB: 12.5 mealCarbs: 35 basalBGI: 6.8 BGI: -13.8 IOB: 1.65 Activity: 0.0333 at 00:34:22 dev: 11.57 avgDelta: -2.25 csf +1 mealCOB: 11.9 mealCarbs: 35 basalBGI: 6.8 BGI: -12.6 IOB: 1.443 Activity: 0.0303 at 00:39:22 dev: 9.83 avgDelta: -2.75 csf +1 mealCOB: 11.4 mealCarbs: 35 basalBGI: 6.8 BGI: -11.4 IOB: 1.248 Activity: 0.0275 at 00:44:22 dev: 8.41 avgDelta: -3.00 csf +1 mealCOB: 10.9 mealCarbs: 35 basalBGI: 6.8 BGI: -10.3 IOB: 1.067 Activity: 0.0249 at 00:49:21 dev: 7.59 avgDelta: -2.75 csf +1 mealCOB: 10.5 mealCarbs: 35 basalBGI: 6.8 BGI: -9.3 IOB: 0.899 Activity: 0.0224 at 00:54:22 dev: 6.80 avgDelta: -2.50 csf +0 mealCOB: 10.0 mealCarbs: 35 basalBGI: 6.9 BGI: -0.9 IOB: 0.081 Activity: 0.0022 at 02:59:22 dev: -13.09 avgDelta: -14.00 csf +0 mealCOB: 9.5 mealCarbs: 35 basalBGI: 7.8 BGI: -0.9 IOB: 0.3 Activity: 0.0023 at 03:04:22 dev: -13.30 avgDelta: -14.25 csf +0 mealCOB: 9.0 mealCarbs: 35 basalBGI: 7.8 BGI: -1.0 IOB: 0.238 Activity: 0.0024 at 03:09:22 dev: -14.00 avgDelta: -15.00 csf +0 mealCOB: 8.5 mealCarbs: 35 basalBGI: 7.8 BGI: -1.0 IOB: 0.176 Activity: 0.0024 at 03:14:22 dev: -14.50 avgDelta: -15.50 csf +0 mealCOB: 8.0 mealCarbs: 35 basalBGI: 7.8 BGI: -0.9 IOB: 0.064 Activity: 0.0022 at 03:19:22 dev: -3.09 avgDelta: -4.00 csf +0 mealCOB: 7.6 mealCarbs: 35 basalBGI: 7.8 BGI: -0.8 IOB: -0.046 Activity: 0.0018 at 03:24:22 dev: -1.75 avgDelta: -2.50 csf +0 mealCOB: 7.1 mealCarbs: 35 basalBGI: 7.8 BGI: -0.5 IOB: -0.104 Activity: 0.0013 at 03:29:21 dev: 0.54 avgDelta: 0.00 csf +0 mealCOB: 6.6 mealCarbs: 35 basalBGI: 7.8 BGI: -0.5 IOB: 0.16 Activity: 0.0012 at 03:34:22 dev: 2.50 avgDelta: 2.00 csf +0 mealCOB: 6.1 mealCarbs: 35 basalBGI: 7.8 BGI: -0.6 IOB: 0.254 Activity: 0.0014 at 03:39:22 dev: 4.08 avgDelta: 3.50 csf +0 mealCOB: 5.6 mealCarbs: 35 basalBGI: 7.8 BGI: -0.7 IOB: 0.246 Activity: 0.0017 at 03:44:22 dev: 3.21 avgDelta: 2.50 csf +0 mealCOB: 5.1 mealCarbs: 35 basalBGI: 7.8 BGI: -0.8 IOB: 0.236 Activity: 0.002 at 03:49:23 dev: 0.83 avgDelta: 0.00 csf +CREndIOB: 0.177 CREndBG: 103 CREndTime: 2022-05-31T01:54:22.000Z +Ignoring 290 m CR period. +0 mealCOB: 4.6 mealCarbs: 35 basalBGI: 7.8 BGI: -0.8 IOB: 0.177 Activity: 0.002 at 03:54:22 dev: -2.42 avgDelta: -3.25 csf +Found at least 1h of carb absorption: assuming all meals were announced, and categorizing UAM data as basal. +oref0-autotune-core autotune.2022-05-30.json profile.json profile.pump.json > newprofile.2022-05-30.json +CRTotalCarbs: 125 CRTotalInsulin: 25.516 totalCR: 4.899 +Hour 0 total deviations: 0 mg/dL +Hour 0 basal adjustment needed: 0 U/hr +Hour 1 total deviations: 0 mg/dL +Hour 1 basal adjustment needed: 0 U/hr +Hour 2 total deviations: 0 mg/dL +Hour 2 basal adjustment needed: 0 U/hr +Hour 3 total deviations: 0 mg/dL +Hour 3 basal adjustment needed: 0 U/hr +Hour 4 total deviations: -22.37 mg/dL +Hour 4 basal adjustment needed: -0.05 U/hr +Hour 5 total deviations: 18.75 mg/dL +Hour 5 basal adjustment needed: 0.05 U/hr +Hour 6 total deviations: 0 mg/dL +Hour 6 basal adjustment needed: 0 U/hr +Hour 7 total deviations: -1.42 mg/dL +Hour 7 basal adjustment needed: 0 U/hr +Hour 8 total deviations: -0.92 mg/dL +Hour 8 basal adjustment needed: 0 U/hr +Hour 9 total deviations: 0 mg/dL +Hour 9 basal adjustment needed: 0 U/hr +Hour 10 total deviations: 0 mg/dL +Hour 10 basal adjustment needed: 0 U/hr +Hour 11 total deviations: 0 mg/dL +Hour 11 basal adjustment needed: 0 U/hr +Hour 12 total deviations: -27.01 mg/dL +Hour 12 basal adjustment needed: -0.07 U/hr +Hour 13 total deviations: 0 mg/dL +Hour 13 basal adjustment needed: 0 U/hr +Hour 14 total deviations: 0 mg/dL +Hour 14 basal adjustment needed: 0 U/hr +Hour 15 total deviations: 0 mg/dL +Hour 15 basal adjustment needed: 0 U/hr +Hour 16 total deviations: -1.54 mg/dL +Hour 16 basal adjustment needed: 0 U/hr +Hour 17 total deviations: -26.49 mg/dL +Hour 17 basal adjustment needed: -0.06 U/hr +Hour 18 total deviations: 0 mg/dL +Hour 18 basal adjustment needed: 0 U/hr +Hour 19 total deviations: 2.02 mg/dL +Hour 19 basal adjustment needed: 0 U/hr +Hour 20 total deviations: 45.02 mg/dL +Hour 20 basal adjustment needed: 0.11 U/hr +Hour 21 total deviations: 59.93 mg/dL +Hour 21 basal adjustment needed: 0.14 U/hr +Hour 22 total deviations: 37.69 mg/dL +Hour 22 basal adjustment needed: 0.09 U/hr +Hour 23 total deviations: 0 mg/dL +Hour 23 basal adjustment needed: 0 U/hr +Limiting hour 18 basal to 0.84 (which is 1.3 * pump basal of 0.648 ) +Adjusting hour 0 basal from 0.977 to 0.979 based on hour 0 = 0.979 and hour 1 = 0.995 +Adjusting hour 5 basal from 0.877 to 0.883 based on hour 4 = 0.954 and hour 9 = 0.855 +Adjusting hour 6 basal from 0.779 to 0.804 based on hour 4 = 0.954 and hour 9 = 0.855 +Adjusting hour 7 basal from 0.827 to 0.843 based on hour 4 = 0.954 and hour 9 = 0.855 +Adjusting hour 8 basal from 0.882 to 0.887 based on hour 4 = 0.954 and hour 9 = 0.855 +Adjusting hour 12 basal from 0.86 to 0.856 based on hour 11 = 0.844 and hour 14 = 0.835 +Adjusting hour 13 basal from 0.858 to 0.854 based on hour 11 = 0.844 and hour 14 = 0.835 +Adjusting hour 22 basal from 0.849 to 0.851 based on hour 21 = 0.879 and hour 23 = 0.843 +Adjusting hour 23 basal from 0.843 to 0.847 based on hour 21 = 0.879 and hour 23 = 0.847 +[ { i: 0, minutes: 0, rate: 0.979, start: '00:00:00', untuned: 5 }, + { i: 1, minutes: 60, rate: 0.995, start: '01:00:00', untuned: 1 }, + { i: 2, minutes: 120, rate: 0.997, start: '02:00:00' }, + { i: 3, minutes: 180, rate: 1.129, start: '03:00:00' }, + { i: 4, minutes: 240, rate: 0.954, start: '04:00:00' }, + { i: 5, minutes: 300, rate: 0.883, start: '05:00:00', untuned: 1 }, + { i: 6, minutes: 360, rate: 0.804, start: '06:00:00', untuned: 1 }, + { i: 7, minutes: 420, rate: 0.843, start: '07:00:00', untuned: 2 }, + { i: 8, minutes: 480, rate: 0.887, start: '08:00:00', untuned: 2 }, + { i: 9, minutes: 540, rate: 0.855, start: '09:00:00', untuned: 5 }, + { i: 10, minutes: 600, rate: 0.856, start: '10:00:00', untuned: 5 }, + { i: 11, minutes: 660, rate: 0.844, start: '11:00:00', untuned: 5 }, + { i: 12, minutes: 720, rate: 0.856, start: '12:00:00', untuned: 6 }, + { i: 13, minutes: 780, rate: 0.854, start: '13:00:00', untuned: 6 }, + { i: 14, minutes: 840, rate: 0.835, start: '14:00:00', untuned: 5 }, + { i: 15, minutes: 900, rate: 0.83, start: '15:00:00', untuned: 5 }, + { i: 16, minutes: 960, rate: 0.801, start: '16:00:00', untuned: 5 }, + { i: 17, + minutes: 1020, + rate: 0.821, + start: '17:00:00', + untuned: 5 }, + { i: 18, + minutes: 1080, + rate: 0.842, + start: '18:00:00', + untuned: 4 }, + { i: 19, + minutes: 1140, + rate: 0.929, + start: '19:00:00', + untuned: 4 }, + { i: 20, + minutes: 1200, + rate: 0.931, + start: '20:00:00', + untuned: 3 }, + { i: 21, + minutes: 1260, + rate: 0.879, + start: '21:00:00', + untuned: 4 }, + { i: 22, + minutes: 1320, + rate: 0.851, + start: '22:00:00', + untuned: 5 }, + { i: 23, + minutes: 1380, + rate: 0.847, + start: '23:00:00', + untuned: 5 } ] +totalMealCarbs: 135 totalDeviations: 2117.06 oldCSF 16.533 fullNewCSF: 15.68 newCSF: 16.363 +oldCR: 5.021 fullNewCR: 4.899 newCR: 4.997 +Limiting adjusted ISF of 57.94 to 66.31 (which is pump ISF of 86.2 / 1.3 ) +p50deviation: 0.815 p50BGI -2.885 p50ratios: 0.698 Old ISF: 83.014 fullNewISF: 57.944 adjustedISF: 66.308 newISF: 79.673 newDIA: 6 newPeak: 45 + +Autotune pump profile recommendations: +--------------------------------------------------------- +Recommendations Log File: /home/titi/aaps/autotune/autotune_recommendations.log + +Parameter | Pump | Autotune | Days Missing +--------------------------------------------------------- +ISF [mg/dL/U] | 86.200 | 79.673 | +Carb Ratio[g/U]| 5.750 | 4.997 | + 00:00 | 0.966 | 0.979 | 5 + 01:00 | 0.977 | 0.995 | 1 + 02:00 | 0.971 | 0.997 | 0 + 03:00 | 1.111 | 1.129 | 0 + 04:00 | 0.974 | 0.954 | 0 + 05:00 | 0.923 | 0.883 | 1 + 06:00 | 0.823 | 0.804 | 1 + 07:00 | 0.855 | 0.843 | 2 + 08:00 | 0.902 | 0.887 | 2 + 09:00 | 0.934 | 0.855 | 5 + 10:00 | 0.938 | 0.856 | 5 + 11:00 | 0.903 | 0.844 | 5 + 12:00 | 0.882 | 0.856 | 6 + 13:00 | 0.874 | 0.854 | 6 + 14:00 | 0.866 | 0.835 | 5 + 15:00 | 0.848 | 0.830 | 5 + 16:00 | 0.758 | 0.801 | 5 + 17:00 | 0.650 | 0.821 | 5 + 18:00 | 0.648 | 0.842 | 4 + 19:00 | 0.738 | 0.929 | 4 + 20:00 | 0.847 | 0.931 | 3 + 21:00 | 0.861 | 0.879 | 4 + 22:00 | 0.863 | 0.851 | 5 + 23:00 | 0.843 | 0.847 | 5 +Query: https://xxxxxxxxxxxx.com entries/sgv.json find%5Bdate%5D%5B%24gte%5D=1653962400000&find%5Bdate%5D%5B%24lte%5D=1654048800000&count=1500 +-rw-r--r-- 1 titi titi 82239 Jun 25 19:54 ns-entries.2022-05-31.json +Query: https://xxxxxxxxxxxx.com treatments.json find%5Bcreated_at%5D%5B%24gte%5D=2022-05-30T06:00+02:00&find%5Bcreated_at%5D%5B%24lte%5D=2022-06-01T18:00+02:00 +-rw-r--r-- 1 titi titi 231419 Jun 25 19:54 ns-treatments.2022-05-31.json + + +Log information after 2022-05-30 removed for unit test \ No newline at end of file diff --git a/app/src/test/res/autotune/test4/newprofile.2022-05-30.json b/app/src/test/res/autotune/test4/newprofile.2022-05-30.json new file mode 100644 index 0000000000..d2e0e6a17c --- /dev/null +++ b/app/src/test/res/autotune/test4/newprofile.2022-05-30.json @@ -0,0 +1,194 @@ +{ + "autosens_max": 1.3, + "autosens_min": 0.7, + "basalprofile": [ + { + "i": 0, + "minutes": 0, + "rate": 0.979, + "start": "00:00:00", + "untuned": 5 + }, + { + "i": 1, + "minutes": 60, + "rate": 0.995, + "start": "01:00:00", + "untuned": 1 + }, + { + "i": 2, + "minutes": 120, + "rate": 0.997, + "start": "02:00:00" + }, + { + "i": 3, + "minutes": 180, + "rate": 1.129, + "start": "03:00:00" + }, + { + "i": 4, + "minutes": 240, + "rate": 0.954, + "start": "04:00:00" + }, + { + "i": 5, + "minutes": 300, + "rate": 0.883, + "start": "05:00:00", + "untuned": 1 + }, + { + "i": 6, + "minutes": 360, + "rate": 0.804, + "start": "06:00:00", + "untuned": 1 + }, + { + "i": 7, + "minutes": 420, + "rate": 0.843, + "start": "07:00:00", + "untuned": 2 + }, + { + "i": 8, + "minutes": 480, + "rate": 0.887, + "start": "08:00:00", + "untuned": 2 + }, + { + "i": 9, + "minutes": 540, + "rate": 0.855, + "start": "09:00:00", + "untuned": 5 + }, + { + "i": 10, + "minutes": 600, + "rate": 0.856, + "start": "10:00:00", + "untuned": 5 + }, + { + "i": 11, + "minutes": 660, + "rate": 0.844, + "start": "11:00:00", + "untuned": 5 + }, + { + "i": 12, + "minutes": 720, + "rate": 0.856, + "start": "12:00:00", + "untuned": 6 + }, + { + "i": 13, + "minutes": 780, + "rate": 0.854, + "start": "13:00:00", + "untuned": 6 + }, + { + "i": 14, + "minutes": 840, + "rate": 0.835, + "start": "14:00:00", + "untuned": 5 + }, + { + "i": 15, + "minutes": 900, + "rate": 0.83, + "start": "15:00:00", + "untuned": 5 + }, + { + "i": 16, + "minutes": 960, + "rate": 0.801, + "start": "16:00:00", + "untuned": 5 + }, + { + "i": 17, + "minutes": 1020, + "rate": 0.821, + "start": "17:00:00", + "untuned": 5 + }, + { + "i": 18, + "minutes": 1080, + "rate": 0.842, + "start": "18:00:00", + "untuned": 4 + }, + { + "i": 19, + "minutes": 1140, + "rate": 0.929, + "start": "19:00:00", + "untuned": 4 + }, + { + "i": 20, + "minutes": 1200, + "rate": 0.931, + "start": "20:00:00", + "untuned": 3 + }, + { + "i": 21, + "minutes": 1260, + "rate": 0.879, + "start": "21:00:00", + "untuned": 4 + }, + { + "i": 22, + "minutes": 1320, + "rate": 0.851, + "start": "22:00:00", + "untuned": 5 + }, + { + "i": 23, + "minutes": 1380, + "rate": 0.847, + "start": "23:00:00", + "untuned": 5 + } + ], + "carb_ratio": 4.997, + "csf": 16.363, + "curve": "ultra-rapid", + "dia": 6, + "insulinPeakTime": 45, + "isfProfile": { + "sensitivities": [ + { + "endoffset": 1440, + "i": 0, + "offset": 0, + "sensitivity": 79.673, + "start": "00:00:00", + "x": 0 + } + ] + }, + "min_5m_carbimpact": 8, + "name": "Tuned Dyn2", + "sens": 79.673, + "timezone": "Europe/Paris", + "units": "mg/dl", + "useCustomPeakTime": true +} diff --git a/app/src/test/res/autotune/test4/ns-entries.2022-05-30.json b/app/src/test/res/autotune/test4/ns-entries.2022-05-30.json new file mode 100644 index 0000000000..0d6001d0ba --- /dev/null +++ b/app/src/test/res/autotune/test4/ns-entries.2022-05-30.json @@ -0,0 +1,2906 @@ +[ + { + "_id": "6295769c9bc0370004b42b86", + "device": "AndroidAPS-DexcomG6", + "date": 1653962362000, + "dateString": "2022-05-31T01:59:22.000Z", + "isValid": true, + "sgv": 96, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-31T01:59:56.953Z" + }, + { + "_id": "6295756f9bc0370004b42b83", + "device": "AndroidAPS-DexcomG6", + "date": 1653962062000, + "dateString": "2022-05-31T01:54:22.000Z", + "isValid": true, + "sgv": 103, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-31T01:54:55.893Z" + }, + { + "_id": "629574429bc0370004b42b80", + "device": "AndroidAPS-DexcomG6", + "date": 1653961763000, + "dateString": "2022-05-31T01:49:23.000Z", + "isValid": true, + "sgv": 112, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-31T01:49:54.739Z" + }, + { + "_id": "629573159bc0370004b42b7d", + "device": "AndroidAPS-DexcomG6", + "date": 1653961462000, + "dateString": "2022-05-31T01:44:22.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-31T01:44:53.650Z" + }, + { + "_id": "629571e89bc0370004b42b7a", + "device": "AndroidAPS-DexcomG6", + "date": 1653961162000, + "dateString": "2022-05-31T01:39:22.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-31T01:39:52.509Z" + }, + { + "_id": "629570bb9bc0370004b42b77", + "device": "AndroidAPS-DexcomG6", + "date": 1653960862000, + "dateString": "2022-05-31T01:34:22.000Z", + "isValid": true, + "sgv": 116, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-31T01:34:51.145Z" + }, + { + "_id": "62956f90e4f1e400046e05c7", + "device": "AndroidAPS-DexcomG6", + "date": 1653960561000, + "dateString": "2022-05-31T01:29:21.000Z", + "isValid": true, + "sgv": 112, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-31T01:29:52.070Z" + }, + { + "_id": "62956e62e4f1e400046e05c3", + "device": "AndroidAPS-DexcomG6", + "date": 1653960262000, + "dateString": "2022-05-31T01:24:22.000Z", + "isValid": true, + "sgv": 107, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-31T01:24:50.951Z" + }, + { + "_id": "62956d35e4f1e400046e05c1", + "device": "AndroidAPS-DexcomG6", + "date": 1653959962000, + "dateString": "2022-05-31T01:19:22.000Z", + "isValid": true, + "sgv": 105, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-31T01:19:49.260Z" + }, + { + "_id": "62956c07e4f1e400046e05be", + "device": "AndroidAPS-DexcomG6", + "date": 1653959662000, + "dateString": "2022-05-31T01:14:22.000Z", + "isValid": true, + "sgv": 108, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-31T01:14:47.990Z" + }, + { + "_id": "62956adae4f1e400046e05bb", + "device": "AndroidAPS-DexcomG6", + "date": 1653959362000, + "dateString": "2022-05-31T01:09:22.000Z", + "isValid": true, + "sgv": 112, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-31T01:09:46.322Z" + }, + { + "_id": "629569abe4f1e400046e05b8", + "device": "AndroidAPS-DexcomG6", + "date": 1653959062000, + "dateString": "2022-05-31T01:04:22.000Z", + "isValid": true, + "sgv": 117, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-31T01:04:43.046Z" + }, + { + "_id": "6295687de4f1e400046e05b4", + "device": "AndroidAPS-DexcomG6", + "date": 1653958762000, + "dateString": "2022-05-31T00:59:22.000Z", + "isValid": true, + "sgv": 121, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-31T00:59:41.709Z" + }, + { + "_id": "62954b36f89bc40004df9f60", + "device": "AndroidAPS-DexcomG6", + "date": 1653951262000, + "dateString": "2022-05-30T22:54:22.000Z", + "isValid": true, + "sgv": 170, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:54:46.692Z" + }, + { + "_id": "62954a21f89bc40004df9f5d", + "device": "AndroidAPS-DexcomG6", + "date": 1653950961000, + "dateString": "2022-05-30T22:49:21.000Z", + "isValid": true, + "sgv": 172, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:50:09.405Z" + }, + { + "_id": "629548f3f89bc40004df9f5a", + "device": "AndroidAPS-DexcomG6", + "date": 1653950662000, + "dateString": "2022-05-30T22:44:22.000Z", + "isValid": true, + "sgv": 174, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:45:07.405Z" + }, + { + "_id": "629547acf89bc40004df9f57", + "device": "AndroidAPS-DexcomG6", + "date": 1653950362000, + "dateString": "2022-05-30T22:39:22.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:39:40.750Z" + }, + { + "_id": "629546941ded00000454b746", + "device": "AndroidAPS-DexcomG6", + "date": 1653950062000, + "dateString": "2022-05-30T22:34:22.000Z", + "isValid": true, + "sgv": 180, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:35:00.013Z" + }, + { + "_id": "629545651ded00000454b744", + "device": "AndroidAPS-DexcomG6", + "date": 1653949762000, + "dateString": "2022-05-30T22:29:22.000Z", + "isValid": true, + "sgv": 183, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:29:57.528Z" + }, + { + "_id": "629544361ded00000454b742", + "device": "AndroidAPS-DexcomG6", + "date": 1653949462000, + "dateString": "2022-05-30T22:24:22.000Z", + "isValid": true, + "sgv": 186, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:24:54.381Z" + }, + { + "_id": "629543081ded00000454b740", + "device": "AndroidAPS-DexcomG6", + "date": 1653949162000, + "dateString": "2022-05-30T22:19:22.000Z", + "isValid": true, + "sgv": 188, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:19:52.210Z" + }, + { + "_id": "629541da1ded00000454b73d", + "device": "AndroidAPS-DexcomG6", + "date": 1653948861000, + "dateString": "2022-05-30T22:14:21.000Z", + "isValid": true, + "sgv": 189, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:14:50.845Z" + }, + { + "_id": "629540ac1ded00000454b739", + "device": "AndroidAPS-DexcomG6", + "date": 1653948562000, + "dateString": "2022-05-30T22:09:22.000Z", + "isValid": true, + "sgv": 188, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:09:48.384Z" + }, + { + "_id": "62953f7e1ded00000454b737", + "device": "AndroidAPS-DexcomG6", + "date": 1653948262000, + "dateString": "2022-05-30T22:04:22.000Z", + "isValid": true, + "sgv": 185, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T22:04:46.798Z" + }, + { + "_id": "62953e5d86a3df0004eb4504", + "device": "AndroidAPS-DexcomG6", + "date": 1653947962000, + "dateString": "2022-05-30T21:59:22.000Z", + "isValid": true, + "sgv": 181, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:59:57.963Z" + }, + { + "_id": "62953d3086a3df0004eb4502", + "device": "AndroidAPS-DexcomG6", + "date": 1653947662000, + "dateString": "2022-05-30T21:54:22.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:54:56.505Z" + }, + { + "_id": "62953c0286a3df0004eb4500", + "device": "AndroidAPS-DexcomG6", + "date": 1653947361000, + "dateString": "2022-05-30T21:49:21.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:49:54.555Z" + }, + { + "_id": "62953ad486a3df0004eb44fd", + "device": "AndroidAPS-DexcomG6", + "date": 1653947062000, + "dateString": "2022-05-30T21:44:22.000Z", + "isValid": true, + "sgv": 181, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:44:52.471Z" + }, + { + "_id": "629539a586a3df0004eb44fb", + "device": "AndroidAPS-DexcomG6", + "date": 1653946762000, + "dateString": "2022-05-30T21:39:22.000Z", + "isValid": true, + "sgv": 188, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:39:49.822Z" + }, + { + "_id": "6295387786a3df0004eb44f9", + "device": "AndroidAPS-DexcomG6", + "date": 1653946462000, + "dateString": "2022-05-30T21:34:22.000Z", + "isValid": true, + "sgv": 192, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T21:34:47.953Z" + }, + { + "_id": "6295374986a3df0004eb44f6", + "device": "AndroidAPS-DexcomG6", + "date": 1653946162000, + "dateString": "2022-05-30T21:29:22.000Z", + "isValid": true, + "sgv": 187, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T21:29:45.117Z" + }, + { + "_id": "6295362fe3aedd00046f3884", + "device": "AndroidAPS-DexcomG6", + "date": 1653945863000, + "dateString": "2022-05-30T21:24:23.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:25:03.893Z" + }, + { + "_id": "62953501e3aedd00046f3880", + "device": "AndroidAPS-DexcomG6", + "date": 1653945562000, + "dateString": "2022-05-30T21:19:22.000Z", + "isValid": true, + "sgv": 167, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:20:01.384Z" + }, + { + "_id": "629533d3e3aedd00046f387e", + "device": "AndroidAPS-DexcomG6", + "date": 1653945263000, + "dateString": "2022-05-30T21:14:23.000Z", + "isValid": true, + "sgv": 162, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:14:59.957Z" + }, + { + "_id": "629532a6e3aedd00046f387c", + "device": "AndroidAPS-DexcomG6", + "date": 1653944962000, + "dateString": "2022-05-30T21:09:22.000Z", + "isValid": true, + "sgv": 161, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:09:58.543Z" + }, + { + "_id": "62953178e3aedd00046f3879", + "device": "AndroidAPS-DexcomG6", + "date": 1653944662000, + "dateString": "2022-05-30T21:04:22.000Z", + "isValid": true, + "sgv": 163, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T21:04:56.492Z" + }, + { + "_id": "62953049e3aedd00046f3874", + "device": "AndroidAPS-DexcomG6", + "date": 1653944362000, + "dateString": "2022-05-30T20:59:22.000Z", + "isValid": true, + "sgv": 166, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:59:53.874Z" + }, + { + "_id": "62952f1be3aedd00046f3871", + "device": "AndroidAPS-DexcomG6", + "date": 1653944062000, + "dateString": "2022-05-30T20:54:22.000Z", + "isValid": true, + "sgv": 169, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:54:51.953Z" + }, + { + "_id": "62952de5e3aedd00046f386d", + "device": "AndroidAPS-DexcomG6", + "date": 1653943762000, + "dateString": "2022-05-30T20:49:22.000Z", + "isValid": true, + "sgv": 171, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:49:41.125Z" + }, + { + "_id": "62952cb7e3aedd00046f386a", + "device": "AndroidAPS-DexcomG6", + "date": 1653943462000, + "dateString": "2022-05-30T20:44:22.000Z", + "isValid": true, + "sgv": 173, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:44:39.868Z" + }, + { + "_id": "62952b89e3aedd00046f3866", + "device": "AndroidAPS-DexcomG6", + "date": 1653943162000, + "dateString": "2022-05-30T20:39:22.000Z", + "isValid": true, + "sgv": 174, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:39:37.778Z" + }, + { + "_id": "62952a5de3aedd00046f385f", + "device": "AndroidAPS-DexcomG6", + "date": 1653942863000, + "dateString": "2022-05-30T20:34:23.000Z", + "isValid": true, + "sgv": 175, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:34:37.302Z" + }, + { + "_id": "62952949e3aedd00046f385c", + "device": "AndroidAPS-DexcomG6", + "date": 1653942563000, + "dateString": "2022-05-30T20:29:23.000Z", + "isValid": true, + "sgv": 176, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:30:01.193Z" + }, + { + "_id": "6295284ee3aedd00046f3858", + "device": "AndroidAPS-DexcomG6", + "date": 1653942262000, + "dateString": "2022-05-30T20:24:22.000Z", + "isValid": true, + "sgv": 178, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:25:50.333Z" + }, + { + "_id": "629526eee3aedd00046f3855", + "device": "AndroidAPS-DexcomG6", + "date": 1653941961000, + "dateString": "2022-05-30T20:19:21.000Z", + "isValid": true, + "sgv": 179, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:19:58.496Z" + }, + { + "_id": "629525baf63c010004ea5d29", + "device": "AndroidAPS-DexcomG6", + "date": 1653941662000, + "dateString": "2022-05-30T20:14:22.000Z", + "isValid": true, + "sgv": 180, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:14:50.164Z" + }, + { + "_id": "629524a6f63c010004ea5d26", + "device": "AndroidAPS-DexcomG6", + "date": 1653941361000, + "dateString": "2022-05-30T20:09:21.000Z", + "isValid": true, + "sgv": 181, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:10:14.057Z" + }, + { + "_id": "62952379f63c010004ea5d22", + "device": "AndroidAPS-DexcomG6", + "date": 1653941062000, + "dateString": "2022-05-30T20:04:22.000Z", + "isValid": true, + "sgv": 182, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T20:05:13.099Z" + }, + { + "_id": "62952232f63c010004ea5d1f", + "device": "AndroidAPS-DexcomG6", + "date": 1653940762000, + "dateString": "2022-05-30T19:59:22.000Z", + "isValid": true, + "sgv": 183, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:59:46.536Z" + }, + { + "_id": "6295211ef63c010004ea5d1c", + "device": "AndroidAPS-DexcomG6", + "date": 1653940461000, + "dateString": "2022-05-30T19:54:21.000Z", + "isValid": true, + "sgv": 184, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:55:10.510Z" + }, + { + "_id": "62951fd8f63c010004ea5d1a", + "device": "AndroidAPS-DexcomG6", + "date": 1653940161000, + "dateString": "2022-05-30T19:49:21.000Z", + "isValid": true, + "sgv": 185, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:49:44.530Z" + }, + { + "_id": "62951eddf63c010004ea5d16", + "device": "AndroidAPS-DexcomG6", + "date": 1653939861000, + "dateString": "2022-05-30T19:44:21.000Z", + "isValid": true, + "sgv": 186, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:45:33.306Z" + }, + { + "_id": "62951d7ff63c010004ea5d12", + "device": "AndroidAPS-DexcomG6", + "date": 1653939561000, + "dateString": "2022-05-30T19:39:21.000Z", + "isValid": true, + "sgv": 187, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:39:43.397Z" + }, + { + "_id": "62951c51f63c010004ea5d0f", + "device": "AndroidAPS-DexcomG6", + "date": 1653939262000, + "dateString": "2022-05-30T19:34:22.000Z", + "isValid": true, + "sgv": 186, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:34:41.514Z" + }, + { + "_id": "62951b23f63c010004ea5d0b", + "device": "AndroidAPS-DexcomG6", + "date": 1653938962000, + "dateString": "2022-05-30T19:29:22.000Z", + "isValid": true, + "sgv": 185, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:29:39.093Z" + }, + { + "_id": "62951a0ef63c010004ea5d08", + "device": "AndroidAPS-DexcomG6", + "date": 1653938661000, + "dateString": "2022-05-30T19:24:21.000Z", + "isValid": true, + "sgv": 184, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:25:02.070Z" + }, + { + "_id": "629518def63c010004ea5d04", + "device": "AndroidAPS-DexcomG6", + "date": 1653938362000, + "dateString": "2022-05-30T19:19:22.000Z", + "isValid": true, + "sgv": 183, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:19:58.457Z" + }, + { + "_id": "629517b0f63c010004ea5d01", + "device": "AndroidAPS-DexcomG6", + "date": 1653938062000, + "dateString": "2022-05-30T19:14:22.000Z", + "isValid": true, + "sgv": 182, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:14:56.712Z" + }, + { + "_id": "62951683f63c010004ea5cff", + "device": "AndroidAPS-DexcomG6", + "date": 1653937762000, + "dateString": "2022-05-30T19:09:22.000Z", + "isValid": true, + "sgv": 181, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:09:55.010Z" + }, + { + "_id": "62951558f63c010004ea5cfc", + "device": "AndroidAPS-DexcomG6", + "date": 1653937462000, + "dateString": "2022-05-30T19:04:22.000Z", + "isValid": true, + "sgv": 181, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T19:04:56.708Z" + }, + { + "_id": "6295142af63c010004ea5cfa", + "device": "AndroidAPS-DexcomG6", + "date": 1653937162000, + "dateString": "2022-05-30T18:59:22.000Z", + "isValid": true, + "sgv": 180, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:59:54.428Z" + }, + { + "_id": "629512fcf63c010004ea5cf7", + "device": "AndroidAPS-DexcomG6", + "date": 1653936863000, + "dateString": "2022-05-30T18:54:23.000Z", + "isValid": true, + "sgv": 179, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:54:52.395Z" + }, + { + "_id": "629511c70f8c2e00042830a2", + "device": "AndroidAPS-DexcomG6", + "date": 1653936563000, + "dateString": "2022-05-30T18:49:23.000Z", + "isValid": true, + "sgv": 177, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:49:43.497Z" + }, + { + "_id": "629510990f8c2e000428309f", + "device": "AndroidAPS-DexcomG6", + "date": 1653936262000, + "dateString": "2022-05-30T18:44:22.000Z", + "isValid": true, + "sgv": 175, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T18:44:41.570Z" + }, + { + "_id": "62950f6b0f8c2e000428309c", + "device": "AndroidAPS-DexcomG6", + "date": 1653935962000, + "dateString": "2022-05-30T18:39:22.000Z", + "isValid": true, + "sgv": 172, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T18:39:39.460Z" + }, + { + "_id": "62950e3d0f8c2e0004283099", + "device": "AndroidAPS-DexcomG6", + "date": 1653935663000, + "dateString": "2022-05-30T18:34:23.000Z", + "isValid": true, + "sgv": 164, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T18:34:37.460Z" + }, + { + "_id": "62950d280f8c2e0004283094", + "device": "AndroidAPS-DexcomG6", + "date": 1653935363000, + "dateString": "2022-05-30T18:29:23.000Z", + "isValid": true, + "sgv": 156, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:30:00.224Z" + }, + { + "_id": "62950bf90f8c2e0004283091", + "device": "AndroidAPS-DexcomG6", + "date": 1653935062000, + "dateString": "2022-05-30T18:24:22.000Z", + "isValid": true, + "sgv": 150, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:24:57.761Z" + }, + { + "_id": "62950acb0f8c2e000428308d", + "device": "AndroidAPS-DexcomG6", + "date": 1653934761000, + "dateString": "2022-05-30T18:19:21.000Z", + "isValid": true, + "sgv": 147, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:19:55.662Z" + }, + { + "_id": "6295099a409703000484d1c9", + "device": "AndroidAPS-DexcomG6", + "date": 1653934461000, + "dateString": "2022-05-30T18:14:21.000Z", + "isValid": true, + "sgv": 144, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:14:50.027Z" + }, + { + "_id": "6295086b409703000484d1c6", + "device": "AndroidAPS-DexcomG6", + "date": 1653934162000, + "dateString": "2022-05-30T18:09:22.000Z", + "isValid": true, + "sgv": 140, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:09:47.806Z" + }, + { + "_id": "6295073d409703000484d1c4", + "device": "AndroidAPS-DexcomG6", + "date": 1653933862000, + "dateString": "2022-05-30T18:04:22.000Z", + "isValid": true, + "sgv": 137, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T18:04:45.808Z" + }, + { + "_id": "6295060f409703000484d1c1", + "device": "AndroidAPS-DexcomG6", + "date": 1653933562000, + "dateString": "2022-05-30T17:59:22.000Z", + "isValid": true, + "sgv": 136, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:59:43.089Z" + }, + { + "_id": "629504e1409703000484d1be", + "device": "AndroidAPS-DexcomG6", + "date": 1653933262000, + "dateString": "2022-05-30T17:54:22.000Z", + "isValid": true, + "sgv": 135, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:54:41.141Z" + }, + { + "_id": "629503cb409703000484d1ba", + "device": "AndroidAPS-DexcomG6", + "date": 1653932962000, + "dateString": "2022-05-30T17:49:22.000Z", + "isValid": true, + "sgv": 133, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:50:03.997Z" + }, + { + "_id": "6295029d409703000484d1b7", + "device": "AndroidAPS-DexcomG6", + "date": 1653932662000, + "dateString": "2022-05-30T17:44:22.000Z", + "isValid": true, + "sgv": 130, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:45:01.816Z" + }, + { + "_id": "6295015e55b9dd00048a5495", + "device": "AndroidAPS-DexcomG6", + "date": 1653932362000, + "dateString": "2022-05-30T17:39:22.000Z", + "isValid": true, + "sgv": 127, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:39:42.833Z" + }, + { + "_id": "6295003055b9dd00048a5493", + "device": "AndroidAPS-DexcomG6", + "date": 1653932061000, + "dateString": "2022-05-30T17:34:21.000Z", + "isValid": true, + "sgv": 125, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:34:40.905Z" + }, + { + "_id": "6294ff1c55b9dd00048a5490", + "device": "AndroidAPS-DexcomG6", + "date": 1653931761000, + "dateString": "2022-05-30T17:29:21.000Z", + "isValid": true, + "sgv": 123, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:30:04.244Z" + }, + { + "_id": "6294fded55b9dd00048a548e", + "device": "AndroidAPS-DexcomG6", + "date": 1653931462000, + "dateString": "2022-05-30T17:24:22.000Z", + "isValid": true, + "sgv": 121, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:25:01.436Z" + }, + { + "_id": "6294fcbf55b9dd00048a548c", + "device": "AndroidAPS-DexcomG6", + "date": 1653931162000, + "dateString": "2022-05-30T17:19:22.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:19:59.153Z" + }, + { + "_id": "6294fb9155b9dd00048a548a", + "device": "AndroidAPS-DexcomG6", + "date": 1653930862000, + "dateString": "2022-05-30T17:14:22.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:14:57.054Z" + }, + { + "_id": "6294fa6255b9dd00048a5488", + "device": "AndroidAPS-DexcomG6", + "date": 1653930562000, + "dateString": "2022-05-30T17:09:22.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:09:54.701Z" + }, + { + "_id": "6294f92d55b9dd00048a5486", + "device": "AndroidAPS-DexcomG6", + "date": 1653930261000, + "dateString": "2022-05-30T17:04:21.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T17:04:45.622Z" + }, + { + "_id": "6294f7fe55b9dd00048a5483", + "device": "AndroidAPS-DexcomG6", + "date": 1653929962000, + "dateString": "2022-05-30T16:59:22.000Z", + "isValid": true, + "sgv": 120, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:59:42.653Z" + }, + { + "_id": "6294f6ea55b9dd00048a5481", + "device": "AndroidAPS-DexcomG6", + "date": 1653929662000, + "dateString": "2022-05-30T16:54:22.000Z", + "isValid": true, + "sgv": 121, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:55:06.087Z" + }, + { + "_id": "6294f5bd55b9dd00048a547f", + "device": "AndroidAPS-DexcomG6", + "date": 1653929361000, + "dateString": "2022-05-30T16:49:21.000Z", + "isValid": true, + "sgv": 123, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:50:05.068Z" + }, + { + "_id": "6294f4db55b9dd00048a547d", + "device": "AndroidAPS-DexcomG6", + "date": 1653929062000, + "dateString": "2022-05-30T16:44:22.000Z", + "isValid": true, + "sgv": 125, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:46:19.989Z" + }, + { + "_id": "6294f35555b9dd00048a547a", + "device": "AndroidAPS-DexcomG6", + "date": 1653928761000, + "dateString": "2022-05-30T16:39:21.000Z", + "isValid": true, + "sgv": 128, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:39:49.489Z" + }, + { + "_id": "6294f23fb23f340004e841eb", + "device": "AndroidAPS-DexcomG6", + "date": 1653928462000, + "dateString": "2022-05-30T16:34:22.000Z", + "isValid": true, + "sgv": 132, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:35:11.666Z" + }, + { + "_id": "6294f0f8b23f340004e841e8", + "device": "AndroidAPS-DexcomG6", + "date": 1653928161000, + "dateString": "2022-05-30T16:29:21.000Z", + "isValid": true, + "sgv": 133, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T16:29:44.123Z" + }, + { + "_id": "6294efcab23f340004e841e5", + "device": "AndroidAPS-DexcomG6", + "date": 1653927861000, + "dateString": "2022-05-30T16:24:21.000Z", + "isValid": true, + "sgv": 131, + "direction": "SingleUp", + "type": "sgv", + "created_at": "2022-05-30T16:24:42.057Z" + }, + { + "_id": "6294eeb5b23f340004e841e1", + "device": "AndroidAPS-DexcomG6", + "date": 1653927562000, + "dateString": "2022-05-30T16:19:22.000Z", + "isValid": true, + "sgv": 123, + "direction": "SingleUp", + "type": "sgv", + "created_at": "2022-05-30T16:20:05.391Z" + }, + { + "_id": "6294ed6eb23f340004e841de", + "device": "AndroidAPS-DexcomG6", + "date": 1653927262000, + "dateString": "2022-05-30T16:14:22.000Z", + "isValid": true, + "sgv": 111, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T16:14:38.319Z" + }, + { + "_id": "6294ec59b23f340004e841da", + "device": "AndroidAPS-DexcomG6", + "date": 1653926962000, + "dateString": "2022-05-30T16:09:22.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:10:01.438Z" + }, + { + "_id": "6294eb2bb23f340004e841d8", + "device": "AndroidAPS-DexcomG6", + "date": 1653926662000, + "dateString": "2022-05-30T16:04:22.000Z", + "isValid": true, + "sgv": 87, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:04:59.310Z" + }, + { + "_id": "6294ea10b23f340004e841d5", + "device": "AndroidAPS-DexcomG6", + "date": 1653926362000, + "dateString": "2022-05-30T15:59:22.000Z", + "isValid": true, + "sgv": 82, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T16:00:16.597Z" + }, + { + "_id": "6294e8c9b23f340004e841d3", + "device": "AndroidAPS-DexcomG6", + "date": 1653926062000, + "dateString": "2022-05-30T15:54:22.000Z", + "isValid": true, + "sgv": 81, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:54:49.400Z" + }, + { + "_id": "6294e79bb23f340004e841d1", + "device": "AndroidAPS-DexcomG6", + "date": 1653925761000, + "dateString": "2022-05-30T15:49:21.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:49:47.886Z" + }, + { + "_id": "6294e66eb23f340004e841cf", + "device": "AndroidAPS-DexcomG6", + "date": 1653925462000, + "dateString": "2022-05-30T15:44:22.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:44:46.677Z" + }, + { + "_id": "6294e554706f120004b7d161", + "device": "AndroidAPS-DexcomG6", + "date": 1653925162000, + "dateString": "2022-05-30T15:39:22.000Z", + "isValid": true, + "sgv": 77, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:40:04.657Z" + }, + { + "_id": "6294e427706f120004b7d15f", + "device": "AndroidAPS-DexcomG6", + "date": 1653924862000, + "dateString": "2022-05-30T15:34:22.000Z", + "isValid": true, + "sgv": 77, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:35:03.426Z" + }, + { + "_id": "6294e2fa706f120004b7d15c", + "device": "AndroidAPS-DexcomG6", + "date": 1653924562000, + "dateString": "2022-05-30T15:29:22.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:30:02.194Z" + }, + { + "_id": "6294e1cd706f120004b7d15a", + "device": "AndroidAPS-DexcomG6", + "date": 1653924262000, + "dateString": "2022-05-30T15:24:22.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:25:01.236Z" + }, + { + "_id": "6294e09f706f120004b7d158", + "device": "AndroidAPS-DexcomG6", + "date": 1653923961000, + "dateString": "2022-05-30T15:19:21.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:19:59.752Z" + }, + { + "_id": "6294dfbd706f120004b7d156", + "device": "AndroidAPS-DexcomG6", + "date": 1653923662000, + "dateString": "2022-05-30T15:14:22.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:16:13.728Z" + }, + { + "_id": "6294df40706f120004b7d154", + "device": "AndroidAPS-DexcomG6", + "date": 1653923361000, + "dateString": "2022-05-30T15:09:21.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:14:08.395Z" + }, + { + "_id": "6294ddc7706f120004b7d152", + "device": "AndroidAPS-DexcomG6", + "date": 1653923061000, + "dateString": "2022-05-30T15:04:21.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:07:51.780Z" + }, + { + "_id": "6294dcde5f047100042886c5", + "device": "AndroidAPS-DexcomG6", + "date": 1653922761000, + "dateString": "2022-05-30T14:59:21.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T15:03:58.124Z" + }, + { + "_id": "6294db4c5f047100042886c3", + "device": "AndroidAPS-DexcomG6", + "date": 1653922461000, + "dateString": "2022-05-30T14:54:21.000Z", + "isValid": true, + "sgv": 81, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:57:16.389Z" + }, + { + "_id": "6294da065f047100042886c0", + "device": "AndroidAPS-DexcomG6", + "date": 1653922161000, + "dateString": "2022-05-30T14:49:21.000Z", + "isValid": true, + "sgv": 82, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:51:50.006Z" + }, + { + "_id": "6294d85b5f047100042886be", + "device": "AndroidAPS-DexcomG6", + "date": 1653921862000, + "dateString": "2022-05-30T14:44:22.000Z", + "isValid": true, + "sgv": 84, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:44:43.154Z" + }, + { + "_id": "6294d72e5f047100042886bc", + "device": "AndroidAPS-DexcomG6", + "date": 1653921561000, + "dateString": "2022-05-30T14:39:21.000Z", + "isValid": true, + "sgv": 85, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:39:42.170Z" + }, + { + "_id": "6294d6005f047100042886ba", + "device": "AndroidAPS-DexcomG6", + "date": 1653921261000, + "dateString": "2022-05-30T14:34:21.000Z", + "isValid": true, + "sgv": 87, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:34:40.716Z" + }, + { + "_id": "6294d4dbdac1e20004fde59a", + "device": "AndroidAPS-DexcomG6", + "date": 1653920961000, + "dateString": "2022-05-30T14:29:21.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:29:47.439Z" + }, + { + "_id": "6294d3aedac1e20004fde598", + "device": "AndroidAPS-DexcomG6", + "date": 1653920661000, + "dateString": "2022-05-30T14:24:21.000Z", + "isValid": true, + "sgv": 93, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:24:46.261Z" + }, + { + "_id": "6294d281dac1e20004fde596", + "device": "AndroidAPS-DexcomG6", + "date": 1653920361000, + "dateString": "2022-05-30T14:19:21.000Z", + "isValid": true, + "sgv": 97, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:19:45.303Z" + }, + { + "_id": "6294d154dac1e20004fde594", + "device": "AndroidAPS-DexcomG6", + "date": 1653920062000, + "dateString": "2022-05-30T14:14:22.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:14:44.142Z" + }, + { + "_id": "6294d026dac1e20004fde592", + "device": "AndroidAPS-DexcomG6", + "date": 1653919761000, + "dateString": "2022-05-30T14:09:21.000Z", + "isValid": true, + "sgv": 103, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:09:42.740Z" + }, + { + "_id": "6294cf12dac1e20004fde58f", + "device": "AndroidAPS-DexcomG6", + "date": 1653919462000, + "dateString": "2022-05-30T14:04:22.000Z", + "isValid": true, + "sgv": 106, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T14:05:06.902Z" + }, + { + "_id": "6294cdccdac1e20004fde58d", + "device": "AndroidAPS-DexcomG6", + "date": 1653919161000, + "dateString": "2022-05-30T13:59:21.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T13:59:40.487Z" + }, + { + "_id": "6294cc9cb8c0c10004ff0014", + "device": "AndroidAPS-DexcomG6", + "date": 1653918862000, + "dateString": "2022-05-30T13:54:22.000Z", + "isValid": true, + "sgv": 113, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T13:54:36.799Z" + }, + { + "_id": "6294cb88b8c0c10004ff0012", + "device": "AndroidAPS-DexcomG6", + "date": 1653918561000, + "dateString": "2022-05-30T13:49:21.000Z", + "isValid": true, + "sgv": 117, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T13:50:00.678Z" + }, + { + "_id": "6294ca5bb8c0c10004ff0010", + "device": "AndroidAPS-DexcomG6", + "date": 1653918262000, + "dateString": "2022-05-30T13:44:22.000Z", + "isValid": true, + "sgv": 121, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:44:59.703Z" + }, + { + "_id": "6294c92eb8c0c10004ff000d", + "device": "AndroidAPS-DexcomG6", + "date": 1653917962000, + "dateString": "2022-05-30T13:39:22.000Z", + "isValid": true, + "sgv": 126, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:39:58.439Z" + }, + { + "_id": "6294c801b8c0c10004ff000b", + "device": "AndroidAPS-DexcomG6", + "date": 1653917662000, + "dateString": "2022-05-30T13:34:22.000Z", + "isValid": true, + "sgv": 130, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:34:57.267Z" + }, + { + "_id": "6294c6d3b8c0c10004ff0009", + "device": "AndroidAPS-DexcomG6", + "date": 1653917362000, + "dateString": "2022-05-30T13:29:22.000Z", + "isValid": true, + "sgv": 136, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:29:55.794Z" + }, + { + "_id": "6294c5a6b8c0c10004ff0007", + "device": "AndroidAPS-DexcomG6", + "date": 1653917062000, + "dateString": "2022-05-30T13:24:22.000Z", + "isValid": true, + "sgv": 141, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:24:54.571Z" + }, + { + "_id": "6294c48252bed20004c9a2bc", + "device": "AndroidAPS-DexcomG6", + "date": 1653916762000, + "dateString": "2022-05-30T13:19:22.000Z", + "isValid": true, + "sgv": 147, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:20:02.947Z" + }, + { + "_id": "6294c35552bed20004c9a2ba", + "device": "AndroidAPS-DexcomG6", + "date": 1653916461000, + "dateString": "2022-05-30T13:14:21.000Z", + "isValid": true, + "sgv": 152, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:15:01.720Z" + }, + { + "_id": "6294c22852bed20004c9a2b7", + "device": "AndroidAPS-DexcomG6", + "date": 1653916162000, + "dateString": "2022-05-30T13:09:22.000Z", + "isValid": true, + "sgv": 158, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:10:00.478Z" + }, + { + "_id": "6294c0fb52bed20004c9a2b5", + "device": "AndroidAPS-DexcomG6", + "date": 1653915862000, + "dateString": "2022-05-30T13:04:22.000Z", + "isValid": true, + "sgv": 164, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T13:04:59.247Z" + }, + { + "_id": "6294bfce52bed20004c9a2b2", + "device": "AndroidAPS-DexcomG6", + "date": 1653915561000, + "dateString": "2022-05-30T12:59:21.000Z", + "isValid": true, + "sgv": 170, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T12:59:58.302Z" + }, + { + "_id": "6294bea052bed20004c9a2af", + "device": "AndroidAPS-DexcomG6", + "date": 1653915262000, + "dateString": "2022-05-30T12:54:22.000Z", + "isValid": true, + "sgv": 176, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T12:54:56.765Z" + }, + { + "_id": "6294bd7352bed20004c9a2ac", + "device": "AndroidAPS-DexcomG6", + "date": 1653914962000, + "dateString": "2022-05-30T12:49:22.000Z", + "isValid": true, + "sgv": 182, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T12:49:55.775Z" + }, + { + "_id": "6294bc52ff39db0004546864", + "device": "AndroidAPS-DexcomG6", + "date": 1653914661000, + "dateString": "2022-05-30T12:44:21.000Z", + "isValid": true, + "sgv": 188, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T12:45:06.129Z" + }, + { + "_id": "6294bb0bff39db0004546861", + "device": "AndroidAPS-DexcomG6", + "date": 1653914362000, + "dateString": "2022-05-30T12:39:22.000Z", + "isValid": true, + "sgv": 195, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T12:39:39.194Z" + }, + { + "_id": "6294b9f6ff39db000454685e", + "device": "AndroidAPS-DexcomG6", + "date": 1653914062000, + "dateString": "2022-05-30T12:34:22.000Z", + "isValid": true, + "sgv": 203, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T12:35:02.052Z" + }, + { + "_id": "6294b8c7ff39db000454685b", + "device": "AndroidAPS-DexcomG6", + "date": 1653913762000, + "dateString": "2022-05-30T12:29:22.000Z", + "isValid": true, + "sgv": 213, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T12:29:59.741Z" + }, + { + "_id": "6294b799ff39db0004546858", + "device": "AndroidAPS-DexcomG6", + "date": 1653913462000, + "dateString": "2022-05-30T12:24:22.000Z", + "isValid": true, + "sgv": 223, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T12:24:57.749Z" + }, + { + "_id": "6294b66bff39db0004546853", + "device": "AndroidAPS-DexcomG6", + "date": 1653913162000, + "dateString": "2022-05-30T12:19:22.000Z", + "isValid": true, + "sgv": 232, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T12:19:55.640Z" + }, + { + "_id": "6294b53dff39db0004546852", + "device": "AndroidAPS-DexcomG6", + "date": 1653912862000, + "dateString": "2022-05-30T12:14:22.000Z", + "isValid": true, + "sgv": 242, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T12:14:53.986Z" + }, + { + "_id": "6294b4130f39100004ec41f5", + "device": "AndroidAPS-DexcomG6", + "date": 1653912562000, + "dateString": "2022-05-30T12:09:22.000Z", + "isValid": true, + "sgv": 248, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T12:09:55.708Z" + }, + { + "_id": "6294b2e50f39100004ec41f3", + "device": "AndroidAPS-DexcomG6", + "date": 1653912261000, + "dateString": "2022-05-30T12:04:21.000Z", + "isValid": true, + "sgv": 251, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T12:04:53.216Z" + }, + { + "_id": "6294b1d10f39100004ec41f1", + "device": "AndroidAPS-DexcomG6", + "date": 1653911961000, + "dateString": "2022-05-30T11:59:21.000Z", + "isValid": true, + "sgv": 251, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T12:00:17.223Z" + }, + { + "_id": "6294b08a0f39100004ec41ef", + "device": "AndroidAPS-DexcomG6", + "date": 1653911662000, + "dateString": "2022-05-30T11:54:22.000Z", + "isValid": true, + "sgv": 249, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T11:54:50.545Z" + }, + { + "_id": "6294af5c0f39100004ec41ed", + "device": "AndroidAPS-DexcomG6", + "date": 1653911361000, + "dateString": "2022-05-30T11:49:21.000Z", + "isValid": true, + "sgv": 246, + "direction": "SingleUp", + "type": "sgv", + "created_at": "2022-05-30T11:49:48.926Z" + }, + { + "_id": "6294ae2f0f39100004ec41e7", + "device": "AndroidAPS-DexcomG6", + "date": 1653911061000, + "dateString": "2022-05-30T11:44:21.000Z", + "isValid": true, + "sgv": 240, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T11:44:47.323Z" + }, + { + "_id": "6294ad1b0f39100004ec41e2", + "device": "AndroidAPS-DexcomG6", + "date": 1653910761000, + "dateString": "2022-05-30T11:39:21.000Z", + "isValid": true, + "sgv": 230, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T11:40:11.205Z" + }, + { + "_id": "6294abd9ac5400000430888e", + "device": "AndroidAPS-DexcomG6", + "date": 1653910462000, + "dateString": "2022-05-30T11:34:22.000Z", + "isValid": true, + "sgv": 215, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T11:34:49.146Z" + }, + { + "_id": "6294aaabac5400000430888a", + "device": "AndroidAPS-DexcomG6", + "date": 1653910161000, + "dateString": "2022-05-30T11:29:21.000Z", + "isValid": true, + "sgv": 195, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T11:29:47.695Z" + }, + { + "_id": "6294a97eac54000004308887", + "device": "AndroidAPS-DexcomG6", + "date": 1653909861000, + "dateString": "2022-05-30T11:24:21.000Z", + "isValid": true, + "sgv": 172, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T11:24:46.490Z" + }, + { + "_id": "6294a851ac54000004308883", + "device": "AndroidAPS-DexcomG6", + "date": 1653909561000, + "dateString": "2022-05-30T11:19:21.000Z", + "isValid": true, + "sgv": 146, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T11:19:45.466Z" + }, + { + "_id": "6294a723ac54000004308881", + "device": "AndroidAPS-DexcomG6", + "date": 1653909261000, + "dateString": "2022-05-30T11:14:21.000Z", + "isValid": true, + "sgv": 122, + "direction": "SingleUp", + "type": "sgv", + "created_at": "2022-05-30T11:14:43.529Z" + }, + { + "_id": "6294a60eac5400000430887d", + "device": "AndroidAPS-DexcomG6", + "date": 1653908962000, + "dateString": "2022-05-30T11:09:22.000Z", + "isValid": true, + "sgv": 102, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T11:10:06.733Z" + }, + { + "_id": "6294a4d1ac5400000430887a", + "device": "AndroidAPS-DexcomG6", + "date": 1653908662000, + "dateString": "2022-05-30T11:04:22.000Z", + "isValid": true, + "sgv": 88, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T11:04:49.434Z" + }, + { + "_id": "6294a3a3ac54000004308877", + "device": "AndroidAPS-DexcomG6", + "date": 1653908361000, + "dateString": "2022-05-30T10:59:21.000Z", + "isValid": true, + "sgv": 81, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:59:47.232Z" + }, + { + "_id": "6294a274ac54000004308874", + "device": "AndroidAPS-DexcomG6", + "date": 1653908062000, + "dateString": "2022-05-30T10:54:22.000Z", + "isValid": true, + "sgv": 77, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:54:44.532Z" + }, + { + "_id": "6294a15bc2e464000413b7a8", + "device": "AndroidAPS-DexcomG6", + "date": 1653907762000, + "dateString": "2022-05-30T10:49:22.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:50:03.007Z" + }, + { + "_id": "6294a02dc2e464000413b7a6", + "device": "AndroidAPS-DexcomG6", + "date": 1653907461000, + "dateString": "2022-05-30T10:44:21.000Z", + "isValid": true, + "sgv": 77, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:45:01.559Z" + }, + { + "_id": "62949f00c2e464000413b7a3", + "device": "AndroidAPS-DexcomG6", + "date": 1653907162000, + "dateString": "2022-05-30T10:39:22.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:40:00.055Z" + }, + { + "_id": "62949debc2e464000413b7a1", + "device": "AndroidAPS-DexcomG6", + "date": 1653906861000, + "dateString": "2022-05-30T10:34:21.000Z", + "isValid": true, + "sgv": 79, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:35:23.163Z" + }, + { + "_id": "62949ca4c2e464000413b79f", + "device": "AndroidAPS-DexcomG6", + "date": 1653906561000, + "dateString": "2022-05-30T10:29:21.000Z", + "isValid": true, + "sgv": 80, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:29:56.711Z" + }, + { + "_id": "62949b77c2e464000413b79d", + "device": "AndroidAPS-DexcomG6", + "date": 1653906262000, + "dateString": "2022-05-30T10:24:22.000Z", + "isValid": true, + "sgv": 82, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:24:55.547Z" + }, + { + "_id": "62949a4ac2e464000413b79a", + "device": "AndroidAPS-DexcomG6", + "date": 1653905961000, + "dateString": "2022-05-30T10:19:21.000Z", + "isValid": true, + "sgv": 84, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:19:54.421Z" + }, + { + "_id": "6294991b5989a90004f0c233", + "device": "AndroidAPS-DexcomG6", + "date": 1653905661000, + "dateString": "2022-05-30T10:14:21.000Z", + "isValid": true, + "sgv": 87, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:14:51.432Z" + }, + { + "_id": "629497ee5989a90004f0c230", + "device": "AndroidAPS-DexcomG6", + "date": 1653905362000, + "dateString": "2022-05-30T10:09:22.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:09:50.202Z" + }, + { + "_id": "629496c15989a90004f0c22d", + "device": "AndroidAPS-DexcomG6", + "date": 1653905061000, + "dateString": "2022-05-30T10:04:21.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T10:04:49.010Z" + }, + { + "_id": "629495ac5989a90004f0c22a", + "device": "AndroidAPS-DexcomG6", + "date": 1653904761000, + "dateString": "2022-05-30T09:59:21.000Z", + "isValid": true, + "sgv": 99, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T10:00:12.873Z" + }, + { + "_id": "629494665989a90004f0c228", + "device": "AndroidAPS-DexcomG6", + "date": 1653904461000, + "dateString": "2022-05-30T09:54:21.000Z", + "isValid": true, + "sgv": 102, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:54:46.582Z" + }, + { + "_id": "629493395989a90004f0c225", + "device": "AndroidAPS-DexcomG6", + "date": 1653904161000, + "dateString": "2022-05-30T09:49:21.000Z", + "isValid": true, + "sgv": 107, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:49:45.193Z" + }, + { + "_id": "6294920b5989a90004f0c223", + "device": "AndroidAPS-DexcomG6", + "date": 1653903861000, + "dateString": "2022-05-30T09:44:21.000Z", + "isValid": true, + "sgv": 112, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:44:43.997Z" + }, + { + "_id": "629490e476174b0004fbd22b", + "device": "AndroidAPS-DexcomG6", + "date": 1653903561000, + "dateString": "2022-05-30T09:39:21.000Z", + "isValid": true, + "sgv": 119, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:39:48.475Z" + }, + { + "_id": "62948fb776174b0004fbd229", + "device": "AndroidAPS-DexcomG6", + "date": 1653903261000, + "dateString": "2022-05-30T09:34:21.000Z", + "isValid": true, + "sgv": 125, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:34:47.315Z" + }, + { + "_id": "62948ebc76174b0004fbd227", + "device": "AndroidAPS-DexcomG6", + "date": 1653902961000, + "dateString": "2022-05-30T09:29:21.000Z", + "isValid": true, + "sgv": 131, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:30:36.089Z" + }, + { + "_id": "62948d5d76174b0004fbd225", + "device": "AndroidAPS-DexcomG6", + "date": 1653902661000, + "dateString": "2022-05-30T09:24:21.000Z", + "isValid": true, + "sgv": 138, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:24:45.006Z" + }, + { + "_id": "62948c4876174b0004fbd222", + "device": "AndroidAPS-DexcomG6", + "date": 1653902361000, + "dateString": "2022-05-30T09:19:21.000Z", + "isValid": true, + "sgv": 146, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:20:08.645Z" + }, + { + "_id": "62948b0276174b0004fbd21f", + "device": "AndroidAPS-DexcomG6", + "date": 1653902061000, + "dateString": "2022-05-30T09:14:21.000Z", + "isValid": true, + "sgv": 156, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:14:42.378Z" + }, + { + "_id": "62948a0776174b0004fbd21d", + "device": "AndroidAPS-DexcomG6", + "date": 1653901761000, + "dateString": "2022-05-30T09:09:21.000Z", + "isValid": true, + "sgv": 166, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:10:31.409Z" + }, + { + "_id": "629488b58ecbb3000401e2de", + "device": "AndroidAPS-DexcomG6", + "date": 1653901461000, + "dateString": "2022-05-30T09:04:21.000Z", + "isValid": true, + "sgv": 175, + "direction": "FortyFiveDown", + "type": "sgv", + "created_at": "2022-05-30T09:04:53.220Z" + }, + { + "_id": "629487878ecbb3000401e2dc", + "device": "AndroidAPS-DexcomG6", + "date": 1653901161000, + "dateString": "2022-05-30T08:59:21.000Z", + "isValid": true, + "sgv": 183, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:59:51.963Z" + }, + { + "_id": "6294865a8ecbb3000401e2da", + "device": "AndroidAPS-DexcomG6", + "date": 1653900861000, + "dateString": "2022-05-30T08:54:21.000Z", + "isValid": true, + "sgv": 189, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:54:50.449Z" + }, + { + "_id": "6294852d8ecbb3000401e2d7", + "device": "AndroidAPS-DexcomG6", + "date": 1653900561000, + "dateString": "2022-05-30T08:49:21.000Z", + "isValid": true, + "sgv": 193, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:49:49.550Z" + }, + { + "_id": "629484008ecbb3000401e2d3", + "device": "AndroidAPS-DexcomG6", + "date": 1653900261000, + "dateString": "2022-05-30T08:44:21.000Z", + "isValid": true, + "sgv": 195, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:44:48.348Z" + }, + { + "_id": "629482d28ecbb3000401e2d0", + "device": "AndroidAPS-DexcomG6", + "date": 1653899961000, + "dateString": "2022-05-30T08:39:21.000Z", + "isValid": true, + "sgv": 197, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:39:46.821Z" + }, + { + "_id": "629481a58ecbb3000401e2cd", + "device": "AndroidAPS-DexcomG6", + "date": 1653899661000, + "dateString": "2022-05-30T08:34:21.000Z", + "isValid": true, + "sgv": 199, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:34:45.627Z" + }, + { + "_id": "62948083d10aeb0004cd3ff4", + "device": "AndroidAPS-DexcomG6", + "date": 1653899361000, + "dateString": "2022-05-30T08:29:21.000Z", + "isValid": true, + "sgv": 202, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:29:55.869Z" + }, + { + "_id": "62947f56d10aeb0004cd3ff0", + "device": "AndroidAPS-DexcomG6", + "date": 1653899062000, + "dateString": "2022-05-30T08:24:22.000Z", + "isValid": true, + "sgv": 205, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:24:54.980Z" + }, + { + "_id": "62947e29d10aeb0004cd3fed", + "device": "AndroidAPS-DexcomG6", + "date": 1653898761000, + "dateString": "2022-05-30T08:19:21.000Z", + "isValid": true, + "sgv": 206, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:19:53.852Z" + }, + { + "_id": "62947cfcd10aeb0004cd3feb", + "device": "AndroidAPS-DexcomG6", + "date": 1653898461000, + "dateString": "2022-05-30T08:14:21.000Z", + "isValid": true, + "sgv": 207, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:14:52.631Z" + }, + { + "_id": "62947bcfd10aeb0004cd3fe9", + "device": "AndroidAPS-DexcomG6", + "date": 1653898161000, + "dateString": "2022-05-30T08:09:21.000Z", + "isValid": true, + "sgv": 209, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:09:51.204Z" + }, + { + "_id": "62947aa2d10aeb0004cd3fe7", + "device": "AndroidAPS-DexcomG6", + "date": 1653897861000, + "dateString": "2022-05-30T08:04:21.000Z", + "isValid": true, + "sgv": 213, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T08:04:50.320Z" + }, + { + "_id": "62947975d10aeb0004cd3fe5", + "device": "AndroidAPS-DexcomG6", + "date": 1653897561000, + "dateString": "2022-05-30T07:59:21.000Z", + "isValid": true, + "sgv": 217, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:59:49.147Z" + }, + { + "_id": "629478477e1237000471bf4e", + "device": "AndroidAPS-DexcomG6", + "date": 1653897262000, + "dateString": "2022-05-30T07:54:22.000Z", + "isValid": true, + "sgv": 219, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:54:47.898Z" + }, + { + "_id": "6294771a7e1237000471bf4c", + "device": "AndroidAPS-DexcomG6", + "date": 1653896961000, + "dateString": "2022-05-30T07:49:21.000Z", + "isValid": true, + "sgv": 219, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:49:46.684Z" + }, + { + "_id": "629475ed7e1237000471bf4a", + "device": "AndroidAPS-DexcomG6", + "date": 1653896662000, + "dateString": "2022-05-30T07:44:22.000Z", + "isValid": true, + "sgv": 218, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:44:45.778Z" + }, + { + "_id": "629474c07e1237000471bf48", + "device": "AndroidAPS-DexcomG6", + "date": 1653896361000, + "dateString": "2022-05-30T07:39:21.000Z", + "isValid": true, + "sgv": 217, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:39:44.449Z" + }, + { + "_id": "629473927e1237000471bf46", + "device": "AndroidAPS-DexcomG6", + "date": 1653896061000, + "dateString": "2022-05-30T07:34:21.000Z", + "isValid": true, + "sgv": 213, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:34:42.398Z" + }, + { + "_id": "629472647e1237000471bf44", + "device": "AndroidAPS-DexcomG6", + "date": 1653895761000, + "dateString": "2022-05-30T07:29:21.000Z", + "isValid": true, + "sgv": 208, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:29:40.917Z" + }, + { + "_id": "629471377e1237000471bf42", + "device": "AndroidAPS-DexcomG6", + "date": 1653895461000, + "dateString": "2022-05-30T07:24:21.000Z", + "isValid": true, + "sgv": 204, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:24:39.113Z" + }, + { + "_id": "6294700d6e1b8e0004363e09", + "device": "AndroidAPS-DexcomG6", + "date": 1653895162000, + "dateString": "2022-05-30T07:19:22.000Z", + "isValid": true, + "sgv": 202, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:19:41.498Z" + }, + { + "_id": "62946ee06e1b8e0004363e07", + "device": "AndroidAPS-DexcomG6", + "date": 1653894861000, + "dateString": "2022-05-30T07:14:21.000Z", + "isValid": true, + "sgv": 201, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:14:40.201Z" + }, + { + "_id": "62946db36e1b8e0004363e05", + "device": "AndroidAPS-DexcomG6", + "date": 1653894562000, + "dateString": "2022-05-30T07:09:22.000Z", + "isValid": true, + "sgv": 202, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:09:39.329Z" + }, + { + "_id": "62946c9e6e1b8e0004363e03", + "device": "AndroidAPS-DexcomG6", + "date": 1653894260000, + "dateString": "2022-05-30T07:04:20.000Z", + "isValid": true, + "sgv": 203, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T07:05:02.549Z" + }, + { + "_id": "62946b8a6e1b8e0004363e01", + "device": "AndroidAPS-DexcomG6", + "date": 1653893961000, + "dateString": "2022-05-30T06:59:21.000Z", + "isValid": true, + "sgv": 203, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T07:00:26.210Z" + }, + { + "_id": "62946a5e6e1b8e0004363dfe", + "device": "AndroidAPS-DexcomG6", + "date": 1653893661000, + "dateString": "2022-05-30T06:54:21.000Z", + "isValid": true, + "sgv": 201, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T06:55:26.117Z" + }, + { + "_id": "629469166e1b8e0004363dfc", + "device": "AndroidAPS-DexcomG6", + "date": 1653893361000, + "dateString": "2022-05-30T06:49:21.000Z", + "isValid": true, + "sgv": 198, + "direction": "SingleUp", + "type": "sgv", + "created_at": "2022-05-30T06:49:58.419Z" + }, + { + "_id": "629467e1b82b320004ef5ed5", + "device": "AndroidAPS-DexcomG6", + "date": 1653893061000, + "dateString": "2022-05-30T06:44:21.000Z", + "isValid": true, + "sgv": 193, + "direction": "SingleUp", + "type": "sgv", + "created_at": "2022-05-30T06:44:49.181Z" + }, + { + "_id": "629466b3b82b320004ef5ed3", + "device": "AndroidAPS-DexcomG6", + "date": 1653892761000, + "dateString": "2022-05-30T06:39:21.000Z", + "isValid": true, + "sgv": 185, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T06:39:47.469Z" + }, + { + "_id": "62946586b82b320004ef5ed1", + "device": "AndroidAPS-DexcomG6", + "date": 1653892461000, + "dateString": "2022-05-30T06:34:21.000Z", + "isValid": true, + "sgv": 173, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T06:34:46.169Z" + }, + { + "_id": "62946458b82b320004ef5ecf", + "device": "AndroidAPS-DexcomG6", + "date": 1653892161000, + "dateString": "2022-05-30T06:29:21.000Z", + "isValid": true, + "sgv": 157, + "direction": "DoubleUp", + "type": "sgv", + "created_at": "2022-05-30T06:29:44.223Z" + }, + { + "_id": "6294632ab82b320004ef5ecc", + "device": "AndroidAPS-DexcomG6", + "date": 1653891861000, + "dateString": "2022-05-30T06:24:21.000Z", + "isValid": true, + "sgv": 137, + "direction": "SingleUp", + "type": "sgv", + "created_at": "2022-05-30T06:24:42.093Z" + }, + { + "_id": "62946214b82b320004ef5ec6", + "device": "AndroidAPS-DexcomG6", + "date": 1653891561000, + "dateString": "2022-05-30T06:19:21.000Z", + "isValid": true, + "sgv": 118, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T06:20:04.840Z" + }, + { + "_id": "629460cdb82b320004ef5ec4", + "device": "AndroidAPS-DexcomG6", + "date": 1653891261000, + "dateString": "2022-05-30T06:14:21.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T06:14:37.040Z" + }, + { + "_id": "62945faad2cadd0004350d89", + "device": "AndroidAPS-DexcomG6", + "date": 1653890961000, + "dateString": "2022-05-30T06:09:21.000Z", + "isValid": true, + "sgv": 92, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T06:09:46.664Z" + }, + { + "_id": "62945e7cd2cadd0004350d86", + "device": "AndroidAPS-DexcomG6", + "date": 1653890661000, + "dateString": "2022-05-30T06:04:21.000Z", + "isValid": true, + "sgv": 89, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T06:04:44.141Z" + }, + { + "_id": "62945d4dd2cadd0004350d83", + "device": "AndroidAPS-DexcomG6", + "date": 1653890361000, + "dateString": "2022-05-30T05:59:21.000Z", + "isValid": true, + "sgv": 90, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:59:41.863Z" + }, + { + "_id": "62945c38d2cadd0004350d80", + "device": "AndroidAPS-DexcomG6", + "date": 1653890061000, + "dateString": "2022-05-30T05:54:21.000Z", + "isValid": true, + "sgv": 92, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:55:04.735Z" + }, + { + "_id": "62945b0bd2cadd0004350d7d", + "device": "AndroidAPS-DexcomG6", + "date": 1653889761000, + "dateString": "2022-05-30T05:49:21.000Z", + "isValid": true, + "sgv": 94, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:50:03.127Z" + }, + { + "_id": "629459ddd2cadd0004350d7a", + "device": "AndroidAPS-DexcomG6", + "date": 1653889461000, + "dateString": "2022-05-30T05:44:21.000Z", + "isValid": true, + "sgv": 96, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:45:01.449Z" + }, + { + "_id": "629458b0d2cadd0004350d76", + "device": "AndroidAPS-DexcomG6", + "date": 1653889161000, + "dateString": "2022-05-30T05:39:21.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:40:00.401Z" + }, + { + "_id": "6294577513be4d00048f99e3", + "device": "AndroidAPS-DexcomG6", + "date": 1653888862000, + "dateString": "2022-05-30T05:34:22.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:34:45.547Z" + }, + { + "_id": "6294564813be4d00048f99e0", + "device": "AndroidAPS-DexcomG6", + "date": 1653888561000, + "dateString": "2022-05-30T05:29:21.000Z", + "isValid": true, + "sgv": 101, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:29:44.188Z" + }, + { + "_id": "6294551a13be4d00048f99dd", + "device": "AndroidAPS-DexcomG6", + "date": 1653888261000, + "dateString": "2022-05-30T05:24:21.000Z", + "isValid": true, + "sgv": 100, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:24:42.074Z" + }, + { + "_id": "6294540513be4d00048f99d9", + "device": "AndroidAPS-DexcomG6", + "date": 1653887961000, + "dateString": "2022-05-30T05:19:21.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:20:05.981Z" + }, + { + "_id": "629452bf13be4d00048f99d7", + "device": "AndroidAPS-DexcomG6", + "date": 1653887661000, + "dateString": "2022-05-30T05:14:21.000Z", + "isValid": true, + "sgv": 98, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:14:39.295Z" + }, + { + "_id": "629451ab13be4d00048f99d4", + "device": "AndroidAPS-DexcomG6", + "date": 1653887361000, + "dateString": "2022-05-30T05:09:21.000Z", + "isValid": true, + "sgv": 99, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:10:03.174Z" + }, + { + "_id": "6294506dc0f24700048ea5f8", + "device": "AndroidAPS-DexcomG6", + "date": 1653887061000, + "dateString": "2022-05-30T05:04:21.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T05:04:45.582Z" + }, + { + "_id": "62944f3fc0f24700048ea5f6", + "device": "AndroidAPS-DexcomG6", + "date": 1653886761000, + "dateString": "2022-05-30T04:59:21.000Z", + "isValid": true, + "sgv": 105, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:59:43.617Z" + }, + { + "_id": "62944e11c0f24700048ea5f3", + "device": "AndroidAPS-DexcomG6", + "date": 1653886461000, + "dateString": "2022-05-30T04:54:21.000Z", + "isValid": true, + "sgv": 108, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:54:41.186Z" + }, + { + "_id": "62944ce3c0f24700048ea5f1", + "device": "AndroidAPS-DexcomG6", + "date": 1653886161000, + "dateString": "2022-05-30T04:49:21.000Z", + "isValid": true, + "sgv": 110, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:49:39.435Z" + }, + { + "_id": "62944bb6c0f24700048ea5ee", + "device": "AndroidAPS-DexcomG6", + "date": 1653885861000, + "dateString": "2022-05-30T04:44:21.000Z", + "isValid": true, + "sgv": 112, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:44:38.372Z" + }, + { + "_id": "62944aa1c0f24700048ea5e9", + "device": "AndroidAPS-DexcomG6", + "date": 1653885561000, + "dateString": "2022-05-30T04:39:21.000Z", + "isValid": true, + "sgv": 112, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:40:01.830Z" + }, + { + "_id": "62944973c0f24700048ea5e7", + "device": "AndroidAPS-DexcomG6", + "date": 1653885261000, + "dateString": "2022-05-30T04:34:21.000Z", + "isValid": true, + "sgv": 112, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:34:59.937Z" + }, + { + "_id": "62944846c0f24700048ea5e4", + "device": "AndroidAPS-DexcomG6", + "date": 1653884961000, + "dateString": "2022-05-30T04:29:21.000Z", + "isValid": true, + "sgv": 112, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:29:58.536Z" + }, + { + "_id": "6294470ac319020004344fc1", + "device": "AndroidAPS-DexcomG6", + "date": 1653884661000, + "dateString": "2022-05-30T04:24:21.000Z", + "isValid": true, + "sgv": 114, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:24:42.523Z" + }, + { + "_id": "629445f6c319020004344fbe", + "device": "AndroidAPS-DexcomG6", + "date": 1653884361000, + "dateString": "2022-05-30T04:19:21.000Z", + "isValid": true, + "sgv": 115, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:20:06.094Z" + }, + { + "_id": "629444afc319020004344fba", + "device": "AndroidAPS-DexcomG6", + "date": 1653884061000, + "dateString": "2022-05-30T04:14:21.000Z", + "isValid": true, + "sgv": 114, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:14:39.235Z" + }, + { + "_id": "6294439ac319020004344fb7", + "device": "AndroidAPS-DexcomG6", + "date": 1653883761000, + "dateString": "2022-05-30T04:09:21.000Z", + "isValid": true, + "sgv": 115, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:10:02.526Z" + }, + { + "_id": "6294426dc319020004344fb4", + "device": "AndroidAPS-DexcomG6", + "date": 1653883461000, + "dateString": "2022-05-30T04:04:21.000Z", + "isValid": true, + "sgv": 116, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T04:05:01.284Z" + }, + { + "_id": "6294413fc319020004344fb0", + "device": "AndroidAPS-DexcomG6", + "date": 1653883161000, + "dateString": "2022-05-30T03:59:21.000Z", + "isValid": true, + "sgv": 119, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T03:59:59.474Z" + }, + { + "_id": "6294400aa743da00044e28eb", + "device": "AndroidAPS-DexcomG6", + "date": 1653882861000, + "dateString": "2022-05-30T03:54:21.000Z", + "isValid": true, + "sgv": 121, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T03:54:50.162Z" + }, + { + "_id": "62943edca743da00044e28e9", + "device": "AndroidAPS-DexcomG6", + "date": 1653882561000, + "dateString": "2022-05-30T03:49:21.000Z", + "isValid": true, + "sgv": 124, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T03:49:48.266Z" + }, + { + "_id": "62943daea743da00044e28e7", + "device": "AndroidAPS-DexcomG6", + "date": 1653882261000, + "dateString": "2022-05-30T03:44:21.000Z", + "isValid": true, + "sgv": 126, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T03:44:46.579Z" + }, + { + "_id": "62943c81a743da00044e28e5", + "device": "AndroidAPS-DexcomG6", + "date": 1653881961000, + "dateString": "2022-05-30T03:39:21.000Z", + "isValid": true, + "sgv": 128, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T03:39:45.390Z" + }, + { + "_id": "62943b53a743da00044e28e2", + "device": "AndroidAPS-DexcomG6", + "date": 1653881661000, + "dateString": "2022-05-30T03:34:21.000Z", + "isValid": true, + "sgv": 131, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T03:34:43.850Z" + }, + { + "_id": "62943a26a743da00044e28de", + "device": "AndroidAPS-DexcomG6", + "date": 1653881361000, + "dateString": "2022-05-30T03:29:21.000Z", + "isValid": true, + "sgv": 131, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T03:29:42.328Z" + }, + { + "_id": "629438f8a743da00044e28dc", + "device": "AndroidAPS-DexcomG6", + "date": 1653881062000, + "dateString": "2022-05-30T03:24:22.000Z", + "isValid": true, + "sgv": 131, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T03:24:40.834Z" + }, + { + "_id": "629437dfa365640004d83cc9", + "device": "AndroidAPS-DexcomG6", + "date": 1653880761000, + "dateString": "2022-05-30T03:19:21.000Z", + "isValid": true, + "sgv": 128, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T03:19:59.695Z" + }, + { + "_id": "629436b0a365640004d83cc5", + "device": "AndroidAPS-DexcomG6", + "date": 1653880461000, + "dateString": "2022-05-30T03:14:21.000Z", + "isValid": true, + "sgv": 125, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T03:14:56.027Z" + }, + { + "_id": "62943582a365640004d83cc3", + "device": "AndroidAPS-DexcomG6", + "date": 1653880161000, + "dateString": "2022-05-30T03:09:21.000Z", + "isValid": true, + "sgv": 119, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T03:09:54.494Z" + }, + { + "_id": "62943454a365640004d83cc0", + "device": "AndroidAPS-DexcomG6", + "date": 1653879861000, + "dateString": "2022-05-30T03:04:21.000Z", + "isValid": true, + "sgv": 114, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T03:04:52.790Z" + }, + { + "_id": "62943327a365640004d83cbe", + "device": "AndroidAPS-DexcomG6", + "date": 1653879561000, + "dateString": "2022-05-30T02:59:21.000Z", + "isValid": true, + "sgv": 108, + "direction": "FortyFiveUp", + "type": "sgv", + "created_at": "2022-05-30T02:59:51.442Z" + }, + { + "_id": "629431f9a365640004d83cb9", + "device": "AndroidAPS-DexcomG6", + "date": 1653879261000, + "dateString": "2022-05-30T02:54:21.000Z", + "isValid": true, + "sgv": 102, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:54:49.321Z" + }, + { + "_id": "629430c1ee9e6e00046d7ff7", + "device": "AndroidAPS-DexcomG6", + "date": 1653878961000, + "dateString": "2022-05-30T02:49:21.000Z", + "isValid": true, + "sgv": 96, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:49:37.117Z" + }, + { + "_id": "62942facee9e6e00046d7ff2", + "device": "AndroidAPS-DexcomG6", + "date": 1653878661000, + "dateString": "2022-05-30T02:44:21.000Z", + "isValid": true, + "sgv": 91, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:45:00.369Z" + }, + { + "_id": "62942e7fee9e6e00046d7fef", + "device": "AndroidAPS-DexcomG6", + "date": 1653878361000, + "dateString": "2022-05-30T02:39:21.000Z", + "isValid": true, + "sgv": 86, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:39:59.070Z" + }, + { + "_id": "62942d51ee9e6e00046d7fec", + "device": "AndroidAPS-DexcomG6", + "date": 1653878061000, + "dateString": "2022-05-30T02:34:21.000Z", + "isValid": true, + "sgv": 82, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:34:57.498Z" + }, + { + "_id": "62942c24ee9e6e00046d7fea", + "device": "AndroidAPS-DexcomG6", + "date": 1653877761000, + "dateString": "2022-05-30T02:29:21.000Z", + "isValid": true, + "sgv": 78, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:29:56.392Z" + }, + { + "_id": "62942af6ee9e6e00046d7fe8", + "device": "AndroidAPS-DexcomG6", + "date": 1653877461000, + "dateString": "2022-05-30T02:24:21.000Z", + "isValid": true, + "sgv": 76, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:24:54.787Z" + }, + { + "_id": "629429caee9e6e00046d7fe6", + "device": "AndroidAPS-DexcomG6", + "date": 1653877161000, + "dateString": "2022-05-30T02:19:21.000Z", + "isValid": true, + "sgv": 75, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:19:54.580Z" + }, + { + "_id": "6294289bee9e6e00046d7fe4", + "device": "AndroidAPS-DexcomG6", + "date": 1653876861000, + "dateString": "2022-05-30T02:14:21.000Z", + "isValid": true, + "sgv": 74, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:14:51.815Z" + }, + { + "_id": "6294276aa90f7f00040c0d4f", + "device": "AndroidAPS-DexcomG6", + "date": 1653876561000, + "dateString": "2022-05-30T02:09:21.000Z", + "isValid": true, + "sgv": 71, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:09:46.033Z" + }, + { + "_id": "6294263ca90f7f00040c0d4b", + "device": "AndroidAPS-DexcomG6", + "date": 1653876261000, + "dateString": "2022-05-30T02:04:21.000Z", + "isValid": true, + "sgv": 67, + "direction": "Flat", + "type": "sgv", + "created_at": "2022-05-30T02:04:44.630Z" + } +] diff --git a/app/src/test/res/autotune/test4/ns-treatments.2022-05-30.json b/app/src/test/res/autotune/test4/ns-treatments.2022-05-30.json new file mode 100644 index 0000000000..ac55f897b2 --- /dev/null +++ b/app/src/test/res/autotune/test4/ns-treatments.2022-05-30.json @@ -0,0 +1,7512 @@ +[ + { + "_id": "62963a9affe824000451d511", + "created_at": "2022-05-31T15:55:45.525Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 314975, + "type": "NORMAL", + "rate": 1.1144, + "percent": 40, + "pumpId": 458546, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458549, + "carbs": null, + "insulin": null + }, + { + "_id": "6296396dffe824000451d50d", + "created_at": "2022-05-31T15:50:55.954Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 288078, + "type": "NORMAL", + "rate": 0.398, + "percent": -50, + "pumpId": 458543, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458545, + "carbs": null, + "insulin": null + }, + { + "_id": "62963847ed7ec900040113c5", + "created_at": "2022-05-31T15:45:57.641Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 296825, + "type": "NORMAL", + "rate": 0.8756, + "percent": 10, + "pumpId": 458540, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458542, + "carbs": null, + "insulin": null + }, + { + "_id": "629635eced7ec900040113c0", + "created_at": "2022-05-31T15:35:54.821Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 601330, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458537, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458539, + "carbs": null, + "insulin": null + }, + { + "_id": "629634bfed7ec900040113bd", + "created_at": "2022-05-31T15:30:57.455Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 295873, + "type": "NORMAL", + "rate": 0.7164, + "percent": -10, + "pumpId": 458534, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458536, + "carbs": null, + "insulin": null + }, + { + "_id": "62963391ed7ec900040113ba", + "created_at": "2022-05-31T15:26:05.836Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 290166, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458531, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458533, + "carbs": null, + "insulin": null + }, + { + "_id": "62963264ed7ec900040113b7", + "created_at": "2022-05-31T15:20:49.875Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 314466, + "type": "NORMAL", + "rate": 0.5572, + "percent": -30, + "pumpId": 458528, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458530, + "carbs": null, + "insulin": null + }, + { + "_id": "62963150ed7ec900040113b4", + "created_at": "2022-05-31T15:16:16.934Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 271450, + "type": "NORMAL", + "rate": 1.1144, + "percent": 40, + "pumpId": 458525, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458527, + "carbs": null, + "insulin": null + }, + { + "_id": "62962dbc7ae53f0004811958", + "created_at": "2022-05-31T15:00:52.574Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 921872, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458521, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458524, + "carbs": null, + "insulin": null + }, + { + "_id": "62962ca87ae53f0004811955", + "created_at": "2022-05-31T14:56:17.286Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 273797, + "type": "NORMAL", + "rate": 0.2298, + "percent": -70, + "pumpId": 458517, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458520, + "carbs": null, + "insulin": null + }, + { + "_id": "62962b617ae53f0004811950", + "eventType": "Correction Bolus", + "insulin": 0.56, + "created_at": "2022-05-31T14:51:06.048Z", + "date": 1654008666048, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22053, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62962b627ae53f0004811951", + "created_at": "2022-05-31T14:51:04.151Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303998, + "type": "FAKE_EXTENDED", + "rate": 2.1870619806709257, + "absolute": 2.1870619806709257, + "pumpId": 22052, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-31T14:51:04.151Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 5, + "durationInMilliseconds": 303998, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.12, + "relative": 1.4210619806709255, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 22052, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "629627c9782bd30004aefa36", + "created_at": "2022-05-31T14:35:43.988Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 315953, + "type": "NORMAL", + "rate": 1.149, + "percent": 50, + "pumpId": 458505, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458507, + "carbs": null, + "insulin": null + }, + { + "_id": "629626b3782bd30004aefa33", + "created_at": "2022-05-31T14:31:05.848Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 274656, + "type": "NORMAL", + "rate": 0.8426, + "percent": 10, + "pumpId": 458502, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458504, + "carbs": null, + "insulin": null + }, + { + "_id": "62962457782bd30004aefa2e", + "created_at": "2022-05-31T14:21:07.305Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 597048, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458499, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458501, + "carbs": null, + "insulin": null + }, + { + "_id": "6296232a782bd30004aefa2b", + "created_at": "2022-05-31T14:16:02.177Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303634, + "type": "NORMAL", + "rate": 0.0766, + "percent": -90, + "pumpId": 458496, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458498, + "carbs": null, + "insulin": null + }, + { + "_id": "629621fd782bd30004aefa28", + "created_at": "2022-05-31T14:11:06.835Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 292851, + "type": "NORMAL", + "rate": 0.1532, + "percent": -80, + "pumpId": 458493, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458495, + "carbs": null, + "insulin": null + }, + { + "_id": "629620cf782bd30004aefa23", + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-31T14:05:54.808Z", + "date": 1654005954808, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22051, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629620d0782bd30004aefa25", + "created_at": "2022-05-31T14:05:52.184Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 313165, + "type": "NORMAL", + "rate": 1.6852, + "percent": 120, + "pumpId": 458488, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458492, + "carbs": null, + "insulin": null + }, + { + "_id": "62961e7571108b0004a2c2b1", + "created_at": "2022-05-31T13:55:43.116Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 606574, + "type": "NORMAL", + "rate": 0.0785, + "percent": -90, + "pumpId": 458484, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458487, + "carbs": null, + "insulin": null + }, + { + "_id": "62961aec71108b0004a2c2aa", + "created_at": "2022-05-31T13:40:48.851Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 891771, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458481, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458483, + "carbs": null, + "insulin": null + }, + { + "_id": "629619d771108b0004a2c2a7", + "created_at": "2022-05-31T13:36:03.349Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 284007, + "type": "NORMAL", + "rate": 0.47100000000000003, + "percent": -40, + "pumpId": 458478, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458480, + "carbs": null, + "insulin": null + }, + { + "_id": "629618aa71108b0004a2c2a2", + "eventType": "Correction Bolus", + "insulin": 0.7, + "created_at": "2022-05-31T13:31:19.636Z", + "date": 1654003879636, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22050, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629618aa71108b0004a2c2a3", + "created_at": "2022-05-31T13:31:17.510Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 277000, + "type": "FAKE_EXTENDED", + "rate": 2.6044945848375454, + "absolute": 2.6044945848375454, + "pumpId": 22049, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-31T13:31:17.510Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 4, + "durationInMilliseconds": 277000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.14, + "relative": 1.8194945848375452, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 22049, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "6296176aec644a0004f646cb", + "created_at": "2022-05-31T13:25:57.102Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 309193, + "type": "NORMAL", + "rate": 0.7065, + "percent": -10, + "pumpId": 458466, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458468, + "carbs": null, + "insulin": null + }, + { + "_id": "6296163cec644a0004f646c8", + "created_at": "2022-05-31T13:20:50.571Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304039, + "type": "NORMAL", + "rate": 0.23550000000000001, + "percent": -70, + "pumpId": 458463, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458465, + "carbs": null, + "insulin": null + }, + { + "_id": "6296150fec644a0004f646c5", + "created_at": "2022-05-31T13:15:52.525Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 296557, + "type": "NORMAL", + "rate": 0.314, + "percent": -60, + "pumpId": 458460, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458462, + "carbs": null, + "insulin": null + }, + { + "_id": "629613e2ec644a0004f646c0", + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-31T13:10:42.660Z", + "date": 1654002642660, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22048, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629613e2ec644a0004f646c2", + "created_at": "2022-05-31T13:10:40.813Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 310221, + "type": "NORMAL", + "rate": 1.1775, + "percent": 50, + "pumpId": 458455, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458459, + "carbs": null, + "insulin": null + }, + { + "_id": "629612b5ec644a0004f646be", + "created_at": "2022-05-31T13:05:40.990Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 298326, + "type": "NORMAL", + "rate": 1.727, + "percent": 120, + "pumpId": 458452, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458454, + "carbs": null, + "insulin": null + }, + { + "_id": "62961187ec644a0004f646b9", + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-31T13:00:49.822Z", + "date": 1654002049822, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22047, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62961188ec644a0004f646bb", + "created_at": "2022-05-31T13:00:47.826Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289674, + "type": "NORMAL", + "rate": 1.256, + "percent": 60, + "pumpId": 458447, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458451, + "carbs": null, + "insulin": null + }, + { + "_id": "6296105aec644a0004f646b7", + "created_at": "2022-05-31T12:55:41.225Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 305119, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458444, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458446, + "carbs": null, + "insulin": null + }, + { + "_id": "62960f36ec644a0004f646b4", + "created_at": "2022-05-31T12:50:59.948Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 278782, + "type": "NORMAL", + "rate": 0.5495, + "percent": -30, + "pumpId": 458441, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458443, + "carbs": null, + "insulin": null + }, + { + "_id": "62960e3bec644a0004f646b0", + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-31T12:46:28.352Z", + "date": 1654001188352, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22046, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62960e3bec644a0004f646b1", + "created_at": "2022-05-31T12:46:25.161Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 272298, + "type": "NORMAL", + "rate": 1.727, + "percent": 120, + "pumpId": 458436, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458440, + "carbs": null, + "insulin": null + }, + { + "_id": "62960cdcec644a0004f646ad", + "created_at": "2022-05-31T12:40:49.763Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 332910, + "type": "NORMAL", + "rate": 0.47100000000000003, + "percent": -40, + "pumpId": 458433, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458435, + "carbs": null, + "insulin": null + }, + { + "_id": "62960be0ec644a0004f646a8", + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-31T12:36:14.179Z", + "date": 1654000574179, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22045, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62960be1ec644a0004f646aa", + "created_at": "2022-05-31T12:36:11.223Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 277044, + "type": "NORMAL", + "rate": 1.8840000000000001, + "percent": 140, + "pumpId": 458428, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458432, + "carbs": null, + "insulin": null + }, + { + "_id": "62960a94966c80000421aa3b", + "created_at": "2022-05-31T12:31:08.722Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300011, + "type": "NORMAL", + "rate": 0.47100000000000003, + "percent": -40, + "pumpId": 458425, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458427, + "carbs": null, + "insulin": null + }, + { + "_id": "62960839966c80000421aa35", + "created_at": "2022-05-31T12:20:54.748Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 612487, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458422, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458424, + "carbs": null, + "insulin": null + }, + { + "_id": "6296070b966c80000421aa32", + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-31T12:16:09.374Z", + "date": 1653999369374, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22044, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629604b1966c80000421aa2e", + "created_at": "2022-05-31T12:05:58.926Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 597042, + "type": "NORMAL", + "rate": 1.099, + "percent": 40, + "pumpId": 458414, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458416, + "carbs": null, + "insulin": null + }, + { + "_id": "6295ffffa56c4d0004cb3049", + "eventType": "Correction Bolus", + "insulin": 0.26, + "created_at": "2022-05-31T11:45:55.935Z", + "date": 1653997555935, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22043, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295fda5a56c4d0004cb3044", + "eventType": "Correction Bolus", + "insulin": 0.3, + "created_at": "2022-05-31T11:35:54.935Z", + "date": 1653996954935, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22042, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295fb4aa56c4d0004cb3040", + "created_at": "2022-05-31T11:25:53.977Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 40, + "durationInMilliseconds": 2402460, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458406, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458413, + "carbs": null, + "insulin": null + }, + { + "_id": "6295f90bbf97420004aee32c", + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-31T11:16:21.275Z", + "date": 1653995781275, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22041, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295f697bf97420004aee327", + "eventType": "Correction Bolus", + "insulin": 0.5, + "created_at": "2022-05-31T11:05:41.260Z", + "date": 1653995141260, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22040, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295f328bf97420004aee321", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-31T10:51:00.280Z", + "date": 1653994260280, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22039, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295f1e4bf97420004aee31d", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T10:45:38.620Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "23g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6295f0b6bf97420004aee31a", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T10:40:30.473Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "22g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6295ef8d1d475d00043d0b6f", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T10:35:33.359Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "24g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6295ee781d475d00043d0b6c", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T10:31:01.436Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "24g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6295eaef1d475d00043d0b66", + "created_at": "2022-05-31T10:16:09.113Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 69, + "durationInMilliseconds": 4182376, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458396, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458405, + "carbs": null, + "insulin": null + }, + { + "_id": "6295ea571d475d00043d0b61", + "eventType": "Meal Bolus", + "insulin": 7.82, + "created_at": "2022-05-31T10:13:24.185Z", + "date": 1653992004185, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 22038, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295ea581d475d00043d0b62", + "eventType": "Bolus Wizard", + "created_at": "2022-05-31T10:13:20.467Z", + "isValid": true, + "bolusCalculatorResult": "{\"basalIOB\":0.889,\"bolusIOB\":-0.461,\"carbs\":50.0,\"carbsInsulin\":8.517881724303429,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1653992000540,\"glucoseDifference\":-14.0,\"glucoseInsulin\":-0.17423155747919142,\"glucoseTrend\":-2.22,\"glucoseValue\":76.0,\"ic\":5.870004024279742,\"id\":1584,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":80.3528373536581,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":90,\"profileName\":\"Working days\",\"superbolusInsulin\":0.0,\"targetBGHigh\":90.0,\"targetBGLow\":90.0,\"timestamp\":1653992000467,\"totalInsulin\":7.82,\"trendInsulin\":-0.08288444091510105,\"utcOffset\":7200000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":true,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}", + "date": 1653992000467, + "glucose": 76, + "units": "mg/dl", + "notes": "", + "carbs": null, + "insulin": null + }, + { + "_id": "6295ea711d475d00043d0b63", + "eventType": "Meal Bolus", + "carbs": 50, + "created_at": "2022-05-31T10:13:20.466Z", + "isValid": true, + "date": 1653992000466, + "insulin": null + }, + { + "_id": "6295e50d430fe80004dfa709", + "created_at": "2022-05-31T09:50:49.679Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1516949, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458390, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458395, + "carbs": null, + "insulin": null + }, + { + "_id": "6295e4f4430fe80004dfa706", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-31T09:50:20.858Z", + "timestamp": 1653990620858, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 110, + "targetTop": 110, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "6295e182430fe80004dfa700", + "created_at": "2022-05-31T09:35:51.419Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 896767, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458387, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458389, + "carbs": null, + "insulin": null + }, + { + "_id": "6295dbb4dc3ee20004e984bf", + "created_at": "2022-05-31T09:10:57.236Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1492691, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458384, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458386, + "carbs": null, + "insulin": null + }, + { + "_id": "6295dad2dc3ee20004e984bc", + "created_at": "2022-05-31T09:07:19.890Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 3, + "durationInMilliseconds": 214851, + "type": "NORMAL", + "rate": 0.4824, + "percent": -40, + "pumpId": 458381, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458383, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d957dc3ee20004e984b7", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-31T09:01:05.878Z", + "date": 1653987665878, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22037, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295d958dc3ee20004e984b9", + "created_at": "2022-05-31T09:01:03.881Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 6, + "durationInMilliseconds": 374522, + "type": "NORMAL", + "rate": 1.4472, + "percent": 80, + "pumpId": 458376, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458380, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d829dc3ee20004e984b5", + "created_at": "2022-05-31T08:55:52.338Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 310053, + "type": "NORMAL", + "rate": 0.1602, + "percent": -80, + "pumpId": 458372, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458375, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d6fbdc3ee20004e984b2", + "created_at": "2022-05-31T08:50:59.593Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 291248, + "type": "NORMAL", + "rate": 0.3204, + "percent": -60, + "pumpId": 458369, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458371, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d5e6dc3ee20004e984af", + "created_at": "2022-05-31T08:46:09.430Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 288668, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458366, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458368, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d4a917528a00041c16aa", + "created_at": "2022-05-31T08:41:04.984Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 302951, + "type": "NORMAL", + "rate": 0.4005, + "percent": -50, + "pumpId": 458362, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458365, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d39417528a00041c16a7", + "created_at": "2022-05-31T08:36:11.245Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 292243, + "type": "NORMAL", + "rate": 1.0413000000000001, + "percent": 30, + "pumpId": 458359, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458361, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d37b17528a00041c16a5", + "created_at": "2022-05-31T08:35:51.495Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 17254, + "type": "NORMAL", + "rate": 0.1602, + "percent": -80, + "pumpId": 458356, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458358, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d24d17528a00041c16a2", + "created_at": "2022-05-31T08:31:04.097Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285901, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458353, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458355, + "carbs": null, + "insulin": null + }, + { + "_id": "6295d11f17528a00041c169d", + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-31T08:25:49.866Z", + "date": 1653985549866, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22036, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295d11f17528a00041c169f", + "created_at": "2022-05-31T08:25:47.757Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 313849, + "type": "NORMAL", + "rate": 0.4005, + "percent": -50, + "pumpId": 458348, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458352, + "carbs": null, + "insulin": null + }, + { + "_id": "6295cc8310cb0b00043ae4d4", + "created_at": "2022-05-31T08:06:06.036Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1180230, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458345, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458347, + "carbs": null, + "insulin": null + }, + { + "_id": "6295cb8710cb0b00043ae4d1", + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-31T08:02:00.225Z", + "date": 1653984120225, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22035, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295cb8710cb0b00043ae4d0", + "created_at": "2022-05-31T08:01:56.099Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 247447, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458340, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458344, + "carbs": null, + "insulin": null + }, + { + "_id": "6295ca2710cb0b00043ae4cb", + "eventType": "Correction Bolus", + "insulin": 0.68, + "created_at": "2022-05-31T07:56:12.084Z", + "date": 1653983772084, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22034, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295ca2710cb0b00043ae4cc", + "created_at": "2022-05-31T07:56:09.536Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 337000, + "type": "FAKE_EXTENDED", + "rate": 3.580448071216617, + "absolute": 3.580448071216617, + "pumpId": 22033, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-31T07:56:09.536Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 5, + "durationInMilliseconds": 337000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.26, + "relative": 2.777448071216617, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 22033, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "6295c1e80030950004c0a3e0", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T07:20:47.689Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "10g de glucides requis dans 35 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6295c0ba0030950004c0a3de", + "created_at": "2022-05-31T07:16:05.967Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 39, + "durationInMilliseconds": 2392475, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458327, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458329, + "carbs": null, + "insulin": null + }, + { + "_id": "6295bf8c0030950004c0a3db", + "created_at": "2022-05-31T07:10:59.023Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304456, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458324, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458326, + "carbs": null, + "insulin": null + }, + { + "_id": "6295bc370030950004c0a3d2", + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-31T06:56:47.742Z", + "date": 1653980207742, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22032, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295baf00030950004c0a3d0", + "eventType": "Correction Bolus", + "insulin": 0.48, + "created_at": "2022-05-31T06:51:07.013Z", + "date": 1653979867013, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22031, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295b8a4469d4a0004784123", + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-31T06:41:23.663Z", + "date": 1653979283663, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22030, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295b8a4469d4a0004784125", + "created_at": "2022-05-31T06:41:19.552Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1776988, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458313, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458323, + "carbs": null, + "insulin": null + }, + { + "_id": "6295b776469d4a0004784121", + "created_at": "2022-05-31T06:36:23.889Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 294183, + "type": "NORMAL", + "rate": 1.1326, + "percent": 40, + "pumpId": 458310, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458312, + "carbs": null, + "insulin": null + }, + { + "_id": "6295adea469d4a000478410e", + "created_at": "2022-05-31T05:55:38.593Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 40, + "durationInMilliseconds": 2443824, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458306, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458309, + "carbs": null, + "insulin": null + }, + { + "_id": "6295ad85469d4a0004784109", + "eventType": "Meal Bolus", + "insulin": 13.82, + "created_at": "2022-05-31T05:53:55.558Z", + "date": 1653976435558, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 22029, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295ad9e469d4a000478410b", + "eventType": "Meal Bolus", + "carbs": 75, + "created_at": "2022-05-31T05:53:53.211Z", + "isValid": true, + "date": 1653976433211, + "insulin": null + }, + { + "_id": "6295ad85469d4a000478410a", + "eventType": "Bolus Wizard", + "created_at": "2022-05-31T05:53:53.211Z", + "isValid": true, + "bolusCalculatorResult": "{\"basalIOB\":0.615,\"bolusIOB\":-0.556,\"carbs\":75.0,\"carbsInsulin\":15.031555984064873,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1653976433240,\"glucoseDifference\":1.0,\"glucoseInsulin\":0.022144508190468416,\"glucoseTrend\":3.5,\"glucoseValue\":91.0,\"ic\":4.9895034206377815,\"id\":1582,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":45.15792319246117,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":90,\"profileName\":\"Working days\",\"superbolusInsulin\":0.0,\"targetBGHigh\":90.0,\"targetBGLow\":90.0,\"timestamp\":1653976433211,\"totalInsulin\":13.81,\"trendInsulin\":0.23251733599991836,\"utcOffset\":7200000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":true,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}", + "date": 1653976433211, + "glucose": 91, + "units": "mg/dl", + "notes": "", + "carbs": null, + "insulin": null + }, + { + "_id": "6295acd5469d4a0004784107", + "created_at": "2022-05-31T05:51:00.890Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 276213, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458301, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458305, + "carbs": null, + "insulin": null + }, + { + "_id": "6295aba5469d4a0004784104", + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-31T05:45:56.589Z", + "date": 1653975956589, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22028, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295a7d7acb47a00042f8141", + "created_at": "2022-05-31T05:29:47.906Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 845906, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458294, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458297, + "carbs": null, + "insulin": null + }, + { + "_id": "6295a7beacb47a00042f8140", + "created_at": "2022-05-31T05:29:32.829Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "OpenAPS Offline", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 900000, + "reason": "DISCONNECT_PUMP", + "carbs": null, + "insulin": null + }, + { + "_id": "6295a5c8acb47a00042f813d", + "created_at": "2022-05-31T05:21:06.825Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 8, + "durationInMilliseconds": 519594, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458291, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458293, + "carbs": null, + "insulin": null + }, + { + "_id": "6295a499acb47a00042f8138", + "eventType": "Correction Bolus", + "insulin": 0.3, + "created_at": "2022-05-31T05:16:04.834Z", + "date": 1653974164834, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22027, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295a49aacb47a00042f813a", + "created_at": "2022-05-31T05:16:02.752Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 302582, + "type": "NORMAL", + "rate": 2.02, + "percent": 150, + "pumpId": 458286, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458290, + "carbs": null, + "insulin": null + }, + { + "_id": "6295a36bacb47a00042f8135", + "created_at": "2022-05-31T05:10:53.912Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 307342, + "type": "NORMAL", + "rate": 1.0504, + "percent": 30, + "pumpId": 458283, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458285, + "carbs": null, + "insulin": null + }, + { + "_id": "62959fdd0e4cd30004fcc889", + "created_at": "2022-05-31T04:55:39.667Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 603463, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458276, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458279, + "carbs": null, + "insulin": null + }, + { + "_id": "62959fc40e4cd30004fcc886", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-31T04:55:12.975Z", + "timestamp": 1653972912975, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 110, + "targetTop": 110, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "62959eb00e4cd30004fcc884", + "created_at": "2022-05-31T04:50:34.517Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303656, + "type": "NORMAL", + "rate": 1.0444, + "percent": 40, + "pumpId": 458273, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458275, + "carbs": null, + "insulin": null + }, + { + "_id": "629597b88aa94000044912f6", + "created_at": "2022-05-31T04:20:53.275Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1779752, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458270, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458272, + "carbs": null, + "insulin": null + }, + { + "_id": "6295968b8aa94000044912f3", + "created_at": "2022-05-31T04:16:03.140Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 288645, + "type": "NORMAL", + "rate": 0.8952, + "percent": 20, + "pumpId": 458267, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458269, + "carbs": null, + "insulin": null + }, + { + "_id": "6295955e8aa94000044912f0", + "created_at": "2022-05-31T04:10:56.377Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304277, + "type": "NORMAL", + "rate": 1.119, + "percent": 50, + "pumpId": 458264, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458266, + "carbs": null, + "insulin": null + }, + { + "_id": "629590b0be37f70004b2bb5d", + "created_at": "2022-05-31T03:51:07.389Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1187499, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458260, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458263, + "carbs": null, + "insulin": null + }, + { + "_id": "6295907ebe37f70004b2bb5b", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-31T03:50:17.539Z", + "timestamp": 1653969017539, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 110, + "targetTop": 110, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "6295886eb8ec320004808360", + "created_at": "2022-05-31T03:15:50.289Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 35, + "durationInMilliseconds": 2114613, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458257, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458259, + "carbs": null, + "insulin": null + }, + { + "_id": "6295886eb8ec32000480835e", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T03:15:36.103Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "10g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629584e6b8ec320004808357", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T03:00:36.460Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "11g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629583b9b8ec320004808354", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T02:55:38.214Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "20g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629582a5b8ec320004808351", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-31T02:51:02.043Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "19g de glucides requis dans 5 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62958272b8ec320004808350", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-31T02:50:04.612Z", + "timestamp": 1653965404612, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 110, + "targetTop": 110, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "62958178b8ec32000480834e", + "created_at": "2022-05-31T02:45:51.272Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1797535, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458253, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458256, + "carbs": null, + "insulin": null + }, + { + "_id": "62958042fe83800004778c28", + "created_at": "2022-05-31T02:40:55.507Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293267, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458250, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458252, + "carbs": null, + "insulin": null + }, + { + "_id": "62957f15fe83800004778c25", + "eventType": "Correction Bolus", + "insulin": 0.46, + "created_at": "2022-05-31T02:35:55.492Z", + "date": 1653964555492, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22026, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62957cbbfe83800004778c1f", + "eventType": "Correction Bolus", + "insulin": 0.62, + "created_at": "2022-05-31T02:25:58.675Z", + "date": 1653963958675, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22025, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62957cbbfe83800004778c20", + "created_at": "2022-05-31T02:25:56.083Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 889000, + "type": "FAKE_EXTENDED", + "rate": 3.427676040494938, + "absolute": 3.427676040494938, + "pumpId": 22024, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-31T02:25:56.083Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 14, + "durationInMilliseconds": 889000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.64, + "relative": 2.591676040494938, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 22024, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "62957b8efe83800004778c1d", + "created_at": "2022-05-31T02:20:42.855Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 301088, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458236, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458238, + "carbs": null, + "insulin": null + }, + { + "_id": "62957a60fe83800004778c1a", + "created_at": "2022-05-31T02:15:53.083Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 288295, + "type": "NORMAL", + "rate": 0.6688, + "percent": -20, + "pumpId": 458233, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458235, + "carbs": null, + "insulin": null + }, + { + "_id": "6295782e9bc0370004b42b8b", + "created_at": "2022-05-31T02:06:38.366Z", + "enteredBy": "openaps://AndroidAPS", + "isValid": true, + "eventType": "Note", + "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Africa\\/Cairo\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":95.73479716801766},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":75.88879083401042},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":58.032604755419776},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":52.38319090325494},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":48.77055704785807},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":46.964240120159616},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":45.15792319246117},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":46.964240120159616},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":50.890130323983435},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":62.496651275067414},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":75.88879083401042},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":80.3528373536581},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":89.28093039295341},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":93.74497691260113},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":98.2090234322488},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":107.13711647154416},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":115.60428337270058}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":5.792007079189894},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":4.9895034206377815},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":5.870004024279742},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":4.9895034206377815}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":1.139},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":1.06},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":1.075},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":1.199},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":0.836},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":0.8270000000000001},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":0.746},{\"time\":\"07:00\",\"timeAsSeconds\":25200,\"value\":0.808},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":0.809},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.803},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":0.801},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":0.804},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":0.798},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.797},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":0.785},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":0.766},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":0.796},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":0.788},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":0.806},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":0.857},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":0.916},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":0.972},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":1.0230000000000001}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}]}", + "originalProfileName": "Working days", + "originalCustomizedName": "Working days", + "originalTimeshift": 0, + "originalPercentage": 100, + "originalDuration": 0, + "originalEnd": 1653962788607, + "notes": "Working days", + "carbs": null, + "insulin": null + }, + { + "_id": "6295782e9bc0370004b42b8a", + "timeshift": 0, + "percentage": 100, + "profile": "Working days", + "originalProfileName": "Working days", + "created_at": "2022-05-31T02:06:28.607Z", + "enteredBy": "openaps://AndroidAPS", + "isValid": true, + "eventType": "Profile Switch", + "duration": 0, + "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Africa\\/Cairo\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":95.73479716801766},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":75.88879083401042},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":58.032604755419776},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":52.38319090325494},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":48.77055704785807},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":46.964240120159616},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":45.15792319246117},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":46.964240120159616},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":50.890130323983435},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":62.496651275067414},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":75.88879083401042},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":80.3528373536581},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":89.28093039295341},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":93.74497691260113},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":98.2090234322488},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":107.13711647154416},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":115.60428337270058}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":5.792007079189894},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":4.9895034206377815},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":5.870004024279742},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":4.9895034206377815}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":1.139},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":1.06},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":1.075},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":1.199},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":0.836},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":0.8270000000000001},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":0.746},{\"time\":\"07:00\",\"timeAsSeconds\":25200,\"value\":0.808},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":0.809},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.803},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":0.801},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":0.804},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":0.798},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.797},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":0.785},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.785},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":0.766},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":0.796},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":0.788},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":0.806},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":0.857},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":0.916},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":0.972},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":1.0230000000000001}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}]}", + "carbs": null, + "insulin": null + }, + { + "_id": "629575bb9bc0370004b42b85", + "created_at": "2022-05-31T01:56:03.509Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1188082, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458227, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458232, + "carbs": null, + "insulin": null + }, + { + "_id": "6295748e9bc0370004b42b82", + "created_at": "2022-05-31T01:51:03.848Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 298169, + "type": "NORMAL", + "rate": 0.579, + "percent": -40, + "pumpId": 458224, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458226, + "carbs": null, + "insulin": null + }, + { + "_id": "629573609bc0370004b42b7f", + "created_at": "2022-05-31T01:46:01.471Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300881, + "type": "NORMAL", + "rate": 1.351, + "percent": 40, + "pumpId": 458221, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458223, + "carbs": null, + "insulin": null + }, + { + "_id": "629572339bc0370004b42b7c", + "created_at": "2022-05-31T01:40:45.409Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 314567, + "type": "NORMAL", + "rate": 1.0614999999999999, + "percent": 10, + "pumpId": 458218, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458220, + "carbs": null, + "insulin": null + }, + { + "_id": "629571069bc0370004b42b79", + "created_at": "2022-05-31T01:35:43.903Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300009, + "type": "NORMAL", + "rate": 2.316, + "percent": 140, + "pumpId": 458215, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458217, + "carbs": null, + "insulin": null + }, + { + "_id": "62956fdbe4f1e400046e05c8", + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-31T01:30:55.508Z", + "date": 1653960655508, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22023, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62956fdbe4f1e400046e05ca", + "created_at": "2022-05-31T01:30:52.670Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289736, + "type": "NORMAL", + "rate": 1.8335, + "percent": 90, + "pumpId": 458210, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458214, + "carbs": null, + "insulin": null + }, + { + "_id": "62956ec7e4f1e400046e05c6", + "created_at": "2022-05-31T01:26:04.315Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 286864, + "type": "NORMAL", + "rate": 0.193, + "percent": -80, + "pumpId": 458207, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458209, + "carbs": null, + "insulin": null + }, + { + "_id": "62956c53e4f1e400046e05c0", + "created_at": "2022-05-31T01:15:44.217Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 617639, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458203, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458206, + "carbs": null, + "insulin": null + }, + { + "_id": "62956b26e4f1e400046e05bd", + "created_at": "2022-05-31T01:10:56.345Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285374, + "type": "NORMAL", + "rate": 0.386, + "percent": -60, + "pumpId": 458199, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458202, + "carbs": null, + "insulin": null + }, + { + "_id": "629569f7e4f1e400046e05ba", + "created_at": "2022-05-31T01:05:44.958Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 308893, + "type": "NORMAL", + "rate": 0.4825, + "percent": -50, + "pumpId": 458196, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458198, + "carbs": null, + "insulin": null + }, + { + "_id": "629568e2e4f1e400046e05b6", + "eventType": "Correction Bolus", + "insulin": 0.18, + "created_at": "2022-05-31T01:01:03.804Z", + "date": 1653958863804, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22022, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629568e2e4f1e400046e05b7", + "created_at": "2022-05-31T01:01:01.983Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 281485, + "type": "NORMAL", + "rate": 1.7369999999999999, + "percent": 80, + "pumpId": 458191, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458195, + "carbs": null, + "insulin": null + }, + { + "_id": "62954fdd68a4bc00040c0170", + "eventType": "Pump Battery Change", + "isValid": true, + "created_at": "2022-05-30T23:02:36.459Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "62954fdc68a4bc00040c016f", + "eventType": "Note", + "isValid": true, + "created_at": "2022-05-30T23:01:55.446Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "Pompe démarrée", + "carbs": null, + "insulin": null + }, + { + "_id": "62954c34f89bc40004df9f64", + "eventType": "Sensor Change", + "isValid": true, + "created_at": "2022-05-30T22:58:37.000Z", + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "62954b81f89bc40004df9f61", + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-30T22:55:56.146Z", + "date": 1653951356146, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22021, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62954b82f89bc40004df9f63", + "created_at": "2022-05-30T22:55:53.216Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1741813, + "type": "NORMAL", + "rate": 1.3755000000000002, + "percent": 50, + "pumpId": 458172, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458186, + "carbs": null, + "insulin": null + }, + { + "_id": "62954a6df89bc40004df9f5f", + "created_at": "2022-05-30T22:51:08.489Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 282244, + "type": "NORMAL", + "rate": 0.2751, + "percent": -70, + "pumpId": 458169, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458171, + "carbs": null, + "insulin": null + }, + { + "_id": "6295493ff89bc40004df9f5c", + "created_at": "2022-05-30T22:46:09.519Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 297487, + "type": "NORMAL", + "rate": 0.4585, + "percent": -50, + "pumpId": 458166, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458168, + "carbs": null, + "insulin": null + }, + { + "_id": "629547f8f89bc40004df9f59", + "created_at": "2022-05-30T22:40:47.081Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 320949, + "type": "NORMAL", + "rate": 0.6419, + "percent": -30, + "pumpId": 458163, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458165, + "carbs": null, + "insulin": null + }, + { + "_id": "629546caf89bc40004df9f56", + "created_at": "2022-05-30T22:35:51.108Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 294484, + "type": "NORMAL", + "rate": 0.8253, + "percent": -10, + "pumpId": 458160, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458162, + "carbs": null, + "insulin": null + }, + { + "_id": "629542261ded00000454b73f", + "created_at": "2022-05-30T22:15:46.620Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 20, + "durationInMilliseconds": 1203000, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458156, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458159, + "carbs": null, + "insulin": null + }, + { + "_id": "629541111ded00000454b73c", + "created_at": "2022-05-30T22:11:11.648Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 273483, + "type": "NORMAL", + "rate": 1.2838, + "percent": 40, + "pumpId": 458153, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458155, + "carbs": null, + "insulin": null + }, + { + "_id": "62953b2086a3df0004eb44ff", + "created_at": "2022-05-30T21:45:59.226Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1510937, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458148, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458152, + "carbs": null, + "insulin": null + }, + { + "_id": "6295379486a3df0004eb44f7", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-30T21:30:47.761Z", + "date": 1653946247761, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22020, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62953566e3aedd00046f3883", + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-30T21:21:15.984Z", + "date": 1653945675984, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22019, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295354de3aedd00046f3882", + "created_at": "2022-05-30T21:21:13.875Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1482865, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458141, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458147, + "carbs": null, + "insulin": null + }, + { + "_id": "629531c4e3aedd00046f387b", + "created_at": "2022-05-30T21:06:05.388Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 15, + "durationInMilliseconds": 906997, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458138, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458140, + "carbs": null, + "insulin": null + }, + { + "_id": "629530fae3aedd00046f3876", + "eventType": "Meal Bolus", + "insulin": 6.02, + "created_at": "2022-05-30T21:02:38.858Z", + "date": 1653944558858, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 22018, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62953113e3aedd00046f3878", + "eventType": "Meal Bolus", + "carbs": 35, + "created_at": "2022-05-30T21:02:35.469Z", + "isValid": true, + "date": 1653944555469, + "insulin": null + }, + { + "_id": "629530fae3aedd00046f3877", + "eventType": "Bolus Wizard", + "created_at": "2022-05-30T21:02:35.469Z", + "isValid": true, + "bolusCalculatorResult": "{\"basalIOB\":0.267,\"bolusIOB\":-1.1300000000000001,\"carbs\":35.0,\"carbsInsulin\":6.9944756849403245,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1653944555615,\"glucoseDifference\":66.0,\"glucoseInsulin\":0.6268744459833301,\"glucoseTrend\":-2.61,\"glucoseValue\":166.0,\"ic\":5.003949055875317,\"id\":1580,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":105.28424060494416,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":90,\"profileName\":\"Training days\",\"superbolusInsulin\":0.0,\"targetBGHigh\":100.0,\"targetBGLow\":100.0,\"timestamp\":1653944555469,\"totalInsulin\":6.0200000000000005,\"trendInsulin\":-0.07437010472802234,\"utcOffset\":7200000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":true,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}", + "date": 1653944555469, + "glucose": 166, + "units": "mg/dl", + "notes": "", + "carbs": null, + "insulin": null + }, + { + "_id": "62952f81e3aedd00046f3873", + "created_at": "2022-05-30T20:56:23.945Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 578949, + "type": "NORMAL", + "rate": 0.36950000000000005, + "percent": -50, + "pumpId": 458132, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458137, + "carbs": null, + "insulin": null + }, + { + "_id": "62952eb4e3aedd00046f386e", + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-30T20:50:49.125Z", + "date": 1653943849125, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22017, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62952eb5e3aedd00046f3870", + "created_at": "2022-05-30T20:50:46.774Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 335678, + "type": "NORMAL", + "rate": 0.22169999999999998, + "percent": -70, + "pumpId": 458127, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458131, + "carbs": null, + "insulin": null + }, + { + "_id": "62952d03e3aedd00046f386c", + "created_at": "2022-05-30T20:45:47.527Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 297761, + "type": "NORMAL", + "rate": 0.36950000000000005, + "percent": -50, + "pumpId": 458124, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458126, + "carbs": null, + "insulin": null + }, + { + "_id": "62952c85e3aedd00046f3868", + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-30T20:43:25.045Z", + "date": 1653943405045, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22016, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62952c85e3aedd00046f3869", + "created_at": "2022-05-30T20:43:22.025Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 144010, + "type": "NORMAL", + "rate": 1.6258, + "percent": 120, + "pumpId": 458119, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458123, + "carbs": null, + "insulin": null + }, + { + "_id": "62952b57e3aedd00046f3863", + "eventType": "Note", + "isValid": true, + "created_at": "2022-05-30T20:38:25.189Z", + "units": "mg/dl", + "notes": "AndroidAPS est lancé - samsung SM-A405FN", + "carbs": null, + "insulin": null + }, + { + "_id": "62952ac3e3aedd00046f3861", + "created_at": "2022-05-30T20:35:51.571Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 41925, + "type": "NORMAL", + "rate": 0.1478, + "percent": -80, + "pumpId": 458113, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458115, + "carbs": null, + "insulin": null + }, + { + "_id": "629529ade3aedd00046f385e", + "created_at": "2022-05-30T20:31:15.130Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 274985, + "type": "NORMAL", + "rate": 0.2956, + "percent": -60, + "pumpId": 458110, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458112, + "carbs": null, + "insulin": null + }, + { + "_id": "62952899e3aedd00046f3859", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-30T20:26:57.470Z", + "date": 1653942417470, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22015, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62952899e3aedd00046f385b", + "created_at": "2022-05-30T20:26:55.194Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 257445, + "type": "NORMAL", + "rate": 1.3302, + "percent": 80, + "pumpId": 458105, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458109, + "carbs": null, + "insulin": null + }, + { + "_id": "6295273ae3aedd00046f3857", + "created_at": "2022-05-30T20:20:59.451Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 353254, + "type": "NORMAL", + "rate": 0.1478, + "percent": -80, + "pumpId": 458102, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458104, + "carbs": null, + "insulin": null + }, + { + "_id": "62952605f63c010004ea5d2a", + "eventType": "Correction Bolus", + "insulin": 0.18, + "created_at": "2022-05-30T20:15:59.073Z", + "date": 1653941759073, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22014, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62952605f63c010004ea5d2c", + "created_at": "2022-05-30T20:15:56.006Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 301964, + "type": "NORMAL", + "rate": 1.4780000000000002, + "percent": 100, + "pumpId": 458097, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458101, + "carbs": null, + "insulin": null + }, + { + "_id": "629524f1f63c010004ea5d28", + "created_at": "2022-05-30T20:11:18.206Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 276310, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458094, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458096, + "carbs": null, + "insulin": null + }, + { + "_id": "629523c4f63c010004ea5d24", + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-30T20:06:16.890Z", + "date": 1653941176890, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22013, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629523c4f63c010004ea5d25", + "created_at": "2022-05-30T20:06:14.789Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300947, + "type": "NORMAL", + "rate": 0.0739, + "percent": -90, + "pumpId": 458089, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458093, + "carbs": null, + "insulin": null + }, + { + "_id": "6295227ef63c010004ea5d21", + "created_at": "2022-05-30T20:00:49.579Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 323721, + "type": "NORMAL", + "rate": 0.36950000000000005, + "percent": -50, + "pumpId": 458086, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458088, + "carbs": null, + "insulin": null + }, + { + "_id": "6295216af63c010004ea5d1e", + "created_at": "2022-05-30T19:56:09.060Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 279028, + "type": "NORMAL", + "rate": 0.2956, + "percent": -60, + "pumpId": 458083, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458085, + "carbs": null, + "insulin": null + }, + { + "_id": "62951f28f63c010004ea5d17", + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-30T19:46:40.723Z", + "date": 1653940000723, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22012, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62951f29f63c010004ea5d19", + "created_at": "2022-05-30T19:46:38.592Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 568986, + "type": "NORMAL", + "rate": 0.2956, + "percent": -60, + "pumpId": 458078, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458082, + "carbs": null, + "insulin": null + }, + { + "_id": "62951dcbf63c010004ea5d13", + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-30T19:40:48.541Z", + "date": 1653939648541, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22011, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62951dcbf63c010004ea5d15", + "created_at": "2022-05-30T19:40:46.581Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 350525, + "type": "NORMAL", + "rate": 0.0739, + "percent": -90, + "pumpId": 458073, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458077, + "carbs": null, + "insulin": null + }, + { + "_id": "62951c9df63c010004ea5d11", + "created_at": "2022-05-30T19:35:47.077Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 298007, + "type": "NORMAL", + "rate": 0.2956, + "percent": -60, + "pumpId": 458070, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458072, + "carbs": null, + "insulin": null + }, + { + "_id": "62951b87f63c010004ea5d0d", + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-30T19:30:59.385Z", + "date": 1653939059385, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22010, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62951b88f63c010004ea5d0e", + "created_at": "2022-05-30T19:30:57.168Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 288421, + "type": "NORMAL", + "rate": 0.0739, + "percent": -90, + "pumpId": 458065, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458069, + "carbs": null, + "insulin": null + }, + { + "_id": "62951a5af63c010004ea5d0a", + "created_at": "2022-05-30T19:26:13.778Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 280898, + "type": "NORMAL", + "rate": 0.36950000000000005, + "percent": -50, + "pumpId": 458062, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458064, + "carbs": null, + "insulin": null + }, + { + "_id": "62951929f63c010004ea5d06", + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-30T19:21:09.927Z", + "date": 1653938469927, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22009, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6295192af63c010004ea5d07", + "created_at": "2022-05-30T19:21:07.733Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304559, + "type": "NORMAL", + "rate": 1.6997, + "percent": 130, + "pumpId": 458057, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458061, + "carbs": null, + "insulin": null + }, + { + "_id": "629517fcf63c010004ea5d03", + "created_at": "2022-05-30T19:16:01.807Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304435, + "type": "NORMAL", + "rate": 0.22169999999999998, + "percent": -70, + "pumpId": 458054, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458056, + "carbs": null, + "insulin": null + }, + { + "_id": "629515a4f63c010004ea5cfe", + "created_at": "2022-05-30T19:06:06.196Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 594121, + "type": "NORMAL", + "rate": 0.5173, + "percent": -30, + "pumpId": 458051, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458053, + "carbs": null, + "insulin": null + }, + { + "_id": "62951348f63c010004ea5cf9", + "created_at": "2022-05-30T18:55:49.150Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 614556, + "type": "NORMAL", + "rate": 0.5089, + "percent": -30, + "pumpId": 458047, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458050, + "carbs": null, + "insulin": null + }, + { + "_id": "629512130f8c2e00042830a4", + "created_at": "2022-05-30T18:50:53.328Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293324, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 458044, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458046, + "carbs": null, + "insulin": null + }, + { + "_id": "629510e40f8c2e00042830a0", + "created_at": "2022-05-30T18:45:49.783Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 301049, + "type": "NORMAL", + "rate": 0.4362, + "percent": -40, + "pumpId": 458041, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458043, + "carbs": null, + "insulin": null + }, + { + "_id": "62950fb60f8c2e000428309d", + "eventType": "Correction Bolus", + "insulin": 0.66, + "created_at": "2022-05-30T18:40:40.053Z", + "date": 1653936040053, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22008, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62950ea10f8c2e000428309b", + "created_at": "2022-05-30T18:35:51.435Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 588000, + "type": "FAKE_EXTENDED", + "rate": 3.788224489795918, + "absolute": 3.788224489795918, + "pumpId": 22007, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-30T18:35:51.435Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 9, + "durationInMilliseconds": 588000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.5, + "relative": 3.061224489795918, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 22007, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "62950dbf0f8c2e0004283098", + "created_at": "2022-05-30T18:32:07.486Z", + "enteredBy": "openaps://AndroidAPS", + "isValid": true, + "eventType": "Note", + "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Africa\\/Cairo\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":87.18851175096937},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":69.11416670978657},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":52.85200983689563},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":47.706921524115316},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":44.41678900521082},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":42.77172274575857},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":41.12665648630631},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":42.77172274575857},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":46.3471470877392},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":56.91754905511835},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":69.11416670978657},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":73.1797059280093},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":81.31078436445473},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":85.37632358267754},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":89.44186280090027},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":97.57294123734576},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":105.28424060494416}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":5.80877612703003},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":5.003949055875317},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":5.886998889265079},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":5.003949055875317}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":0.917},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":0.919},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":0.969},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":0.965},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":0.858},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":0.864},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":0.787},{\"time\":\"07:00\",\"timeAsSeconds\":25200,\"value\":0.81},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":0.756},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.776},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":0.777},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":0.753},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":0.723},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.72},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":0.718},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.721},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":0.71},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":0.635},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":0.603},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":0.582},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":0.727},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":0.739},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":0.759}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}]}", + "originalProfileName": "Training days", + "originalCustomizedName": "Training days", + "originalTimeshift": 0, + "originalPercentage": 100, + "originalDuration": 0, + "originalEnd": 1653876333580, + "notes": "Training days", + "carbs": null, + "insulin": null + }, + { + "_id": "62950d8c0f8c2e0004283096", + "eventType": "Correction Bolus", + "insulin": 0.2, + "created_at": "2022-05-30T18:31:16.379Z", + "date": 1653935476379, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22006, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62950d8d0f8c2e0004283097", + "created_at": "2022-05-30T18:31:13.515Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 266977, + "type": "NORMAL", + "rate": 1.33768, + "percent": 130, + "pumpId": 458025, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458031, + "carbs": null, + "insulin": null + }, + { + "_id": "62950c5e0f8c2e0004283093", + "created_at": "2022-05-30T18:26:18.162Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 293856, + "type": "NORMAL", + "rate": 0.40712000000000004, + "percent": -30, + "pumpId": 458022, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458024, + "carbs": null, + "insulin": null + }, + { + "_id": "62950b160f8c2e000428308e", + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-30T18:21:07.247Z", + "date": 1653934867247, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22005, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62950b160f8c2e000428308f", + "created_at": "2022-05-30T18:21:04.625Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304000, + "type": "FAKE_EXTENDED", + "rate": 1.0552842105263158, + "absolute": 1.0552842105263158, + "pumpId": 22004, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-30T18:21:04.625Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 5, + "durationInMilliseconds": 304000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.04, + "relative": 0.47368421052631576, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 22004, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "629508d0409703000484d1c8", + "created_at": "2022-05-30T18:11:02.413Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 590161, + "type": "NORMAL", + "rate": 0.7560800000000001, + "percent": 30, + "pumpId": 458010, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458012, + "carbs": null, + "insulin": null + }, + { + "_id": "6295065b409703000484d1c3", + "created_at": "2022-05-30T18:00:54.436Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 605487, + "type": "NORMAL", + "rate": 0.40712000000000004, + "percent": -30, + "pumpId": 458007, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458009, + "carbs": null, + "insulin": null + }, + { + "_id": "6295052c409703000484d1c0", + "created_at": "2022-05-30T17:55:41.687Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 311257, + "type": "NORMAL", + "rate": 0.5121600000000001, + "percent": 10, + "pumpId": 458003, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458006, + "carbs": null, + "insulin": null + }, + { + "_id": "62950417409703000484d1bb", + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-30T17:51:02.602Z", + "date": 1653933062602, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22003, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62950417409703000484d1bd", + "created_at": "2022-05-30T17:51:00.624Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 279574, + "type": "NORMAL", + "rate": 0.88464, + "percent": 90, + "pumpId": 457998, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 458002, + "carbs": null, + "insulin": null + }, + { + "_id": "629502e9409703000484d1b8", + "created_at": "2022-05-30T17:46:00.204Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 298930, + "type": "NORMAL", + "rate": 0.65184, + "percent": 40, + "pumpId": 457995, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457997, + "carbs": null, + "insulin": null + }, + { + "_id": "6294ff6755b9dd00048a5492", + "created_at": "2022-05-30T17:31:07.277Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 574757, + "type": "NORMAL", + "rate": 0.55872, + "percent": 20, + "pumpId": 457989, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457991, + "carbs": null, + "insulin": null + }, + { + "_id": "6294f81755b9dd00048a5484", + "eventType": "Exercise", + "isValid": true, + "created_at": "2022-05-30T17:00:01.505Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "duration": 90, + "durationInMilliseconds": 5400000, + "notes": "🏓", + "carbs": null, + "insulin": null + }, + { + "_id": "6294f3a055b9dd00048a547c", + "created_at": "2022-05-30T16:40:57.666Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 50, + "durationInMilliseconds": 3007120, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457984, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457988, + "carbs": null, + "insulin": null + }, + { + "_id": "6294f143b23f340004e841ea", + "created_at": "2022-05-30T16:30:34.848Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 621339, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457981, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457983, + "carbs": null, + "insulin": null + }, + { + "_id": "6294f02eb23f340004e841e7", + "created_at": "2022-05-30T16:25:59.075Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 274281, + "type": "NORMAL", + "rate": 0.2412, + "percent": -50, + "pumpId": 457978, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457980, + "carbs": null, + "insulin": null + }, + { + "_id": "6294ef00b23f340004e841e2", + "eventType": "Correction Bolus", + "insulin": 0.44, + "created_at": "2022-05-30T16:21:13.491Z", + "date": 1653927673491, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 22002, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294ef01b23f340004e841e4", + "created_at": "2022-05-30T16:21:11.436Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 278000, + "type": "FAKE_EXTENDED", + "rate": 1.5183712230215827, + "absolute": 1.5183712230215827, + "pumpId": 22001, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-30T16:21:11.436Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 4, + "durationInMilliseconds": 278000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.08, + "relative": 1.0359712230215827, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 22001, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "6294edb9b23f340004e841e0", + "created_at": "2022-05-30T16:15:48.023Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 323413, + "type": "FAKE_EXTENDED", + "rate": 1.6824, + "absolute": 1.6824, + "pumpId": 22000, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-30T16:15:48.023Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 5, + "durationInMilliseconds": 323413, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.10780433333333332, + "relative": 1.2, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 22000, + "endId": 22001, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "endId": 22001, + "carbs": null, + "insulin": null + }, + { + "_id": "6294eca4b23f340004e841db", + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-30T16:10:57.547Z", + "date": 1653927057547, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21999, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294eca5b23f340004e841dd", + "created_at": "2022-05-30T16:10:55.574Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 279439, + "type": "NORMAL", + "rate": 0.9648, + "percent": 100, + "pumpId": 457960, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457964, + "carbs": null, + "insulin": null + }, + { + "_id": "6294ea5cb23f340004e841d7", + "created_at": "2022-05-30T16:01:08.748Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 585338, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457957, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457959, + "carbs": null, + "insulin": null + }, + { + "_id": "62952b70e3aedd00046f3864", + "eventType": "Carb Correction", + "carbs": 10, + "created_at": "2022-05-30T16:00:50.000Z", + "isValid": true, + "date": 1653926450000, + "insulin": null + }, + { + "_id": "6294e345706f120004b7d15e", + "created_at": "2022-05-30T15:31:10.998Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1796270, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457952, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457956, + "carbs": null, + "insulin": null + }, + { + "_id": "6294d527dac1e20004fde59f", + "created_at": "2022-05-30T14:30:51.321Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 60, + "durationInMilliseconds": 3617187, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457947, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457951, + "carbs": null, + "insulin": null + }, + { + "_id": "6294d50ddac1e20004fde59c", + "created_at": "2022-05-30T14:30:37.211Z", + "enteredBy": "openaps://AndroidAPS", + "isValid": true, + "eventType": "Note", + "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Africa\\/Cairo\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":108.98563968871171},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":86.39270838723321},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":66.06501229611953},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":59.63365190514415},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":55.52098625651353},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":53.464653432198205},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":51.408320607882885},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":53.464653432198205},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":57.933933859674},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":71.14693631889794},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":86.39270838723321},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":91.47463241001162},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":101.63848045556841},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":106.72040447834692},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":111.80232850112533},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":121.96617654668219},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":131.6053007561802}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":7.260970158787537},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":6.2549363198441466},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":7.3587486115813485},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":6.2549363198441466}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":0.7336},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":0.7352000000000001},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":0.7752},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":0.772},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":0.6864},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":0.6912},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":0.6296},{\"time\":\"07:00\",\"timeAsSeconds\":25200,\"value\":0.6480000000000001},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":0.6048},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.6208},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":0.6216},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":0.6024},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":0.5784},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.576},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":0.5744},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.5768},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":0.568},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":0.508},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":0.4824},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":0.4656},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":0.5816},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":0.5912000000000001},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":0.6072000000000001}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}]}", + "originalProfileName": "Training days", + "originalCustomizedName": "Training days(80%)", + "originalTimeshift": 0, + "originalPercentage": 80, + "originalDuration": 14400000, + "originalEnd": 1653935417554, + "notes": "Training days(80%)", + "carbs": null, + "insulin": null + }, + { + "_id": "6294d50ddac1e20004fde59b", + "timeshift": 0, + "percentage": 80, + "created_at": "2022-05-30T14:30:14.534Z", + "enteredBy": "openaps://AndroidAPS", + "isValid": true, + "eventType": "Profile Switch", + "duration": 240, + "profile": "Training days", + "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Africa\\/Cairo\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":87.18851175096937},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":69.11416670978657},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":52.85200983689563},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":47.706921524115316},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":44.41678900521082},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":42.77172274575857},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":41.12665648630631},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":42.77172274575857},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":46.3471470877392},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":56.91754905511835},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":69.11416670978657},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":73.1797059280093},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":81.31078436445473},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":85.37632358267754},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":89.44186280090027},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":97.57294123734576},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":105.28424060494416}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":5.80877612703003},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":5.003949055875317},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":5.886998889265079},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":5.003949055875317}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":0.917},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":0.919},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":0.969},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":0.965},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":0.858},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":0.864},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":0.787},{\"time\":\"07:00\",\"timeAsSeconds\":25200,\"value\":0.81},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":0.756},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.776},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":0.777},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":0.753},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":0.723},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.72},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":0.718},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.721},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":0.71},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":0.635},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":0.603},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":0.582},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":0.727},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":0.739},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":0.739},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":0.759}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}]}", + "carbs": null, + "insulin": null + }, + { + "_id": "6294c27452bed20004c9a2b9", + "created_at": "2022-05-30T13:10:58.834Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 79, + "durationInMilliseconds": 4790001, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457941, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457946, + "carbs": null, + "insulin": null + }, + { + "_id": "6294beec52bed20004c9a2b0", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-30T12:55:49.673Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "24g de glucides requis dans 15 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6294bdbe52bed20004c9a2ad", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-30T12:50:45.432Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "26g de glucides requis dans 20 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6294bc9dff39db0004546866", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-30T12:46:09.818Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "28g de glucides requis dans 25 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6294bb56ff39db0004546862", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-30T12:40:38.359Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "31g de glucides requis dans 30 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6294ba41ff39db000454685f", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-30T12:35:59.292Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "33g de glucides requis dans 35 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6294b913ff39db000454685d", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-30T12:30:53.968Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "35g de glucides requis dans 35 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6294b7e5ff39db0004546859", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-30T12:25:53.822Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "36g de glucides requis dans 40 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6294b6b7ff39db0004546856", + "created_at": "2022-05-30T12:20:57.742Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 49, + "durationInMilliseconds": 2999601, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457937, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457940, + "carbs": null, + "insulin": null + }, + { + "_id": "6294b6b7ff39db0004546855", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-30T12:20:55.578Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "36g de glucides requis dans 45 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6294ae7b0f39100004ec41eb", + "created_at": "2022-05-30T11:45:53.866Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 35, + "durationInMilliseconds": 2102390, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457933, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457936, + "carbs": null, + "insulin": null + }, + { + "_id": "6294ae480f39100004ec41e8", + "eventType": "Note", + "isValid": true, + "created_at": "2022-05-30T11:44:23.166Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "Pompe démarrée", + "carbs": null, + "insulin": null + }, + { + "_id": "6294ae480f39100004ec41e9", + "eventType": "Insulin Change", + "isValid": true, + "created_at": "2022-05-30T11:44:04.200Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "6294ad4d0f39100004ec41e6", + "eventType": "Note", + "isValid": true, + "created_at": "2022-05-30T11:40:51.759Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "Pompe suspendue", + "carbs": null, + "insulin": null + }, + { + "_id": "6294ad4d0f39100004ec41e4", + "eventType": "Meal Bolus", + "insulin": 10.22, + "created_at": "2022-05-30T11:40:44.413Z", + "date": 1653910844413, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21998, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294ad340f39100004ec41e3", + "eventType": "Bolus Wizard", + "created_at": "2022-05-30T11:40:28.961Z", + "isValid": true, + "bolusCalculatorResult": "{\"basalIOB\":-0.144,\"bolusIOB\":-2.272,\"carbs\":50.0,\"carbsInsulin\":8.493291903141824,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1653910829149,\"glucoseDifference\":142.0,\"glucoseInsulin\":1.7463858098271619,\"glucoseTrend\":18.5,\"glucoseValue\":232.0,\"ic\":5.886998889265079,\"id\":1578,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":81.31078436445473,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":120,\"profileName\":\"Training days\",\"superbolusInsulin\":0.0,\"targetBGHigh\":90.0,\"targetBGLow\":90.0,\"timestamp\":1653910828961,\"totalInsulin\":10.21,\"trendInsulin\":0.6825662848268133,\"utcOffset\":7200000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":true,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}", + "date": 1653910828961, + "glucose": 232, + "units": "mg/dl", + "notes": "", + "carbs": null, + "insulin": null + }, + { + "_id": "6294ac24ac54000004308890", + "created_at": "2022-05-30T11:35:47.458Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 604926, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457913, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457932, + "carbs": null, + "insulin": null + }, + { + "_id": "6294aaf7ac5400000430888b", + "eventType": "Correction Bolus", + "insulin": 0.56, + "created_at": "2022-05-30T11:30:58.979Z", + "date": 1653910258979, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21997, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294aaf7ac5400000430888d", + "created_at": "2022-05-30T11:30:56.911Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289057, + "type": "NORMAL", + "rate": 0.21599999999999997, + "percent": -70, + "pumpId": 457908, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457912, + "carbs": null, + "insulin": null + }, + { + "_id": "6294a9e2ac54000004308889", + "created_at": "2022-05-30T11:26:00.011Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 294405, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457905, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457907, + "carbs": null, + "insulin": null + }, + { + "_id": "6294a8b5ac54000004308885", + "eventType": "Correction Bolus", + "insulin": 1.3, + "created_at": "2022-05-30T11:21:17.561Z", + "date": 1653909677561, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21996, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294a8b5ac54000004308886", + "created_at": "2022-05-30T11:21:15.161Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 275000, + "type": "FAKE_EXTENDED", + "rate": 4.123636363636364, + "absolute": 4.123636363636364, + "pumpId": 21995, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-30T11:21:15.161Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 4, + "durationInMilliseconds": 275000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.26, + "relative": 3.403636363636364, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 21995, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "6294a673ac5400000430887e", + "eventType": "Correction Bolus", + "insulin": 0.56, + "created_at": "2022-05-30T11:11:41.446Z", + "date": 1653909101446, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21994, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294a673ac54000004308880", + "created_at": "2022-05-30T11:11:38.414Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 576747, + "type": "FAKE_EXTENDED", + "rate": 2.92, + "absolute": 2.92, + "pumpId": 21993, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-30T11:11:38.414Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 9, + "durationInMilliseconds": 576747, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.35245650000000006, + "relative": 2.2, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 21993, + "endId": 21995, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "endId": 21995, + "carbs": null, + "insulin": null + }, + { + "_id": "6294a4f9ac5400000430887b", + "eventType": "Note", + "isValid": true, + "created_at": "2022-05-30T11:05:10.963Z", + "units": "mg/dl", + "notes": "AndroidAPS est lancé - samsung SM-A405FN", + "carbs": null, + "insulin": null + }, + { + "_id": "6294a3f0ac54000004308879", + "created_at": "2022-05-30T11:00:58.834Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 627902, + "type": "NORMAL", + "rate": 0.504, + "percent": -30, + "pumpId": 457887, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457889, + "carbs": null, + "insulin": null + }, + { + "_id": "6294a2d9ac54000004308876", + "created_at": "2022-05-30T10:56:07.755Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289590, + "type": "NORMAL", + "rate": 0.6507, + "percent": -10, + "pumpId": 457883, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457886, + "carbs": null, + "insulin": null + }, + { + "_id": "62949f4bc2e464000413b7a5", + "created_at": "2022-05-30T10:41:06.400Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 899864, + "type": "NORMAL", + "rate": 0.5783999999999999, + "percent": -20, + "pumpId": 457880, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457882, + "carbs": null, + "insulin": null + }, + { + "_id": "6294ad4d0f39100004ec41e5", + "eventType": "Meal Bolus", + "carbs": 50, + "created_at": "2022-05-30T10:40:28.961Z", + "isValid": true, + "date": 1653907228961, + "insulin": null + }, + { + "_id": "62949aaec2e464000413b79c", + "created_at": "2022-05-30T10:21:11.134Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1192773, + "type": "NORMAL", + "rate": 0.3615, + "percent": -50, + "pumpId": 457877, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457879, + "carbs": null, + "insulin": null + }, + { + "_id": "629498395989a90004f0c232", + "created_at": "2022-05-30T10:10:51.972Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 617668, + "type": "NORMAL", + "rate": 0.5061, + "percent": -30, + "pumpId": 457874, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457876, + "carbs": null, + "insulin": null + }, + { + "_id": "629497255989a90004f0c22f", + "created_at": "2022-05-30T10:06:04.609Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 285883, + "type": "NORMAL", + "rate": 0.6507, + "percent": -10, + "pumpId": 457871, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457873, + "carbs": null, + "insulin": null + }, + { + "_id": "629495c55989a90004f0c22b", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-30T10:00:20.925Z", + "timestamp": 1653904820925, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 85, + "targetTop": 85, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "629493845989a90004f0c227", + "created_at": "2022-05-30T09:50:42.429Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 637607, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457864, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457867, + "carbs": null, + "insulin": null + }, + { + "_id": "62948cad76174b0004fbd224", + "created_at": "2022-05-30T09:21:26.391Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1753548, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457861, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457863, + "carbs": null, + "insulin": null + }, + { + "_id": "62948b4d76174b0004fbd221", + "created_at": "2022-05-30T09:15:44.467Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 339433, + "type": "NORMAL", + "rate": 0.3012, + "percent": -60, + "pumpId": 457858, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457860, + "carbs": null, + "insulin": null + }, + { + "_id": "629489008ecbb3000401e2df", + "created_at": "2022-05-30T09:05:54.354Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 587619, + "type": "NORMAL", + "rate": 0.1506, + "percent": -80, + "pumpId": 457854, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457857, + "carbs": null, + "insulin": null + }, + { + "_id": "629485788ecbb3000401e2d9", + "created_at": "2022-05-30T08:50:58.583Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 605568, + "type": "NORMAL", + "rate": 0.8547, + "percent": 10, + "pumpId": 457847, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457850, + "carbs": null, + "insulin": null + }, + { + "_id": "6294844b8ecbb3000401e2d4", + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-30T08:45:49.557Z", + "date": 1653900349557, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21992, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294844b8ecbb3000401e2d6", + "created_at": "2022-05-30T08:45:47.742Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 309352, + "type": "NORMAL", + "rate": 1.7094, + "percent": 120, + "pumpId": 457842, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457846, + "carbs": null, + "insulin": null + }, + { + "_id": "6294831e8ecbb3000401e2d2", + "created_at": "2022-05-30T08:40:41.524Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304721, + "type": "NORMAL", + "rate": 0.8547, + "percent": 10, + "pumpId": 457839, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457841, + "carbs": null, + "insulin": null + }, + { + "_id": "629481f18ecbb3000401e2cf", + "created_at": "2022-05-30T08:35:41.513Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 298517, + "type": "NORMAL", + "rate": 0.3885, + "percent": -50, + "pumpId": 457836, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457838, + "carbs": null, + "insulin": null + }, + { + "_id": "629480cfd10aeb0004cd3ff6", + "created_at": "2022-05-30T08:31:00.195Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 278821, + "type": "NORMAL", + "rate": 0.1554, + "percent": -80, + "pumpId": 457833, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457835, + "carbs": null, + "insulin": null + }, + { + "_id": "62947fa2d10aeb0004cd3ff1", + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-30T08:26:06.795Z", + "date": 1653899166795, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21991, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62947fa3d10aeb0004cd3ff3", + "created_at": "2022-05-30T08:26:04.750Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 292954, + "type": "NORMAL", + "rate": 1.2432, + "percent": 60, + "pumpId": 457828, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457832, + "carbs": null, + "insulin": null + }, + { + "_id": "62947e75d10aeb0004cd3fef", + "created_at": "2022-05-30T08:20:55.136Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 308124, + "type": "NORMAL", + "rate": 0.3108, + "percent": -60, + "pumpId": 457825, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457827, + "carbs": null, + "insulin": null + }, + { + "_id": "62946ac16e1b8e0004363e00", + "created_at": "2022-05-30T06:56:40.471Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 84, + "durationInMilliseconds": 5053176, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457819, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457824, + "carbs": null, + "insulin": null + }, + { + "_id": "62946376b82b320004ef5ece", + "created_at": "2022-05-30T06:25:52.633Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 30, + "durationInMilliseconds": 1845357, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457816, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457818, + "carbs": null, + "insulin": null + }, + { + "_id": "62946279b82b320004ef5ec9", + "eventType": "Note", + "isValid": true, + "created_at": "2022-05-30T06:20:55.768Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "Avertissement W31 : Réservoir bas", + "carbs": null, + "insulin": null + }, + { + "_id": "62946247b82b320004ef5ec8", + "eventType": "Meal Bolus", + "insulin": 16.26, + "created_at": "2022-05-30T06:20:45.443Z", + "date": 1653891645443, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21990, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294622db82b320004ef5ec7", + "eventType": "Bolus Wizard", + "created_at": "2022-05-30T06:20:04.980Z", + "isValid": true, + "bolusCalculatorResult": "{\"basalIOB\":0.444,\"bolusIOB\":-0.239,\"carbs\":75.0,\"carbsInsulin\":14.988162182014982,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1653891605009,\"glucoseDifference\":9.0,\"glucoseInsulin\":0.21041939445594296,\"glucoseTrend\":12.0,\"glucoseValue\":99.0,\"ic\":5.003949055875317,\"id\":1576,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":42.77172274575857,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":100,\"profileName\":\"Training days\",\"superbolusInsulin\":0.0,\"targetBGHigh\":90.0,\"targetBGLow\":90.0,\"timestamp\":1653891604980,\"totalInsulin\":16.25,\"trendInsulin\":0.8416775778237718,\"utcOffset\":7200000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":true,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}", + "date": 1653891604980, + "glucose": 99, + "units": "mg/dl", + "notes": "", + "carbs": null, + "insulin": null + }, + { + "_id": "62945ff6d2cadd0004350d8b", + "created_at": "2022-05-30T06:10:53.144Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 897997, + "type": "NORMAL", + "rate": 0.6048, + "percent": -20, + "pumpId": 457809, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457815, + "carbs": null, + "insulin": null + }, + { + "_id": "62945ee1d2cadd0004350d88", + "created_at": "2022-05-30T06:06:14.629Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 276025, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457806, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457808, + "carbs": null, + "insulin": null + }, + { + "_id": "62946279b82b320004ef5eca", + "eventType": "Meal Bolus", + "carbs": 75, + "created_at": "2022-05-30T06:05:04.980Z", + "isValid": true, + "date": 1653890704980, + "insulin": null + }, + { + "_id": "62945d9ad2cadd0004350d85", + "created_at": "2022-05-30T06:00:37.634Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 335497, + "type": "NORMAL", + "rate": 0.2268, + "percent": -70, + "pumpId": 457803, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457805, + "carbs": null, + "insulin": null + }, + { + "_id": "62945c84d2cadd0004350d82", + "created_at": "2022-05-30T05:55:56.652Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 279490, + "type": "NORMAL", + "rate": 0.7290000000000001, + "percent": -10, + "pumpId": 457799, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457802, + "carbs": null, + "insulin": null + }, + { + "_id": "62945b56d2cadd0004350d7f", + "created_at": "2022-05-30T05:51:11.125Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 284042, + "type": "NORMAL", + "rate": 0.08100000000000002, + "percent": -90, + "pumpId": 457796, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457798, + "carbs": null, + "insulin": null + }, + { + "_id": "62945a29d2cadd0004350d7c", + "created_at": "2022-05-30T05:46:04.618Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304018, + "type": "NORMAL", + "rate": 0.08100000000000002, + "percent": -90, + "pumpId": 457793, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457795, + "carbs": null, + "insulin": null + }, + { + "_id": "62945992d2cadd0004350d79", + "created_at": "2022-05-30T05:43:22.980Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 2, + "durationInMilliseconds": 160150, + "type": "NORMAL", + "rate": 0.8910000000000001, + "percent": 10, + "pumpId": 457790, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457792, + "carbs": null, + "insulin": null + }, + { + "_id": "629457f413be4d00048f99e5", + "created_at": "2022-05-30T05:36:39.361Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 6, + "durationInMilliseconds": 402130, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457787, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457789, + "carbs": null, + "insulin": null + }, + { + "_id": "629456ad13be4d00048f99e2", + "created_at": "2022-05-30T05:31:20.230Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 316643, + "type": "NORMAL", + "rate": 0.8910000000000001, + "percent": 10, + "pumpId": 457784, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457786, + "carbs": null, + "insulin": null + }, + { + "_id": "6294559813be4d00048f99df", + "created_at": "2022-05-30T05:26:33.058Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 284676, + "type": "NORMAL", + "rate": 1.5390000000000001, + "percent": 90, + "pumpId": 457781, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457783, + "carbs": null, + "insulin": null + }, + { + "_id": "6294546a13be4d00048f99db", + "eventType": "Correction Bolus", + "insulin": 0.1, + "created_at": "2022-05-30T05:21:40.755Z", + "date": 1653888100755, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21989, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294546b13be4d00048f99dc", + "created_at": "2022-05-30T05:21:37.532Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 294039, + "type": "NORMAL", + "rate": 1.215, + "percent": 50, + "pumpId": 457776, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457780, + "carbs": null, + "insulin": null + }, + { + "_id": "6294520f13be4d00048f99d6", + "created_at": "2022-05-30T05:11:40.257Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 594790, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457773, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457775, + "carbs": null, + "insulin": null + }, + { + "_id": "629450fa13be4d00048f99d3", + "created_at": "2022-05-30T05:06:57.622Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 280151, + "type": "NORMAL", + "rate": 0.08100000000000002, + "percent": -90, + "pumpId": 457770, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457772, + "carbs": null, + "insulin": null + }, + { + "_id": "62944e90c0f24700048ea5f5", + "created_at": "2022-05-30T04:56:35.596Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 294089, + "type": "NORMAL", + "rate": 0.1574, + "percent": -80, + "pumpId": 457763, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457766, + "carbs": null, + "insulin": null + }, + { + "_id": "62944c33c0f24700048ea5f0", + "created_at": "2022-05-30T04:46:35.308Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 598821, + "type": "NORMAL", + "rate": 0.0787, + "percent": -90, + "pumpId": 457760, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457762, + "carbs": null, + "insulin": null + }, + { + "_id": "62944b06c0f24700048ea5ea", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-30T04:41:36.155Z", + "date": 1653885696155, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21988, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62944b06c0f24700048ea5ed", + "created_at": "2022-05-30T04:41:33.737Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299075, + "type": "NORMAL", + "rate": 1.4165999999999999, + "percent": 80, + "pumpId": 457754, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457759, + "carbs": null, + "insulin": null + }, + { + "_id": "62944b06c0f24700048ea5eb", + "eventType": "Note", + "isValid": true, + "created_at": "2022-05-30T04:33:29.750Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "Avertissement W32 : Batterie faible", + "carbs": null, + "insulin": null + }, + { + "_id": "629448abc0f24700048ea5e6", + "created_at": "2022-05-30T04:31:29.135Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 603111, + "type": "NORMAL", + "rate": 0.4722, + "percent": -40, + "pumpId": 457748, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457753, + "carbs": null, + "insulin": null + }, + { + "_id": "62944788c319020004344fc3", + "created_at": "2022-05-30T04:26:24.314Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 303324, + "type": "NORMAL", + "rate": 0.7082999999999999, + "percent": -10, + "pumpId": 457745, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457747, + "carbs": null, + "insulin": null + }, + { + "_id": "6294465ac319020004344fbf", + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-30T04:21:40.190Z", + "date": 1653884500190, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21987, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294452cc319020004344fbb", + "eventType": "Correction Bolus", + "insulin": 0.12, + "created_at": "2022-05-30T04:16:23.222Z", + "date": 1653884183222, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21986, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294452cc319020004344fbd", + "created_at": "2022-05-30T04:16:21.242Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 600581, + "type": "NORMAL", + "rate": 1.2592, + "percent": 60, + "pumpId": 457738, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457744, + "carbs": null, + "insulin": null + }, + { + "_id": "629443ffc319020004344fb9", + "created_at": "2022-05-30T04:11:37.634Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 281119, + "type": "NORMAL", + "rate": 0.5509000000000001, + "percent": -30, + "pumpId": 457734, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457737, + "carbs": null, + "insulin": null + }, + { + "_id": "629442d2c319020004344fb6", + "created_at": "2022-05-30T04:06:36.554Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299592, + "type": "NORMAL", + "rate": 0.8657, + "percent": 10, + "pumpId": 457731, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457733, + "carbs": null, + "insulin": null + }, + { + "_id": "629441bdc319020004344fb2", + "created_at": "2022-05-30T04:02:01.839Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 272225, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457728, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457730, + "carbs": null, + "insulin": null + }, + { + "_id": "62943bd1a743da00044e28e4", + "created_at": "2022-05-30T03:36:23.863Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1536482, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457724, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457727, + "carbs": null, + "insulin": null + }, + { + "_id": "62943aa3a743da00044e28e0", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-30T03:31:24.792Z", + "date": 1653881484792, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21985, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62943aa4a743da00044e28e1", + "created_at": "2022-05-30T03:31:22.771Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299601, + "type": "NORMAL", + "rate": 1.5552000000000001, + "percent": 80, + "pumpId": 457719, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457723, + "carbs": null, + "insulin": null + }, + { + "_id": "6294385da365640004d83ccb", + "created_at": "2022-05-30T03:21:42.950Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 578328, + "type": "NORMAL", + "rate": 0.0864, + "percent": -90, + "pumpId": 457716, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457718, + "carbs": null, + "insulin": null + }, + { + "_id": "6294372fa365640004d83cc7", + "eventType": "Correction Bolus", + "insulin": 0.48, + "created_at": "2022-05-30T03:16:53.627Z", + "date": 1653880613627, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21984, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6294372fa365640004d83cc8", + "created_at": "2022-05-30T03:16:50.671Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 282000, + "type": "FAKE_EXTENDED", + "rate": 3.417191489361702, + "absolute": 3.417191489361702, + "pumpId": 21983, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-30T03:16:50.671Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 4, + "durationInMilliseconds": 282000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.2, + "relative": 2.5531914893617023, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 21983, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "629434b9a365640004d83cc1", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-30T03:06:26.954Z", + "date": 1653879986954, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21982, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62943277a365640004d83cbc", + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-30T02:56:44.155Z", + "date": 1653879404155, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21981, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62943278a365640004d83cbd", + "created_at": "2022-05-30T02:56:41.816Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1196851, + "type": "NORMAL", + "rate": 2.145, + "percent": 150, + "pumpId": 457699, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457706, + "carbs": null, + "insulin": null + }, + { + "_id": "62943010ee9e6e00046d7ff3", + "eventType": "Correction Bolus", + "insulin": 0.26, + "created_at": "2022-05-30T02:46:22.948Z", + "date": 1653878782948, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21980, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62943011ee9e6e00046d7ff5", + "created_at": "2022-05-30T02:46:20.921Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 619407, + "type": "NORMAL", + "rate": 1.8876, + "percent": 120, + "pumpId": 457693, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457698, + "carbs": null, + "insulin": null + }, + { + "_id": "62942ee3ee9e6e00046d7ff1", + "created_at": "2022-05-30T02:41:20.762Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 298664, + "type": "NORMAL", + "rate": 0.5147999999999999, + "percent": -40, + "pumpId": 457690, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457692, + "carbs": null, + "insulin": null + }, + { + "_id": "62942db6ee9e6e00046d7fee", + "created_at": "2022-05-30T02:36:22.192Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 297076, + "type": "NORMAL", + "rate": 0.1716, + "percent": -80, + "pumpId": 457687, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457689, + "carbs": null, + "insulin": null + }, + { + "_id": "629427e7a90f7f00040c0d51", + "created_at": "2022-05-30T02:11:31.145Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1488556, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457684, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457686, + "carbs": null, + "insulin": null + }, + { + "_id": "62942688a90f7f00040c0d4e", + "created_at": "2022-05-30T02:05:44.144Z", + "enteredBy": "openaps://AndroidAPS", + "isValid": true, + "eventType": "Note", + "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Africa\\/Cairo\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":87.18851175096937},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":69.11416670978657},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":52.85200983689563},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":47.706921524115316},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":44.41678900521082},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":42.77172274575857},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":41.12665648630631},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":42.77172274575857},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":46.3471470877392},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":56.91754905511835},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":69.11416670978657},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":73.1797059280093},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":81.31078436445473},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":85.37632358267754},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":89.44186280090027},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":97.57294123734576},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":105.28424060494416}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":5.80877612703003},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":5.003949055875317},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":5.886998889265079},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":5.003949055875317}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":0.917},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":0.919},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":0.969},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":0.965},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":0.858},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":0.864},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":0.787},{\"time\":\"07:00\",\"timeAsSeconds\":25200,\"value\":0.81},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":0.756},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.776},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":0.777},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":0.753},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":0.723},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.72},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":0.718},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.721},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":0.71},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":0.635},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":0.603},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":0.582},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":0.727},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":0.739},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":0.759}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}]}", + "originalProfileName": "Training days", + "originalCustomizedName": "Training days", + "originalTimeshift": 0, + "originalPercentage": 100, + "originalDuration": 0, + "originalEnd": 1653876333580, + "notes": "Training days", + "carbs": null, + "insulin": null + }, + { + "_id": "6294266fa90f7f00040c0d4c", + "timeshift": 0, + "percentage": 100, + "created_at": "2022-05-30T02:05:33.580Z", + "enteredBy": "openaps://AndroidAPS", + "isValid": true, + "eventType": "Profile Switch", + "duration": 0, + "profile": "Training days", + "profileJson": "{\"units\":\"mg\\/dl\",\"dia\":6,\"timezone\":\"Africa\\/Cairo\",\"sens\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":87.18851175096937},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":69.11416670978657},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":52.85200983689563},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":47.706921524115316},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":44.41678900521082},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":42.77172274575857},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":41.12665648630631},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":42.77172274575857},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":46.3471470877392},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":56.91754905511835},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":69.11416670978657},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":73.1797059280093},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":81.31078436445473},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":85.37632358267754},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":89.44186280090027},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":97.57294123734576},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":105.28424060494416}],\"carbratio\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":5.80877612703003},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":5.003949055875317},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":5.886998889265079},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":5.003949055875317}],\"basal\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":0.917},{\"time\":\"01:00\",\"timeAsSeconds\":3600,\"value\":0.919},{\"time\":\"02:00\",\"timeAsSeconds\":7200,\"value\":0.969},{\"time\":\"03:00\",\"timeAsSeconds\":10800,\"value\":0.965},{\"time\":\"04:00\",\"timeAsSeconds\":14400,\"value\":0.858},{\"time\":\"05:00\",\"timeAsSeconds\":18000,\"value\":0.864},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":0.787},{\"time\":\"07:00\",\"timeAsSeconds\":25200,\"value\":0.81},{\"time\":\"08:00\",\"timeAsSeconds\":28800,\"value\":0.756},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":0.776},{\"time\":\"10:00\",\"timeAsSeconds\":36000,\"value\":0.777},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":0.753},{\"time\":\"12:00\",\"timeAsSeconds\":43200,\"value\":0.723},{\"time\":\"13:00\",\"timeAsSeconds\":46800,\"value\":0.72},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":0.718},{\"time\":\"15:00\",\"timeAsSeconds\":54000,\"value\":0.721},{\"time\":\"16:00\",\"timeAsSeconds\":57600,\"value\":0.71},{\"time\":\"17:00\",\"timeAsSeconds\":61200,\"value\":0.635},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":0.603},{\"time\":\"19:00\",\"timeAsSeconds\":68400,\"value\":0.582},{\"time\":\"20:00\",\"timeAsSeconds\":72000,\"value\":0.727},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":0.739},{\"time\":\"22:00\",\"timeAsSeconds\":79200,\"value\":0.739},{\"time\":\"23:00\",\"timeAsSeconds\":82800,\"value\":0.759}],\"target_low\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}],\"target_high\":[{\"time\":\"00:00\",\"timeAsSeconds\":0,\"value\":100},{\"time\":\"06:00\",\"timeAsSeconds\":21600,\"value\":90},{\"time\":\"09:00\",\"timeAsSeconds\":32400,\"value\":100},{\"time\":\"11:00\",\"timeAsSeconds\":39600,\"value\":90},{\"time\":\"14:00\",\"timeAsSeconds\":50400,\"value\":100},{\"time\":\"18:00\",\"timeAsSeconds\":64800,\"value\":90},{\"time\":\"21:00\",\"timeAsSeconds\":75600,\"value\":100}]}", + "carbs": null, + "insulin": null + }, + { + "_id": "62942460a90f7f00040c0d48", + "created_at": "2022-05-30T01:56:36.130Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 893527, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457677, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457683, + "carbs": null, + "insulin": null + }, + { + "_id": "6294219fa90f7f00040c0d41", + "eventType": "Temporary Target", + "duration": 90, + "durationInMilliseconds": 5400000, + "isValid": true, + "created_at": "2022-05-30T01:45:00.160Z", + "timestamp": 1653875100160, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 120, + "targetTop": 120, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "62941769773aab00049f760c", + "created_at": "2022-05-30T01:01:19.791Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 55, + "durationInMilliseconds": 3314849, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457674, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457676, + "carbs": null, + "insulin": null + }, + { + "_id": "62941070773aab00049f75ff", + "created_at": "2022-05-30T00:31:28.314Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1789990, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457669, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457673, + "carbs": null, + "insulin": null + }, + { + "_id": "62940e203d4dab0004cd1c4d", + "created_at": "2022-05-30T00:21:34.178Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 591648, + "type": "NORMAL", + "rate": 1.1223, + "percent": -10, + "pumpId": 457666, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457668, + "carbs": null, + "insulin": null + }, + { + "_id": "6294094f3d4dab0004cd1c42", + "created_at": "2022-05-30T00:01:02.427Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 20, + "durationInMilliseconds": 1230257, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457662, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457665, + "carbs": null, + "insulin": null + }, + { + "_id": "629409363d4dab0004cd1c40", + "eventType": "Temporary Target", + "duration": 90, + "durationInMilliseconds": 5400000, + "isValid": true, + "created_at": "2022-05-30T00:00:41.151Z", + "timestamp": 1653868841151, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 120, + "targetTop": 120, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "629405d50174fb0004ce672c", + "created_at": "2022-05-29T23:46:20.699Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 879249, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457657, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457661, + "carbs": null, + "insulin": null + }, + { + "_id": "6294000a0174fb0004ce6721", + "created_at": "2022-05-29T23:21:37.300Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1481907, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457654, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457656, + "carbs": null, + "insulin": null + }, + { + "_id": "6293fb25d1a5200004a64e29", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-29T23:00:27.400Z", + "timestamp": 1653865227400, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 110, + "targetTop": 110, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "6293fa2ad1a5200004a64e27", + "created_at": "2022-05-29T22:56:19.507Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1515302, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457650, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457653, + "carbs": null, + "insulin": null + }, + { + "_id": "6293f8fcd1a5200004a64e22", + "eventType": "Correction Bolus", + "insulin": 0.22, + "created_at": "2022-05-29T22:51:31.787Z", + "date": 1653864691787, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21979, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293f8fcd1a5200004a64e24", + "created_at": "2022-05-29T22:51:29.742Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 288274, + "type": "NORMAL", + "rate": 0.43, + "percent": -60, + "pumpId": 457645, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457649, + "carbs": null, + "insulin": null + }, + { + "_id": "6293f7e8d1a5200004a64e20", + "created_at": "2022-05-29T22:46:43.874Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 284375, + "type": "NORMAL", + "rate": 0.43, + "percent": -60, + "pumpId": 457642, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457644, + "carbs": null, + "insulin": null + }, + { + "_id": "6293f6d2d1a5200004a64e1a", + "eventType": "Correction Bolus", + "insulin": 0.14, + "created_at": "2022-05-29T22:41:50.545Z", + "date": 1653864110545, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21978, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293f6d3d1a5200004a64e1c", + "created_at": "2022-05-29T22:41:48.373Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 294017, + "type": "NORMAL", + "rate": 0.3225, + "percent": -70, + "pumpId": 457637, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457641, + "carbs": null, + "insulin": null + }, + { + "_id": "6293f59d9ecc5e0004355b00", + "created_at": "2022-05-29T22:36:57.686Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 288195, + "type": "NORMAL", + "rate": 0.3225, + "percent": -70, + "pumpId": 457634, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457636, + "carbs": null, + "insulin": null + }, + { + "_id": "6293f46f9ecc5e0004355afc", + "eventType": "Correction Bolus", + "insulin": 0.46, + "created_at": "2022-05-29T22:31:50.989Z", + "date": 1653863510989, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21977, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293f46f9ecc5e0004355afd", + "created_at": "2022-05-29T22:31:48.259Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 299000, + "type": "FAKE_EXTENDED", + "rate": 3.242224080267558, + "absolute": 3.242224080267558, + "pumpId": 21976, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-29T22:31:48.259Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 4, + "durationInMilliseconds": 299000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.18, + "relative": 2.1672240802675584, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 21976, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "6293eaa265b2420004c06370", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-29T21:50:13.436Z", + "timestamp": 1653861013436, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 110, + "targetTop": 110, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "6293f750d1a5200004a64e1d", + "eventType": "Carb Correction", + "carbs": 10, + "created_at": "2022-05-29T21:45:40.000Z", + "isValid": true, + "date": 1653860740000, + "insulin": null + }, + { + "_id": "6293e89365b2420004c0636c", + "created_at": "2022-05-29T21:41:33.569Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 50, + "durationInMilliseconds": 3003675, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457619, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457624, + "carbs": null, + "insulin": null + }, + { + "_id": "6293e19d65b2420004c06360", + "created_at": "2022-05-29T21:11:41.680Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1789396, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457616, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457618, + "carbs": null, + "insulin": null + }, + { + "_id": "6293e07065b2420004c0635c", + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-29T21:06:44.914Z", + "date": 1653858404914, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21975, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293de1665b2420004c06357", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-29T20:56:33.937Z", + "date": 1653857793937, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21974, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293da9f5d63e500043da7b2", + "created_at": "2022-05-29T20:41:52.642Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1787544, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457608, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457615, + "carbs": null, + "insulin": null + }, + { + "_id": "6293d9715d63e500043da7ae", + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-29T20:36:42.707Z", + "date": 1653856602707, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21973, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293d6fe5d63e500043da7a9", + "eventType": "Correction Bolus", + "insulin": 0.42, + "created_at": "2022-05-29T20:26:31.571Z", + "date": 1653855991571, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21972, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293d4bc5d63e500043da7a4", + "eventType": "Correction Bolus", + "insulin": 0.38, + "created_at": "2022-05-29T20:16:46.053Z", + "date": 1653855406053, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21971, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293d3765d63e500043da7a1", + "eventType": "Correction Bolus", + "insulin": 0.44, + "created_at": "2022-05-29T20:11:31.773Z", + "date": 1653855091773, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21970, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293d14a0c2a950004a81e33", + "eventType": "Correction Bolus", + "insulin": 0.54, + "created_at": "2022-05-29T20:01:55.412Z", + "date": 1653854515412, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21969, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293ced60c2a950004a81e2e", + "eventType": "Correction Bolus", + "insulin": 0.5, + "created_at": "2022-05-29T19:51:40.370Z", + "date": 1653853900370, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21968, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293cc7c0c2a950004a81e29", + "eventType": "Correction Bolus", + "insulin": 0.46, + "created_at": "2022-05-29T19:41:39.514Z", + "date": 1653853299514, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21967, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293ca2a822c320004b85211", + "eventType": "Correction Bolus", + "insulin": 0.24, + "created_at": "2022-05-29T19:31:41.148Z", + "date": 1653852701148, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21966, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293c571822c320004b85209", + "created_at": "2022-05-29T19:11:35.804Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 90, + "durationInMilliseconds": 5415345, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457588, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457607, + "carbs": null, + "insulin": null + }, + { + "_id": "6293c474822c320004b85205", + "eventType": "Meal Bolus", + "insulin": 7.54, + "created_at": "2022-05-29T19:07:09.325Z", + "date": 1653851229325, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21965, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293c45b822c320004b85204", + "eventType": "Bolus Wizard", + "created_at": "2022-05-29T19:06:54.838Z", + "isValid": true, + "bolusCalculatorResult": "{\"basalIOB\":0.785,\"bolusIOB\":-2.29,\"carbs\":45.0,\"carbsInsulin\":8.908723692318452,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1653851214949,\"glucoseDifference\":41.0,\"glucoseInsulin\":0.4173320827373653,\"glucoseTrend\":18.0,\"glucoseValue\":141.0,\"ic\":5.051228610760625,\"id\":1574,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":98.24310590039647,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":90,\"profileName\":\"Weekend days\",\"superbolusInsulin\":0.0,\"targetBGHigh\":100.0,\"targetBGLow\":100.0,\"timestamp\":1653851214838,\"totalInsulin\":7.53,\"trendInsulin\":0.549656889458969,\"utcOffset\":7200000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":true,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}", + "date": 1653851214838, + "glucose": 141, + "units": "mg/dl", + "notes": "", + "carbs": null, + "insulin": null + }, + { + "_id": "6293c442822c320004b85203", + "created_at": "2022-05-29T19:06:29.428Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304884, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457583, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457587, + "carbs": null, + "insulin": null + }, + { + "_id": "6293c32d822c320004b851ff", + "eventType": "Correction Bolus", + "insulin": 0.9, + "created_at": "2022-05-29T19:01:59.437Z", + "date": 1653850919437, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21964, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293c32e822c320004b85200", + "created_at": "2022-05-29T19:01:56.046Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 270897, + "type": "NORMAL", + "rate": 0.0774, + "percent": -90, + "pumpId": 457578, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457582, + "carbs": null, + "insulin": null + }, + { + "_id": "6293c205822c320004b851fc", + "created_at": "2022-05-29T18:56:56.166Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 298402, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457574, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457577, + "carbs": null, + "insulin": null + }, + { + "_id": "6293c0be822c320004b851f7", + "eventType": "Correction Bolus", + "insulin": 0.88, + "created_at": "2022-05-29T18:51:38.181Z", + "date": 1653850298181, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21963, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293c0be822c320004b851f8", + "created_at": "2022-05-29T18:51:35.515Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 311000, + "type": "FAKE_EXTENDED", + "rate": 2.8176012861736335, + "absolute": 2.8176012861736335, + "pumpId": 21962, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-29T18:51:35.515Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 5, + "durationInMilliseconds": 311000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.18, + "relative": 2.0836012861736335, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 21962, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "6293c474822c320004b85206", + "eventType": "Meal Bolus", + "carbs": 45, + "created_at": "2022-05-29T18:31:54.837Z", + "isValid": true, + "date": 1653849114837, + "insulin": null + }, + { + "_id": "6293b8b9411d3400044ea44d", + "created_at": "2022-05-29T18:17:21.698Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 34, + "durationInMilliseconds": 2041809, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457562, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457564, + "carbs": null, + "insulin": null + }, + { + "_id": "6293b83b411d3400044ea449", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-29T18:14:57.596Z", + "timestamp": 1653848097596, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 110, + "targetTop": 110, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "6293abc46219a300042d6779", + "created_at": "2022-05-29T17:21:50.383Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 55, + "durationInMilliseconds": 3329827, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457558, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457561, + "carbs": null, + "insulin": null + }, + { + "_id": "6293a737ae43dd00049c530b", + "eventType": "Correction Bolus", + "insulin": 0.7, + "created_at": "2022-05-29T17:02:22.679Z", + "date": 1653843742679, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21961, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293a4c3ae43dd00049c5305", + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-29T16:51:57.840Z", + "date": 1653843117840, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21960, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293a4c3ae43dd00049c5306", + "created_at": "2022-05-29T16:51:54.897Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1792996, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457550, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457557, + "carbs": null, + "insulin": null + }, + { + "_id": "6293a267ae43dd00049c52ff", + "eventType": "Correction Bolus", + "insulin": 0.4, + "created_at": "2022-05-29T16:41:53.804Z", + "date": 1653842513804, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21959, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62939ff2ae43dd00049c52fb", + "eventType": "Correction Bolus", + "insulin": 0.44, + "created_at": "2022-05-29T16:31:44.873Z", + "date": 1653841904873, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21958, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62939dc64c156c000419f12f", + "eventType": "Correction Bolus", + "insulin": 0.34, + "created_at": "2022-05-29T16:22:07.129Z", + "date": 1653841327129, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21957, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62939dc74c156c000419f130", + "created_at": "2022-05-29T16:22:04.725Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1788689, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457541, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457549, + "carbs": null, + "insulin": null + }, + { + "_id": "62939a3d4c156c000419f128", + "eventType": "Correction Bolus", + "insulin": 0.54, + "created_at": "2022-05-29T16:07:05.844Z", + "date": 1653840425844, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21956, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629398f64c156c000419f124", + "eventType": "Correction Bolus", + "insulin": 0.58, + "created_at": "2022-05-29T16:01:46.109Z", + "date": 1653840106109, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21955, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629396a6c4590900040354f8", + "eventType": "Correction Bolus", + "insulin": 0.46, + "created_at": "2022-05-29T15:51:51.765Z", + "date": 1653839511765, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21954, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62939579c4590900040354f6", + "created_at": "2022-05-29T15:46:45.168Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 35, + "durationInMilliseconds": 2118073, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457531, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457540, + "carbs": null, + "insulin": null + }, + { + "_id": "62939464c4590900040354f2", + "eventType": "Correction Bolus", + "insulin": 0.54, + "created_at": "2022-05-29T15:42:16.590Z", + "date": 1653838936590, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21953, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629391efc4590900040354ed", + "eventType": "Correction Bolus", + "insulin": 0.82, + "created_at": "2022-05-29T15:31:48.944Z", + "date": 1653838308944, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21952, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62938fadc4590900040354e8", + "eventType": "Correction Bolus", + "insulin": 1.14, + "created_at": "2022-05-29T15:22:16.968Z", + "date": 1653837736968, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21951, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62938e6c10fec10004d25b98", + "eventType": "Correction Bolus", + "insulin": 1.48, + "created_at": "2022-05-29T15:16:51.754Z", + "date": 1653837411754, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21950, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62938e6d10fec10004d25b9a", + "created_at": "2022-05-29T15:16:49.736Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1793954, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457519, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457530, + "carbs": null, + "insulin": null + }, + { + "_id": "62938d5710fec10004d25b96", + "created_at": "2022-05-29T15:12:03.739Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 284504, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457516, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457518, + "carbs": null, + "insulin": null + }, + { + "_id": "62938c1110fec10004d25b92", + "eventType": "Correction Bolus", + "insulin": 1.52, + "created_at": "2022-05-29T15:06:35.585Z", + "date": 1653836795585, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21949, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62938c1110fec10004d25b93", + "created_at": "2022-05-29T15:06:32.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 320000, + "type": "FAKE_EXTENDED", + "rate": 3.706, + "absolute": 3.706, + "pumpId": 21948, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-29T15:06:32.000Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 5, + "durationInMilliseconds": 320000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.26, + "relative": 2.925, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 21948, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "62938ae310fec10004d25b8d", + "eventType": "Meal Bolus", + "carbs": 40, + "created_at": "2022-05-29T14:50:49.000Z", + "isValid": true, + "date": 1653835849000, + "insulin": null + }, + { + "_id": "629386d72e64470004ddfa33", + "eventType": "Note", + "isValid": true, + "created_at": "2022-05-29T14:44:19.893Z", + "units": "mg/dl", + "notes": "AndroidAPS est lancé - samsung SM-A405FN", + "carbs": null, + "insulin": null + }, + { + "_id": "629376f21d13c2000469a799", + "created_at": "2022-05-29T13:36:41.814Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 89, + "durationInMilliseconds": 5353198, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457504, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457508, + "carbs": null, + "insulin": null + }, + { + "_id": "629373681d13c2000469a791", + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-29T13:21:43.137Z", + "date": 1653830503137, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21947, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629371261d13c2000469a78d", + "eventType": "Correction Bolus", + "insulin": 0.42, + "created_at": "2022-05-29T13:11:44.482Z", + "date": 1653829904482, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21946, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62936d96b97b6600046a28ce", + "eventType": "Correction Bolus", + "insulin": 0.46, + "created_at": "2022-05-29T12:56:41.095Z", + "date": 1653829001095, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21945, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62936b54b97b6600046a28c9", + "eventType": "Correction Bolus", + "insulin": 0.5, + "created_at": "2022-05-29T12:47:00.369Z", + "date": 1653828420369, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21944, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6293658bb97b6600046a28be", + "created_at": "2022-05-29T12:21:43.345Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 74, + "durationInMilliseconds": 4496983, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457491, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457503, + "carbs": null, + "insulin": null + }, + { + "_id": "62936300b97b6600046a28b8", + "eventType": "Correction Bolus", + "insulin": 0.38, + "created_at": "2022-05-29T12:11:34.015Z", + "date": 1653826294015, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21943, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629360a637fd2b0004af9367", + "eventType": "Correction Bolus", + "insulin": 0.52, + "created_at": "2022-05-29T12:01:32.648Z", + "date": 1653825692648, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21942, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629359a737fd2b0004af935b", + "created_at": "2022-05-29T11:31:24.472Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 50, + "durationInMilliseconds": 3016384, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457483, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457490, + "carbs": null, + "insulin": null + }, + { + "_id": "629356fcab873a0004e70cfe", + "eventType": "Meal Bolus", + "insulin": 6.74, + "created_at": "2022-05-29T11:20:25.910Z", + "date": 1653823225910, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21941, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62935715ab873a0004e70d00", + "eventType": "Meal Bolus", + "carbs": 45, + "created_at": "2022-05-29T11:20:17.286Z", + "isValid": true, + "date": 1653823217286, + "insulin": null + }, + { + "_id": "629356fcab873a0004e70cff", + "eventType": "Bolus Wizard", + "created_at": "2022-05-29T11:20:17.286Z", + "isValid": true, + "bolusCalculatorResult": "{\"basalIOB\":0.991,\"bolusIOB\":-1.114,\"carbs\":45.0,\"carbsInsulin\":7.572415138470685,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1653823217360,\"glucoseDifference\":6.0,\"glucoseInsulin\":0.06718028648942959,\"glucoseTrend\":-1.28,\"glucoseValue\":96.0,\"ic\":5.9426218950125,\"id\":1572,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":89.31191445490582,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":90,\"profileName\":\"Weekend days\",\"superbolusInsulin\":0.0,\"targetBGHigh\":90.0,\"targetBGLow\":90.0,\"timestamp\":1653823217286,\"totalInsulin\":6.73,\"trendInsulin\":-0.04299538335323493,\"utcOffset\":7200000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":true,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}", + "date": 1653823217286, + "glucose": 96, + "units": "mg/dl", + "notes": "", + "carbs": null, + "insulin": null + }, + { + "_id": "62934b8981eecb0004b36989", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T10:31:28.825Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "11g de glucides requis dans 20 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62934a7381eecb0004b36986", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T10:26:41.576Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "13g de glucides requis dans 25 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6293494381eecb0004b36984", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T10:21:34.052Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "18g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "6293481281eecb0004b36980", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T10:16:27.158Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "21g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629346e481eecb0004b3697d", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T10:11:47.978Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "23g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629345c1e492ca000461c5f4", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T10:06:35.040Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "26g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62934366e492ca000461c5f0", + "created_at": "2022-05-29T09:56:45.285Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 94, + "durationInMilliseconds": 5677694, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457476, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457482, + "carbs": null, + "insulin": null + }, + { + "_id": "62934365e492ca000461c5ee", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:56:32.097Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "32g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62934237e492ca000461c5eb", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:51:39.114Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "32g de glucides requis dans 0 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62934109e492ca000461c5e8", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:46:38.397Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "32g de glucides requis dans 10 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62933fdbe492ca000461c5e5", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:41:22.751Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "32g de glucides requis dans 15 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62933e94e492ca000461c5e2", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:36:17.776Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "33g de glucides requis dans 10 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62933d6ea93f2f00043e98fd", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:31:21.229Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "34g de glucides requis dans 5 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62935812ab873a0004e70d03", + "eventType": "Meal Bolus", + "carbs": 20, + "created_at": "2022-05-29T09:30:29.000Z", + "isValid": true, + "date": 1653816629000, + "insulin": null + }, + { + "_id": "62933c72a93f2f00043e98fa", + "created_at": "2022-05-29T09:26:54.313Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1788486, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457473, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457475, + "carbs": null, + "insulin": null + }, + { + "_id": "62933c59a93f2f00043e98f8", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:26:41.044Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "34g de glucides requis dans 5 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62933bf4a93f2f00043e98f7", + "eventType": "Temporary Target", + "duration": 60, + "durationInMilliseconds": 3600000, + "isValid": true, + "created_at": "2022-05-29T09:24:55.780Z", + "timestamp": 1653816295780, + "enteredBy": "AndroidAPS", + "reason": "Automation", + "targetBottom": 110, + "targetTop": 110, + "units": "mg/dl", + "carbs": null, + "insulin": null + }, + { + "_id": "62933b44a93f2f00043e98f4", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:22:08.766Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "33g de glucides requis dans 10 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629339fda93f2f00043e98f1", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:16:37.269Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "34g de glucides requis dans 10 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629338cfa93f2f00043e98ee", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:11:36.712Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "34g de glucides requis dans 15 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629337a1a93f2f00043e98eb", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:06:35.041Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "35g de glucides requis dans 15 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62933673a93f2f00043e98e8", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T09:01:29.382Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "35g de glucides requis dans 20 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62933590a93f2f00043e98e6", + "created_at": "2022-05-29T08:56:57.810Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1794023, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457470, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457472, + "carbs": null, + "insulin": null + }, + { + "_id": "62933553d9e5bf0004488aca", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T08:56:40.706Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "24g de glucides requis dans 20 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "629332f8d9e5bf0004488ac5", + "eventType": "Announcement", + "isValid": true, + "created_at": "2022-05-29T08:46:32.658Z", + "enteredBy": "AndroidAPS", + "units": "mg/dl", + "notes": "23g de glucides requis dans 45 min.", + "isAnnouncement": true, + "carbs": null, + "insulin": null + }, + { + "_id": "62932e71d9e5bf0004488abd", + "created_at": "2022-05-29T08:27:08.244Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 29, + "durationInMilliseconds": 1788077, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457467, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457469, + "carbs": null, + "insulin": null + }, + { + "_id": "62932d70d9e5bf0004488ab9", + "eventType": "Meal Bolus", + "insulin": 14.06, + "created_at": "2022-05-29T08:23:01.108Z", + "date": 1653812581108, + "type": "NORMAL", + "isValid": true, + "isSMB": false, + "pumpId": 21940, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62932d70d9e5bf0004488ab8", + "eventType": "Bolus Wizard", + "created_at": "2022-05-29T08:22:59.388Z", + "isValid": true, + "bolusCalculatorResult": "{\"basalIOB\":-0.354,\"bolusIOB\":-1.975,\"carbs\":80.0,\"carbsInsulin\":15.837731008566136,\"cob\":0.0,\"cobInsulin\":0.0,\"dateCreated\":1653812579455,\"glucoseDifference\":72.0,\"glucoseInsulin\":1.1516620541045064,\"glucoseTrend\":20.06,\"glucoseValue\":172.0,\"ic\":5.051228610760625,\"id\":1570,\"interfaceIDs_backing\":{},\"isValid\":true,\"isf\":62.51834011843411,\"note\":\"\",\"otherCorrection\":0.0,\"percentageCorrection\":90,\"profileName\":\"Weekend days\",\"superbolusInsulin\":0.0,\"targetBGHigh\":100.0,\"targetBGLow\":100.0,\"timestamp\":1653812579388,\"totalInsulin\":14.06,\"trendInsulin\":0.9625975335556832,\"utcOffset\":7200000,\"version\":0,\"wasBasalIOBUsed\":true,\"wasBolusIOBUsed\":true,\"wasCOBUsed\":true,\"wasGlucoseUsed\":true,\"wasSuperbolusUsed\":false,\"wasTempTargetUsed\":false,\"wasTrendUsed\":true,\"wereCarbsUsed\":false}", + "date": 1653812579388, + "glucose": 172, + "units": "mg/dl", + "notes": "", + "carbs": null, + "insulin": null + }, + { + "_id": "62932d22d9e5bf0004488ab7", + "eventType": "Correction Bolus", + "insulin": 0.72, + "created_at": "2022-05-29T08:21:51.002Z", + "date": 1653812511002, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21939, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62932aefd9e5bf0004488ab1", + "eventType": "Correction Bolus", + "insulin": 0.86, + "created_at": "2022-05-29T08:12:14.562Z", + "date": 1653811934562, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21938, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62932af0d9e5bf0004488ab2", + "created_at": "2022-05-29T08:12:12.318Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 14, + "durationInMilliseconds": 887000, + "type": "FAKE_EXTENDED", + "rate": 4.17924464487035, + "absolute": 4.17924464487035, + "pumpId": 21937, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-29T08:12:12.318Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 14, + "durationInMilliseconds": 887000, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.84, + "relative": 3.4092446448703493, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 21937, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "carbs": null, + "insulin": null + }, + { + "_id": "62932893d9e5bf0004488aab", + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-29T08:02:17.683Z", + "date": 1653811337683, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21936, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "62932893d9e5bf0004488aac", + "created_at": "2022-05-29T08:02:14.951Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 597367, + "type": "FAKE_EXTENDED", + "rate": 2.01, + "absolute": 2.01, + "pumpId": 21935, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "extendedEmulated": { + "created_at": "2022-05-29T08:02:14.951Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Combo Bolus", + "duration": 9, + "durationInMilliseconds": 597367, + "splitNow": 0, + "splitExt": 100, + "enteredinsulin": 0.20575974444444445, + "relative": 1.24, + "isValid": true, + "isEmulatingTempBasal": true, + "pumpId": 21935, + "endId": 21937, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206" + }, + "endId": 21937, + "carbs": null, + "insulin": null + }, + { + "_id": "6293261ed9e5bf0004488aa6", + "created_at": "2022-05-29T07:51:48.306Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 613607, + "type": "NORMAL", + "rate": 0.6152000000000001, + "percent": -20, + "pumpId": 457444, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457447, + "carbs": null, + "insulin": null + }, + { + "_id": "62932da8d9e5bf0004488aba", + "eventType": "Meal Bolus", + "carbs": 80, + "created_at": "2022-05-29T07:32:59.387Z", + "isValid": true, + "date": 1653809579387, + "insulin": null + }, + { + "_id": "62932152b1568c00046a66d4", + "created_at": "2022-05-29T07:31:27.748Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 20, + "durationInMilliseconds": 1218071, + "type": "NORMAL", + "rate": 0.07690000000000001, + "percent": -90, + "pumpId": 457440, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457443, + "carbs": null, + "insulin": null + }, + { + "_id": "62931caa95c7b700044ac610", + "created_at": "2022-05-29T07:11:35.216Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 19, + "durationInMilliseconds": 1191056, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457436, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457439, + "carbs": null, + "insulin": null + }, + { + "_id": "62931a3595c7b700044ac60a", + "created_at": "2022-05-29T07:01:05.427Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 627304, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457433, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457435, + "carbs": null, + "insulin": null + }, + { + "_id": "6293190795c7b700044ac607", + "created_at": "2022-05-29T06:55:45.020Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 317918, + "type": "NORMAL", + "rate": 0.8855000000000001, + "percent": 10, + "pumpId": 457429, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457432, + "carbs": null, + "insulin": null + }, + { + "_id": "629317d995c7b700044ac604", + "created_at": "2022-05-29T06:50:56.089Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 286443, + "type": "NORMAL", + "rate": 0.48300000000000004, + "percent": -40, + "pumpId": 457426, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457428, + "carbs": null, + "insulin": null + }, + { + "_id": "629316ab95c7b700044ac601", + "created_at": "2022-05-29T06:45:40.887Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 313705, + "type": "NORMAL", + "rate": 0.161, + "percent": -80, + "pumpId": 457423, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457425, + "carbs": null, + "insulin": null + }, + { + "_id": "6293157e95c7b700044ac5fe", + "created_at": "2022-05-29T06:40:49.495Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289898, + "type": "NORMAL", + "rate": 0.161, + "percent": -80, + "pumpId": 457420, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457422, + "carbs": null, + "insulin": null + }, + { + "_id": "62931458ddb62c00041b9e5e", + "created_at": "2022-05-29T06:36:04.950Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 283072, + "type": "NORMAL", + "rate": 0.24150000000000002, + "percent": -70, + "pumpId": 457417, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457419, + "carbs": null, + "insulin": null + }, + { + "_id": "6293132addb62c00041b9e5a", + "eventType": "Correction Bolus", + "insulin": 0.32, + "created_at": "2022-05-29T06:30:47.530Z", + "date": 1653805847530, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21934, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629311fcddb62c00041b9e58", + "created_at": "2022-05-29T06:25:40.126Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 10, + "durationInMilliseconds": 623334, + "type": "NORMAL", + "rate": 1.9320000000000002, + "percent": 140, + "pumpId": 457412, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457416, + "carbs": null, + "insulin": null + }, + { + "_id": "629310cdddb62c00041b9e53", + "eventType": "Correction Bolus", + "insulin": 0.16, + "created_at": "2022-05-29T06:20:41.770Z", + "date": 1653805241770, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21933, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "629310ceddb62c00041b9e55", + "created_at": "2022-05-29T06:20:39.976Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 297656, + "type": "NORMAL", + "rate": 1.288, + "percent": 60, + "pumpId": 457407, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457411, + "carbs": null, + "insulin": null + }, + { + "_id": "62930fa0ddb62c00041b9e51", + "created_at": "2022-05-29T06:15:38.026Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300456, + "type": "NORMAL", + "rate": 0.644, + "percent": -20, + "pumpId": 457404, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457406, + "carbs": null, + "insulin": null + }, + { + "_id": "62930d45ddb62c00041b9e4a", + "created_at": "2022-05-29T06:05:48.141Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 588392, + "type": "NORMAL", + "rate": 0.8855000000000001, + "percent": 10, + "pumpId": 457401, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457403, + "carbs": null, + "insulin": null + }, + { + "_id": "62930c197b537000043fa1eb", + "created_at": "2022-05-29T06:00:33.505Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 312147, + "type": "NORMAL", + "rate": 0.5635, + "percent": -30, + "pumpId": 457398, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457400, + "carbs": null, + "insulin": null + }, + { + "_id": "629309bc7b537000043fa1e5", + "created_at": "2022-05-29T05:50:47.255Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 584759, + "type": "NORMAL", + "rate": 0.8844000000000001, + "percent": 10, + "pumpId": 457393, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457397, + "carbs": null, + "insulin": null + }, + { + "_id": "629307797b537000043fa1e0", + "created_at": "2022-05-29T05:40:51.736Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 593029, + "type": "NORMAL", + "rate": 0.7236, + "percent": -10, + "pumpId": 457390, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457392, + "carbs": null, + "insulin": null + }, + { + "_id": "6293019235e0750004253d2c", + "created_at": "2022-05-29T05:15:44.511Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 25, + "durationInMilliseconds": 1505734, + "type": "NORMAL", + "rate": 0.08040000000000001, + "percent": -90, + "pumpId": 457387, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457389, + "carbs": null, + "insulin": null + }, + { + "_id": "6293006435e0750004253d29", + "created_at": "2022-05-29T05:10:38.330Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 304686, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457384, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457386, + "carbs": null, + "insulin": null + }, + { + "_id": "6292fa8d77f215000477fce4", + "created_at": "2022-05-29T04:45:45.401Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 24, + "durationInMilliseconds": 1491438, + "type": "NORMAL", + "rate": 0, + "percent": -100, + "pumpId": 457380, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457383, + "carbs": null, + "insulin": null + }, + { + "_id": "6292f95f77f215000477fce0", + "created_at": "2022-05-29T04:40:43.528Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 300380, + "type": "NORMAL", + "rate": 0.1524, + "percent": -80, + "pumpId": 457377, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457379, + "carbs": null, + "insulin": null + }, + { + "_id": "6292f70377f215000477fcdc", + "created_at": "2022-05-29T04:30:47.924Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 289800, + "type": "NORMAL", + "rate": 0.1524, + "percent": -80, + "pumpId": 457371, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457373, + "carbs": null, + "insulin": null + }, + { + "_id": "6292f5d477f215000477fcd7", + "eventType": "Correction Bolus", + "insulin": 0.28, + "created_at": "2022-05-29T04:25:41.075Z", + "date": 1653798341075, + "type": "SMB", + "isValid": true, + "isSMB": true, + "pumpId": 21932, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null + }, + { + "_id": "6292f5d577f215000477fcd9", + "created_at": "2022-05-29T04:25:38.818Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 5, + "durationInMilliseconds": 307615, + "type": "NORMAL", + "rate": 1.7526, + "percent": 130, + "pumpId": 457366, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457370, + "carbs": null, + "insulin": null + }, + { + "_id": "6292f3886a923a000405c861", + "created_at": "2022-05-29T04:15:51.340Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 585991, + "type": "NORMAL", + "rate": 0.2286, + "percent": -70, + "pumpId": 457363, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457365, + "carbs": null, + "insulin": null + }, + { + "_id": "6292f12c6a923a000405c85c", + "created_at": "2022-05-29T04:05:57.590Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 9, + "durationInMilliseconds": 591258, + "type": "NORMAL", + "rate": 0.3048, + "percent": -60, + "pumpId": 457360, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457362, + "carbs": null, + "insulin": null + }, + { + "_id": "6292f0006a923a000405c859", + "created_at": "2022-05-29T04:00:59.965Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 4, + "durationInMilliseconds": 296127, + "type": "NORMAL", + "rate": 0.6858, + "percent": -10, + "pumpId": 457357, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "endId": 457359, + "carbs": null, + "insulin": null + }, + { + "_id": "6292effe6a923a000405c856", + "created_at": "2022-05-29T04:00:41.006Z", + "enteredBy": "openaps://AndroidAPS", + "eventType": "Temp Basal", + "isValid": true, + "duration": 0, + "durationInMilliseconds": 17465, + "type": "NORMAL", + "rate": 0.9144, + "percent": 20, + "pumpId": 457354, + "endId": 457356, + "pumpType": "ACCU_CHEK_INSIGHT_BLUETOOTH", + "pumpSerial": "33013206", + "carbs": null, + "insulin": null + } +] diff --git a/app/src/test/res/autotune/test4/profile.2022-05-30.json b/app/src/test/res/autotune/test4/profile.2022-05-30.json new file mode 100644 index 0000000000..41b52dfb83 --- /dev/null +++ b/app/src/test/res/autotune/test4/profile.2022-05-30.json @@ -0,0 +1,192 @@ +{ + "autosens_max": 1.3, + "autosens_min": 0.7, + "basalprofile": [ + { + "i": 0, + "minutes": 0, + "rate": 0.977, + "start": "00:00:00", + "untuned": 4 + }, + { + "i": 1, + "minutes": 60, + "rate": 1.011, + "start": "01:00:00", + "untuned": 1 + }, + { + "i": 2, + "minutes": 120, + "rate": 0.996, + "start": "02:00:00" + }, + { + "i": 3, + "minutes": 180, + "rate": 1.13, + "start": "03:00:00" + }, + { + "i": 4, + "minutes": 240, + "rate": 0.937, + "start": "04:00:00" + }, + { + "i": 5, + "minutes": 300, + "rate": 0.877, + "start": "05:00:00" + }, + { + "i": 6, + "minutes": 360, + "rate": 0.779, + "start": "06:00:00" + }, + { + "i": 7, + "minutes": 420, + "rate": 0.827, + "start": "07:00:00", + "untuned": 1 + }, + { + "i": 8, + "minutes": 480, + "rate": 0.882, + "start": "08:00:00", + "untuned": 1 + }, + { + "i": 9, + "minutes": 540, + "rate": 0.878, + "start": "09:00:00", + "untuned": 5 + }, + { + "i": 10, + "minutes": 600, + "rate": 0.879, + "start": "10:00:00", + "untuned": 5 + }, + { + "i": 11, + "minutes": 660, + "rate": 0.867, + "start": "11:00:00", + "untuned": 5 + }, + { + "i": 12, + "minutes": 720, + "rate": 0.86, + "start": "12:00:00", + "untuned": 5 + }, + { + "i": 13, + "minutes": 780, + "rate": 0.858, + "start": "13:00:00", + "untuned": 5 + }, + { + "i": 14, + "minutes": 840, + "rate": 0.855, + "start": "14:00:00", + "untuned": 5 + }, + { + "i": 15, + "minutes": 900, + "rate": 0.85, + "start": "15:00:00", + "untuned": 5 + }, + { + "i": 16, + "minutes": 960, + "rate": 0.82, + "start": "16:00:00", + "untuned": 5 + }, + { + "i": 17, + "minutes": 1020, + "rate": 0.784, + "start": "17:00:00", + "untuned": 5 + }, + { + "i": 18, + "minutes": 1080, + "rate": 0.778, + "start": "18:00:00", + "untuned": 4 + }, + { + "i": 19, + "minutes": 1140, + "rate": 0.815, + "start": "19:00:00", + "untuned": 4 + }, + { + "i": 20, + "minutes": 1200, + "rate": 0.854, + "start": "20:00:00", + "untuned": 3 + }, + { + "i": 21, + "minutes": 1260, + "rate": 0.849, + "start": "21:00:00", + "untuned": 4 + }, + { + "i": 22, + "minutes": 1320, + "rate": 0.849, + "start": "22:00:00", + "untuned": 4 + }, + { + "i": 23, + "minutes": 1380, + "rate": 0.843, + "start": "23:00:00", + "untuned": 4 + } + ], + "carb_ratio": 5.021, + "csf": 15.669, + "curve": "ultra-rapid", + "dia": 6, + "insulinPeakTime": 45, + "isfProfile": { + "sensitivities": [ + { + "endoffset": 1440, + "i": 0, + "offset": 0, + "sensitivity": 83.014, + "start": "00:00:00", + "x": 0 + } + ] + }, + "min_5m_carbimpact": 8, + "name": "Tuned Dyn2", + "sens": 83.014, + "timezone": "Europe/Paris", + "units": "mg/dl", + "useCustomPeakTime": true +} diff --git a/app/src/test/res/autotune/test4/profile.pump.json b/app/src/test/res/autotune/test4/profile.pump.json new file mode 100644 index 0000000000..eefadabacb --- /dev/null +++ b/app/src/test/res/autotune/test4/profile.pump.json @@ -0,0 +1,147 @@ +{ + "name": "Tuned Dyn2", + "min_5m_carbimpact": 8, + "dia": 6, + "curve": "ultra-rapid", + "useCustomPeakTime": true, + "insulinPeakTime": 45, + "basalprofile": [ + { + "start": "00:00:00", + "minutes": 0, + "rate": 0.966 + }, + { + "start": "01:00:00", + "minutes": 60, + "rate": 0.977 + }, + { + "start": "02:00:00", + "minutes": 120, + "rate": 0.971 + }, + { + "start": "03:00:00", + "minutes": 180, + "rate": 1.111 + }, + { + "start": "04:00:00", + "minutes": 240, + "rate": 0.974 + }, + { + "start": "05:00:00", + "minutes": 300, + "rate": 0.923 + }, + { + "start": "06:00:00", + "minutes": 360, + "rate": 0.823 + }, + { + "start": "07:00:00", + "minutes": 420, + "rate": 0.855 + }, + { + "start": "08:00:00", + "minutes": 480, + "rate": 0.902 + }, + { + "start": "09:00:00", + "minutes": 540, + "rate": 0.934 + }, + { + "start": "10:00:00", + "minutes": 600, + "rate": 0.938 + }, + { + "start": "11:00:00", + "minutes": 660, + "rate": 0.903 + }, + { + "start": "12:00:00", + "minutes": 720, + "rate": 0.882 + }, + { + "start": "13:00:00", + "minutes": 780, + "rate": 0.874 + }, + { + "start": "14:00:00", + "minutes": 840, + "rate": 0.866 + }, + { + "start": "15:00:00", + "minutes": 900, + "rate": 0.848 + }, + { + "start": "16:00:00", + "minutes": 960, + "rate": 0.758 + }, + { + "start": "17:00:00", + "minutes": 1020, + "rate": 0.65 + }, + { + "start": "18:00:00", + "minutes": 1080, + "rate": 0.648 + }, + { + "start": "19:00:00", + "minutes": 1140, + "rate": 0.738 + }, + { + "start": "20:00:00", + "minutes": 1200, + "rate": 0.847 + }, + { + "start": "21:00:00", + "minutes": 1260, + "rate": 0.861 + }, + { + "start": "22:00:00", + "minutes": 1320, + "rate": 0.863 + }, + { + "start": "23:00:00", + "minutes": 1380, + "rate": 0.843 + } + ], + "isfProfile": { + "sensitivities": [ + { + "i": 0, + "start": "00:00:00", + "sensitivity": 86.2, + "offset": 0, + "x": 0, + "endoffset": 1440 + } + ] + }, + "carb_ratio": 5.75, + "autosens_max": 1.3, + "autosens_min": 0.7, + "units": "mg/dl", + "timezone": "Europe/Paris" +} diff --git a/automation/src/main/java/info/nightscout/androidaps/automation/di/AutomationModule.kt b/automation/src/main/java/info/nightscout/androidaps/automation/di/AutomationModule.kt index 0d40a894fa..b889b40692 100644 --- a/automation/src/main/java/info/nightscout/androidaps/automation/di/AutomationModule.kt +++ b/automation/src/main/java/info/nightscout/androidaps/automation/di/AutomationModule.kt @@ -33,6 +33,7 @@ abstract class AutomationModule { @ContributesAndroidInjector abstract fun triggerWifiSsidInjector(): TriggerWifiSsid @ContributesAndroidInjector abstract fun actionInjector(): Action + @ContributesAndroidInjector abstract fun actionStopProcessingInjector(): ActionStopProcessing @ContributesAndroidInjector abstract fun actionLoopDisableInjector(): ActionLoopDisable @ContributesAndroidInjector abstract fun actionLoopEnableInjector(): ActionLoopEnable @ContributesAndroidInjector abstract fun actionLoopResumeInjector(): ActionLoopResume diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationEvent.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationEvent.kt index 13842ec74a..6657204f97 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationEvent.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationEvent.kt @@ -4,6 +4,7 @@ import dagger.android.HasAndroidInjector import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.general.automation.actions.Action import info.nightscout.androidaps.plugins.general.automation.actions.ActionDummy +import info.nightscout.androidaps.plugins.general.automation.actions.ActionStopProcessing import info.nightscout.androidaps.plugins.general.automation.triggers.TriggerConnector import info.nightscout.androidaps.plugins.general.automation.triggers.TriggerDummy import info.nightscout.androidaps.utils.DateUtil @@ -52,6 +53,11 @@ class AutomationEvent(private val injector: HasAndroidInjector) { return result } + fun hasStopProcessing(): Boolean { + for (action in actions) if (action is ActionStopProcessing) return true + return false + } + fun toJSON(): String { val array = JSONArray() for (a in actions) array.put(a.toJSON()) diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt index fd941dd6ca..c7710432f7 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt @@ -212,8 +212,12 @@ class AutomationPlugin @Inject constructor( while (iterator.hasNext()) { val event = iterator.next() if (event.isEnabled && !event.userAction && event.shouldRun()) - if (event.systemAction || commonEventsEnabled) processEvent(event) + if (event.systemAction || commonEventsEnabled) { + processEvent(event) + if (event.hasStopProcessing()) break + } } + // we cannot detect connected BT devices // so let's collect all connection/disconnections between 2 runs of processActions() // TriggerBTDevice can pick up and process these events @@ -329,6 +333,7 @@ class AutomationPlugin @Inject constructor( //ActionLoopEnable(injector), //ActionLoopResume(injector), //ActionLoopSuspend(injector), + ActionStopProcessing(injector), ActionStartTempTarget(injector), ActionStopTempTarget(injector), ActionNotification(injector), diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionRunAutotune.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionRunAutotune.kt index c2687fffed..b1da120478 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionRunAutotune.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionRunAutotune.kt @@ -42,13 +42,19 @@ class ActionRunAutotune(injector: HasAndroidInjector) : Action(injector) { val profileName = if (inputProfileName.value == rh.gs(R.string.active)) "" else inputProfileName.value var message = if (autoSwitch) R.string.autotune_run_with_autoswitch else R.string.autotune_run_without_autoswitch Thread { - autotunePlugin.atLog("[Automation] Run Autotune $profileName, ${daysBack.value} days, Autoswitch $autoSwitch") - autotunePlugin.aapsAutotune(daysBack.value, autoSwitch, profileName) - if (!autotunePlugin.lastRunSuccess) { - message = R.string.autotune_run_with_error - aapsLogger.error(LTag.AUTOMATION, "Error during Autotune Run") + if (!autotunePlugin.calculationRunning) { + autotunePlugin.atLog("[Automation] Run Autotune $profileName, ${daysBack.value} days, Autoswitch $autoSwitch") + autotunePlugin.aapsAutotune(daysBack.value, autoSwitch, profileName) + if (!autotunePlugin.lastRunSuccess) { + message = R.string.autotune_run_with_error + aapsLogger.error(LTag.AUTOMATION, "Error during Autotune Run") + } + callback.result(PumpEnactResult(injector).success(autotunePlugin.lastRunSuccess).comment(message)).run() + } else { + message = R.string.autotune_run_cancelled + aapsLogger.debug(LTag.AUTOMATION, "Autotune run detected, Autotune Run Cancelled") + callback.result(PumpEnactResult(injector).success(false).comment(message)).run() } - callback.result(PumpEnactResult(injector).success(autotunePlugin.lastRunSuccess).comment(message)).run() }.start() return } diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStopProcessing.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStopProcessing.kt new file mode 100644 index 0000000000..eb437bb91c --- /dev/null +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStopProcessing.kt @@ -0,0 +1,33 @@ +package info.nightscout.androidaps.plugins.general.automation.actions + +import androidx.annotation.DrawableRes +import com.google.gson.JsonObject +import dagger.android.HasAndroidInjector +import info.nightscout.androidaps.automation.R +import info.nightscout.androidaps.data.PumpEnactResult +import info.nightscout.androidaps.queue.Callback +import org.json.JSONObject + +class ActionStopProcessing(injector: HasAndroidInjector) : Action(injector) { + + override fun friendlyName(): Int = R.string.stop_processing + override fun shortDescription(): String = rh.gs(R.string.stop_processing) + @DrawableRes override fun icon(): Int = R.drawable.ic_stop_24dp + + override fun isValid(): Boolean = true + + override fun doAction(callback: Callback) { + callback.result(PumpEnactResult(injector).success(true).comment(R.string.ok)).run() + } + + override fun toJSON(): String { + return JSONObject() + .put("type", this.javaClass.name) + .put("data", JsonObject()) + .toString() + } + + override fun fromJSON(data: String): Action = this + + override fun hasDialog(): Boolean = false +} \ No newline at end of file diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerBTDevice.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerBTDevice.kt index bb0c3848f1..81d22fecf9 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerBTDevice.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerBTDevice.kt @@ -1,8 +1,12 @@ package info.nightscout.androidaps.plugins.general.automation.triggers +import android.Manifest import android.bluetooth.BluetoothManager import android.content.Context +import android.content.pm.PackageManager +import android.os.Build import android.widget.LinearLayout +import androidx.core.app.ActivityCompat import com.google.common.base.Optional import dagger.android.HasAndroidInjector import info.nightscout.androidaps.automation.R @@ -13,9 +17,9 @@ import info.nightscout.androidaps.plugins.general.automation.elements.InputDropd import info.nightscout.androidaps.plugins.general.automation.elements.LayoutBuilder import info.nightscout.androidaps.plugins.general.automation.elements.StaticLabel import info.nightscout.androidaps.utils.JsonHelper +import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.shared.logging.LTag import org.json.JSONObject -import java.util.* import javax.inject.Inject class TriggerBTDevice(injector: HasAndroidInjector) : Trigger(injector) { @@ -74,12 +78,16 @@ class TriggerBTDevice(injector: HasAndroidInjector) : Trigger(injector) { // Get the list of paired BT devices to use in dropdown menu private fun devicesPaired(): ArrayList { val s = ArrayList() - (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter?.bondedDevices?.forEach { s.add(it.name) } + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { + (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter?.bondedDevices?.forEach { s.add(it.name) } + } else { + ToastUtils.errorToast(context, context.getString(R.string.needconnectpermission)) + } return s } private fun eventExists(): Boolean { - automationPlugin.btConnects.forEach { + ArrayList(automationPlugin.btConnects).forEach { if (btDevice.value == it.deviceName) { if (comparator.value == ComparatorConnect.Compare.ON_CONNECT && it.state == EventBTChange.Change.CONNECT) return true if (comparator.value == ComparatorConnect.Compare.ON_DISCONNECT && it.state == EventBTChange.Change.DISCONNECT) return true diff --git a/automation/src/main/res/values-cs-rCZ/strings.xml b/automation/src/main/res/values-cs-rCZ/strings.xml index d7425d45a3..c25f63dc99 100644 --- a/automation/src/main/res/values-cs-rCZ/strings.xml +++ b/automation/src/main/res/values-cs-rCZ/strings.xml @@ -123,4 +123,5 @@ Spustit automatizace Přidat pravidlo Odstranit/řadit + Zastavit zpracovávání diff --git a/automation/src/main/res/values-da-rDK/strings.xml b/automation/src/main/res/values-da-rDK/strings.xml index 9e3bf9669b..59f99c5877 100644 --- a/automation/src/main/res/values-da-rDK/strings.xml +++ b/automation/src/main/res/values-da-rDK/strings.xml @@ -123,4 +123,5 @@ Kør automatisering Tilføj regel Fjern/sorter + Stop afvikling diff --git a/automation/src/main/res/values-de-rDE/strings.xml b/automation/src/main/res/values-de-rDE/strings.xml index 4fdf548bc7..c6e3b2bc69 100644 --- a/automation/src/main/res/values-de-rDE/strings.xml +++ b/automation/src/main/res/values-de-rDE/strings.xml @@ -113,5 +113,15 @@ Automatisierungs-Ereignis Umsortieren Benutzeraktion + Automatisierung entfernen + Automation-Regeln sortieren + Ausgewähltes Objekt löschen + %1$d ausgewählt Sind Sie sicher, dass Sie diese(s) %1$d Element(e) löschen möchten? + Sortieren + System-Automatisierung + Automatisierungen ausführen + Regel hinzufügen + Entfernen/sortieren + Verarbeitung beenden diff --git a/automation/src/main/res/values-es-rES/strings.xml b/automation/src/main/res/values-es-rES/strings.xml index f07949b232..3522537a95 100644 --- a/automation/src/main/res/values-es-rES/strings.xml +++ b/automation/src/main/res/values-es-rES/strings.xml @@ -123,4 +123,5 @@ Ejecutar automatizaciones Añadir regla Eliminar/ordenar + Parar procesamiento diff --git a/automation/src/main/res/values-fr-rFR/strings.xml b/automation/src/main/res/values-fr-rFR/strings.xml index 397e534b59..bc8aec0c4c 100644 --- a/automation/src/main/res/values-fr-rFR/strings.xml +++ b/automation/src/main/res/values-fr-rFR/strings.xml @@ -123,4 +123,5 @@ Exécuter les automatisations Ajouter une règle Supprimer/trier + Arrêter le traitement diff --git a/automation/src/main/res/values-it-rIT/strings.xml b/automation/src/main/res/values-it-rIT/strings.xml index 01f8733efa..e341ede3d4 100644 --- a/automation/src/main/res/values-it-rIT/strings.xml +++ b/automation/src/main/res/values-it-rIT/strings.xml @@ -120,4 +120,8 @@ Sicuro di voler eliminare %1$d elementi Ordina Automazione sistema + Esegui automazioni + Aggiungi regola + Rimuovi/ordina + Interrompere l\'elaborazione diff --git a/automation/src/main/res/values-lt-rLT/strings.xml b/automation/src/main/res/values-lt-rLT/strings.xml index acd9f4fba0..c4d36915e2 100644 --- a/automation/src/main/res/values-lt-rLT/strings.xml +++ b/automation/src/main/res/values-lt-rLT/strings.xml @@ -112,4 +112,5 @@ Automatizuotas įvykis Pertvarkyti Vartotojo veiksmas + Rūšiuoti diff --git a/automation/src/main/res/values-nl-rNL/strings.xml b/automation/src/main/res/values-nl-rNL/strings.xml index cf5f20fb24..d4815fd566 100644 --- a/automation/src/main/res/values-nl-rNL/strings.xml +++ b/automation/src/main/res/values-nl-rNL/strings.xml @@ -120,4 +120,7 @@ Weet je zeker dat je %1$d items wilt verwijderen Sorteren Systeem automatisering + Automatisering uitvoeren + Regel toevoegen + Verwijderen/sorteren diff --git a/automation/src/main/res/values-no-rNO/strings.xml b/automation/src/main/res/values-no-rNO/strings.xml index ffa6fc6483..92fd9ecf6d 100644 --- a/automation/src/main/res/values-no-rNO/strings.xml +++ b/automation/src/main/res/values-no-rNO/strings.xml @@ -123,4 +123,5 @@ Kjør automatisering Legg til regel Fjern/sorter + Stopp prosessering diff --git a/automation/src/main/res/values-ru-rRU/strings.xml b/automation/src/main/res/values-ru-rRU/strings.xml index 181d25930f..ec29696bf0 100644 --- a/automation/src/main/res/values-ru-rRU/strings.xml +++ b/automation/src/main/res/values-ru-rRU/strings.xml @@ -90,7 +90,7 @@ Широта: Долгота: Гк %1$s]: - Цель %1$d м + Цель [%1$s]: Предыдущий болюс Время болюса %1$s %2$s мин назад Активн углеводы @@ -123,4 +123,5 @@ Запустить автоматизацию Добавить правило Удаление/сортировка + Остановить обработку diff --git a/automation/src/main/res/values-sk-rSK/strings.xml b/automation/src/main/res/values-sk-rSK/strings.xml index 39a1502bc1..13e9c9d977 100644 --- a/automation/src/main/res/values-sk-rSK/strings.xml +++ b/automation/src/main/res/values-sk-rSK/strings.xml @@ -123,4 +123,5 @@ Spustiť automatizácie Pridať pravidlo Odstrániť/zoradiť + Zastaviť spracovanie diff --git a/automation/src/main/res/values-tr-rTR/strings.xml b/automation/src/main/res/values-tr-rTR/strings.xml index 2873b09421..adafbd5e22 100644 --- a/automation/src/main/res/values-tr-rTR/strings.xml +++ b/automation/src/main/res/values-tr-rTR/strings.xml @@ -93,8 +93,8 @@ Hedef [%1$s]: Son bolus önce Son bolus zamanı %1$s %2$s dakika önce - COB - AK (COB) %1$s %2$.0f + AKRB + AKRB %1$s %2$.0f IOB [U]: Mesafe [m]: Yinelenen zaman @@ -123,4 +123,5 @@ Otomasyonları çalıştır Kural ekle Kaldır/sırala + İşlemeyi durdur diff --git a/automation/src/main/res/values/strings.xml b/automation/src/main/res/values/strings.xml index 30ca8cf431..3e7d2daf50 100644 --- a/automation/src/main/res/values/strings.xml +++ b/automation/src/main/res/values/strings.xml @@ -126,5 +126,6 @@ Run automations Add rule Remove/sort + Stop processing \ No newline at end of file diff --git a/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/AutomationEventTest.kt b/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/AutomationEventTest.kt index 874077109b..68066c6e7b 100644 --- a/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/AutomationEventTest.kt +++ b/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/AutomationEventTest.kt @@ -5,13 +5,14 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.interfaces.ConfigBuilder import info.nightscout.androidaps.interfaces.Loop +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.automation.actions.Action import info.nightscout.androidaps.plugins.general.automation.actions.ActionLoopEnable +import info.nightscout.androidaps.plugins.general.automation.actions.ActionStopProcessing import info.nightscout.androidaps.plugins.general.automation.triggers.TriggerConnector import info.nightscout.androidaps.plugins.general.automation.triggers.TriggerConnectorTest import info.nightscout.androidaps.plugins.general.automation.triggers.TriggerDummy -import info.nightscout.androidaps.interfaces.ResourceHelper import org.json.JSONObject import org.junit.Assert import org.junit.Test @@ -70,4 +71,14 @@ class AutomationEventTest : TestBase() { Assert.assertFalse(event.actions === clone.actions) // not the same object reference Assert.assertEquals(clone.toJSON(), clone.toJSON()) } + + @Test + fun hasStopProcessing() { + val event = AutomationEvent(injector) + event.title = "Test" + event.trigger = TriggerDummy(injector).instantiate(JSONObject(TriggerConnectorTest.oneItem)) as TriggerConnector + Assert.assertFalse(event.hasStopProcessing()) + event.addAction(ActionStopProcessing(injector)) + Assert.assertTrue(event.hasStopProcessing()) + } } diff --git a/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStopProcessingTest.kt b/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStopProcessingTest.kt new file mode 100644 index 0000000000..c16de7bdac --- /dev/null +++ b/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStopProcessingTest.kt @@ -0,0 +1,44 @@ +package info.nightscout.androidaps.plugins.general.automation.actions + +import info.nightscout.androidaps.automation.R +import info.nightscout.androidaps.queue.Callback +import org.junit.Assert +import org.junit.Before +import org.junit.Test +import org.mockito.Mockito.`when` + +class ActionStopProcessingTest : ActionsTestBase() { + + lateinit var sut: ActionStopProcessing + + @Before + fun setup() { + + `when`(rh.gs(R.string.stop_processing)).thenReturn("Stop processing") + sut = ActionStopProcessing(injector) + } + + @Test + fun friendlyNameTest() { + Assert.assertEquals(R.string.stop_processing, sut.friendlyName()) + } + + @Test + fun shortDescriptionTest() { + Assert.assertEquals("Stop processing", sut.shortDescription()) + } + + @Test + fun iconTest() { + Assert.assertEquals(R.drawable.ic_stop_24dp, sut.icon()) + } + + @Test + fun doActionTest() { + sut.doAction(object : Callback() { + override fun run() { + Assert.assertTrue(result.success) + } + }) + } +} \ No newline at end of file diff --git a/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionsTestBase.kt b/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionsTestBase.kt index 783fcbb2e6..0461810d0d 100644 --- a/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionsTestBase.kt +++ b/automation/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionsTestBase.kt @@ -144,6 +144,9 @@ ActionsTestBase : TestBaseWithProfile() { it.profileFunction = profileFunction it.uel = uel } + if (it is ActionStopProcessing) { + it.rh = rh + } if (it is PumpEnactResult) { it.rh = rh } diff --git a/build.gradle b/build.gradle index 2c78775b78..b2dfbd702d 100644 --- a/build.gradle +++ b/build.gradle @@ -2,19 +2,19 @@ buildscript { ext { - kotlin_version = '1.7.0' + kotlin_version = '1.7.10' core_version = '1.8.0' rxjava_version = '3.1.5' rxandroid_version = '3.0.0' rxkotlin_version = '3.0.1' - room_version = '2.4.2' - lifecycle_version = '2.4.1' + room_version = '2.4.3' + lifecycle_version = '2.5.0' dagger_version = '2.42' - coroutines_version = '1.6.3' + coroutines_version = '1.6.4' activity_version = '1.4.0' fragmentktx_version = '1.4.1' ormLite_version = '4.46' - gson_version = '2.9.0' + gson_version = '2.9.1' nav_version = '2.4.2' appcompat_version = '1.4.2' material_version = '1.6.1' @@ -48,9 +48,9 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } // jacoco 0.2 } dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' - classpath 'com.google.gms:google-services:4.3.10' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0' + classpath 'com.android.tools.build:gradle:7.2.2' + classpath 'com.google.gms:google-services:4.3.13' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -63,10 +63,10 @@ buildscript { } plugins { - id "io.gitlab.arturbosch.detekt" version "1.20.0" + id "io.gitlab.arturbosch.detekt" version "1.21.0" id "org.jlleitschuh.gradle.ktlint" version "10.3.0" id 'org.barfuin.gradle.jacocolog' version '2.0.0' - id 'org.jetbrains.kotlin.android' version '1.7.0' apply false + id 'org.jetbrains.kotlin.android' version '1.7.10' apply false } allprojects { diff --git a/combo/src/main/res/values-de-rDE/strings.xml b/combo/src/main/res/values-de-rDE/strings.xml index f932cf9292..32fa737274 100644 --- a/combo/src/main/res/values-de-rDE/strings.xml +++ b/combo/src/main/res/values-de-rDE/strings.xml @@ -51,4 +51,10 @@ Anzahl TBR Bolus gestoppt Bolus wird gestoppt + Komm. Fehleranzahl + Zeige Komm.-Fehleranzahl + Zeigt die Fehleranzahl bei der Kommunikation mit Ruffy an. In den meisten Fällen zeigt eine Zahl höher als 0 an, dass Ruffy Kommunikationsprobleme vorliegen (ein Neustart kann erforderlich sein). + Nie + Bei Fehler + Immer diff --git a/core/src/main/AndroidManifest.xml b/core/src/main/AndroidManifest.xml index 0f37944ddb..083c7f30cf 100644 --- a/core/src/main/AndroidManifest.xml +++ b/core/src/main/AndroidManifest.xml @@ -8,6 +8,8 @@ + + (this.autosensDataTable.size).apply { putAll(this@AutosensDataStore.autosensDataTable) } it.bucketedData = this.bucketedData?.toMutableList() } } @@ -57,7 +58,7 @@ class AutosensDataStore { synchronized(autosensDataTable) { for (index in autosensDataTable.size() - 1 downTo 0) { if (autosensDataTable.keyAt(index) > time) { - aapsLogger.debug(LTag.AUTOSENS, "Removing from autosensDataTable: " + dateUtil.dateAndTimeAndSecondsString(autosensDataTable.keyAt(index))) + aapsLogger.debug(LTag.AUTOSENS) { "Removing from autosensDataTable: ${dateUtil.dateAndTimeAndSecondsString(autosensDataTable.keyAt(index))}" } autosensDataTable.removeAt(index) } else { break @@ -135,10 +136,10 @@ class AutosensDataStore { return null } return if (data.time < System.currentTimeMillis() - 11 * 60 * 1000) { - aapsLogger.debug(LTag.AUTOSENS, "AUTOSENSDATA null: data is old (" + reason + ") size()=" + autosensDataTable.size() + " lastData=" + dateUtil.dateAndTimeAndSecondsString(data.time)) + aapsLogger.debug(LTag.AUTOSENS) { "AUTOSENSDATA null: data is old ($reason) size()=${autosensDataTable.size()} lastData=${dateUtil.dateAndTimeAndSecondsString(data.time)}" } null } else { - aapsLogger.debug(LTag.AUTOSENS, "AUTOSENSDATA ($reason) $data") + aapsLogger.debug(LTag.AUTOSENS) { "AUTOSENSDATA ($reason) $data" } data } } @@ -164,7 +165,7 @@ class AutosensDataStore { .compatGetBgReadingsDataFromTime(start, to + T.mins(2).msecs(), false) .blockingGet() .filter { it.value >= 39 } - aapsLogger.debug(LTag.AUTOSENS, "BG data loaded. Size: " + bgReadings.size + " Start date: " + dateUtil.dateAndTimeString(start) + " End date: " + dateUtil.dateAndTimeString(to)) + aapsLogger.debug(LTag.AUTOSENS) { "BG data loaded. Size: ${bgReadings.size} Start date: ${dateUtil.dateAndTimeString(start)} End date: ${dateUtil.dateAndTimeString(to)}" } createBucketedData(aapsLogger, dateUtil) rxBus.send(EventBucketedDataCreated()) } @@ -184,13 +185,13 @@ class AutosensDataStore { totalDiff += diff diff = abs(diff) if (diff > T.secs(30).msecs()) { - aapsLogger.debug(LTag.AUTOSENS, "Interval detection: values: " + bgReadings.size + " diff: " + diff / 1000 + "[s] is5minData: " + false) + aapsLogger.debug(LTag.AUTOSENS, "Interval detection: values: ${bgReadings.size} diff: ${diff / 1000}[s] is5minData: false") return false } } val averageDiff = totalDiff / bgReadings.size / 1000 val is5minData = averageDiff < 1 - aapsLogger.debug(LTag.AUTOSENS, "Interval detection: values: " + bgReadings.size + " averageDiff: " + averageDiff + "[s] is5minData: " + is5minData) + aapsLogger.debug(LTag.AUTOSENS, "Interval detection: values: ${bgReadings.size} averageDiff: $averageDiff[s] is5minData: $is5minData") return is5minData } } @@ -239,8 +240,7 @@ class AutosensDataStore { var currentTime = bgReadings[0].timestamp - bgReadings[0].timestamp % T.mins(5).msecs() val adjustedTime = adjustToReferenceTime(currentTime) // after adjusting time may be newer. In this case use T-5min - if (adjustedTime > currentTime) currentTime = adjustedTime - T.mins(5).msecs() - else currentTime = adjustedTime + currentTime = if (adjustedTime > currentTime) adjustedTime - T.mins(5).msecs() else adjustedTime aapsLogger.debug("Adjusted time " + dateUtil.dateAndTimeAndSecondsString(currentTime)) //log.debug("First reading: " + new Date(currentTime).toLocaleString()); while (true) { @@ -270,7 +270,7 @@ class AutosensDataStore { } val bData: MutableList = ArrayList() bData.add(InMemoryGlucoseValue(bgReadings[0])) - aapsLogger.debug(LTag.AUTOSENS, "Adding. bgTime: " + dateUtil.toISOString(bgReadings[0].timestamp) + " lastBgTime: " + "none-first-value" + " " + bgReadings[0].toString()) + aapsLogger.debug(LTag.AUTOSENS) { "Adding. bgTime: ${dateUtil.toISOString(bgReadings[0].timestamp)} lastBgTime: none-first-value ${bgReadings[0]}" } var j = 0 for (i in 1 until bgReadings.size) { val bgTime = bgReadings[i].timestamp @@ -293,7 +293,7 @@ class AutosensDataStore { val newBgReading = InMemoryGlucoseValue(nextBgTime, nextBg.roundToLong().toDouble(), true) //console.error("Interpolated", bData[j]); bData.add(newBgReading) - aapsLogger.debug(LTag.AUTOSENS, "Adding. bgTime: " + dateUtil.toISOString(bgTime) + " lastBgTime: " + dateUtil.toISOString(lastBgTime) + " " + newBgReading.toString()) + aapsLogger.debug(LTag.AUTOSENS) { "Adding. bgTime: ${dateUtil.toISOString(bgTime)} lastBgTime: ${dateUtil.toISOString(lastBgTime)} $newBgReading" } elapsedMinutes -= 5 lastBg = nextBg lastBgTime = nextBgTime @@ -301,14 +301,14 @@ class AutosensDataStore { j++ val newBgReading = InMemoryGlucoseValue(bgTime, bgReadings[i].value) bData.add(newBgReading) - aapsLogger.debug(LTag.AUTOSENS, "Adding. bgTime: " + dateUtil.toISOString(bgTime) + " lastBgTime: " + dateUtil.toISOString(lastBgTime) + " " + newBgReading.toString()) + aapsLogger.debug(LTag.AUTOSENS) { "Adding. bgTime: ${dateUtil.toISOString(bgTime)} lastBgTime: ${dateUtil.toISOString(lastBgTime)} $newBgReading" } } abs(elapsedMinutes) > 2 -> { j++ val newBgReading = InMemoryGlucoseValue(bgTime, bgReadings[i].value) bData.add(newBgReading) - aapsLogger.debug(LTag.AUTOSENS, "Adding. bgTime: " + dateUtil.toISOString(bgTime) + " lastBgTime: " + dateUtil.toISOString(lastBgTime) + " " + newBgReading.toString()) + aapsLogger.debug(LTag.AUTOSENS) { "Adding. bgTime: ${dateUtil.toISOString(bgTime)} lastBgTime: ${dateUtil.toISOString(lastBgTime)} $newBgReading" } } else -> { @@ -327,7 +327,7 @@ class AutosensDataStore { val previous = bData[i + 1] val mSecDiff = current.timestamp - previous.timestamp val adjusted = (mSecDiff - T.mins(5).msecs()) / 1000 - aapsLogger.debug(LTag.AUTOSENS, "Adjusting bucketed data time. Current: " + dateUtil.dateAndTimeAndSecondsString(current.timestamp) + " to: " + dateUtil.dateAndTimeAndSecondsString(previous.timestamp + T.mins(5).msecs()) + " by " + adjusted + " sec") + aapsLogger.debug(LTag.AUTOSENS) { "Adjusting bucketed data time. Current: ${dateUtil.dateAndTimeAndSecondsString(current.timestamp)} to: ${dateUtil.dateAndTimeAndSecondsString(previous.timestamp + T.mins(5).msecs())} by $adjusted sec" } if (abs(adjusted) > 90) { // too big adjustment, fallback to non 5 min data aapsLogger.debug(LTag.AUTOSENS, "Fallback to non 5 min data") @@ -354,5 +354,4 @@ class AutosensDataStore { } return if (count != 0) sum / count else 0.0 } - } \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BlePreCheck.kt b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BlePreCheck.kt index 716aad98ce..3d96e24bc4 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BlePreCheck.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BlePreCheck.kt @@ -43,11 +43,10 @@ class BlePreCheck @Inject constructor( } // change after SDK = 31+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - if (ContextCompat.checkSelfPermission(context, "android.permission.BLUETOOTH_CONNECT") != PackageManager.PERMISSION_GRANTED || - ContextCompat.checkSelfPermission(context, "android.permission.BLUETOOTH_SCAN") != PackageManager.PERMISSION_GRANTED + if (ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED || + ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_SCAN) != PackageManager.PERMISSION_GRANTED ) { - //ActivityCompat.requestPermissions(activity, arrayOf(Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT), PERMISSION_REQUEST_BLUETOOTH) - ActivityCompat.requestPermissions(activity, arrayOf("android.permission.BLUETOOTH_SCAN", "android.permission.BLUETOOTH_CONNECT"), PERMISSION_REQUEST_BLUETOOTH) + ActivityCompat.requestPermissions(activity, arrayOf(Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT), PERMISSION_REQUEST_BLUETOOTH) return false } } diff --git a/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.kt b/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.kt index 5fbe786c73..8b10cb6a97 100644 --- a/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.kt +++ b/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.kt @@ -74,7 +74,7 @@ class AlarmSoundService : DaggerService() { if (intent?.hasExtra(ErrorHelperActivity.SOUND_ID) == true) resourceId = intent.getIntExtra(ErrorHelperActivity.SOUND_ID, R.raw.error) player = MediaPlayer() try { - val afd = rh.openRawResourceFd(resourceId) ?: return START_STICKY + val afd = rh.openRawResourceFd(resourceId) ?: return START_NOT_STICKY player?.setDataSource(afd.fileDescriptor, afd.startOffset, afd.length) afd.close() player?.isLooping = true @@ -94,7 +94,7 @@ class AlarmSoundService : DaggerService() { aapsLogger.error("Unhandled exception", e) } aapsLogger.debug(LTag.CORE, "onStartCommand End") - return START_STICKY + return START_NOT_STICKY } override fun onDestroy() { diff --git a/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt b/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt index e4ed8f77fa..46a8813120 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt @@ -10,6 +10,10 @@ import info.nightscout.androidaps.core.R import info.nightscout.shared.logging.AAPSLogger import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP +import info.nightscout.shared.weardata.EventData +import java.io.ByteArrayInputStream +import java.io.IOException +import java.io.ObjectInputStream import javax.inject.Inject import javax.inject.Singleton @@ -79,7 +83,7 @@ class FabricPrivacy @Inject constructor( // Crashlytics log message fun logMessage(message: String) { - aapsLogger.info(LTag.CORE,"Crashlytics log message: $message") + aapsLogger.info(LTag.CORE, "Crashlytics log message: $message") FirebaseCrashlytics.getInstance().log(message) } @@ -92,4 +96,31 @@ class FabricPrivacy @Inject constructor( fun fabricEnabled(): Boolean { return sp.getBoolean(R.string.key_enable_fabric, true) } -} \ No newline at end of file + + fun logWearException(wearException: EventData.WearException) { + aapsLogger.debug(LTag.WEAR, "logWearException") + FirebaseCrashlytics.getInstance().apply { + setCustomKey("wear_exception", true) + setCustomKey("wear_board", wearException.board) + setCustomKey("wear_fingerprint", wearException.fingerprint) + setCustomKey("wear_sdk", wearException.sdk) + setCustomKey("wear_model", wearException.model) + setCustomKey("wear_manufacturer", wearException.manufacturer) + setCustomKey("wear_product", wearException.product) + } + logException(byteArrayToThrowable(wearException.exception)) + } + + private fun byteArrayToThrowable(wearExceptionData: ByteArray): Throwable { + val bis = ByteArrayInputStream(wearExceptionData) + try { + val ois = ObjectInputStream(bis) + return ois.readObject() as Throwable + } catch (e: IOException) { + e.printStackTrace() + } catch (e: ClassNotFoundException) { + e.printStackTrace() + } + return IllegalArgumentException("Wear Exception could not be de-serialized") + } +} diff --git a/core/src/main/java/info/nightscout/androidaps/utils/Round.kt b/core/src/main/java/info/nightscout/androidaps/utils/Round.kt index 3f854d4979..e7ca2f5fd8 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/Round.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/Round.kt @@ -2,6 +2,7 @@ package info.nightscout.androidaps.utils import android.os.Bundle import java.math.BigDecimal +import java.security.InvalidParameterException import kotlin.math.abs import kotlin.math.ceil import kotlin.math.floor @@ -12,16 +13,10 @@ import kotlin.math.roundToLong */ object Round { - fun roundTo(x: Double, step: Double, fabricPrivacy: FabricPrivacy? = null): Double = try { - if (x == 0.0) 0.0 + fun roundTo(x: Double, step: Double): Double { + if (x.isNaN()) throw InvalidParameterException("Parameter is NaN") + return if (x == 0.0) 0.0 else BigDecimal.valueOf((x / step).roundToLong()).multiply(BigDecimal.valueOf(step)).toDouble() - } catch (e: Exception) { - fabricPrivacy?.logCustom("Error_roundTo", Bundle().apply { - putDouble("x", x) - putDouble("step", step) - putString("stacktrace", e.stackTraceToString()) - }) - 0.0 } fun floorTo(x: Double, step: Double): Double = diff --git a/core/src/main/java/info/nightscout/androidaps/utils/ui/BluetoothDevicePreference.kt b/core/src/main/java/info/nightscout/androidaps/utils/ui/BluetoothDevicePreference.kt new file mode 100644 index 0000000000..20bbfd38a0 --- /dev/null +++ b/core/src/main/java/info/nightscout/androidaps/utils/ui/BluetoothDevicePreference.kt @@ -0,0 +1,33 @@ +package info.nightscout.androidaps.utils.ui + +import android.Manifest +import kotlin.jvm.JvmOverloads +import android.bluetooth.BluetoothManager +import android.content.Context +import android.content.pm.PackageManager +import android.os.Build +import android.util.AttributeSet +import androidx.core.app.ActivityCompat +import androidx.preference.ListPreference +import info.nightscout.androidaps.core.R +import info.nightscout.androidaps.utils.ToastUtils +import java.util.* + +class BluetoothDevicePreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ListPreference(context, attrs) { + + init { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { + val devices = Vector() + (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter?.let { bta -> + for (dev in bta.bondedDevices) + dev.name?.let { name -> devices.add(name) } + } + entries = devices.toTypedArray() + entryValues = devices.toTypedArray() + } else { + entries = emptyArray() + entryValues = emptyArray() + ToastUtils.errorToast(context, context.getString(R.string.needconnectpermission)) + } + } +} \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/utils/userEntry/UserEntryPresentationHelper.kt b/core/src/main/java/info/nightscout/androidaps/utils/userEntry/UserEntryPresentationHelper.kt index 0bc1c3d8ca..faae359445 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/userEntry/UserEntryPresentationHelper.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/userEntry/UserEntryPresentationHelper.kt @@ -91,9 +91,9 @@ class UserEntryPresentationHelper @Inject constructor( Sources.Insight -> R.drawable.ic_insight_128 Sources.Combo -> R.drawable.ic_combo_128 Sources.Medtronic -> R.drawable.ic_veo_128 - Sources.Omnipod -> R.drawable.ic_pod_128 - Sources.OmnipodEros -> R.drawable.ic_pod_128 - Sources.OmnipodDash -> R.drawable.ic_pod_128 + Sources.Omnipod -> R.drawable.ic_patch_pump_outline + Sources.OmnipodEros -> R.drawable.ic_patch_pump_outline + Sources.OmnipodDash -> R.drawable.ic_patch_pump_outline Sources.MDI -> R.drawable.ic_ict Sources.VirtualPump -> R.drawable.ic_virtual_pump Sources.SMS -> R.drawable.ic_sms diff --git a/core/src/main/res/drawable/ic_close.xml b/core/src/main/res/drawable/ic_close.xml index 49ac6f1398..b6edb1d328 100644 --- a/core/src/main/res/drawable/ic_close.xml +++ b/core/src/main/res/drawable/ic_close.xml @@ -1,10 +1,9 @@ diff --git a/core/src/main/res/drawable/ic_generic_cgm.xml b/core/src/main/res/drawable/ic_generic_cgm.xml index 2758d5d8b8..2838fce45f 100644 --- a/core/src/main/res/drawable/ic_generic_cgm.xml +++ b/core/src/main/res/drawable/ic_generic_cgm.xml @@ -1,45 +1,21 @@ - - - - - - - - - - - + android:fillColor="?attr/colorControlNormal"/> diff --git a/core/src/main/res/drawable/ic_glimp.xml b/core/src/main/res/drawable/ic_glimp.xml index ed10736e93..d58294f27e 100644 --- a/core/src/main/res/drawable/ic_glimp.xml +++ b/core/src/main/res/drawable/ic_glimp.xml @@ -3,85 +3,86 @@ android:height="64dp" android:viewportWidth="64" android:viewportHeight="64"> - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/res/drawable/ic_insulin.xml b/core/src/main/res/drawable/ic_insulin.xml index a273562b2d..a4f653fe07 100644 --- a/core/src/main/res/drawable/ic_insulin.xml +++ b/core/src/main/res/drawable/ic_insulin.xml @@ -3,28 +3,16 @@ android:height="64dp" android:viewportWidth="64" android:viewportHeight="64"> - - - - - - - - + + + + diff --git a/core/src/main/res/drawable/ic_nightscout_profile.xml b/core/src/main/res/drawable/ic_nightscout_profile.xml index 7fb7c6f4a5..9b9b07d3f9 100644 --- a/core/src/main/res/drawable/ic_nightscout_profile.xml +++ b/core/src/main/res/drawable/ic_nightscout_profile.xml @@ -1,10 +1,23 @@ - - - + + - - - + android:strokeWidth="3.09" + android:strokeColor="?attr/colorControlNormal" /> + + + diff --git a/core/src/main/res/drawable/ic_nightscout_syncs.xml b/core/src/main/res/drawable/ic_nightscout_syncs.xml index d90bc99dd3..381de5de2c 100644 --- a/core/src/main/res/drawable/ic_nightscout_syncs.xml +++ b/core/src/main/res/drawable/ic_nightscout_syncs.xml @@ -1,11 +1,27 @@ - - - - - + - - + android:strokeWidth="3.09" + android:strokeColor="?attr/colorControlNormal" /> + + + + + diff --git a/core/src/main/res/drawable/ic_nsclient_bg.xml b/core/src/main/res/drawable/ic_nsclient_bg.xml index 00e95c65cb..fff0a558f6 100644 --- a/core/src/main/res/drawable/ic_nsclient_bg.xml +++ b/core/src/main/res/drawable/ic_nsclient_bg.xml @@ -3,15 +3,20 @@ android:height="64dp" android:viewportWidth="64" android:viewportHeight="64"> - - - + + + + + diff --git a/core/src/main/res/drawable/ic_patch_pump_outline.xml b/core/src/main/res/drawable/ic_patch_pump_outline.xml new file mode 100644 index 0000000000..6a86ec1503 --- /dev/null +++ b/core/src/main/res/drawable/ic_patch_pump_outline.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/core/src/main/res/drawable/ic_refresh.xml b/core/src/main/res/drawable/ic_refresh.xml index 8229a9a64c..ceda60bb9a 100644 --- a/core/src/main/res/drawable/ic_refresh.xml +++ b/core/src/main/res/drawable/ic_refresh.xml @@ -4,6 +4,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/core/src/main/res/drawable/ic_sensor.xml b/core/src/main/res/drawable/ic_sensor.xml index 39caee867c..4ce0d49c60 100644 --- a/core/src/main/res/drawable/ic_sensor.xml +++ b/core/src/main/res/drawable/ic_sensor.xml @@ -1,5 +1,12 @@ - - - + + + diff --git a/core/src/main/res/drawable/ic_sort.xml b/core/src/main/res/drawable/ic_sort.xml index 4b1317ac20..8ff707c8ca 100644 --- a/core/src/main/res/drawable/ic_sort.xml +++ b/core/src/main/res/drawable/ic_sort.xml @@ -2,7 +2,6 @@ android:width="24dp" android:height="24dp" android:autoMirrored="true" - android:tint="#FFFFFF" android:viewportWidth="24" android:viewportHeight="24"> + android:fillColor="?attr/colorControlNormal"/> diff --git a/core/src/main/res/values-bg-rBG/strings.xml b/core/src/main/res/values-bg-rBG/strings.xml index 183980600d..e6b584986c 100644 --- a/core/src/main/res/values-bg-rBG/strings.xml +++ b/core/src/main/res/values-bg-rBG/strings.xml @@ -289,6 +289,7 @@ SMS Базал + Апликацията изисква разрешение за bluetooth %1$d дeн %1$d дни diff --git a/core/src/main/res/values-ca-rES/strings.xml b/core/src/main/res/values-ca-rES/strings.xml index 1eb5f978ea..6cd9b7b34c 100644 --- a/core/src/main/res/values-ca-rES/strings.xml +++ b/core/src/main/res/values-ca-rES/strings.xml @@ -70,4 +70,5 @@ Basal + L\'aplicació necessita el permís del bluethoot diff --git a/core/src/main/res/values-cs-rCZ/strings.xml b/core/src/main/res/values-cs-rCZ/strings.xml index 8f03f86ea7..81d72c8309 100644 --- a/core/src/main/res/values-cs-rCZ/strings.xml +++ b/core/src/main/res/values-cs-rCZ/strings.xml @@ -488,6 +488,8 @@ Autotune spuštěno bez přepnutí profilu Autotune spuštěno, a profil automaticky přepnut Chyba při posledním spuštění Autotune + Byla zjištěna jiná běžící úloha Autotune, spuštění zrušeno + Aplikace potřebuje oprávnění bluetooth %1$d den %1$d dnů diff --git a/core/src/main/res/values-da-rDK/strings.xml b/core/src/main/res/values-da-rDK/strings.xml index d446162c2f..2b88c0a550 100644 --- a/core/src/main/res/values-da-rDK/strings.xml +++ b/core/src/main/res/values-da-rDK/strings.xml @@ -450,17 +450,23 @@ Hvis aktiveret, vil Autotune automatisk opdatere og skifte til input-profil efter beregning ud fra en automatiseringsregel. Kategoriser UAM som basal Aktiver kun hvis du har indtastet alle kulhydrater på pålidelig vis. Med denne indstilling vil pludselige stigninger set af Autotune, blive brugt til at anbefale ændringer af basal rate. + Tilpas insulinkurven + Aktiver kun hvis du bruger egen peak værdi. Dette alternativ vil justere peak og DIA-varigheden Antal dage med data Anvend gennemsnitligt resultat i døgnbaseret IC/ISF Autotune vil ikke justere døgnrytme variationer, denne indstilling benytter gennemsnitlige værdier til justering af IC og ISF til din døgnrytme input profil Inkludér flere logoplysninger for fejlfinding Aktivér kun hvis udviklerne beder dig om det, for at sende flere logoplysninger til at hjælpe med at fejlfinde Autotune plugin + Standard antal dage data der skal behandles af Autotune (op til 30) Justeret Profil : Justerings dage : Sidst kørt : Advarsel : Vælg profil, der skal justeres + Autotune fungerer med kun én IC-værdi, din profil har %1$d værdier. Gennemsnitsværdi er %2$.2fg/E + Autotune virker med kun én ISF-værdi, din profil har %1$d værdier. Gennemsnitlig værdi er %2$.1f%3$s/E + Fejl i inputdata, prøv at køre autotune igen eller reducer antallet af dage Automatisk beregning startet, vær venligst tålmodig Kontrollér resultaterne omhyggeligt, før du bruger dem! Delvis resultat dag %1$d / %2$d justeret @@ -482,6 +488,8 @@ Autotune kørt uden profilskift Autotune kørt, profilen er automatisk skiftet Fejl under sidste Autotune kørsel + Autotune kører allerede, annulleret + Applikationen kræver tilladelse til bluetooth %1$d dag %1$d dage diff --git a/core/src/main/res/values-de-rDE/strings.xml b/core/src/main/res/values-de-rDE/strings.xml index 5b12029067..6932c25155 100644 --- a/core/src/main/res/values-de-rDE/strings.xml +++ b/core/src/main/res/values-de-rDE/strings.xml @@ -135,7 +135,9 @@ Auf neueren Geräten muss für die Bluetooth-Erkennung der Standortdienst aktiviert sein. AAPS speichert keine Standortdaten und der Dienst kann nach erfolgreichem Pairing wieder deaktiviert werden. Falsches Passwort + Falsche PIN Die Passwörter stimmen nicht überein. + PINs stimmen nicht überein Basalraten beginnen nicht zur vollen Stunde: %1$s Basal-Wert wurde durch den kleinst möglichen Wert ersetzt: %1$s @@ -429,10 +431,65 @@ Insight Refresh Button abnehmend %1$s mit %2$s zunehmend %1$s mit %2$s + %1$.0f%% Basal + Basal % %1$d ausgewählt Sortieren + Entferne Elemente + Sortiere Elemente + lösche ausgewählte Elemente + Datei + Nutzer + Autotune + Hilfe bei möglichen Anpassungen des Profils (ISF, IC und Basalraten) + AT + Autotune Einstellungen + Automation Profilwechsel + Falls aktiviert, wird Autotune nach der Berechnung in einer Automatisierungsregel automatisch das Eingangsprofil anpassen und darauf wechseln. + UAM als Basal kategorisieren + Nur aktivieren, wenn Sie alle gegessen Kohlenhydrate zuverlässig eingegeben haben. Mit dieser Option werden plötzliche Steigerungen, die durch Autotune entdeckt werden, verwendet, um Änderungen an der Basalrate zu empfehlen. + Insulinkurve anpassen + Nur einschalten, falls Du Free Peak verwendest. Diese Option passt sowohl den Gipfel der Wirkkurve an als auch die DIA Laufzeit + Anzahl der Tage an Daten + Durchschnittsresultat im zirkadianen IC/ISF anwenden + Autotune wird keine zirkadianen Variationen einstellen. Diese Option wendet nur die durchschnittliche Änderung von IC und ISF auf Dein zirkadianes Eingangsprofil an + Fügen Sie weitere Log-Informationen zum Debuggen ein + Nur einschalten, wenn von Du von den Entwicklern aufgefordert wirst, um ausführlichere Protokollinformationen zu senden, die beim Debuggen des Autotune Plugins hilfreich sind + Standardanzahl der von Autotune zu verarbeitenden Daten (bis zu 30) + Angepasst + Profil : + Anpassungstage : + Letzte Ausführung : + Warnung : + Wähle das Profil zum Anpassen aus + Ausgewähltes Profil hat %1$d IC-Werte. Autotune wird %2$.2f g/U verwenden + Ausgewähltes Profil hat %1$d ISF-Werte. Autotune wird %2$.1f %3$s/U verwenden + Fehler in den Eingabedaten, versuche erneut Autotune auszuführen oder reduziere die Anzahl der Tage + Autotune Berechnung gestartet, bitte gedulde Dich einen Moment + Überprüfe die Ergebnisse sorgfältig, bevor Du sie verwendest! + Teilergebnistag %1$d / %2$d angepasst + Ergebnis: %1$s + Parameter + % + Fehlend + Autotune Profil %1$s + Autotune ausführen + Eingabeprofil überprüfen + Profile vergleichen + In lokales Profil kopieren + Eingabeprofil anpassen + Eingabeprofil zurücksetzen + Neues lokales Profil aus diesem Autotune Profil erstellen? + Anpassen %1$s Profile mit dem Autotune Profile? + %1$s Profil mit Eingabeprofil zurücksetzen? + Profil ungültig + Autotune ohne Profilwechsel ausgeführt + Autotune ausgeführt und Profil automatisch gewechselt + Fehler beim letzten Autotune Lauf + Ein weiterer Lauf von Autotune wurde erkannt, Lauf abgebrochen + App benötigt Bluetooth-Berechtigung %1$d Tag %1$d Tage diff --git a/core/src/main/res/values-es-rES/strings.xml b/core/src/main/res/values-es-rES/strings.xml index 19f888b736..502b29f99b 100644 --- a/core/src/main/res/values-es-rES/strings.xml +++ b/core/src/main/res/values-es-rES/strings.xml @@ -464,6 +464,8 @@ Última ejecución : Advertencia : Selecciona el perfil para a ajustar + Autotune sólo funciona con un único valor de IC. Tu perfil tiene %1$d valores. El valor promedio es %2$.2fg/U + Autotune sólo funciona con un único valor de ISF. Tu perfil tiene %1$d valores. El valor promedio es %2$.1f%3$s/U Error en los datos de entrada, intenta ejecutar de nuevo autotune o reducir el número de días Cálculo de autototune iniciado, por favor ten paciencia ¡Comprueba los resultados cuidadosamente antes de usarlos! @@ -486,6 +488,8 @@ Autotune ejecutado sin cambio de perfil Autotune ejecutado y perfil cambiado automáticamente Error durante la última ejecución de Autotune + Se ha detectado otra ejecución de Autotune, ejecución cancelada + La aplicación necesita permiso de bluetooth %1$d día %1$d días diff --git a/core/src/main/res/values-fr-rFR/strings.xml b/core/src/main/res/values-fr-rFR/strings.xml index 2170468b20..9d13c4bb50 100644 --- a/core/src/main/res/values-fr-rFR/strings.xml +++ b/core/src/main/res/values-fr-rFR/strings.xml @@ -488,6 +488,8 @@ Autotune exécuté sans changement de profil Autotune exécuté et le profil automatiquement activé Erreur lors de la dernière exécution d\'Autotune + Une autre exécution d\'Autotune est détectée, l\'exécution est annulée + L\'application a besoin de l\'autorisation Bluetooth %1$d jour %1$d jours diff --git a/core/src/main/res/values-it-rIT/strings.xml b/core/src/main/res/values-it-rIT/strings.xml index 5ac31e2345..752b4f9264 100644 --- a/core/src/main/res/values-it-rIT/strings.xml +++ b/core/src/main/res/values-it-rIT/strings.xml @@ -42,6 +42,7 @@ CHO Profilo non valido !!! NESSUN PROFILO IMPOSTATO + ]]> Data Unità DIA @@ -441,6 +442,54 @@ file utente + Autotune + Aiuto per potenziali regolazioni del profilo (ISF, rapporto CHO e velocità basali) + AT + Impostazioni Autotune + Automazione cambio profilo + Se abilitato, Autotune si aggiornerà automaticamente e passerà al profilo di input dopo il calcolo da una regola di automazione. + Classifica UAM come basale + Abilita solo se hai inserito in modo affidabile tutti i carboidrati assunti, con questa opzione aumenti improvvisi individuati da Autotune verranno usati per consigliare modifiche alla velocità basale. + Regola la curva dell\'insulina + Abilita solo se usi free-peak. Questa opzione regolerà la durata di picco e DIA + Numero di giorni di dati + Applica il risultato medio in IC/ISF circadiano + Autotune non regolerà le variazioni circadiane, questa opzione applica solo la regolazione media di IC e ISF al tuo profilo di input circadiano + Includi più informazioni di log per il debug + Attiva solo se richiesto dallo sviluppatore per inviare ulteriori informazioni di log per aiutare il debug del plugin Autotune + Numero predefinito di giorni di dati da elaborare da Autotune (fino a 30) + Regolato + Profilo : + Giorni regolazione : + Ultima esecuzione : + Avviso : + Seleziona il profilo da regolare + Il profilo selezionato ha %1$d valori IC. Autotune userà %2$.2f g/U + Il profilo selezionato ha %1$d valori ISF. Autotune userà %2$.1f %3$s/U + Errore nei dati di input, prova a eseguire di nuovo Autotune o ridurre il numero di giorni + Il calcolo di Autotune è iniziato, attendi + Controlla attentamente i risultati prima di utilizzarli! + Risultato parziale giorno %1$d / %2$d regolato + Risultato: %1$s + Param + % + Mancante + Profilo Autotune %1$s + Esegui Autotune + Controlla il profilo di input + Compara profili + Copia nel profilo locale + Aggiorna il profilo di input + Ripristina il profilo di input + Creare un nuovo profilo locale da questo profilo Autotune? + Aggiornare il profilo %1$s con il profilo Autotune? + Ripristinare il profilo %1$s con il profilo di input? + Profilo non valido + Autotune eseguito senza cambio profilo + Autotune eseguito e profilo cambiato automaticamente + Errore durante l\'ultima esecuzione di Autotune + È stata rilevata un\'altra esecuzione di Autotune, esecuzione annullata + L\'applicazione richiede l\'autorizzazione bluetooth %1$d giorno %1$d giorni diff --git a/core/src/main/res/values-iw-rIL/strings.xml b/core/src/main/res/values-iw-rIL/strings.xml index 700387ef45..c837a798e3 100644 --- a/core/src/main/res/values-iw-rIL/strings.xml +++ b/core/src/main/res/values-iw-rIL/strings.xml @@ -488,6 +488,8 @@ כוונון אוטומטי מופעל ללא החלפת פרופיל כוונון אוטומטי הופעל והפרופיל הוחלף אוטומטית שגיאה במהלך הכיוונון האוטומטי האחרון + נמצאה הפעלה נוספת של הכוונון האוטומטי ברקע, ההפעלה מבוטלת + האפליקציה צריכה הרשאה לבלוטות\' %1$d יום %1$d ימים diff --git a/core/src/main/res/values-lt-rLT/strings.xml b/core/src/main/res/values-lt-rLT/strings.xml index c834cbf768..7a1c1ae6e6 100644 --- a/core/src/main/res/values-lt-rLT/strings.xml +++ b/core/src/main/res/values-lt-rLT/strings.xml @@ -422,6 +422,7 @@ Insight Mygtukas Naujinti Valandinė bazė + Programai reikalinga Bluetooth prieigos teisė %1$d d. %1$d d. diff --git a/core/src/main/res/values-night/styles.xml b/core/src/main/res/values-night/styles.xml index 7e98c75fcd..dfd244db24 100644 --- a/core/src/main/res/values-night/styles.xml +++ b/core/src/main/res/values-night/styles.xml @@ -246,6 +246,16 @@ @color/white @color/white + + @style/CommonSpinnerItemStyle + + @style/GrayButton + + + + + + + diff --git a/core/test_dependencies.gradle b/core/test_dependencies.gradle index 9628a048a9..bc9915e4bb 100644 --- a/core/test_dependencies.gradle +++ b/core/test_dependencies.gradle @@ -15,6 +15,13 @@ dependencies { androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' } +tasks.matching { it instanceof Test }.all { + //testLogging.events = ["failed", "skipped", "started"] + // use to display stdout in travis + testLogging.events = ["failed", "skipped", "started", "standard_out"] + testLogging.exceptionFormat = "full" +} + android { testOptions { unitTests { diff --git a/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java b/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java index 1253ef889a..40e9688199 100644 --- a/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java +++ b/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java @@ -354,8 +354,7 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin { insulin = constraintChecker.applyExtendedBolusConstraints(new Constraint<>(insulin)).value(); // needs to be rounded int durationInHalfHours = Math.max(durationInMinutes / 30, 1); - insulin = Round.INSTANCE.roundTo(insulin, getPumpDescription().getExtendedBolusStep(), - null); + insulin = Round.INSTANCE.roundTo(insulin, getPumpDescription().getExtendedBolusStep()); PumpEnactResult result = new PumpEnactResult(getInjector()); if (danaPump.isExtendedInProgress() && Math.abs(danaPump.getExtendedBolusAmount() - insulin) < pumpDescription.getExtendedBolusStep()) { diff --git a/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java b/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java index f2dbf782a6..77588a77bf 100644 --- a/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java +++ b/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java @@ -267,8 +267,7 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump insulin = constraintChecker.applyExtendedBolusConstraints(new Constraint<>(insulin)).value(); // needs to be rounded int durationInHalfHours = Math.max(durationInMinutes / 30, 1); - insulin = Round.INSTANCE.roundTo(insulin, getPumpDescription().getExtendedBolusStep(), - null); + insulin = Round.INSTANCE.roundTo(insulin, getPumpDescription().getExtendedBolusStep()); PumpEnactResult result = new PumpEnactResult(getInjector()); if (danaPump.isExtendedInProgress() && Math.abs(danaPump.getExtendedBolusAmount() - insulin) < getPumpDescription().getExtendedBolusStep()) { diff --git a/danar/src/main/java/info/nightscout/androidaps/danar/BluetoothDevicePreference.kt b/danar/src/main/java/info/nightscout/androidaps/danar/BluetoothDevicePreference.kt deleted file mode 100644 index 41b090bc72..0000000000 --- a/danar/src/main/java/info/nightscout/androidaps/danar/BluetoothDevicePreference.kt +++ /dev/null @@ -1,22 +0,0 @@ -package info.nightscout.androidaps.danar - -import kotlin.jvm.JvmOverloads -import android.bluetooth.BluetoothAdapter -import android.bluetooth.BluetoothDevice -import android.bluetooth.BluetoothManager -import android.content.Context -import android.util.AttributeSet -import androidx.preference.ListPreference -import java.util.* - -class BluetoothDevicePreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ListPreference(context, attrs) { - init { - val entries = Vector() - (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter?.let { bta -> - for (dev in bta.bondedDevices) - dev.name?.let { name -> entries.add(name) } - } - setEntries(entries.toTypedArray()) - entryValues = entries.toTypedArray() - } -} \ No newline at end of file diff --git a/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java b/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java index 1a2e573be2..10c8b58fa2 100644 --- a/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java +++ b/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java @@ -288,8 +288,7 @@ public class DanaRPlugin extends AbstractDanaRPlugin { double extendedRateToSet = absoluteRate - getBaseBasalRate(); extendedRateToSet = constraintChecker.applyBasalConstraints(new Constraint<>(extendedRateToSet), profile).value(); // needs to be rounded to 0.1 - extendedRateToSet = Round.INSTANCE.roundTo(extendedRateToSet, - pumpDescription.getExtendedBolusStep() * 2, null); // *2 because of half hours + extendedRateToSet = Round.INSTANCE.roundTo(extendedRateToSet, pumpDescription.getExtendedBolusStep() * 2); // *2 because of half hours // What is current rate of extended bolusing in u/h? aapsLogger.debug(LTag.PUMP, "setTempBasalAbsolute: Extended bolus in progress: " + (danaPump.isExtendedInProgress()) + " rate: " + danaPump.getExtendedBolusAbsoluteRate() + "U/h duration remaining: " + danaPump.getExtendedBolusRemainingMinutes() + "min"); diff --git a/danar/src/main/java/info/nightscout/androidaps/danar/services/AbstractDanaRExecutionService.java b/danar/src/main/java/info/nightscout/androidaps/danar/services/AbstractDanaRExecutionService.java index 2e0b01350c..3425dd25ad 100644 --- a/danar/src/main/java/info/nightscout/androidaps/danar/services/AbstractDanaRExecutionService.java +++ b/danar/src/main/java/info/nightscout/androidaps/danar/services/AbstractDanaRExecutionService.java @@ -1,14 +1,19 @@ package info.nightscout.androidaps.danar.services; +import android.Manifest; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothManager; import android.bluetooth.BluetoothSocket; import android.content.Context; import android.content.Intent; +import android.content.pm.PackageManager; +import android.os.Build; import android.os.IBinder; import android.os.SystemClock; +import androidx.core.app.ActivityCompat; + import java.io.IOException; import java.util.Set; import java.util.UUID; @@ -41,8 +46,7 @@ import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.PumpSync; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.androidaps.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; @@ -50,8 +54,9 @@ import info.nightscout.androidaps.plugins.general.overview.notifications.Notific import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.utils.ToastUtils; -import info.nightscout.androidaps.interfaces.ResourceHelper; import info.nightscout.androidaps.utils.rx.AapsSchedulers; +import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.shared.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.disposables.CompositeDisposable; @@ -191,30 +196,32 @@ public abstract class AbstractDanaRExecutionService extends DaggerService { protected void getBTSocketForSelectedPump() { mDevName = sp.getString(R.string.key_danar_bt_name, ""); - BluetoothAdapter bluetoothAdapter = ((BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter(); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { + BluetoothAdapter bluetoothAdapter = ((BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter(); - if (bluetoothAdapter != null) { - Set bondedDevices = bluetoothAdapter.getBondedDevices(); + if (bluetoothAdapter != null) { + Set bondedDevices = bluetoothAdapter.getBondedDevices(); - if (bondedDevices != null) - for (BluetoothDevice device : bondedDevices) { - if (mDevName.equals(device.getName())) { - mBTDevice = device; - try { - mRfcommSocket = mBTDevice.createRfcommSocketToServiceRecord(SPP_UUID); - } catch (IOException e) { - aapsLogger.error("Error creating socket: ", e); + if (bondedDevices != null) + for (BluetoothDevice device : bondedDevices) { + if (mDevName.equals(device.getName())) { + mBTDevice = device; + try { + mRfcommSocket = mBTDevice.createRfcommSocketToServiceRecord(SPP_UUID); + } catch (IOException e) { + aapsLogger.error("Error creating socket: ", e); + } + break; } - break; } - } + } else { + ToastUtils.INSTANCE.showToastInUiThread(context.getApplicationContext(), rh.gs(R.string.nobtadapter)); + } + if (mBTDevice == null) { + ToastUtils.INSTANCE.showToastInUiThread(context.getApplicationContext(), rh.gs(R.string.devicenotfound)); + } } else { - ToastUtils.INSTANCE.showToastInUiThread(context.getApplicationContext(), - rh.gs(R.string.nobtadapter)); - } - if (mBTDevice == null) { - ToastUtils.INSTANCE.showToastInUiThread(context.getApplicationContext(), - rh.gs(R.string.devicenotfound)); + ToastUtils.INSTANCE.errorToast(context, context.getString(R.string.needconnectpermission)); } } diff --git a/danar/src/main/res/values-da-rDK/strings.xml b/danar/src/main/res/values-da-rDK/strings.xml index 3ea04e700d..a943e7b0de 100644 --- a/danar/src/main/res/values-da-rDK/strings.xml +++ b/danar/src/main/res/values-da-rDK/strings.xml @@ -1,2 +1,4 @@ - + + Handling understøttes ikke i pumpe. Brug kun AndroidAPS-brugerflade! + diff --git a/danar/src/main/res/values-de-rDE/strings.xml b/danar/src/main/res/values-de-rDE/strings.xml index 3ea04e700d..2fde3f558c 100644 --- a/danar/src/main/res/values-de-rDE/strings.xml +++ b/danar/src/main/res/values-de-rDE/strings.xml @@ -1,2 +1,4 @@ - + + Nicht unterstützte Aktion in Insulinpumpe. Bitte nur AndroidAPS-UI benutzen! + diff --git a/danar/src/main/res/values-it-rIT/strings.xml b/danar/src/main/res/values-it-rIT/strings.xml index 3ea04e700d..5a4de59455 100644 --- a/danar/src/main/res/values-it-rIT/strings.xml +++ b/danar/src/main/res/values-it-rIT/strings.xml @@ -1,2 +1,4 @@ - + + Azione non supportata nel micro. Usa solo l\'interfaccia di AndroidAPS! + diff --git a/danar/src/main/res/values-nl-rNL/strings.xml b/danar/src/main/res/values-nl-rNL/strings.xml index 3ea04e700d..ff920b8ec5 100644 --- a/danar/src/main/res/values-nl-rNL/strings.xml +++ b/danar/src/main/res/values-nl-rNL/strings.xml @@ -1,2 +1,4 @@ - + + Niet-ondersteunde actie in pomp. Gebruik alleen AndroidAPS gebruikersinterface! + diff --git a/danar/src/main/res/xml/pref_danar.xml b/danar/src/main/res/xml/pref_danar.xml index c7d45b8f12..98b1f51b37 100644 --- a/danar/src/main/res/xml/pref_danar.xml +++ b/danar/src/main/res/xml/pref_danar.xml @@ -8,7 +8,7 @@ android:title="@string/danar_pump_settings" app:initialExpandedChildrenCount="0"> - diff --git a/danar/src/main/res/xml/pref_danarkorean.xml b/danar/src/main/res/xml/pref_danarkorean.xml index 96479baf58..5b3372e2ed 100644 --- a/danar/src/main/res/xml/pref_danarkorean.xml +++ b/danar/src/main/res/xml/pref_danarkorean.xml @@ -8,7 +8,7 @@ android:title="@string/danar_pump_settings" app:initialExpandedChildrenCount="0"> - diff --git a/danar/src/main/res/xml/pref_danarv2.xml b/danar/src/main/res/xml/pref_danarv2.xml index f18ed77e4a..f16c06afb6 100644 --- a/danar/src/main/res/xml/pref_danarv2.xml +++ b/danar/src/main/res/xml/pref_danarv2.xml @@ -8,7 +8,7 @@ android:title="@string/danar_pump_settings" app:initialExpandedChildrenCount="0"> - diff --git a/danars/src/main/AndroidManifest.xml b/danars/src/main/AndroidManifest.xml index c3ef8bc727..108cb94048 100644 --- a/danars/src/main/AndroidManifest.xml +++ b/danars/src/main/AndroidManifest.xml @@ -5,6 +5,8 @@ + + = Build.VERSION_CODES.S && + ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED + ) { + ToastUtils.errorToast(context, context.getString(info.nightscout.androidaps.core.R.string.needconnectpermission)) + aapsLogger.error(LTag.PUMPBTCOMM, "missing permission: $from") + return false + } aapsLogger.debug(LTag.PUMPBTCOMM, "Initializing BLEComm.") if (bluetoothAdapter == null) { aapsLogger.error("Unable to obtain a BluetoothAdapter.") @@ -107,8 +119,10 @@ class BLEComm @Inject internal constructor( return false } if (device.bondState == BluetoothDevice.BOND_NONE) { - device.createBond() - SystemClock.sleep(10000) + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { + device.createBond() + SystemClock.sleep(10000) + } return false } isConnected = false @@ -131,6 +145,12 @@ class BLEComm @Inject internal constructor( @Synchronized fun disconnect(from: String) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && + ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED + ) { + aapsLogger.error(LTag.PUMPBTCOMM, "missing permission: $from") + return + } aapsLogger.debug(LTag.PUMPBTCOMM, "disconnect from: $from") if (!encryptedDataRead && encryptedCommandSent && encryption == EncryptionType.ENCRYPTION_BLE5) { @@ -191,6 +211,7 @@ class BLEComm @Inject internal constructor( } } + @SuppressLint("MissingPermission") @Synchronized fun close() { /* if (!encryptedDataRead && !encryptedCommandSent) { @@ -268,6 +289,7 @@ class BLEComm @Inject internal constructor( } } + @SuppressLint("MissingPermission") @Synchronized private fun setCharacteristicNotification(characteristic: BluetoothGattCharacteristic?, enabled: Boolean) { aapsLogger.debug(LTag.PUMPBTCOMM, "setCharacteristicNotification") @@ -287,6 +309,7 @@ class BLEComm @Inject internal constructor( } } + @SuppressLint("MissingPermission") @Synchronized private fun writeCharacteristicNoResponse(characteristic: BluetoothGattCharacteristic, data: ByteArray) { Thread(Runnable { @@ -346,6 +369,7 @@ class BLEComm @Inject internal constructor( } } + @SuppressLint("MissingPermission") @Synchronized private fun onConnectionStateChangeSynchronized(gatt: BluetoothGatt, newState: Int) { aapsLogger.debug(LTag.PUMPBTCOMM, "onConnectionStateChange") @@ -559,7 +583,7 @@ class BLEComm @Inject internal constructor( sp.putString(rh.gs(R.string.key_dana_ble5_pairingkey) + danaRSPlugin.mDeviceName, pairingKey) val storedPairingKey = sp.getString(rh.gs(R.string.key_dana_ble5_pairingkey) + danaRSPlugin.mDeviceName, "") - if (storedPairingKey.isNullOrBlank()) { + if (storedPairingKey.isBlank()) { removeBond() disconnect("Non existing pairing key") } diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt index fcb383fa8c..897723f2ec 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt @@ -19,7 +19,9 @@ class DiaconnG8Pump @Inject constructor( private val aapsLogger: AAPSLogger, private val dateUtil: DateUtil ) { - + //var bleResultInfo: Pair = Pair(null, false) + var bolusConfirmMessage: Byte = 0 + var isReadyToBolus: Boolean = false var maxBolusePerDay: Double = 0.0 var pumpIncarnationNum: Int = 65536 var isPumpVersionGe2_63: Boolean = false // is pumpVersion higher then 2.63 diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8BLEScanActivity.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8BLEScanActivity.kt index 52165d828d..05fbebeaf1 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8BLEScanActivity.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8BLEScanActivity.kt @@ -1,5 +1,6 @@ package info.nightscout.androidaps.diaconn.activities +import android.Manifest import android.annotation.SuppressLint import android.bluetooth.BluetoothAdapter import android.bluetooth.BluetoothDevice @@ -11,6 +12,8 @@ import android.bluetooth.le.ScanResult import android.bluetooth.le.ScanSettings import android.content.Context import android.content.pm.ActivityInfo +import android.content.pm.PackageManager +import android.os.Build import android.os.Bundle import android.os.Handler import android.os.Looper @@ -19,12 +22,13 @@ import android.view.View import android.view.ViewGroup import android.widget.BaseAdapter import android.widget.TextView +import androidx.core.app.ActivityCompat import info.nightscout.androidaps.activities.NoSplashAppCompatActivity -import info.nightscout.androidaps.diaconn.events.EventDiaconnG8DeviceChange import info.nightscout.androidaps.diaconn.R import info.nightscout.androidaps.diaconn.databinding.DiaconnG8BlescannerActivityBinding -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.diaconn.events.EventDiaconnG8DeviceChange import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck +import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.shared.sharedPreferences.SP import java.util.* import javax.inject.Inject @@ -61,18 +65,25 @@ class DiaconnG8BLEScanActivity : NoSplashAppCompatActivity() { override fun onResume() { super.onResume() - bluetoothAdapter?.let { bluetoothAdapter -> - if (!bluetoothAdapter.isEnabled) bluetoothAdapter.enable() - bluetoothLeScanner = bluetoothAdapter.bluetoothLeScanner - startScan() + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_SCAN) == PackageManager.PERMISSION_GRANTED) { + bluetoothAdapter?.let { bluetoothAdapter -> + if (!bluetoothAdapter.isEnabled) bluetoothAdapter.enable() + bluetoothLeScanner = bluetoothAdapter.bluetoothLeScanner + startScan() + } + } else { + ToastUtils.errorToast(context, context.getString(info.nightscout.androidaps.core.R.string.needconnectpermission)) } } override fun onPause() { super.onPause() - stopScan() + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_SCAN) == PackageManager.PERMISSION_GRANTED) { + stopScan() + } } + @SuppressLint("MissingPermission") private fun startScan() = try { val filters: MutableList = ArrayList() @@ -86,16 +97,23 @@ class DiaconnG8BLEScanActivity : NoSplashAppCompatActivity() { .build() bluetoothLeScanner?.startScan(filters, settings, mBleScanCallback) - } catch (e: IllegalStateException) { + } catch (ignored: IllegalStateException) { } // ignore BT not on + @SuppressLint("MissingPermission") private fun stopScan() = try { bluetoothLeScanner?.stopScan(mBleScanCallback) - } catch (e: IllegalStateException) { + } catch (ignored: IllegalStateException) { } // ignore BT not on private fun addBleDevice(device: BluetoothDevice?) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && + ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED + ) { + ToastUtils.errorToast(context, context.getString(info.nightscout.androidaps.core.R.string.needconnectpermission)) + return + } if (device == null || device.name == null || device.name == "") { return } @@ -145,6 +163,7 @@ class DiaconnG8BLEScanActivity : NoSplashAppCompatActivity() { v.setOnClickListener(this@ViewHolder) } + @SuppressLint("MissingPermission") override fun onClick(v: View) { sp.putString(R.string.key_diaconn_g8_address, item.device.address) sp.putString(R.string.key_diaconn_g8_name, name.text.toString()) @@ -153,6 +172,7 @@ class DiaconnG8BLEScanActivity : NoSplashAppCompatActivity() { finish() } + @SuppressLint("MissingPermission") fun setData(data: BluetoothDeviceItem) { var tTitle = data.device.name if (tTitle == null || tTitle == "") { @@ -168,6 +188,7 @@ class DiaconnG8BLEScanActivity : NoSplashAppCompatActivity() { // inner class BluetoothDeviceItem internal constructor(val device: BluetoothDevice) { + override fun equals(other: Any?): Boolean { if (other !is BluetoothDeviceItem) { return false diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8UserOptionsActivity.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8UserOptionsActivity.kt index 49d315f341..a1e62c4d5d 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8UserOptionsActivity.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8UserOptionsActivity.kt @@ -152,12 +152,7 @@ class DiaconnG8UserOptionsActivity : NoSplashAppCompatActivity() { commandQueue.setUserOptions(object : Callback() { override fun run() { if (!result.success) { - val i = Intent(context, ErrorHelperActivity::class.java) - i.putExtra("soundid", R.raw.boluserror) - i.putExtra("status", result.comment) - i.putExtra("title", rh.gs(R.string.pumperror)) - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - context.startActivity(i) + ErrorHelperActivity.runAlarm(context, result.comment, rh.gs(R.string.pumperror), R.raw.boluserror) } } }) diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/di/DiaconnG8PacketModule.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/di/DiaconnG8PacketModule.kt index 86a27374ce..49ec0d9f30 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/di/DiaconnG8PacketModule.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/di/DiaconnG8PacketModule.kt @@ -77,6 +77,8 @@ abstract class DiaconnG8PacketModule { @ContributesAndroidInjector abstract fun contributesLanguageInquireResponsePacket(): LanguageInquireResponsePacket @ContributesAndroidInjector abstract fun contributesBigAPSMainInfoInquirePacket(): BigAPSMainInfoInquirePacket @ContributesAndroidInjector abstract fun contributesBigAPSMainInfoInquireResponsePacket(): BigAPSMainInfoInquireResponsePacket + @ContributesAndroidInjector abstract fun contributesSerialNumInquirePacket(): SerialNumInquirePacket + @ContributesAndroidInjector abstract fun contributesSerialNumInquireResponsePacket(): SerialNumInquireResponsePacket } diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingResponsePacket.kt index d45f174bf3..9f41cfde1b 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingResponsePacket.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingResponsePacket.kt @@ -35,6 +35,10 @@ class AppConfirmSettingResponsePacket( failed = true return } + // The bolus progress diallog opens only when the confirm result is successfull + if(diaconnG8Pump.bolusConfirmMessage == 0x07.toByte()) { + diaconnG8Pump.isReadyToBolus = true + } } override fun getFriendlyName(): String { diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8ResponseMessageHashTable.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8ResponseMessageHashTable.kt index 7248d73530..e401d465a8 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8ResponseMessageHashTable.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8ResponseMessageHashTable.kt @@ -25,7 +25,6 @@ class DiaconnG8ResponseMessageHashTable @Inject constructor(val injector: HasAnd put(SneckLimitInquireResponsePacket(injector)) put(BasalLimitInquireResponsePacket(injector)) put(TempBasalInquireResponsePacket(injector)) - put(TimeInquirePacket(injector)) put(TimeInquireResponsePacket(injector)) put(TimeReportPacket(injector)) put(LogStatusInquireResponsePacket(injector)) @@ -34,6 +33,8 @@ class DiaconnG8ResponseMessageHashTable @Inject constructor(val injector: HasAnd put(SoundInquireResponsePacket(injector)) put(DisplayTimeInquireResponsePacket(injector)) put(LanguageInquireResponsePacket(injector)) + put(SerialNumInquireResponsePacket(injector)) + // Report Packet put(BasalPauseReportPacket(injector)) diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquirePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquirePacket.kt new file mode 100644 index 0000000000..0284c35029 --- /dev/null +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquirePacket.kt @@ -0,0 +1,29 @@ +package info.nightscout.androidaps.diaconn.packet + +import dagger.android.HasAndroidInjector +import info.nightscout.androidaps.diaconn.DiaconnG8Pump +import info.nightscout.shared.logging.LTag +import javax.inject.Inject + +/** + + * SerialNumInquirePacket + */ +class SerialNumInquirePacket( + injector: HasAndroidInjector +) : DiaconnG8Packet(injector ) { + @Inject lateinit var diaconnG8Pump: DiaconnG8Pump + init { + msgType = 0x6E + aapsLogger.debug(LTag.PUMPCOMM, "SeialNumInquirePacket init") + } + + override fun encode(msgSeq:Int): ByteArray { + val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END) + return suffixEncode(buffer) + } + + override fun getFriendlyName(): String { + return "PUMP_SERIAL_NUM_INQUIRE" + } +} \ No newline at end of file diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquireResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquireResponsePacket.kt new file mode 100644 index 0000000000..76306e54fa --- /dev/null +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquireResponsePacket.kt @@ -0,0 +1,69 @@ +package info.nightscout.androidaps.diaconn.packet + +import dagger.android.HasAndroidInjector +import info.nightscout.androidaps.diaconn.DiaconnG8Pump +import info.nightscout.androidaps.diaconn.R +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.shared.logging.LTag +import info.nightscout.shared.sharedPreferences.SP +import javax.inject.Inject + +/** + * SerialNumInquireResponsePacket + */ +class SerialNumInquireResponsePacket(injector: HasAndroidInjector) : DiaconnG8Packet(injector ) { + + @Inject lateinit var diaconnG8Pump: DiaconnG8Pump + @Inject lateinit var sp: SP + @Inject lateinit var rh: ResourceHelper + + + init { + msgType = 0xAE.toByte() + aapsLogger.debug(LTag.PUMPCOMM, "SerialNumInquireResponsePacket init") + } + + override fun handleMessage(data: ByteArray?) { + val result = defect(data) + if (result != 0) { + aapsLogger.debug(LTag.PUMPCOMM, "SerialNumInquireResponsePacket Got some Error") + failed = true + return + } else failed = false + + val bufferData = prefixDecode(data) + val result2 = getByteToInt(bufferData) + if(!isSuccInquireResponseResult(result2)) { + failed = true + return + } + + diaconnG8Pump.country = getByteToInt(bufferData).toChar().toString().toInt() // ASCII + diaconnG8Pump.productType = getByteToInt(bufferData).toChar().toString().toInt() // ASCII + diaconnG8Pump.makeYear = getByteToInt(bufferData) + diaconnG8Pump.makeMonth = getByteToInt(bufferData) + diaconnG8Pump.makeDay = getByteToInt(bufferData) + diaconnG8Pump.lotNo = getByteToInt(bufferData)// LOT NO + diaconnG8Pump.serialNo = getShortToInt(bufferData) + diaconnG8Pump.majorVersion = getByteToInt(bufferData) + diaconnG8Pump.minorVersion = getByteToInt(bufferData) + + + aapsLogger.debug(LTag.PUMPCOMM, "Result --> ${diaconnG8Pump.result}") + aapsLogger.debug(LTag.PUMPCOMM, "country --> ${diaconnG8Pump.country}") + aapsLogger.debug(LTag.PUMPCOMM, "productType --> ${diaconnG8Pump.productType}") + aapsLogger.debug(LTag.PUMPCOMM, "makeYear --> ${diaconnG8Pump.makeYear}") + aapsLogger.debug(LTag.PUMPCOMM, "makeMonth --> ${diaconnG8Pump.makeMonth}") + aapsLogger.debug(LTag.PUMPCOMM, "makeDay --> ${diaconnG8Pump.makeDay}") + aapsLogger.debug(LTag.PUMPCOMM, "lotNo --> ${diaconnG8Pump.lotNo}") + aapsLogger.debug(LTag.PUMPCOMM, "serialNo --> ${diaconnG8Pump.serialNo}") + aapsLogger.debug(LTag.PUMPCOMM, "majorVersion --> ${diaconnG8Pump.majorVersion}") + aapsLogger.debug(LTag.PUMPCOMM, "minorVersion --> ${diaconnG8Pump.minorVersion}") + + sp.putString(rh.gs(R.string.pumpversion), diaconnG8Pump.majorVersion.toString() + "." + diaconnG8Pump.minorVersion.toString()) + } + + override fun getFriendlyName(): String { + return "PUMP_SERIAL_NUM_INQUIRE_RESPONSE" + } +} \ No newline at end of file diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquireResponsePacket.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquireResponsePacket.kt index 6b7882196c..a2f88429b5 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquireResponsePacket.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquireResponsePacket.kt @@ -15,24 +15,30 @@ class TimeInquireResponsePacket( @Inject lateinit var diaconnG8Pump: DiaconnG8Pump init { - msgType = 0x50.toByte() + msgType = 0x8F.toByte() aapsLogger.debug(LTag.PUMPCOMM, "TimeInquireResponsePacket init") } override fun handleMessage(data: ByteArray?) { - val result = defect(data) - if (result != 0) { + val defectCheck = defect(data) + if (defectCheck != 0) { aapsLogger.debug(LTag.PUMPCOMM, "TimeInquireResponsePacket Got some Error") failed = true return } else failed = false val bufferData = prefixDecode(data) - val result2 = getByteToInt(bufferData) - if(!isSuccInquireResponseResult(result2)) { + val result = getByteToInt(bufferData) + if(!isSuccInquireResponseResult(result)) { failed = true return } + diaconnG8Pump.year = getByteToInt(bufferData) + 2000 // 년 (18~99) + diaconnG8Pump.month = getByteToInt(bufferData) // 월 (1~12) + diaconnG8Pump.day = getByteToInt(bufferData) // 일 (1~31) + diaconnG8Pump.hour = getByteToInt(bufferData) // 시 (0~23) + diaconnG8Pump.minute = getByteToInt(bufferData) // 분 (0~59) + diaconnG8Pump.second = getByteToInt(bufferData) // 초 (0~59) } override fun getFriendlyName(): String { diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt index be2969ea4b..723d50752b 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt @@ -1,9 +1,13 @@ package info.nightscout.androidaps.diaconn.service +import android.Manifest +import android.annotation.SuppressLint import android.bluetooth.* import android.content.Context -import android.content.Intent +import android.content.pm.PackageManager +import android.os.Build import android.os.SystemClock +import androidx.core.app.ActivityCompat import dagger.android.HasAndroidInjector import info.nightscout.androidaps.activities.ErrorHelperActivity import info.nightscout.androidaps.diaconn.DiaconnG8Pump @@ -12,10 +16,11 @@ import info.nightscout.androidaps.diaconn.packet.* import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.extensions.notify import info.nightscout.androidaps.extensions.waitMillis +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.shared.logging.AAPSLogger import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.ResourceHelper import java.util.* import java.util.concurrent.ScheduledFuture import javax.inject.Inject @@ -31,9 +36,10 @@ class BLECommonService @Inject internal constructor( private val diaconnG8ResponseMessageHashTable: DiaconnG8ResponseMessageHashTable, private val diaconnG8SettingResponseMessageHashTable: DiaconnG8SettingResponseMessageHashTable, private val diaconnG8Pump: DiaconnG8Pump, -){ +) { companion object { + private const val WRITE_DELAY_MILLIS: Long = 50 private const val INDICATION_UUID = "6e400003-b5a3-f393-e0a9-e50e24dcca9e" private const val WRITE_UUID = "6e400002-b5a3-f393-e0a9-e50e24dcca9e" @@ -53,7 +59,7 @@ class BLECommonService @Inject internal constructor( private var uartIndicate: BluetoothGattCharacteristic? = null private var uartWrite: BluetoothGattCharacteristic? = null - private var mSequence : Int = 0 + private var mSequence: Int = 0 private fun getMsgSequence(): Int { val seq = mSequence % 255 @@ -66,6 +72,13 @@ class BLECommonService @Inject internal constructor( @Synchronized fun connect(from: String, address: String?): Boolean { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && + ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED + ) { + ToastUtils.errorToast(context, context.getString(info.nightscout.androidaps.core.R.string.needconnectpermission)) + aapsLogger.error(LTag.PUMPBTCOMM, "missing permission: $from") + return false + } aapsLogger.debug(LTag.PUMPBTCOMM, "Initializing Bluetooth ") if (bluetoothAdapter == null) { aapsLogger.error("Unable to obtain a BluetoothAdapter.") @@ -98,6 +111,12 @@ class BLECommonService @Inject internal constructor( @Synchronized fun disconnect(from: String) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && + ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED + ) { + aapsLogger.error(LTag.PUMPBTCOMM, "missing permission: $from") + return + } aapsLogger.debug(LTag.PUMPBTCOMM, "disconnect from: $from") // cancel previous scheduled disconnection to prevent closing upcoming connection @@ -117,6 +136,7 @@ class BLECommonService @Inject internal constructor( SystemClock.sleep(2000) } + @SuppressLint("MissingPermission") @Synchronized fun close() { aapsLogger.debug(LTag.PUMPBTCOMM, "BluetoothAdapter close") @@ -133,13 +153,16 @@ class BLECommonService @Inject internal constructor( aapsLogger.debug(LTag.PUMPBTCOMM, "onServicesDiscovered") if (status == BluetoothGatt.GATT_SUCCESS) { findCharacteristic() + SystemClock.sleep(1600) + isConnected = true + isConnecting = false } } override fun onCharacteristicChanged(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic) { aapsLogger.debug(LTag.PUMPBTCOMM, "(응답) onCharacteristicChanged: " + DiaconnG8Packet.toHex(characteristic.value)) // 대량로그응답 처리. - if(characteristic.value[1] == 0xb2.toByte()) { + if (characteristic.value[1] == 0xb2.toByte()) { aapsLogger.debug(LTag.PUMPBTCOMM, "(대량 로그 처리 응답) onCharacteristicChanged: " + DiaconnG8Packet.toHex(characteristic.value)) val message = BigLogInquireResponsePacket(injector) message.handleMessage(characteristic.value) @@ -156,6 +179,7 @@ class BLECommonService @Inject internal constructor( } } + @SuppressLint("MissingPermission") @Synchronized private fun writeCharacteristicNoResponse(characteristic: BluetoothGattCharacteristic, data: ByteArray) { Thread(Runnable { @@ -194,6 +218,7 @@ class BLECommonService @Inject internal constructor( return bluetoothGatt?.services } + @SuppressLint("MissingPermission") @Synchronized private fun findCharacteristic() { val gattServices = getSupportedGattServices() ?: return @@ -206,6 +231,7 @@ class BLECommonService @Inject internal constructor( uartIndicate = gattCharacteristic //setCharacteristicNotification(uartIndicate, true) bluetoothGatt?.setCharacteristicNotification(uartIndicate, true) + // nRF Connect 참고하여 추가함 val descriptor: BluetoothGattDescriptor = uartIndicate!!.getDescriptor(UUID.fromString(CHARACTERISTIC_CONFIG_UUID)) descriptor.value = BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE @@ -218,13 +244,12 @@ class BLECommonService @Inject internal constructor( } } + @SuppressLint("MissingPermission") @Synchronized private fun onConnectionStateChangeSynchronized(gatt: BluetoothGatt, newState: Int) { aapsLogger.debug(LTag.PUMPBTCOMM, "onConnectionStateChange newState : $newState") if (newState == BluetoothProfile.STATE_CONNECTED) { gatt.discoverServices() - isConnected = true - isConnecting = false rxBus.send(EventPumpStatusChanged(EventPumpStatusChanged.Status.CONNECTED)) } else if (newState == BluetoothProfile.STATE_DISCONNECTED) { close() @@ -250,7 +275,7 @@ class BLECommonService @Inject internal constructor( writeCharacteristicNoResponse(uartWriteBTGattChar, bytes) // 요청 큐에 요청할 바이트 정보 담기. synchronized(mSendQueue) { - if(mSendQueue.size > 10) mSendQueue.clear() + if (mSendQueue.size > 10) mSendQueue.clear() mSendQueue.add(bytes) } aapsLogger.debug(LTag.PUMPBTCOMM, "sendMessage() after mSendQueue.size :: ${mSendQueue.size}") @@ -268,6 +293,7 @@ class BLECommonService @Inject internal constructor( // process common packet response private fun processResponseMessage(data: ByteArray) { isConnected = true + isConnecting = false //요청정보 val originalMessageSeq = processedMessage?.getSeq(processedMessageByte) @@ -281,44 +307,29 @@ class BLECommonService @Inject internal constructor( aapsLogger.debug(LTag.PUMPBTCOMM, "receivedCommand :: $receivedCommand") // 응답메시지가 조회응답인지. 설정응답인지 구분해야됨. - var message:DiaconnG8Packet? = null + var message: DiaconnG8Packet? = null // 요청시퀀스와 응답의 시퀀스가 동일한 경우에만 처리. // 펌프로부터 받은 보고응답의 경우 처리 - if(receivedType == 3) { + if (receivedType == 3) { message = diaconnG8ResponseMessageHashTable.findMessage(receivedCommand) // injection Blocked Report - if(message is InjectionBlockReportPacket ) { + if (message is InjectionBlockReportPacket) { message.handleMessage(data) diaconnG8Pump.bolusBlocked = true - val i = Intent(context, ErrorHelperActivity::class.java) - i.putExtra("soundid", R.raw.boluserror) - i.putExtra("status", rh.gs(R.string.injectionblocked)) - i.putExtra("title", rh.gs(R.string.injectionblocked)) - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - context.startActivity(i) + ErrorHelperActivity.runAlarm(context, rh.gs(R.string.injectionblocked), rh.gs(R.string.injectionblocked), R.raw.boluserror) return } // battery warning report - if(message is BatteryWarningReportPacket ) { + if (message is BatteryWarningReportPacket) { message.handleMessage(data) - val i = Intent(context, ErrorHelperActivity::class.java) - i.putExtra("soundid", R.raw.boluserror) - i.putExtra("status", rh.gs(R.string.needbatteryreplace)) - i.putExtra("title", rh.gs(R.string.batterywarning)) - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - context.startActivity(i) + ErrorHelperActivity.runAlarm(context, rh.gs(R.string.needbatteryreplace), rh.gs(R.string.batterywarning), R.raw.boluserror) return } // insulin lack warning report - if(message is InsulinLackReportPacket ) { + if (message is InsulinLackReportPacket) { message.handleMessage(data) - val i = Intent(context, ErrorHelperActivity::class.java) - i.putExtra("soundid", R.raw.boluserror) - i.putExtra("status", rh.gs(R.string.needinsullinreplace)) - i.putExtra("title", rh.gs(R.string.insulinlackwarning)) - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - context.startActivity(i) + ErrorHelperActivity.runAlarm(context, rh.gs(R.string.needinsullinreplace), rh.gs(R.string.insulinlackwarning), R.raw.boluserror) return } @@ -327,7 +338,7 @@ class BLECommonService @Inject internal constructor( synchronized(mSendQueue) { val sendQueueSize = mSendQueue.size if (sendQueueSize > 0) { - for (i in sendQueueSize-1 downTo 0 ) { + for (i in sendQueueSize - 1 downTo 0) { val sendQueueSeq = DiaconnG8Packet(injector).getSeq(mSendQueue[i]) val sendQueueType = DiaconnG8Packet(injector).getType(mSendQueue[i]) if (sendQueueSeq == receivedSeq) { diff --git a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt index 85e84d4b29..a2c0e2e4de 100644 --- a/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt +++ b/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt @@ -136,13 +136,14 @@ class DiaconnG8Service : DaggerService() { } private fun sendMessage(message: DiaconnG8Packet) { - bleCommonService.sendMessage(message, 2000) + bleCommonService.sendMessage(message, 5000) } fun readPumpStatus() { try { val pump = activePlugin.activePump rxBus.send(EventPumpStatusChanged(rh.gs(R.string.gettingpumpsettings))) + sendMessage(SerialNumInquirePacket(injector)) val pumpFirmwareVersion = sp.getString(rh.gs(R.string.pumpversion), "") @@ -170,6 +171,7 @@ class DiaconnG8Service : DaggerService() { // 시간 설정 rxBus.send(EventPumpStatusChanged(rh.gs(R.string.gettingpumptime))) + sendMessage(TimeInquirePacket(injector)) var timeDiff = (diaconnG8Pump.getPumpTime() - System.currentTimeMillis()) / 1000L if (diaconnG8Pump.getPumpTime() == 0L) { // initial handshake was not successful @@ -239,14 +241,12 @@ class DiaconnG8Service : DaggerService() { } fun loadHistory(): PumpEnactResult { - if (!diaconnG8Plugin.isInitialized()) { val result = PumpEnactResult(injector).success(false) result.comment = "pump not initialized" return result } sendMessage(LogStatusInquirePacket(injector)) - // pump version check if (diaconnG8Pump.isPumpVersionGe2_63) { sendMessage(IncarnationInquirePacket(injector)) @@ -257,7 +257,7 @@ class DiaconnG8Service : DaggerService() { var apsWrappingCount = -1 // get saved last loginfo val diaconnHistoryRecord = diaconnHistoryRecordDao.getLastRecord(diaconnG8Pump.pumpUid) - aapsLogger.error(LTag.PUMPCOMM, "diaconnHistoryRecord :: $diaconnHistoryRecord") + aapsLogger.debug(LTag.PUMPCOMM, "diaconnHistoryRecord :: $diaconnHistoryRecord") if(diaconnHistoryRecord != null) { apsLastLogNum = diaconnHistoryRecord.lognum @@ -306,7 +306,6 @@ class DiaconnG8Service : DaggerService() { result.success(true) diaconnG8Pump.lastConnection = System.currentTimeMillis() } - // upload pump log to Diaconn Cloud if (sp.getBoolean(R.string.key_diaconn_g8_cloudsend, true)) { SystemClock.sleep(1000) @@ -399,13 +398,6 @@ class DiaconnG8Service : DaggerService() { fun bolus(insulin: Double, carbs: Int, carbTime: Long, t: EventOverviewBolusProgress.Treatment): Boolean { if (!isConnected) return false if (BolusProgressDialog.stopPressed) return false - - // Only Carbs - if (carbs > 0 && insulin == 0.0) { - pumpSync.syncCarbsWithTimestamp(carbTime, carbs.toDouble(), null, PumpType.DIACONN_G8, diaconnG8Pump.serialNo.toString()) - return true - } - rxBus.send(EventPumpStatusChanged(rh.gs(R.string.startingbolus))) // bolus speed setting @@ -435,7 +427,7 @@ class DiaconnG8Service : DaggerService() { val bolusStart = System.currentTimeMillis() if (insulin > 0) { if (!diaconnG8Pump.bolusStopped) { - sendMessage(start) + sendMessage(start, 100) // otp process if (!processConfirm(start.msgType)) return false } else { @@ -460,26 +452,29 @@ class DiaconnG8Service : DaggerService() { } val bolusDurationInMSec = (insulin * speed * 1000).toLong() - val expectedEnd = bolusStart + bolusDurationInMSec + 7500L + val expectedEnd = bolusStart + bolusDurationInMSec + 3500L val totalwaitTime = (expectedEnd - System.currentTimeMillis()) / 1000 - while (!diaconnG8Pump.bolusDone) { - val waitTime = (expectedEnd - System.currentTimeMillis()) / 1000 - bolusingEvent.status = rh.gs(R.string.waitingforestimatedbolusend, if (waitTime < 0) 0 else waitTime) - var progressPecent = 0 - if (totalwaitTime > waitTime) { - progressPecent = ((totalwaitTime - waitTime) * 100 / totalwaitTime).toInt() + if(diaconnG8Pump.isReadyToBolus) { + while (!diaconnG8Pump.bolusDone) { + val waitTime = (expectedEnd - System.currentTimeMillis()) / 1000 + bolusingEvent.status = String.format(rh.gs(R.string.waitingforestimatedbolusend), if (waitTime < 0) 0 else waitTime) + var progressPecent = 0 + if (totalwaitTime > waitTime) { + progressPecent = ((totalwaitTime - waitTime) * 100 / totalwaitTime).toInt() + } + bolusingEvent.percent = min(progressPecent, 100) + rxBus.send(bolusingEvent) + SystemClock.sleep(200) } - bolusingEvent.percent = min(progressPecent, 100) - rxBus.send(bolusingEvent) - SystemClock.sleep(200) } + diaconnG8Pump.isReadyToBolus = false // do not call loadHistory() directly, reconnection may be needed commandQueue.loadEvents(object : Callback() { override fun run() { // reread bolus status rxBus.send(EventPumpStatusChanged(rh.gs(R.string.gettingbolusstatus))) - sendMessage(InjectionSnackInquirePacket(injector), 1000) // last bolus + sendMessage(InjectionSnackInquirePacket(injector), 2000) // last bolus // 볼러스 결과 보고패킷에서 처리함. bolusingEvent.percent = 100 rxBus.send(EventPumpStatusChanged(rh.gs(R.string.disconnecting))) @@ -492,7 +487,7 @@ class DiaconnG8Service : DaggerService() { val stop = InjectionCancelSettingPacket(injector, 0x07.toByte()) diaconnG8Pump.bolusStopForced = true if (isConnected) { - sendMessage(stop) + sendMessage(stop, 100) // otp process if (!processConfirm(stop.msgType)) return while (!diaconnG8Pump.bolusStopped) { @@ -513,7 +508,7 @@ class DiaconnG8Service : DaggerService() { rxBus.send(EventPumpStatusChanged(rh.gs(R.string.stoppingtempbasal))) val msgPacket = TempBasalSettingPacket(injector, 2, diaconnG8Pump.tbTime, diaconnG8Pump.tbInjectRateRatio) // tempbasal stop - sendMessage(msgPacket) + sendMessage(msgPacket, 100) // otp process if (!processConfirm(msgPacket.msgType)) return false diaconnG8Pump.tempBasalStart = dateUtil.now() @@ -521,7 +516,7 @@ class DiaconnG8Service : DaggerService() { rxBus.send(EventPumpStatusChanged(rh.gs(R.string.settingtempbasal))) val tbInjectRate = ((absoluteRate * 100) + 1000).toInt() val msgTBR = TempBasalSettingPacket(injector, 1, ((durationInHours * 60) / 15).toInt(), tbInjectRate) - sendMessage(msgTBR) + sendMessage(msgTBR, 100) // otp process if (!processConfirm(msgTBR.msgType)) return false // pump tempbasal status inquire @@ -545,7 +540,7 @@ class DiaconnG8Service : DaggerService() { rxBus.send(EventPumpStatusChanged(rh.gs(R.string.stoppingtempbasal))) val msgPacket = TempBasalSettingPacket(injector, 2, diaconnG8Pump.tbTime, diaconnG8Pump.tbInjectRateRatio) // tempbasal stop - sendMessage(msgPacket) + sendMessage(msgPacket, 100) // otp process if (!processConfirm(msgPacket.msgType)) return false SystemClock.sleep(500) @@ -553,7 +548,7 @@ class DiaconnG8Service : DaggerService() { rxBus.send(EventPumpStatusChanged(rh.gs(R.string.settingtempbasal))) val tbInjectRate = absoluteRate * 100 + 1000 val msgTBR = TempBasalSettingPacket(injector, 1, 2, tbInjectRate.toInt()) - sendMessage(msgTBR) + sendMessage(msgTBR, 100) // otp process if (!processConfirm(msgTBR.msgType)) return false sendMessage(TempBasalInquirePacket(injector)) @@ -577,7 +572,7 @@ class DiaconnG8Service : DaggerService() { diaconnG8Pump.tbInjectRateRatio ) // tempbasal stop - sendMessage(msgPacket) + sendMessage(msgPacket, 500) // otp process if (!processConfirm(msgPacket.msgType)) return false SystemClock.sleep(500) @@ -593,7 +588,7 @@ class DiaconnG8Service : DaggerService() { fun extendedBolus(insulin: Double, durationInMinutes: Int): Boolean { if (!isConnected) return false rxBus.send(EventPumpStatusChanged(rh.gs(R.string.settingextendedbolus))) - aapsLogger.error(LTag.PUMPCOMM, "insulin: $insulin durationInMinutes: $durationInMinutes") + aapsLogger.debug(LTag.PUMPCOMM, "insulin: $insulin durationInMinutes: $durationInMinutes") val msgExtended = InjectionExtendedBolusSettingPacket(injector, (insulin * 100).toInt(), durationInMinutes, dateUtil.now()) sendMessage(msgExtended) @@ -672,6 +667,7 @@ class DiaconnG8Service : DaggerService() { (basalList[23] * 100).toInt() ) // setting basal pattern 1,2,3,4 + sendMessage(SerialNumInquirePacket(injector), 2000) sendMessage(requestReqPacket1, 500) sendMessage(requestReqPacket2, 500) sendMessage(requestReqPacket3, 500) @@ -694,22 +690,22 @@ class DiaconnG8Service : DaggerService() { private fun processConfirm(msgType: Byte): Boolean { // pump confirm + var loopCnt = 0 + // waiting 2 seconds for otp + while(loopCnt < 20) { + if (diaconnG8Pump.otpNumber == 0) { + SystemClock.sleep(100) + aapsLogger.error(LTag.PUMPCOMM, "OTP waiting 100ms $loopCnt / 20") + } + loopCnt++ + } + // after 2 second if (diaconnG8Pump.otpNumber == 0) { aapsLogger.error(LTag.PUMPCOMM, "otp is not received yet") - - // Comments are made as dialogs are exposed twice each in the event of an error. - // Thread { - // val i = Intent(context, ErrorHelperActivity::class.java) - // i.putExtra("soundid", R.raw.boluserror) - // i.putExtra("status", rh.gs(R.string.diaconn_g8_errotpreceivedyet)) - // i.putExtra("title", rh.gs(R.string.pumperror)) - // i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - // context.startActivity(i) - // }.start() - return false } - sendMessage(AppConfirmSettingPacket(injector, msgType, diaconnG8Pump.otpNumber)) + diaconnG8Pump.bolusConfirmMessage = msgType + sendMessage(AppConfirmSettingPacket(injector, msgType, diaconnG8Pump.otpNumber), 2000) diaconnG8Pump.otpNumber = 0 return true } diff --git a/diaconn/src/main/res/values-de-rDE/strings.xml b/diaconn/src/main/res/values-de-rDE/strings.xml index 696d5e84f4..50a3ac09df 100644 --- a/diaconn/src/main/res/values-de-rDE/strings.xml +++ b/diaconn/src/main/res/values-de-rDE/strings.xml @@ -152,4 +152,6 @@ LGS inaktiv, Befehl zum Ausschalten zurückgewiesen. TBR Start ist während einer laufenden TBR nicht möglich. TBR kann nicht gestoppt werden, da keine TBR läuft. + Sende Pumpenprotokolle zur Diaconn Cloud. + Diaconn Cloud-Sync diff --git a/diaconn/src/main/res/values-it-rIT/strings.xml b/diaconn/src/main/res/values-it-rIT/strings.xml index c4c7b80b16..2aad15a22a 100644 --- a/diaconn/src/main/res/values-it-rIT/strings.xml +++ b/diaconn/src/main/res/values-it-rIT/strings.xml @@ -152,4 +152,6 @@ Stato LGS già su OFF. Comando di disattivazione rifiutato. L\'avvio della basale temporanea viene rifiutato quando è già in esecuzione una basale temporanea Lo stop della basale temporanea viene rifiutato quando non è in esecuzione alcuna basale temporanea + Invia i log del micro a Diaconn Cloud. + Sincronizzazione Diaconn Cloud diff --git a/diaconn/src/main/res/values-iw-rIL/strings.xml b/diaconn/src/main/res/values-iw-rIL/strings.xml index 793e713ae8..d07e682614 100644 --- a/diaconn/src/main/res/values-iw-rIL/strings.xml +++ b/diaconn/src/main/res/values-iw-rIL/strings.xml @@ -135,4 +135,6 @@ בעת השהייה עקב סוכר נמוך, ההזרקה מוגבלת מצב השהייה עקב סוכר נמוך מופעל, פקודת ON נדחתה. מצב השהייה עקב סוכר נמוך כבוי, פקודת OFF נדחתה. + שלח יומני משאבה לענן Diaconn. + סנכרון Diaconn Cloud diff --git a/diaconn/src/main/res/values-nl-rNL/strings.xml b/diaconn/src/main/res/values-nl-rNL/strings.xml index acee82d0a6..ab90c38045 100644 --- a/diaconn/src/main/res/values-nl-rNL/strings.xml +++ b/diaconn/src/main/res/values-nl-rNL/strings.xml @@ -152,4 +152,6 @@ LGS status UIT, UIT Commando is geweigerd. Tijdelijk basaal start geweigerd als tijdelijk basaal wordt uitgevoerd Tijdelijk basaal stop geweigerd als tijdelijk basaal niet wordt uitgevoerd + Stuur pomp logs naar de Diaconn Cloud. + Diaconn Cloud Sync diff --git a/diaconn/src/main/res/values/strings.xml b/diaconn/src/main/res/values/strings.xml index f74b46b0af..ea014d7ef3 100644 --- a/diaconn/src/main/res/values/strings.xml +++ b/diaconn/src/main/res/values/strings.xml @@ -169,5 +169,5 @@ Tempbasal stop is rejected when tempbasal is not running Send pump logs to the Diaconn Cloud. Diaconn Cloud Sync - diaconn_g8_appuid + diaconn_g8_appuid diff --git a/icons/action_add.svg b/icons/action_add.svg new file mode 100644 index 0000000000..929dd4f7d9 --- /dev/null +++ b/icons/action_add.svg @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/icons/action_minus.svg b/icons/action_minus.svg new file mode 100644 index 0000000000..c7ef549809 --- /dev/null +++ b/icons/action_minus.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/icons/cancel.svg b/icons/cancel.svg new file mode 100644 index 0000000000..070444ebd3 --- /dev/null +++ b/icons/cancel.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/icons/confirm.svg b/icons/confirm.svg new file mode 100644 index 0000000000..0e93b2634e --- /dev/null +++ b/icons/confirm.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/icons/icon_snooze.svg b/icons/icon_snooze.svg new file mode 100644 index 0000000000..c2190ac542 --- /dev/null +++ b/icons/icon_snooze.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + diff --git a/icons/loop.svg b/icons/loop.svg new file mode 100644 index 0000000000..b9e96b325d --- /dev/null +++ b/icons/loop.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/icons/setting_off.svg b/icons/setting_off.svg new file mode 100644 index 0000000000..ae79852ac7 --- /dev/null +++ b/icons/setting_off.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/icons/setting_on.svg b/icons/setting_on.svg new file mode 100644 index 0000000000..72d9d52c8b --- /dev/null +++ b/icons/setting_on.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/insight/build.gradle b/insight/build.gradle index 623c52532a..5e69a77ba6 100644 --- a/insight/build.gradle +++ b/insight/build.gradle @@ -25,6 +25,7 @@ android { dependencies { implementation project(':core') implementation project(':shared') + implementation project(':pump-common') api "androidx.room:room-ktx:$room_version" api "androidx.room:room-runtime:$room_version" diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index 517d1c7ec4..503b68e53f 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -590,7 +590,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai EventOverviewBolusProgress.Treatment t = new EventOverviewBolusProgress.Treatment(0, 0, detailedBolusInfo.getBolusType() == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.getId()); final EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.INSTANCE; bolusingEvent.setT(t); - bolusingEvent.setStatus(rh.gs(R.string.insight_delivered, 0d, insulin)); + bolusingEvent.setStatus(rh.gs(R.string.bolus_delivered, 0d, insulin)); bolusingEvent.setPercent(0); rxBus.send(bolusingEvent); int trials = 0; @@ -629,14 +629,14 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai trials = -1; int percentBefore = bolusingEvent.getPercent(); bolusingEvent.setPercent((int) (100D / activeBolus.getInitialAmount() * (activeBolus.getInitialAmount() - activeBolus.getRemainingAmount()))); - bolusingEvent.setStatus(rh.gs(R.string.insight_delivered, activeBolus.getInitialAmount() - activeBolus.getRemainingAmount(), activeBolus.getInitialAmount())); + bolusingEvent.setStatus(rh.gs(R.string.bolus_delivered, activeBolus.getInitialAmount() - activeBolus.getRemainingAmount(), activeBolus.getInitialAmount())); if (percentBefore != bolusingEvent.getPercent()) rxBus.send(bolusingEvent); } else { synchronized ($bolusLock) { if (bolusCancelled || trials == -1 || trials++ >= 5) { if (!bolusCancelled) { - bolusingEvent.setStatus(rh.gs(R.string.insight_delivered, insulin, insulin)); + bolusingEvent.setStatus(rh.gs(R.string.bolus_delivered, insulin, insulin)); bolusingEvent.setPercent(100); rxBus.send(bolusingEvent); } diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/connection_service/InsightConnectionService.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/connection_service/InsightConnectionService.java index 114dbdbe62..f394dad0bd 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/connection_service/InsightConnectionService.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/connection_service/InsightConnectionService.java @@ -1,16 +1,20 @@ package info.nightscout.androidaps.plugins.pump.insight.connection_service; +import android.Manifest; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothManager; import android.bluetooth.BluetoothSocket; import android.content.Context; import android.content.Intent; +import android.content.pm.PackageManager; import android.os.Binder; +import android.os.Build; import android.os.IBinder; import android.os.PowerManager; import androidx.annotation.Nullable; +import androidx.core.app.ActivityCompat; import org.spongycastle.crypto.InvalidCipherTextException; @@ -23,8 +27,6 @@ import javax.inject.Inject; import dagger.android.DaggerService; import info.nightscout.androidaps.insight.R; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.insight.app_layer.AppLayerMessage; import info.nightscout.androidaps.plugins.pump.insight.app_layer.ReadParameterBlockMessage; import info.nightscout.androidaps.plugins.pump.insight.app_layer.configuration.CloseConfigurationWriteSessionMessage; @@ -87,6 +89,8 @@ import info.nightscout.androidaps.plugins.pump.insight.utils.PairingDataStorage; import info.nightscout.androidaps.plugins.pump.insight.utils.crypto.Cryptograph; import info.nightscout.androidaps.plugins.pump.insight.utils.crypto.DerivedKeys; import info.nightscout.androidaps.plugins.pump.insight.utils.crypto.KeyPair; +import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.shared.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; public class InsightConnectionService extends DaggerService implements ConnectionEstablisher.Callback, InputStreamReader.Callback, OutputStreamWriter.Callback { @@ -108,7 +112,7 @@ public class InsightConnectionService extends DaggerService implements Connectio private DelayedActionThread disconnectTimer; private DelayedActionThread recoveryTimer; private DelayedActionThread timeoutTimer; - private BluetoothAdapter bluetoothAdapter; + @Nullable private BluetoothAdapter bluetoothAdapter; private BluetoothDevice bluetoothDevice; private BluetoothSocket bluetoothSocket; private ConnectionEstablisher connectionEstablisher; @@ -205,7 +209,7 @@ public class InsightConnectionService extends DaggerService implements Connectio } public synchronized boolean isPaired() { - return pairingDataStorage.isPaired(); + return pairingDataStorage != null && pairingDataStorage.isPaired(); } public synchronized MessageRequest requestMessage(T message) { @@ -258,7 +262,9 @@ public class InsightConnectionService extends DaggerService implements Connectio @Override public synchronized void onCreate() { super.onCreate(); - bluetoothAdapter = ((BluetoothManager)getApplicationContext().getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter(); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_CONNECT) == PackageManager.PERMISSION_GRANTED) { + bluetoothAdapter = ((BluetoothManager) getApplicationContext().getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter(); + } pairingDataStorage = new PairingDataStorage(this); state = pairingDataStorage.isPaired() ? InsightState.DISCONNECTED : InsightState.NOT_PAIRED; wakeLock = ((PowerManager) getSystemService(POWER_SERVICE)).newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AndroidAPS:InsightConnectionService"); @@ -426,6 +432,7 @@ public class InsightConnectionService extends DaggerService implements Connectio } private synchronized void connect() { + if (bluetoothAdapter == null) return; if (bluetoothDevice == null) bluetoothDevice = bluetoothAdapter.getRemoteDevice(pairingDataStorage.getMacAddress()); setState(InsightState.CONNECTING); diff --git a/insight/src/main/res/layout/bluetooth_device.xml b/insight/src/main/res/layout/bluetooth_device.xml index 9287922b46..1e6f3e7121 100644 --- a/insight/src/main/res/layout/bluetooth_device.xml +++ b/insight/src/main/res/layout/bluetooth_device.xml @@ -7,6 +7,5 @@ android:gravity="center_vertical" android:paddingStart="16dp" android:paddingEnd="0dp" - android:textColor="#FFFFFF" android:textSize="20sp" tools:text="Test" /> diff --git a/insight/src/main/res/layout/local_insight_status_item.xml b/insight/src/main/res/layout/local_insight_status_item.xml index 987d71b50e..31eb51d0a6 100644 --- a/insight/src/main/res/layout/local_insight_status_item.xml +++ b/insight/src/main/res/layout/local_insight_status_item.xml @@ -34,7 +34,6 @@ android:gravity="start" android:paddingStart="5dp" android:paddingEnd="0dp" - android:textColor="@android:color/white" android:textSize="14sp" /> diff --git a/insight/src/main/res/values-bg-rBG/strings.xml b/insight/src/main/res/values-bg-rBG/strings.xml index 1cf9437089..d299c43c7b 100644 --- a/insight/src/main/res/values-bg-rBG/strings.xml +++ b/insight/src/main/res/values-bg-rBG/strings.xml @@ -27,7 +27,6 @@ Съвпадат ли кодовете, показани на това устройство и на Вашата помпа? Insight свързване Accu-Chek Insight - %1$.2fЕ / %2$.2fЕ доставени %1$s:%2$s Тръба сменена Sight diff --git a/insight/src/main/res/values-cs-rCZ/strings.xml b/insight/src/main/res/values-cs-rCZ/strings.xml index a8fca7d393..b26c49268e 100644 --- a/insight/src/main/res/values-cs-rCZ/strings.xml +++ b/insight/src/main/res/values-cs-rCZ/strings.xml @@ -27,7 +27,6 @@ Souhlasí kódy zobrazené na tomto zařízení a na pumpě? Insight párování Accu-Chek Insight - Podáno %1$.2f U / %2$.2f U %1$s: %2$s Vyměněna hadičky Insight diff --git a/insight/src/main/res/values-da-rDK/strings.xml b/insight/src/main/res/values-da-rDK/strings.xml index b1557b9a98..7d3e525db3 100644 --- a/insight/src/main/res/values-da-rDK/strings.xml +++ b/insight/src/main/res/values-da-rDK/strings.xml @@ -27,7 +27,6 @@ Stemmer de viste koder overens mellem dette apparat og din pumpe? Insight parring Accu-Chek Insight - %1$.2f IE / %2$.2f IE leveret %1$s: %2$s Slange skiftet Sight diff --git a/insight/src/main/res/values-de-rDE/strings.xml b/insight/src/main/res/values-de-rDE/strings.xml index 4a1032acfb..bcff03ea9e 100644 --- a/insight/src/main/res/values-de-rDE/strings.xml +++ b/insight/src/main/res/values-de-rDE/strings.xml @@ -27,7 +27,6 @@ Stimmen die Codes auf diesem Gerät und auf deiner Pumpe überein? Insight Kopplung Accu-Chek Insight - %1$.2f IE / %2$.2f IE abgegeben %1$s: %2$s Schlauch gewechselt Sight diff --git a/insight/src/main/res/values-es-rES/strings.xml b/insight/src/main/res/values-es-rES/strings.xml index 0247f64554..8ef38ef27c 100644 --- a/insight/src/main/res/values-es-rES/strings.xml +++ b/insight/src/main/res/values-es-rES/strings.xml @@ -27,7 +27,6 @@ ¿Coinciden los códigos mostrados en este dispositivo con los de la bomba? Insight emparejada Accu-Chek Insight - %1$.2f U / %2$.2f U entregado %1$s: %2$s Tubo cambiado Sight diff --git a/insight/src/main/res/values-fr-rFR/strings.xml b/insight/src/main/res/values-fr-rFR/strings.xml index a218610084..31004af864 100644 --- a/insight/src/main/res/values-fr-rFR/strings.xml +++ b/insight/src/main/res/values-fr-rFR/strings.xml @@ -27,7 +27,6 @@ Les codes affichés sur cet appareil et sur la pompe sont-ils identiques ? Appairage de Insight Accu-Chek Insight - %1$.2f U / %2$.2f U délivrés %1$s : %2$s Tubulure changée AC-I diff --git a/insight/src/main/res/values-ga-rIE/strings.xml b/insight/src/main/res/values-ga-rIE/strings.xml index 28a4614bb0..9a5c82d1d2 100644 --- a/insight/src/main/res/values-ga-rIE/strings.xml +++ b/insight/src/main/res/values-ga-rIE/strings.xml @@ -7,7 +7,6 @@ TDD Lomlán %1$.2f / %2$.2f A do %3$d nom Accu-Chek Insight - %1$.2f A / %2$.2f A seachadta %1$s: %2$s Caidéil stopadh Caidéil tosú diff --git a/insight/src/main/res/values-it-rIT/strings.xml b/insight/src/main/res/values-it-rIT/strings.xml index ab9bb89df7..f472a03a83 100644 --- a/insight/src/main/res/values-it-rIT/strings.xml +++ b/insight/src/main/res/values-it-rIT/strings.xml @@ -27,7 +27,6 @@ I codici mostrati su questo dispositivo e sul micro combaciano? Associazione Insight Accu-Chek Insight - %1$.2f U / %2$.2f U erogato %1$s: %2$s Catetere sostituito Sight diff --git a/insight/src/main/res/values-iw-rIL/strings.xml b/insight/src/main/res/values-iw-rIL/strings.xml index 7076fcc849..fffb9f3b7f 100644 --- a/insight/src/main/res/values-iw-rIL/strings.xml +++ b/insight/src/main/res/values-iw-rIL/strings.xml @@ -27,7 +27,6 @@ האם הקודים המוצגים בהתקן זה ובמשאבה זהים? צימוד Insight Accu-Chek Insight - %1$.2f יח\' מתוך %2$.2f יח\' הוזרקו %1$s: %2$s הצינורית הוחלפה Insight diff --git a/insight/src/main/res/values-ko-rKR/strings.xml b/insight/src/main/res/values-ko-rKR/strings.xml index efb441f1ed..02c0d4225a 100644 --- a/insight/src/main/res/values-ko-rKR/strings.xml +++ b/insight/src/main/res/values-ko-rKR/strings.xml @@ -26,7 +26,6 @@ 이 장치에서 보여지는 코드와 펌프에서 보여지는 코드가 동일한가요? Insight와 동기화 아큐-첵 Insight - %1$.2f U / %2$.2f U 주입됨 %1$s: %2$s 튜브 변경 Sight diff --git a/insight/src/main/res/values-lt-rLT/strings.xml b/insight/src/main/res/values-lt-rLT/strings.xml index daf025ad85..4ba1aaeff1 100644 --- a/insight/src/main/res/values-lt-rLT/strings.xml +++ b/insight/src/main/res/values-lt-rLT/strings.xml @@ -27,7 +27,6 @@ Ar kodas, kurį matote įrenginyje, sutampa su pompos kodu? Insight sujungimas Accu-Chek Insight - %1$.2f vv iš %2$.2f vv suleista %1$s: %2$s Kateteris pakeistas Sight diff --git a/insight/src/main/res/values-nl-rNL/strings.xml b/insight/src/main/res/values-nl-rNL/strings.xml index 2efcf95fbd..6505b5f3e5 100644 --- a/insight/src/main/res/values-nl-rNL/strings.xml +++ b/insight/src/main/res/values-nl-rNL/strings.xml @@ -27,7 +27,6 @@ Worden dezelfde codes weergegeven op dit apparaat als op je pomp? Insight koppelen Accu-Chek Insight - %1$.2f E / %2$.2f E toegediend %1$s: %2$s Slang vervangen Insight diff --git a/insight/src/main/res/values-no-rNO/strings.xml b/insight/src/main/res/values-no-rNO/strings.xml index 14871c36c7..05e452e49b 100644 --- a/insight/src/main/res/values-no-rNO/strings.xml +++ b/insight/src/main/res/values-no-rNO/strings.xml @@ -27,7 +27,6 @@ Stemmer de viste kodene overens mellom denne enheten og din pumpe? Sammenkobling av Insight Accu-Chek Insight - %1$.2f E / %2$.2f E levert %1$s: %2$s Slange byttet Sight diff --git a/insight/src/main/res/values-pl-rPL/strings.xml b/insight/src/main/res/values-pl-rPL/strings.xml index 717cf0a20b..5fd910388e 100644 --- a/insight/src/main/res/values-pl-rPL/strings.xml +++ b/insight/src/main/res/values-pl-rPL/strings.xml @@ -27,7 +27,6 @@ Czy kody wyświetlone na tym urządzeniu i na twojej pompie pasują? Parowanie Insight Accu-Chek Insight - podano %1$.2f U / %2$.2f U %1$s: %2$s Dren zmieniony Sight diff --git a/insight/src/main/res/values-pt-rPT/strings.xml b/insight/src/main/res/values-pt-rPT/strings.xml index becf828d63..befcfa9dd3 100644 --- a/insight/src/main/res/values-pt-rPT/strings.xml +++ b/insight/src/main/res/values-pt-rPT/strings.xml @@ -27,7 +27,6 @@ Os códigos exibidos neste dispositivo e na sua bomba correspondem? Emparelhamento Insight Accu-Chek Insight - %1$.2f U / %2$.2f U administrado %1$s: %2$s Tubo mudado Visão diff --git a/insight/src/main/res/values-ro-rRO/strings.xml b/insight/src/main/res/values-ro-rRO/strings.xml index f005b68bea..0cea3bfe86 100644 --- a/insight/src/main/res/values-ro-rRO/strings.xml +++ b/insight/src/main/res/values-ro-rRO/strings.xml @@ -27,7 +27,6 @@ Sunt identice codurile afișate aici și cele de pe pompă? Asociere Insight Accu-Chek Insight - %1$.2f U din %2$.2f U livrate %1$s:%2$s Canulă schimbată Obiectiv diff --git a/insight/src/main/res/values-ru-rRU/strings.xml b/insight/src/main/res/values-ru-rRU/strings.xml index 2c34e92dfc..909280c5af 100644 --- a/insight/src/main/res/values-ru-rRU/strings.xml +++ b/insight/src/main/res/values-ru-rRU/strings.xml @@ -27,7 +27,6 @@ Коды на этом устройстве и на вашей помпе совпадают? Сопряжение с Insight Accu-Chek Insight - Подано %1$.2fед / %2$.2fед %1$s: %2$s Трубка заменена Поле обзора diff --git a/insight/src/main/res/values-sk-rSK/strings.xml b/insight/src/main/res/values-sk-rSK/strings.xml index b8fb7f6d8e..cc0d65f2ff 100644 --- a/insight/src/main/res/values-sk-rSK/strings.xml +++ b/insight/src/main/res/values-sk-rSK/strings.xml @@ -27,7 +27,6 @@ Zhodujú sa kódy zobrazené na tomto zariadení a na pumpe? Párovanie Insight Accu-Chek Insight - %1$.2f JI / %2$.2f JI podaných %1$s: %2$s Hadička vymenená Sight diff --git a/insight/src/main/res/values-sv-rSE/strings.xml b/insight/src/main/res/values-sv-rSE/strings.xml index 1ca1a27151..36d3fd2de2 100644 --- a/insight/src/main/res/values-sv-rSE/strings.xml +++ b/insight/src/main/res/values-sv-rSE/strings.xml @@ -27,7 +27,6 @@ Stämmer koderna överens mellan denna enhet och din pump? Parkoppling av Insight Accu-Chek Insight - %1$.2fU / %2$.2fU levererat %1$s: %2$s Slang bytt Sight diff --git a/insight/src/main/res/values-tr-rTR/strings.xml b/insight/src/main/res/values-tr-rTR/strings.xml index ad1eb34680..9e277c8349 100644 --- a/insight/src/main/res/values-tr-rTR/strings.xml +++ b/insight/src/main/res/values-tr-rTR/strings.xml @@ -27,7 +27,6 @@ Bu cihazda ve pompanızda görüntülenen kodlar uyuşuyor mu? Insight eşleştirme Accu-Chek Insight - %1$.2f Ü / %2$.2f Ü gönderildi %1$s: %2$s Hortum değişti Sight diff --git a/insight/src/main/res/values-zh-rCN/strings.xml b/insight/src/main/res/values-zh-rCN/strings.xml index b66a09bfa9..a87e136d2f 100644 --- a/insight/src/main/res/values-zh-rCN/strings.xml +++ b/insight/src/main/res/values-zh-rCN/strings.xml @@ -27,7 +27,6 @@ 此设备和您的泵上显示的代码是否匹配? Insight 正在配对 Accu-Chek Insight - %1$.2f U / %2$.2f U 已输注 %1$s: %2$s 管路已经更换 Sight diff --git a/insight/src/main/res/values/strings.xml b/insight/src/main/res/values/strings.xml index f07833d819..a6bfaf9b02 100644 --- a/insight/src/main/res/values/strings.xml +++ b/insight/src/main/res/values/strings.xml @@ -28,7 +28,6 @@ Do the codes displayed on this device and on your pump match? Insight pairing Accu-Chek Insight - %1$.2f U / %2$.2f U delivered %1$s: %2$s Tube changed Sight diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt index e3e0642a70..84ac9a6138 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt @@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic import android.annotation.SuppressLint import android.content.Intent -import android.graphics.Color import android.os.Bundle import android.os.Handler import android.os.HandlerThread @@ -16,13 +15,11 @@ import info.nightscout.androidaps.events.EventTempBasalChange import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState import info.nightscout.androidaps.plugins.pump.common.events.EventRefreshButtonState import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange -import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity @@ -42,8 +39,9 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.WarnColors import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject @@ -59,7 +57,6 @@ class MedtronicFragment : DaggerFragment() { @Inject lateinit var activePlugin: ActivePlugin @Inject lateinit var medtronicPumpPlugin: MedtronicPumpPlugin @Inject lateinit var warnColors: WarnColors - @Inject lateinit var rileyLinkUtil: RileyLinkUtil @Inject lateinit var medtronicUtil: MedtronicUtil @Inject lateinit var medtronicPumpStatus: MedtronicPumpStatus @Inject lateinit var rileyLinkServiceData: RileyLinkServiceData @@ -92,7 +89,7 @@ class MedtronicFragment : DaggerFragment() { binding.rlStatus.text = rh.gs(RileyLinkServiceState.NotStarted.resourceId) - binding.pumpStatusIcon.setTextColor(rh.gac(context,R.attr.defaultTextColor)) + binding.pumpStatusIcon.setTextColor(rh.gac(context, R.attr.defaultTextColor)) @SuppressLint("SetTextI18n") binding.pumpStatusIcon.text = "{fa-bed}" @@ -139,9 +136,9 @@ class MedtronicFragment : DaggerFragment() { .toObservable(EventRileyLinkDeviceStatusChange::class.java) .observeOn(aapsSchedulers.main) .subscribe({ - aapsLogger.debug(LTag.PUMP, "onStatusEvent(EventRileyLinkDeviceStatusChange): $it") - setDeviceStatus() - }, fabricPrivacy::logException) + aapsLogger.debug(LTag.PUMP, "onStatusEvent(EventRileyLinkDeviceStatusChange): $it") + setDeviceStatus() + }, fabricPrivacy::logException) disposable += rxBus .toObservable(EventMedtronicPumpValuesChanged::class.java) .observeOn(aapsSchedulers.main) @@ -158,10 +155,10 @@ class MedtronicFragment : DaggerFragment() { .toObservable(EventMedtronicPumpConfigurationChanged::class.java) .observeOn(aapsSchedulers.main) .subscribe({ - aapsLogger.debug(LTag.PUMP, "EventMedtronicPumpConfigurationChanged triggered") - medtronicPumpPlugin.rileyLinkService?.verifyConfiguration() - updateGUI() - }, fabricPrivacy::logException) + aapsLogger.debug(LTag.PUMP, "EventMedtronicPumpConfigurationChanged triggered") + medtronicPumpPlugin.rileyLinkService?.verifyConfiguration() + updateGUI() + }, fabricPrivacy::logException) disposable += rxBus .toObservable(EventPumpStatusChanged::class.java) .observeOn(aapsSchedulers.main) @@ -191,7 +188,7 @@ class MedtronicFragment : DaggerFragment() { @Synchronized private fun setDeviceStatus() { val resourceId = rileyLinkServiceData.rileyLinkServiceState.resourceId - val rileyLinkError = medtronicPumpPlugin.rileyLinkService?.error + val rileyLinkError =rileyLinkServiceData.rileyLinkError binding.rlStatus.text = when { rileyLinkServiceData.rileyLinkServiceState == RileyLinkServiceState.NotStarted -> rh.gs(resourceId) @@ -200,7 +197,7 @@ class MedtronicFragment : DaggerFragment() { rileyLinkServiceData.rileyLinkServiceState.isError && rileyLinkError != null -> "{fa-bluetooth-b} " + rh.gs(rileyLinkError.getResourceId(RileyLinkTargetDevice.MedtronicPump)) else -> "{fa-bluetooth-b} " + rh.gs(resourceId) } - binding.rlStatus.setTextColor(rh.gac( context, if (rileyLinkError != null) R.attr.warningColor else R.attr.defaultTextColor)) + binding.rlStatus.setTextColor(rh.gac(context, if (rileyLinkError != null) R.attr.warningColor else R.attr.defaultTextColor)) binding.errors.text = rileyLinkServiceData.rileyLinkError?.let { @@ -253,8 +250,10 @@ class MedtronicFragment : DaggerFragment() { private fun displayNotConfiguredDialog() { context?.let { - OKDialog.show(it, rh.gs(R.string.medtronic_warning), - rh.gs(R.string.medtronic_error_operation_not_possible_no_configuration), null) + OKDialog.show( + it, rh.gs(R.string.medtronic_warning), + rh.gs(R.string.medtronic_error_operation_not_possible_no_configuration), null + ) } } @@ -272,7 +271,7 @@ class MedtronicFragment : DaggerFragment() { val min = (System.currentTimeMillis() - medtronicPumpStatus.lastConnection) / 1000 / 60 if (medtronicPumpStatus.lastConnection + 60 * 1000 > System.currentTimeMillis()) { binding.lastConnection.setText(R.string.medtronic_pump_connected_now) - binding.lastConnection.setTextColor(rh.gac(context,R.attr.defaultTextColor)) + binding.lastConnection.setTextColor(rh.gac(context, R.attr.defaultTextColor)) } else if (medtronicPumpStatus.lastConnection + 30 * 60 * 1000 < System.currentTimeMillis()) { if (min < 60) { @@ -288,10 +287,10 @@ class MedtronicFragment : DaggerFragment() { binding.lastConnection.text = (rh.gq(R.plurals.duration_days, d, d) + " " + rh.gs(R.string.ago)) } - binding.lastConnection.setTextColor(rh.gac(context,R.attr.warningColor)) + binding.lastConnection.setTextColor(rh.gac(context, R.attr.warningColor)) } else { binding.lastConnection.text = minAgo - binding.lastConnection.setTextColor(rh.gac(context,R.attr.defaultTextColor)) + binding.lastConnection.setTextColor(rh.gac(context, R.attr.defaultTextColor)) } } @@ -329,7 +328,8 @@ class MedtronicFragment : DaggerFragment() { if (medtronicPumpStatus.batteryType == BatteryType.None || medtronicPumpStatus.batteryVoltage == null) { binding.pumpStateBattery.text = "{fa-battery-" + medtronicPumpStatus.batteryRemaining / 25 + "} " } else { - binding.pumpStateBattery.text = "{fa-battery-" + medtronicPumpStatus.batteryRemaining / 25 + "} " + medtronicPumpStatus.batteryRemaining + "%" + String.format(" (%.2f V)", medtronicPumpStatus.batteryVoltage) + binding.pumpStateBattery.text = + "{fa-battery-" + medtronicPumpStatus.batteryRemaining / 25 + "} " + medtronicPumpStatus.batteryRemaining + "%" + String.format(" (%.2f V)", medtronicPumpStatus.batteryVoltage) } warnColors.setColorInverse(binding.pumpStateBattery, medtronicPumpStatus.batteryRemaining.toDouble(), 25.0, 10.0) @@ -340,19 +340,15 @@ class MedtronicFragment : DaggerFragment() { medtronicPumpPlugin.rileyLinkService?.verifyConfiguration() binding.errors.text = medtronicPumpStatus.errorInfo - val showRileyLinkBatteryLevel: Boolean = rileyLinkServiceData.showBatteryLevel - - if (showRileyLinkBatteryLevel) { + if (rileyLinkServiceData.showBatteryLevel) { binding.rlBatteryView.visibility = View.VISIBLE binding.rlBatteryLabel.visibility = View.VISIBLE binding.rlBatteryState.visibility = View.VISIBLE binding.rlBatteryLayout.visibility = View.VISIBLE binding.rlBatterySemicolon.visibility = View.VISIBLE - if (rileyLinkServiceData.batteryLevel == null) { - binding.rlBatteryState.text = " ?" - } else { - binding.rlBatteryState.text = "{fa-battery-" + rileyLinkServiceData.batteryLevel / 25 + "} " + rileyLinkServiceData.batteryLevel + "%" - } + binding.rlBatteryState.text = + if (rileyLinkServiceData.batteryLevel == null) " ?" + else "{fa-battery-${rileyLinkServiceData.batteryLevel!! / 25}} ${rileyLinkServiceData.batteryLevel}%" } else { binding.rlBatteryView.visibility = View.GONE binding.rlBatteryLabel.visibility = View.GONE diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt index 2fbebf5bf7..551a06f862 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt @@ -20,6 +20,7 @@ import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.common.PumpPluginAbstract +import info.nightscout.androidaps.plugins.pump.common.data.PumpStatus import info.nightscout.androidaps.plugins.pump.common.defs.PumpDriverState import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.events.EventRefreshButtonState @@ -33,6 +34,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.WakeAndTuneTask import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryTBR import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncEntriesCreator +import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry @@ -54,7 +56,6 @@ import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Comp import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.TimeChangeType -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.shared.logging.AAPSLogger import info.nightscout.shared.logging.LTag @@ -90,7 +91,7 @@ class MedtronicPumpPlugin @Inject constructor( dateUtil: DateUtil, aapsSchedulers: AapsSchedulers, pumpSync: PumpSync, - pumpSyncStorage: info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage + pumpSyncStorage: PumpSyncStorage ) : PumpPluginAbstract( PluginDescription() // .mainType(PluginType.PUMP) // @@ -194,16 +195,18 @@ class MedtronicPumpPlugin @Inject constructor( } } - override fun onStartCustomActions() { + override fun hasService(): Boolean { + return true + } + + override fun onStartScheduledPumpActions() { // check status every minute (if any status needs refresh we send readStatus command) Thread { do { SystemClock.sleep(60000) if (this.isInitialized) { - val statusRefresh = workWithStatusRefresh( - StatusRefreshAction.GetData, null, null - )!! + val statusRefresh = synchronized(statusRefreshMap) { HashMap(statusRefreshMap) } if (doWeHaveAnyStatusNeededRefreshing(statusRefresh)) { if (!commandQueue.statusInQueue()) { commandQueue.readStatus(rh.gs(R.string.scheduled_status_refresh), null) @@ -215,27 +218,13 @@ class MedtronicPumpPlugin @Inject constructor( }.start() } - override val serviceClass: Class<*> - get() = RileyLinkMedtronicService::class.java - - override val pumpStatusData: info.nightscout.androidaps.plugins.pump.common.data.PumpStatus - get() = medtronicPumpStatus - - override fun deviceID(): String { - return "Medtronic" - } - - override val isFakingTempsByExtendedBoluses: Boolean - get() = false - - override fun canHandleDST(): Boolean { - return false - } - - // Pump Plugin + override val serviceClass: Class<*> = RileyLinkMedtronicService::class.java + override val pumpStatusData: PumpStatus get() = medtronicPumpStatus + override fun deviceID(): String = "Medtronic" + override val isFakingTempsByExtendedBoluses: Boolean = false + override fun canHandleDST(): Boolean = false private var isServiceSet: Boolean = false - - override val rileyLinkService: RileyLinkMedtronicService? = rileyLinkMedtronicService + override val rileyLinkService: RileyLinkMedtronicService? get() = rileyLinkMedtronicService override val pumpInfo: RileyLinkPumpInfo get() = RileyLinkPumpInfo( @@ -244,7 +233,7 @@ class MedtronicPumpPlugin @Inject constructor( medtronicPumpStatus.serialNumber ) - override val lastConnectionTimeMillis: Long = medtronicPumpStatus.lastConnection + override val lastConnectionTimeMillis: Long get() = medtronicPumpStatus.lastConnection override fun setLastCommunicationToNow() { medtronicPumpStatus.setLastCommunicationToNow() @@ -319,12 +308,8 @@ class MedtronicPumpPlugin @Inject constructor( private val isPumpNotReachable: Boolean get() { val rileyLinkServiceState = rileyLinkServiceData.rileyLinkServiceState - if (rileyLinkServiceState == null) { - aapsLogger.debug(LTag.PUMP, "RileyLink unreachable. RileyLinkServiceState is null.") - return false - } - if (rileyLinkServiceState != RileyLinkServiceState.PumpConnectorReady // - && rileyLinkServiceState != RileyLinkServiceState.RileyLinkReady // + if (rileyLinkServiceState != RileyLinkServiceState.PumpConnectorReady + && rileyLinkServiceState != RileyLinkServiceState.RileyLinkReady && rileyLinkServiceState != RileyLinkServiceState.TuneUpDevice ) { aapsLogger.debug(LTag.PUMP, "RileyLink unreachable.") @@ -334,10 +319,7 @@ class MedtronicPumpPlugin @Inject constructor( } private fun refreshAnyStatusThatNeedsToBeRefreshed() { - val statusRefresh = workWithStatusRefresh( - StatusRefreshAction.GetData, null, - null - )!! + val statusRefresh = synchronized(statusRefreshMap) { HashMap(statusRefreshMap) } if (!doWeHaveAnyStatusNeededRefreshing(statusRefresh)) { return } @@ -359,6 +341,7 @@ class MedtronicPumpPlugin @Inject constructor( val refreshTypesNeededToReschedule: MutableSet = mutableSetOf() for ((key, value) in statusRefresh) { if (value > 0 && System.currentTimeMillis() > value) { + @Suppress("WHEN_ENUM_CAN_BE_NULL_IN_JAVA") when (key) { MedtronicStatusRefreshType.PumpHistory -> { readPumpHistory() @@ -677,19 +660,9 @@ class MedtronicPumpPlugin @Inject constructor( @Suppress("SameParameterValue") private fun setNotReachable(isBolus: Boolean, success: Boolean): PumpEnactResult { setRefreshButtonEnabled(true) - if (isBolus) { - bolusDeliveryType = BolusDeliveryType.Idle - } - return if (success) { - PumpEnactResult(injector) // - .success(true) // - .enacted(false) - } else { - PumpEnactResult(injector) // - .success(false) // - .enacted(false) // - .comment(R.string.medtronic_pump_status_pump_unreachable) - } + if (isBolus) bolusDeliveryType = BolusDeliveryType.Idle + return if (success) PumpEnactResult(injector).success(true).enacted(false) + else PumpEnactResult(injector).success(false).enacted(false).comment(R.string.medtronic_pump_status_pump_unreachable) } override fun stopBolusDelivering() { @@ -776,7 +749,7 @@ class MedtronicPumpPlugin @Inject constructor( PumpEnactResult(injector).success(false).enacted(false) // .comment(R.string.medtronic_cmd_tbr_could_not_be_delivered) } else { - medtronicPumpStatus.tempBasalStart = Date() + medtronicPumpStatus.tempBasalStart = System.currentTimeMillis() medtronicPumpStatus.tempBasalAmount = absoluteRate medtronicPumpStatus.tempBasalLength = durationInMinutes @@ -993,42 +966,15 @@ class MedtronicPumpPlugin @Inject constructor( MedtronicStatusRefreshType.RemainingInsulin -> { val remaining = medtronicPumpStatus.reservoirRemainingUnits val min: Int = if (remaining > 50) 4 * 60 else if (remaining > 20) 60 else 15 - workWithStatusRefresh(StatusRefreshAction.Add, refreshType, getTimeInFutureFromMinutes(min)) + synchronized(statusRefreshMap) { statusRefreshMap[refreshType] = getTimeInFutureFromMinutes(min) } } MedtronicStatusRefreshType.PumpTime, MedtronicStatusRefreshType.Configuration, MedtronicStatusRefreshType.BatteryStatus, MedtronicStatusRefreshType.PumpHistory -> { - workWithStatusRefresh( - StatusRefreshAction.Add, refreshType, - getTimeInFutureFromMinutes(refreshType.refreshTime + additionalTimeInMinutes) - ) + synchronized(statusRefreshMap) { statusRefreshMap[refreshType] = getTimeInFutureFromMinutes(refreshType.refreshTime + additionalTimeInMinutes) } } } } - private enum class StatusRefreshAction { - Add, // - GetData - } - - @Synchronized - private fun workWithStatusRefresh( - action: StatusRefreshAction, // - statusRefreshType: MedtronicStatusRefreshType?, // - time: Long? - ): Map? { - return when (action) { - StatusRefreshAction.Add -> { - statusRefreshMap[statusRefreshType!!] = time!! - null - } - - StatusRefreshAction.GetData -> { - HashMap(statusRefreshMap) - } - - } - } - private fun getTimeInFutureFromMinutes(minutes: Int): Long { return System.currentTimeMillis() + getTimeInMs(minutes) } diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt index 752d7e187b..09ebc9d5b7 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt @@ -29,6 +29,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpSta import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.shared.sharedPreferences.SP import org.apache.commons.lang3.StringUtils import org.joda.time.LocalDateTime @@ -57,7 +58,7 @@ class MedtronicHistoryData @Inject constructor( val medtronicPumpHistoryDecoder: MedtronicPumpHistoryDecoder, val medtronicPumpStatus: MedtronicPumpStatus, val pumpSync: PumpSync, - val pumpSyncStorage: info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage + val pumpSyncStorage: PumpSyncStorage ) { val allHistory: MutableList = mutableListOf() @@ -357,7 +358,7 @@ class MedtronicHistoryData @Inject constructor( aapsLogger.debug(LTag.PUMP, String.format(Locale.ENGLISH, "ProcessHistoryData: TBRs Processed [count=%d, items=%s]", tbrs.size, gson.toJson(tbrs))) if (tbrs.isNotEmpty()) { try { - processTBREntries(tbrs, rewindRecords) + processTBREntries(tbrs) } catch (ex: Exception) { aapsLogger.error(LTag.PUMP, "ProcessHistoryData: Error processing TBR entries: " + ex.message, ex) throw ex @@ -582,7 +583,7 @@ class MedtronicHistoryData @Inject constructor( } } - private fun processTBREntries(entryList: MutableList, rewindList: MutableList) { + private fun processTBREntries(entryList: MutableList) { entryList.reverse() val tbr = entryList[0].getDecodedDataEntry("Object") as TempBasalPair // var readOldItem = false @@ -606,7 +607,7 @@ class MedtronicHistoryData @Inject constructor( val tbrRecords = pumpSyncStorage.getTBRs() - val processList: MutableList = createTBRProcessList(entryList, rewindList) + val processList: MutableList = createTBRProcessList(entryList) if (processList.isNotEmpty()) { for (tempBasalProcessDTO in processList) { @@ -730,7 +731,7 @@ class MedtronicHistoryData @Inject constructor( } - fun createTBRProcessList(entryList: MutableList, rewindList: MutableList) : MutableList { + fun createTBRProcessList(entryList: MutableList) : MutableList { aapsLogger.debug(LTag.PUMP, "${ProcessHistoryRecord.TBR.description} List (before filter): ${gson.toJson(entryList)}") @@ -796,24 +797,68 @@ class MedtronicHistoryData @Inject constructor( } } - // see if rewind items, need to fix any of current tempBasalProcessDTO items (bug 1724) - if (rewindList.isNotEmpty()) { - for (rewindEntry in rewindList) { - for (tempBasalProcessDTO in processList) { - if (tempBasalProcessDTO.itemTwo==null) { - val endTime: Long = DateTimeUtil.getATDWithAddedMinutes(tempBasalProcessDTO.itemOne.atechDateTime, tempBasalProcessDTO.itemOneTbr!!.durationMinutes) + // TODO this solution needs to be overworked, commenting out for now + // val suspendList = getFilteredItems(newHistory, // + // setOf(PumpHistoryEntryType.SuspendPump)) + // + // val stopList : MutableList = mutableListOf() + // stopList.addAll(suspendList); + // stopList.addAll(rewindList); + // + // // TODO remove see if rewind items, need to fix any of current tempBasalProcessDTO items (bug 1724) + // if (rewindList.isNotEmpty()) { + // for (rewindEntry in rewindList) { + // for (tempBasalProcessDTO in processList) { + // if (tempBasalProcessDTO.itemTwo==null) { + // val endTime: Long = DateTimeUtil.getATDWithAddedMinutes(tempBasalProcessDTO.itemOne.atechDateTime, tempBasalProcessDTO.itemOneTbr!!.durationMinutes) + // + // if ((rewindEntry.atechDateTime > tempBasalProcessDTO.itemOne.atechDateTime) && + // (rewindEntry.atechDateTime < endTime)) { + // tempBasalProcessDTO.itemTwo = rewindEntry + // continue + // } + // } + // } + // } + // } + // + // // see if have rewind/stop items that need to fix any of current tempBasalProcessDTO items (bug 1724) + // if (stopList.isNotEmpty()) { + // for (tempBasalProcessDTO in processList) { + // if (tempBasalProcessDTO.itemTwo==null) { + // val endTime: Long = DateTimeUtil.getATDWithAddedMinutes(tempBasalProcessDTO.itemOne.atechDateTime, tempBasalProcessDTO.itemOneTbr!!.durationMinutes) + // + // val findNearestEntry = findNearestEntry(tempBasalProcessDTO.itemOne.atechDateTime, endTime, stopList); + // + // if (findNearestEntry!=null) { + // tempBasalProcessDTO.itemTwo = findNearestEntry + // stopList.remove(findNearestEntry) + // } + // } + // } + // } - if ((rewindEntry.atechDateTime > tempBasalProcessDTO.itemOne.atechDateTime) && - (rewindEntry.atechDateTime < endTime)) { - tempBasalProcessDTO.itemTwo = rewindEntry - continue - } - } - } + return processList + } + + fun findNearestEntry(startTime: Long, endTime: Long, list: MutableList) : PumpHistoryEntry? { + val outList: MutableList = mutableListOf() + + for (pumpHistoryEntry in list) { + if ((pumpHistoryEntry.atechDateTime > startTime) && + (pumpHistoryEntry.atechDateTime < endTime)) { + outList.add(pumpHistoryEntry) } } - return processList + if (outList.size == 0) { + return null + } else if (outList.size==1) { + return outList[0] + } else { + // TODO + return null + } } fun isTBRActive(dbEntry: PumpDbEntryTBR): Boolean { diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt index 504994800f..82238a9e3f 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt @@ -122,7 +122,7 @@ class MedtronicPumpStatus @Inject constructor(private val rh: ResourceHelper, get() { if (tempBasalStart == null) return null if (tempBasalEnd == null) { - val startTime = tempBasalStart!!.time + val startTime = tempBasalStart!! tempBasalEnd = startTime + tempBasalLength!! * 60 * 1000 } if (System.currentTimeMillis() > tempBasalEnd!!) { diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/service/RileyLinkMedtronicService.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/service/RileyLinkMedtronicService.kt index e5157aadec..4154965d3b 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/service/RileyLinkMedtronicService.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/service/RileyLinkMedtronicService.kt @@ -177,7 +177,7 @@ class RileyLinkMedtronicService : RileyLinkService() { medtronicPumpStatus.pumpFrequency = pumpFrequency val isFrequencyUS = pumpFrequency == frequencies[0] val newTargetFrequency = if (isFrequencyUS) // - RileyLinkTargetFrequency.Medtronic_US else RileyLinkTargetFrequency.Medtronic_WorldWide + RileyLinkTargetFrequency.MedtronicUS else RileyLinkTargetFrequency.MedtronicWorldWide if (rileyLinkServiceData.rileyLinkTargetFrequency != newTargetFrequency) { rileyLinkServiceData.rileyLinkTargetFrequency = newTargetFrequency } diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/util/MedtronicConst.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/util/MedtronicConst.kt index e88d3de97f..8d86bce696 100644 --- a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/util/MedtronicConst.kt +++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/util/MedtronicConst.kt @@ -18,20 +18,17 @@ object MedtronicConst { val BolusDelay = R.string.key_medtronic_bolus_delay val Encoding = R.string.key_medtronic_encoding val BatteryType = R.string.key_medtronic_battery_type - val BolusDebugEnabled = R.string.key_medtronic_bolus_debug } object Statistics { - const val StatsPrefix = "medtronic_" + private const val StatsPrefix = "medtronic_" const val FirstPumpStart = Prefix + "first_pump_use" const val LastGoodPumpCommunicationTime = Prefix + "lastGoodPumpCommunicationTime" - const val LastGoodPumpFrequency = Prefix + "LastGoodPumpFrequency" const val TBRsSet = StatsPrefix + "tbrs_set" const val StandardBoluses = StatsPrefix + "std_boluses_delivered" const val SMBBoluses = StatsPrefix + "smb_boluses_delivered" const val LastPumpHistoryEntry = StatsPrefix + "pump_history_entry" const val LastPrime = StatsPrefix + "last_sent_prime" const val LastRewind = StatsPrefix + "last_sent_rewind" - const val InternalTemporaryDatabase = StatsPrefix + "temporary_entries" } } \ No newline at end of file diff --git a/medtronic/src/main/res/values-de-rDE/strings.xml b/medtronic/src/main/res/values-de-rDE/strings.xml index 95a8a4f820..7f886fd428 100644 --- a/medtronic/src/main/res/values-de-rDE/strings.xml +++ b/medtronic/src/main/res/values-de-rDE/strings.xml @@ -91,4 +91,6 @@ Wenn diese Option aktiviert ist, wird die TBR vor Ende jeder Stunde abgebrochen. Dies kann dazu beitragen, einige Pumpen davon abzuhalten, zur vollen Stunde zu vibrieren / zu piepsen. %1$.1f U/h (%2$d Minuten verbleibend) Ungültige Pumpenhistorie erkannt. Eröffne ein neues Ticket (issue) und füge Logs bei. + RL Statistik + Typ: diff --git a/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt b/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt index e2864fc967..0557795620 100644 --- a/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt +++ b/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt @@ -141,7 +141,7 @@ class MedtronicHistoryDataUTest : TestBase() { println("PumpHistoryEntries: getRewindItems: $rewindRecords.size : " + gson.toJson(rewindRecords)) - val processList: MutableList = medtronicHistoryData.createTBRProcessList(tbrs, rewindRecords) + val processList: MutableList = medtronicHistoryData.createTBRProcessList(tbrs) println("PumpHistoryEntries: processList: " + processList.size) diff --git a/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryDataUTest.kt b/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryDataUTest.kt index f880537198..c930e83710 100644 --- a/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryDataUTest.kt +++ b/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryDataUTest.kt @@ -55,7 +55,7 @@ class MedtronicHistoryDataUTest : TestBase() { println("TBR Pre-Process List: " + gson.toJson(yourClassList)) - val createTBRProcessList = unitToTest.createTBRProcessList(yourClassList, mutableListOf()) + val createTBRProcessList = unitToTest.createTBRProcessList(yourClassList) println("TBR Process List: " + createTBRProcessList.size) @@ -98,7 +98,7 @@ class MedtronicHistoryDataUTest : TestBase() { println("TBR Pre-Process List (Special): " + gson.toJson(yourClassList)) - val createTBRProcessList = unitToTest.createTBRProcessList(yourClassList, mutableListOf()) + val createTBRProcessList = unitToTest.createTBRProcessList(yourClassList) println("TBR Process List (Special): " + createTBRProcessList.size) diff --git a/omnipod-common/src/main/res/layout/omnipod_common_overview_buttons.xml b/omnipod-common/src/main/res/layout/omnipod_common_overview_buttons.xml index 50c2861bf3..14844d8efc 100644 --- a/omnipod-common/src/main/res/layout/omnipod_common_overview_buttons.xml +++ b/omnipod-common/src/main/res/layout/omnipod_common_overview_buttons.xml @@ -1,6 +1,9 @@ + android:layout_height="wrap_content" + android:orientation="horizontal" + tools:parentTag="android.widget.LinearLayout"> - \ No newline at end of file + diff --git a/omnipod-common/src/main/res/layout/omnipod_common_overview_pod_info.xml b/omnipod-common/src/main/res/layout/omnipod_common_overview_pod_info.xml index ff9e401287..9813bcd36b 100644 --- a/omnipod-common/src/main/res/layout/omnipod_common_overview_pod_info.xml +++ b/omnipod-common/src/main/res/layout/omnipod_common_overview_pod_info.xml @@ -2,24 +2,26 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:orientation="vertical" + tools:parentTag="android.widget.LinearLayout"> + android:focusable="true" + android:orientation="horizontal"> @@ -49,17 +51,17 @@ android:id="@+id/omnipod_common_overview_lot_number_layout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:focusable="true"> + android:focusable="true" + android:orientation="horizontal"> @@ -88,17 +90,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -127,17 +129,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -166,17 +168,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -206,17 +208,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -246,17 +248,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -302,17 +304,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -350,17 +352,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -398,17 +400,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -446,17 +448,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -494,17 +496,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -542,17 +544,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -590,17 +592,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -638,17 +640,17 @@ + android:focusable="true" + android:orientation="horizontal"> @@ -691,4 +693,5 @@ android:rotationX="180" android:rotationY="180" app:drawableTopCompat="@drawable/ic_pod" /> - \ No newline at end of file + + diff --git a/omnipod-common/src/main/res/layout/omnipod_common_pod_deactivation_wizard_activity.xml b/omnipod-common/src/main/res/layout/omnipod_common_pod_deactivation_wizard_activity.xml index f6143346a7..334bb28408 100644 --- a/omnipod-common/src/main/res/layout/omnipod_common_pod_deactivation_wizard_activity.xml +++ b/omnipod-common/src/main/res/layout/omnipod_common_pod_deactivation_wizard_activity.xml @@ -10,6 +10,6 @@ android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" android:layout_height="match_parent" - app:navGraph="@navigation/omnipod_common_pod_deactivation_wizard_navigation_graph" /> - \ No newline at end of file + + diff --git a/omnipod-common/src/main/res/values-no-rNO/strings.xml b/omnipod-common/src/main/res/values-no-rNO/strings.xml index 258e97569e..48aaea828d 100644 --- a/omnipod-common/src/main/res/values-no-rNO/strings.xml +++ b/omnipod-common/src/main/res/values-no-rNO/strings.xml @@ -9,29 +9,29 @@ Deaktiver Pod Forkast Pod Dersom du forkaster Pod, vil du ikke kunne kommunisere med den lenger. Du skal bare gjøre dette når all kommunikasjon med Pod vedvarende mislykkes. Hvis du fortsatt kan kommunisere med Pod, bruk alternativet Deaktiver Pod.\n\nHvis du ønsker å fortsette, må du huske på å fjerne Pod fra kroppen din! - Avspill testlyd - Avspiller testlyd… - Pod historikk + Spill av testlyd + Spiller av testlyd… + Pod-historikk Ingen aktiv Pod - Feilet i å lagre basalprofilen. + Kunne ikke lagre basalprofilen. Bolus var mislykket. - Feilet i å lagre basal profil: mottok en tom profil. Kontroller at du har aktivert profilen. - Ingen basal profil er aktiv. Sørg for å aktivere din basal profil. + Kunne ikke lagre basalprofil: mottok en tom profil. Kontroller at du har aktivert profilen. + Ingen basalprofil er aktiv. Sørg for å aktivere din basalprofil. Ukjent kommando: %1$s Feilet i å oppdatere status - Feilet i å oppdatere status ved oppstart - Feilet i å bekrefte varsler - Feilet i å stoppe insulinleveranser - Feilet i å angi tid - Feilet i å gjenoppta leveransen + Kunne ikke oppdatere status ved oppstart + Kunne ikke bekrefte varsler + Kunne ikke stoppe insulinleveranser + Kunne ikke angi tid + Kunne ikke gjenoppta leveransen Feilet i å initialisere Pod Feilet ved innsetting av kanyle Pod\'ens aktiveringstid er overskredet. Denne Pod kan ikke lenger aktiveres. Klarte ikke å verifisere fremdrift i aktiveringen. Prøv på nytt. Pod er pauset - Feilet i avspilling av test lyd - Tid på Pod er ikke synkronisert. Vennligst oppdater tiden i Omnipod fanen. + Kunne ikke spille av testlyd + Tid på Pod er ikke synkronisert. Vennligst oppdater tiden i Omnipod-fanen. En uventet feil oppstod. Vennligst rapporter! (%1$s: %2$s). Bekreftelse @@ -45,21 +45,21 @@ Angi tid Pauset Gjenoppta levering - Pod administrasjon + Pod-administrasjon Demp varsler Pod status Totalt levert %1$.2f E Unik ID LOT nummer - Sekvens nummer + Sekvensnummer Pod utløper Siste tilkobling Siste bolus - Temp basal rate - Profilens basal dose + Midlertidig basaldose + Profilens basaldose Reservoar - Aktive Pod varsler + Aktive Pod-varsler Firmware versjon Tid på Pod %1$.2fE/t @%2$s (%3$d/%4$d minutter) @@ -82,7 +82,7 @@ Klargjør infusjonsstedet. Fjern Pod\'ens kanylebeskyttelse og papirfolien, og fest Pod til infusjonsstedet.\n\nHvis du oppdager feil med kanylen, trykk Avbryt og forkast Pod.\n\nTrykk Neste for å sette inn kanyle og starte påfyllingsbolus. Når du trykker OKvil kanylen settes inn. Pass på at du har festet Pod\'en på infusjonsstedet. Sett inn kanyle - Prøver å angi initialt basal program og sett inn kanylen.\n\nNår kanylen er vellykket på plass kan du trykke på Neste. + Prøver å angi basalprogram og sette inn kanylen.\n\nNår kanylen er vellykket på plass kan du trykke på Neste. Pod aktivert Den nye Pod\'en er nå aktiv.\n\nDin basalprofil har blitt lagret og kanylen er inne.\n\nVennligst kontroller at kanylen ble satt riktig inn og skift Pod hvis du tror det har oppstått feil med innsettingen. @@ -97,20 +97,20 @@ Dersom du forkaster Pod vil du ikke være i stand til å kommunisere med den lenger. Du skal bare gjøre dette når all kommunikasjon med Pod konsekvent feiler. Er du sikker på at du vil forkaste Pod? Forkast Pod - Bolus lyd aktivert - Basal lyd aktivert + Bolus-lyd aktivert + Basal-lyd aktivert SMB lyd aktivert - TBR lyd aktivert + TBR-lyd aktivert Vis Pause insulintilførsel knapp i Omnipod meny - DST/Tidssone deteksjon aktivert + DST/Tidssone-deteksjon aktivert Utløpspåminnelse aktivert Timer før nedstenging Varsel om lavt reservoar aktivert Antall enheter - Automatisk demp Pod varsler + Automatisk demp Pod-varsler Annet Varsler - Bekreftelse lyd + Bekreftelseslyd Varsler Lydvarsel for ubekreftet temp basal dosering (TBR) er aktivert Lydvarsel for ubekreftet SMB er aktivert @@ -121,7 +121,7 @@ Oppsett pågår (venter på innsetting av kanyle) Kjører Pauset - Pod feil + Pod-feil Aktiveringstiden er overskredet Inaktiv Pod feil: %1$03d %2$s @@ -130,12 +130,12 @@ Forkast Pod Angi Bolus Avbryt bolus - Angi Temp Basal - Avbryt temp basal (internt av driver) - Avbryt temp basal + Angi Midlertidig Basal + Avbryt midlertidig basal (internt av driver) + Avbryt midlertidig basal Angi basal program - Les Pod status - Les Pod info + Hent Pod-status + Hent Pod-info Angi tid Konfigurer varsler Demp varsler @@ -149,7 +149,7 @@ Avbryt vilkårlig midlertidig basal som er opprettet fordi Pod var pauset Del midlertidig basal fordi en uavklart feil ble oppdaget ved kanselleringen Oppsett lyd - Avspill testlyd + Spill av testlyd Fullfør parringspåminnelse Påminnelse om å fullføre oppsett diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index 84aa19951d..355371f106 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -46,6 +46,7 @@ import info.nightscout.androidaps.queue.commands.CustomCommand import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal import info.nightscout.androidaps.utils.FabricPrivacy +import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.TimeChangeType import info.nightscout.androidaps.utils.rx.AapsSchedulers @@ -698,7 +699,7 @@ class OmnipodDashPumpPlugin @Inject constructor( } val percent = (waited.toFloat() / estimatedDeliveryTimeSeconds) * 100 updateBolusProgressDialog( - rh.gs(R.string.dash_bolusdelivering, requestedBolusAmount), + rh.gs(R.string.bolus_delivered, Round.roundTo(percent*requestedBolusAmount/100, PodConstants.POD_PULSE_BOLUS_UNITS), requestedBolusAmount), percent.toInt() ) } @@ -729,7 +730,7 @@ class OmnipodDashPumpPlugin @Inject constructor( val remainingUnits = podStateManager.lastBolus!!.bolusUnitsRemaining val percent = ((requestedBolusAmount - remainingUnits) / requestedBolusAmount) * 100 updateBolusProgressDialog( - rh.gs(R.string.bolusdelivering, requestedBolusAmount), + rh.gs(R.string.bolus_delivered, Round.roundTo(requestedBolusAmount - remainingUnits, PodConstants.POD_PULSE_BOLUS_UNITS), requestedBolusAmount), percent.toInt() ) diff --git a/omnipod-dash/src/main/res/layout/omnipod_dash_overview_bluetooth_status.xml b/omnipod-dash/src/main/res/layout/omnipod_dash_overview_bluetooth_status.xml index c4d2b73130..a117c1ce23 100644 --- a/omnipod-dash/src/main/res/layout/omnipod_dash_overview_bluetooth_status.xml +++ b/omnipod-dash/src/main/res/layout/omnipod_dash_overview_bluetooth_status.xml @@ -1,20 +1,22 @@ + xmlns:tools="http://schemas.android.com/tools" + android:orientation="vertical" + tools:parentTag="android.widget.LinearLayout"> + android:focusable="true" + android:orientation="horizontal"> + + android:focusable="true" + android:orientation="horizontal"> @@ -82,18 +85,18 @@ android:id="@+id/connectionQuality" android:layout_width="match_parent" android:layout_height="wrap_content" + android:focusable="true" android:orientation="horizontal" - android:visibility="gone" - android:focusable="true"> + android:visibility="gone"> + + android:visibility="gone"> + Количество: %1$.2f U, Продължителност: %2$d мин %1$.2fЕ - Доставяне %1$.2f U diff --git a/omnipod-dash/src/main/res/values-cs-rCZ/strings.xml b/omnipod-dash/src/main/res/values-cs-rCZ/strings.xml index 45c6e82aec..75048fb574 100644 --- a/omnipod-dash/src/main/res/values-cs-rCZ/strings.xml +++ b/omnipod-dash/src/main/res/values-cs-rCZ/strings.xml @@ -33,7 +33,6 @@ Neznámý stav příkazu Rychlost: %1$.2f U, doba trvání: %2$d minut %1$.2f U - Podávání %1$.2f U Výdej inzulínu je pozastaven Ztraceno připojení k podu Vydává se další bolus diff --git a/omnipod-dash/src/main/res/values-da-rDK/strings.xml b/omnipod-dash/src/main/res/values-da-rDK/strings.xml index 28b866ad34..7a798a11d1 100644 --- a/omnipod-dash/src/main/res/values-da-rDK/strings.xml +++ b/omnipod-dash/src/main/res/values-da-rDK/strings.xml @@ -34,7 +34,6 @@ Ukendt tilstand for kommandoen Rate: %1$.2f IE, varighed: %2$d minutter %1$.2f IE - Afgiver %1$.2f IE Insulintilførslen suspenderet Mistede forbindelse til pod En anden bolus er ved at blive afgivet diff --git a/omnipod-dash/src/main/res/values-de-rDE/strings.xml b/omnipod-dash/src/main/res/values-de-rDE/strings.xml index a43c501d96..b6ad4b3dc8 100644 --- a/omnipod-dash/src/main/res/values-de-rDE/strings.xml +++ b/omnipod-dash/src/main/res/values-de-rDE/strings.xml @@ -33,7 +33,6 @@ Unbekannter Status für den Befehl Rate: %1$.2f IE, Dauer: %2$d min. %1$.2f IE - Gebe %1$.2f IE ab Insulinabgabe ist unterbrochen Verbindung zum Pod verloren Ein weiterer Bolus wird abgegeben diff --git a/omnipod-dash/src/main/res/values-es-rES/strings.xml b/omnipod-dash/src/main/res/values-es-rES/strings.xml index a302a379a8..81653b86c9 100644 --- a/omnipod-dash/src/main/res/values-es-rES/strings.xml +++ b/omnipod-dash/src/main/res/values-es-rES/strings.xml @@ -34,7 +34,6 @@ Estado desconocido para el comando Tasa: %1$.2f U, duración: %2$d minutos %1$.2f U - Entregando %1$.2f U Suspendida la entrega de insulina Conexión perdida con el pod Otro bolo está siendo entregado diff --git a/omnipod-dash/src/main/res/values-fr-rFR/strings.xml b/omnipod-dash/src/main/res/values-fr-rFR/strings.xml index 0369cb2044..52c52fb151 100644 --- a/omnipod-dash/src/main/res/values-fr-rFR/strings.xml +++ b/omnipod-dash/src/main/res/values-fr-rFR/strings.xml @@ -33,7 +33,6 @@ État inconnu pour la commande Débit : %1$.2f U, durée : %2$d minutes %1$.2f U - Injection de %1$.2fU en cours Injection d\'insuline suspendue Connexion perdue avec le pod Un autre bolus est en cours d\'injection diff --git a/omnipod-dash/src/main/res/values-it-rIT/strings.xml b/omnipod-dash/src/main/res/values-it-rIT/strings.xml index 7fba31370b..0ac8ec4b81 100644 --- a/omnipod-dash/src/main/res/values-it-rIT/strings.xml +++ b/omnipod-dash/src/main/res/values-it-rIT/strings.xml @@ -33,7 +33,6 @@ Stato sconosciuto per il comando Tasso: %1$.2f U, durata: %2$d minuti %1$.2f U - Erogazione di %1$.2f U L\'erogazione di insulina è sospesa Persa connessione al pod Altro bolo in erogazione diff --git a/omnipod-dash/src/main/res/values-iw-rIL/strings.xml b/omnipod-dash/src/main/res/values-iw-rIL/strings.xml index 38f204c426..59bc448d89 100644 --- a/omnipod-dash/src/main/res/values-iw-rIL/strings.xml +++ b/omnipod-dash/src/main/res/values-iw-rIL/strings.xml @@ -33,7 +33,6 @@ מצב הפקודה לא ידוע מינון: %1$.2f יח\', משך: %2$d דק\' %1$.2f יח\' - מזריק %1$.2f יח\' הזרקת האינסולין מופסקת אבד החיבור לפוד בולוס אחר מוזרק כרגע diff --git a/omnipod-dash/src/main/res/values-lt-rLT/strings.xml b/omnipod-dash/src/main/res/values-lt-rLT/strings.xml index 0c70dc4f41..71d5b28037 100644 --- a/omnipod-dash/src/main/res/values-lt-rLT/strings.xml +++ b/omnipod-dash/src/main/res/values-lt-rLT/strings.xml @@ -33,7 +33,6 @@ Nežinoma komandos būklė Kiekis: %1$.2f vv, trukmė: %2$d min %1$.2f vv - Leidžiama %1$.2f vv Insulino leidimas sustabdytas Ryšys su Pod prarastas Kitas bolusas yra jau leidžiamas diff --git a/omnipod-dash/src/main/res/values-nl-rNL/strings.xml b/omnipod-dash/src/main/res/values-nl-rNL/strings.xml index ab89814c50..feeb7e87c3 100644 --- a/omnipod-dash/src/main/res/values-nl-rNL/strings.xml +++ b/omnipod-dash/src/main/res/values-nl-rNL/strings.xml @@ -33,7 +33,6 @@ Onbekende status voor de opdracht Basaal: %1$.2f E, Duur: %2$d min %1$.2f E - %1$.2f eh worden toegediend Insuline levering is opgeschort Verbinding met pod verbroken Een andere bolus wordt op dit moment toegediend diff --git a/omnipod-dash/src/main/res/values-no-rNO/strings.xml b/omnipod-dash/src/main/res/values-no-rNO/strings.xml index 9eb18fa172..d8cdfdb3c9 100644 --- a/omnipod-dash/src/main/res/values-no-rNO/strings.xml +++ b/omnipod-dash/src/main/res/values-no-rNO/strings.xml @@ -4,7 +4,7 @@ Pumpeintegrering for Omnipod Dash (den nye, Bluetooth-aktiverte modellen med en blå kanylehette). - Pod historikk + Pod-historikk Beskrivelse Kilde Dato @@ -13,13 +13,13 @@ %1$.2f E, KH=%2$.1f g Dosering: %1$.2f E, varighet: %2$d min - Bluetooth status - Bluetooth adresse + Bluetooth-status + Bluetooth-adresse Firmware %1$s / Bluetooth %2$s - Tilkoblingskvalitet Bluetooth + Bluetooth tilkoblingskvalitet Leveringsstatus - Fyll en ny Pod med nok insulin for 3 dager.\n\nLytt etter to lydsignaler fra Pod under fyllingen. De indikerer at minimums volum på 80E er fylt opp. Vær nøye med å tømme fyllingssprøyten helt, selv etter at du har hørt de to lydsignalene.\n\nEtter fylling av Pod, vennligst trykk Neste.\n\nMerk: vent med å fjerne kanylebeskyttelsen til Pod. + Fyll en ny Pod med nok insulin for 3 dager.\n\nLytt etter to lydsignaler fra Pod under fyllingen. De indikerer at minimumsvolum på 80E er fylt opp. Vær nøye med å tømme fyllingssprøyten helt, selv etter at du har hørt de to lydsignalene.\n\nEtter fylling av Pod, vennligst trykk Neste.\n\nMerk: vent med å fjerne kanylebeskyttelsen til Pod. Prøver å parre med den nye Pod og prime den.\n\nNår oppstartsprosessen er ferdig, kan du trykke Neste. Lydvarsel aktivert hvis insulinlevering blir stanset @@ -27,13 +27,12 @@ Fant for mange podder for aktivering Fant ingen pod tilgjengelig for aktivering Generell feil: %1$s - Feilet i å sende kommandoen + Kunne ikke sende kommandoen Kommando ikke sendt Kommandoen ikke mottatt av podden Ukjent tilstand for kommandoen Dosering: %1$.2f E, varighet: %2$d min %1$.2f E - Leverer %1$.2f E Insulintilførsel er suspendert Mistet tilkoblingen til pod En annen bolusdose blir levert diff --git a/omnipod-dash/src/main/res/values-pl-rPL/strings.xml b/omnipod-dash/src/main/res/values-pl-rPL/strings.xml index 8954e5d32a..df41465053 100644 --- a/omnipod-dash/src/main/res/values-pl-rPL/strings.xml +++ b/omnipod-dash/src/main/res/values-pl-rPL/strings.xml @@ -33,7 +33,6 @@ Nieznany stan polecenia Dawka: %1$.2f U, Czas trwania: %2$d min %1$.2f U - Dostarczanie %1$.2f U Podawanie insuliny zawieszone Utracono połączenie z Podem Inny bolus jest dostarczany diff --git a/omnipod-dash/src/main/res/values-pt-rPT/strings.xml b/omnipod-dash/src/main/res/values-pt-rPT/strings.xml index 4cabe33872..c53e9bef97 100644 --- a/omnipod-dash/src/main/res/values-pt-rPT/strings.xml +++ b/omnipod-dash/src/main/res/values-pt-rPT/strings.xml @@ -34,7 +34,6 @@ Estado desconhecido para o comando Rácio: %1$.2f U, duração: %2$d minutes %1$.2f U - A administrar %1$.2f U A entrega de insulina está suspensa Perda de ligação ao pod Outro bólus está a ser administrado diff --git a/omnipod-dash/src/main/res/values-ro-rRO/strings.xml b/omnipod-dash/src/main/res/values-ro-rRO/strings.xml index 0ed49aca60..7af51302b3 100644 --- a/omnipod-dash/src/main/res/values-ro-rRO/strings.xml +++ b/omnipod-dash/src/main/res/values-ro-rRO/strings.xml @@ -34,7 +34,6 @@ Stare necunoscută pentru comandă Rata: %1$.2f U, durata: %2$d minute %1$.2f U - Se livrează %1$.2f U Administrarea insulinei este suspendată S-a pierdut conexiunea la pod Un alt bolus este în curs de livrare diff --git a/omnipod-dash/src/main/res/values-ru-rRU/strings.xml b/omnipod-dash/src/main/res/values-ru-rRU/strings.xml index 7c1ad24700..0c3943c952 100644 --- a/omnipod-dash/src/main/res/values-ru-rRU/strings.xml +++ b/omnipod-dash/src/main/res/values-ru-rRU/strings.xml @@ -33,7 +33,6 @@ Состояние команды неясно Баз Скорость: %1$.2f ед, Продолжительность: %2$d мин %1$.2f ед - Подается болюс %1$.2f ед Введение инсулина приостановлено Потеряно соединение с подом Вводится еще один болюс diff --git a/omnipod-dash/src/main/res/values-sk-rSK/strings.xml b/omnipod-dash/src/main/res/values-sk-rSK/strings.xml index bb3e57ff8b..a95a3387db 100644 --- a/omnipod-dash/src/main/res/values-sk-rSK/strings.xml +++ b/omnipod-dash/src/main/res/values-sk-rSK/strings.xml @@ -33,7 +33,6 @@ Neznámy stav príkazu Rýchlosť: %1$.2f JI, Doba trvania: %2$d minút %1$.2f JI - Podávanie %1$.2f JI Podávanie inzulínu je pozastavené Stratilo sa spojenie s Podom Už sa podáva iný bolus diff --git a/omnipod-dash/src/main/res/values-sv-rSE/strings.xml b/omnipod-dash/src/main/res/values-sv-rSE/strings.xml index 657863b9be..6afa96c186 100644 --- a/omnipod-dash/src/main/res/values-sv-rSE/strings.xml +++ b/omnipod-dash/src/main/res/values-sv-rSE/strings.xml @@ -33,7 +33,6 @@ Okänt tillstånd för kommandot Dos: %1$.2f U, Duration: %2$d min %1$.2fU - Levererar %1$.2f enheter Insulinleverans är pausad Tappade anslutningen till pod En annan bolus håller på att levereras diff --git a/omnipod-dash/src/main/res/values-tr-rTR/strings.xml b/omnipod-dash/src/main/res/values-tr-rTR/strings.xml index 7d72f133b1..2c89b47912 100644 --- a/omnipod-dash/src/main/res/values-tr-rTR/strings.xml +++ b/omnipod-dash/src/main/res/values-tr-rTR/strings.xml @@ -33,7 +33,6 @@ Bilinmeyen komut durumu Oran: %1$.2f Ü, süre: %2$d dakika %1$.2f Ü - %1$.2f Ü gönderiliyor İnsülin iletimi askıya alındı Pod ile bağlantı koptu Diğer bolus iletiliyor diff --git a/omnipod-dash/src/main/res/values-zh-rCN/strings.xml b/omnipod-dash/src/main/res/values-zh-rCN/strings.xml index f5fcc1a77d..3d893017b7 100644 --- a/omnipod-dash/src/main/res/values-zh-rCN/strings.xml +++ b/omnipod-dash/src/main/res/values-zh-rCN/strings.xml @@ -33,7 +33,6 @@ 命令的未知状态 速率: %1$.2f U,持续时间: %2$d 分钟 %1$.2f U - 正在输注 %1$.2f U 胰岛素输注已暂停 最后一次连接pod 另一个大剂量正在输注 diff --git a/omnipod-dash/src/main/res/values/strings.xml b/omnipod-dash/src/main/res/values/strings.xml index 9a13bac3c0..63db714e30 100644 --- a/omnipod-dash/src/main/res/values/strings.xml +++ b/omnipod-dash/src/main/res/values/strings.xml @@ -46,7 +46,6 @@ Unknown state for the command Rate: %1$.2f U, duration: %2$d minutes %1$.2f U - Delivering %1$.2f U Insulin delivery is suspended Lost connection to pod Another bolus is being delivered diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java index 402d836bb3..f1c8882213 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java @@ -46,6 +46,7 @@ import info.nightscout.androidaps.interfaces.Pump; import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpSync; +import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule; import info.nightscout.shared.logging.AAPSLogger; import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.bus.RxBus; @@ -375,7 +376,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley } public boolean isRileyLinkReady() { - return rileyLinkServiceData.rileyLinkServiceState.isReady(); + return rileyLinkServiceData.getRileyLinkServiceState().isReady(); } private void handleCancelledTbr() { @@ -628,8 +629,9 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley if (!podStateManager.isPodRunning()) { return 0.0d; } - - return podStateManager.getBasalSchedule().rateAt(TimeUtil.toDuration(DateTime.now())); + BasalSchedule schedule = podStateManager.getBasalSchedule(); + if (schedule != null) return schedule.rateAt(TimeUtil.toDuration(DateTime.now())); + else return 0; } @Override @@ -1014,7 +1016,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley // - RileyLink has been connecting for over RILEY_LINK_CONNECT_TIMEOUT return (podStateManager.getLastFailedCommunication() != null && podStateManager.getLastSuccessfulCommunication().isBefore(podStateManager.getLastFailedCommunication())) || podStateManager.isSuspended() || - rileyLinkServiceData.rileyLinkServiceState.isError() || + rileyLinkServiceData.getRileyLinkServiceState().isError() || // The below clause is a hack for working around the RL service state forever staying in connecting state on startup if the RL is switched off / unreachable (rileyLinkServiceData.getRileyLinkServiceState().isConnecting() && rileyLinkServiceData.getLastServiceStateChange() + RILEY_LINK_CONNECT_TIMEOUT_MILLIS < currentTimeMillis); } diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/ErosPodStateManager.java b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/ErosPodStateManager.java index 27eb849931..caa6d72f4d 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/ErosPodStateManager.java +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/ErosPodStateManager.java @@ -49,24 +49,38 @@ public abstract class ErosPodStateManager { this.gsonInstance = createGson(); } + /** + * Discard Pod state + */ public final void discardState() { - this.podState = new PodState(this.podState.address); + // Change on commit 4cea57acf6d74baffef83e1f04376b10bb5c1978 Nov 2021 + // As by commit, keep podState object but wipe address to 0x0 to signal hasPodState() + // there is no state ( = no Pod address). + this.podState = new PodState(0x0); storePodState(); } + /** + * Init Pod state but only if it has valid state. + * @param address New Pod address + */ public final void initState(int address) { if (hasPodState()) { - throw new IllegalStateException("Can not init a new pod state: podState <> null"); + throw new IllegalStateException("Can not init a new pod state: State is " + + "null or discarded?"); } podState = new PodState(address); storePodState(); } /** - * @return true if we have a Pod state (which at least contains an address), indicating it is legal to call getters on PodStateManager + * @return true if we have a Pod state (which at least contains an valid address), indicating + * it is legal to call getters on PodStateManager */ public final boolean hasPodState() { - return podState != null; + + return this.podState != null + && this.podState.getAddress() != 0x0; // 0x0=discarded } /** diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java index faa58d345d..26a5a3445d 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java @@ -291,6 +291,15 @@ public class AapsOmnipodErosManager { return new PumpEnactResult(injector).success(false).enacted(false).comment(note); } + // #1963 return synthetic success if pre-activation + // to allow profile switch prior to pod activation + // otherwise a catch-22 + if (!podStateManager.getActivationProgress().isCompleted()) { + // TODO: i18n string + return new PumpEnactResult(injector).success(true).enacted(false).comment("pre" + + "-activation basal change moot"); + } + PodHistoryEntryType historyEntryType = podStateManager.isSuspended() ? PodHistoryEntryType.RESUME_DELIVERY : PodHistoryEntryType.SET_BASAL_SCHEDULE; try { @@ -370,7 +379,7 @@ public class AapsOmnipodErosManager { bolusCommandResult = executeCommand(() -> delegate.bolus(PumpType.OMNIPOD_EROS.determineCorrectBolusSize(detailedBolusInfo.insulin), beepsEnabled, beepsEnabled, detailedBolusInfo.getBolusType() == DetailedBolusInfo.BolusType.SMB ? null : (estimatedUnitsDelivered, percentage) -> { EventOverviewBolusProgress progressUpdateEvent = EventOverviewBolusProgress.INSTANCE; - progressUpdateEvent.setStatus(getStringResource(R.string.goingtodeliver, detailedBolusInfo.insulin)); + progressUpdateEvent.setStatus(getStringResource(R.string.bolus_delivered, estimatedUnitsDelivered, detailedBolusInfo.insulin)); progressUpdateEvent.setPercent(percentage); sendEvent(progressUpdateEvent); })); diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/service/RileyLinkOmnipodService.java b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/service/RileyLinkOmnipodService.java index 8520db88d3..c6a7d37063 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/service/RileyLinkOmnipodService.java +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/service/RileyLinkOmnipodService.java @@ -97,10 +97,8 @@ public class RileyLinkOmnipodService extends RileyLinkService { /* private functions */ - // PumpInterface - REMOVE - public boolean isInitialized() { - return rileyLinkServiceData.rileyLinkServiceState.isReady(); + return rileyLinkServiceData.getRileyLinkServiceState().isReady(); } @Override diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt index 0aa199eabc..5e55c7d612 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt @@ -32,6 +32,7 @@ import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.extensions.toVisibility +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.ui.UIRunnable import io.reactivex.rxjava3.disposables.CompositeDisposable @@ -53,6 +54,7 @@ class ErosPodManagementActivity : NoSplashAppCompatActivity() { @Inject lateinit var omnipodErosPumpPlugin: OmnipodErosPumpPlugin @Inject lateinit var serviceTaskExecutor: ServiceTaskExecutor @Inject lateinit var aapsSchedulers: AapsSchedulers + @Inject lateinit var buildHelper: BuildHelper private var disposables: CompositeDisposable = CompositeDisposable() private val handler = Handler(HandlerThread(this::class.simpleName + "Handler").also { it.start() }.looper) @@ -160,7 +162,8 @@ class ErosPodManagementActivity : NoSplashAppCompatActivity() { // Only show the discard button to reset a cached Pod address before the Pod has actually been initialized // Otherwise, users should use the Deactivate Pod Wizard. In case proper deactivation fails, // they will get an option to discard the Pod state there - val discardButtonEnabled = podStateManager.hasPodState() && !podStateManager.isPodInitialized + // Milos Kozak: allow to show button by activating engineering mode + val discardButtonEnabled = podStateManager.hasPodState() && (!podStateManager.isPodInitialized || buildHelper.isEngineeringMode()) binding.buttonDiscardPod.visibility = discardButtonEnabled.toVisibility() val pulseLogButtonEnabled = aapsOmnipodManager.isPulseLogButtonEnabled diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt index 429301d62c..e26bb0dfb0 100644 --- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt +++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt @@ -287,9 +287,9 @@ class OmnipodErosOverviewFragment : DaggerFragment() { podInfoBinding.timeOnPod.setTextColor( rh.gac(context, if (podStateManager.timeDeviatesMoreThan(OmnipodConstants.TIME_DEVIATION_THRESHOLD)) { - R.attr.defaultTextColor - } else { R.attr.warningColor + } else { + R.attr.defaultTextColor }) ) val expiresAt = podStateManager.expiresAt diff --git a/omnipod-eros/src/main/res/layout/omnipod_eros_overview_riley_link_status.xml b/omnipod-eros/src/main/res/layout/omnipod_eros_overview_riley_link_status.xml index ebf63b10a4..8034efcc7a 100644 --- a/omnipod-eros/src/main/res/layout/omnipod_eros_overview_riley_link_status.xml +++ b/omnipod-eros/src/main/res/layout/omnipod_eros_overview_riley_link_status.xml @@ -1,20 +1,22 @@ + xmlns:tools="http://schemas.android.com/tools" + android:orientation="vertical" + tools:parentTag="android.widget.LinearLayout"> + android:focusable="true" + android:orientation="horizontal"> diff --git a/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManagerTest.kt b/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManagerTest.kt index 7d0748726d..8c15bc9fa8 100644 --- a/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManagerTest.kt +++ b/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManagerTest.kt @@ -27,7 +27,7 @@ class AapsErosPodStateManagerTest : TestBase() { val now = DateTime(2020, 1, 1, 1, 2, 3, timeZone) DateTimeUtils.setCurrentMillisFixed(now.millis) val podStateManager = AapsErosPodStateManager(aapsLogger, sp, rxBus) - podStateManager.initState(0x0) + podStateManager.initState(0x01) podStateManager.setInitializationParameters( 0, 0, FirmwareVersion(1, 1, 1), FirmwareVersion(2, 2, 2), timeZone, PodProgressStatus.ABOVE_FIFTY_UNITS @@ -46,7 +46,7 @@ class AapsErosPodStateManagerTest : TestBase() { val now = DateTime(2020, 1, 1, 1, 2, 3, timeZone) DateTimeUtils.setCurrentMillisFixed(now.millis) val podStateManager = AapsErosPodStateManager(aapsLogger, sp, rxBus) - podStateManager.initState(0x0) + podStateManager.initState(0x01) podStateManager.setInitializationParameters( 0, 0, FirmwareVersion(1, 1, 1), FirmwareVersion(2, 2, 2), timeZone, PodProgressStatus.ABOVE_FIFTY_UNITS @@ -70,7 +70,7 @@ class AapsErosPodStateManagerTest : TestBase() { val now = DateTime(2020, 1, 1, 1, 2, 3, timeZone) DateTimeUtils.setCurrentMillisFixed(now.millis) val podStateManager = AapsErosPodStateManager(aapsLogger, sp, rxBus) - podStateManager.initState(0x0) + podStateManager.initState(0x01) podStateManager.setInitializationParameters( 0, 0, FirmwareVersion(1, 1, 1), FirmwareVersion(2, 2, 2), timeZone, PodProgressStatus.ABOVE_FIFTY_UNITS diff --git a/openhumans/src/main/res/values-da-rDK/strings.xml b/openhumans/src/main/res/values-da-rDK/strings.xml index dd505c8935..735188e7cc 100644 --- a/openhumans/src/main/res/values-da-rDK/strings.xml +++ b/openhumans/src/main/res/values-da-rDK/strings.xml @@ -16,6 +16,42 @@ Du er blevet logget ud af Open Humans Klik her for at logge ind igen, hvis dette ikke var meningen. Upload nu + Næste + Velkommen til Open Humans + Klik på \'Næste\' for at opsætte dataoverførsel. + Samtykke + Vilkår for anvendelse + Læs venligst følgende oplysninger grundigt og accepter vilkårene for brug for at fortsætte. + Dette er et open source værktøj, der vil kopiere dine data til Open Humans. Vi har ingen rettigheder til at dele dine data med tredjeparter uden din udtrykkelige tilladelse. De data, som projektet og appen modtager, identificeres via et tilfældigt bruger-ID og vil kun blive overført sikkert til en Open Humans konto med din godkendelse af denne proces. Du kan til enhver tid stoppe med at uploade og slette dine uploaddata via www.openhumans.org. + Data Uploadet + Glukose værdier + Bolusser + Forlænget bolus + Kulhydrater + Careportal Begivenheder (undtagen noter) + Profilskift + Samlede Daglige Doser + Midlertidige basal rater + Midlertidige Mål + Indstillinger + Programversion + Enhedsmodel + Skærm Dimensioner + Algoritme Fejlretningsdata + Data IKKE uploadet + Kodeord + Nightscout URL + Nightscout API Secret + Fritekstfelt + Jeg forstår og er enig. + Login på Open Humans + Afsluttende detaljer + Du er kun et skridt væk fra at uploade dine data til Open Humans. Vil du fortsætte? Annuller + Fortsæt + Afslutter... + Dette kan tage nogle sekunder. + Vi er færdige! + Fra nu af vil telefonen lydløst uploade data i baggrunden fra tid til anden. Luk diff --git a/openhumans/src/main/res/values-de-rDE/strings.xml b/openhumans/src/main/res/values-de-rDE/strings.xml index 19a6178baa..45854805de 100644 --- a/openhumans/src/main/res/values-de-rDE/strings.xml +++ b/openhumans/src/main/res/values-de-rDE/strings.xml @@ -16,7 +16,42 @@ Du wurdest von Open Humans abgemeldet. Klicke hier, um Dich erneut anzumelden, falls dies versehentlich passiert ist. Jetzt hochladen + Weiter + Willkommen bei Open Humans + Klicken Sie auf \'Weiter\', um das Hochladen der Daten einzurichten. + Einwilligen Nutzungsbedingungen + Bitte lesen Sie die folgenden Informationen sorgfältig und akzeptieren Sie die Nutzungsbedingungen, um fortzufahren. + Dies ist ein Open-Source-Tool, das Deine Daten zu Open Humans hochlädt. Wir behalten uns keine Rechte vor, Deine Daten ohne Deine ausdrückliche Genehmigung an Dritte weiterzugeben. Die Daten, die das Projekt und die Anwendung erhalten, werden über eine zufällige Benutzer-ID identifiziert und nur nach Deiner Zustimmung sicher auf ein Open Humans-Konto übertragen. Du kannst jederzeit das Hochladen beenden und Deine hochgeladenen Daten über www.openhumans.org löschen. + Daten hochgeladen + Glukosewerte + Boli + Verzögerte Boli + Kohlenhydrate + Careportal-Ereignisse (mit Ausnahme von Notizen) + Profilwechsel + Tägliche Gesamtdosis (TDD) + Temporäre Basalraten + Temporäre Ziele + Einstellungen + Programmversion + Gerätemodell + Bildschirmgröße + Algorithmus-Debug-Daten + Daten NICHT hochgeladen + Passwörter + Nightscout-URL + Nightscout API Secret + Freitextfelder + Verstanden und akzeptiert. + Login Open Humans + letzter Schliff + Sie sind nur einen Schritt vom Hochladen Ihrer Daten zu Open Humans entfernt. Möchten Sie fortfahren? Abbrechen + Fortfahren + Beende... + Dies kann einige Sekunden dauern. + Wir sind fertig! + Von nun an wird Ihr Telefon von Zeit zu Zeit stillschweigend Daten im Hintergrund hochladen. Schließen diff --git a/openhumans/src/main/res/values-it-rIT/strings.xml b/openhumans/src/main/res/values-it-rIT/strings.xml index 6ef4309f8e..54f578f9b4 100644 --- a/openhumans/src/main/res/values-it-rIT/strings.xml +++ b/openhumans/src/main/res/values-it-rIT/strings.xml @@ -16,4 +16,42 @@ Sei stato disconnesso da Open Humans Fare click qui per accedere di nuovo. Carica adesso + Avanti + Benvenuto in Open Humans + Per configurare il caricamento dei dati, fai click su \'Avanti\'. + Consenso + Termini d\'uso + Leggi attentamente le seguenti informazioni e accetta i termini d\'uso per procedere. + Questo è uno strumento open source che copierà i tuoi dati su Open Humans. Non ci riserviamo alcun diritto di condividere i tuoi dati con terze parti senza la tua esplicita autorizzazione. I dati che il progetto e l\'app ricevono vengono identificati tramite un ID utente casuale e verranno trasmessi in modo sicuro a un account Open Humans solo con la tua autorizzazione per tale processo. Puoi interrompere il caricamento ed eliminare i dati di caricamento in qualsiasi momento tramite www.openhumans.org. + Dati caricati + Valori glicemia + Boli + Boli estesi + Carboidrati + Eventi Portale (eccetto le note) + Cambi profilo + Dosi giornaliere totali + Velocità basali temporanee + Target temporanei + Impostazioni + Versione applicazione + Modello dispositivo + Dimensioni schermo + Dati di debug dell\'algoritmo + Dati NON caricati + Password + URL di Nightscout + API Secret di Nightscout + Campi di testo libero + Comprendo e accetto. + Accesso a Open Humans + Tocchi finali + Sei a solo un passo dal caricare i tuoi dati su Open Humans. Vuoi procedere? + Annulla + Continua + Completamento... + Potrebbe richiedere alcuni secondi. + Abbiamo fatto! + D\'ora in poi, il tuo telefono caricherà i dati in background di tanto in tanto. + Chiudi diff --git a/openhumans/src/main/res/values-nl-rNL/strings.xml b/openhumans/src/main/res/values-nl-rNL/strings.xml index 39127a1a5e..9a35bba7e0 100644 --- a/openhumans/src/main/res/values-nl-rNL/strings.xml +++ b/openhumans/src/main/res/values-nl-rNL/strings.xml @@ -16,4 +16,42 @@ Je bent uitgelogd van Open Humans Klik hier om opnieuw in te loggen als dit niet opzettelijk was. Nu Uploaden + Volgende + Welkom bij Open Humans + Klik op \'Volgende\' om gegevens te uploaden. + Toestemming + Gebruiksvoorwaarden + Lees zorgvuldig de volgende informatie en accepteer de gebruiksvoorwaarden om verder te gaan. + Dit is een open source tool die jouw gegevens zal kopiëren naar Open Humans. We behouden geen rechten om je gegevens met derden te delen zonder je expliciete toestemming. De gegevens die het project en de app ontvangen worden geïdentificeerd via een willekeurige gebruikers-ID en zullen alleen veilig worden verzonden naar een Open Humans account met uw toestemming voor dat proces. U kunt op elk gewenst moment stoppen met uploaden en uw upload gegevens verwijderen via www.openhumans.org. + Gegevensupload + Glucose waarden + Bolussen + Vertraagde bolus + Koolhydraten + Careportal gebeurtenissen (behalve notities) + Profiel wisselingen + Totaal Dagelijkse Doses + Tijdelijke basaalstanden + Tijdelijke streefdoelen + Instellingen + Applicatie versie + Apparaat model + Scherm afmetingen + Algoritme debug data + Gegevens NIET ge-upload + Wachtwoorden + Nightscout URL + Nightscout API Secret + Vrije tekstvelden + Ik begrijp het en ga akkoord. + Aanmelden bij Open Humans + Laatste details + U bent slechts één stap verwijderd van het uploaden van uw gegevens naar Open Humans. Wilt u doorgaan? + Afbreken + Ga verder + Voltooien... + Dit kan enkele seconden duren. + We zijn klaar! + Voortaan zal je telefoon zo nu en dan op de achtergrond gegevens uploaden. + Sluiten diff --git a/pump-common/src/main/AndroidManifest.xml b/pump-common/src/main/AndroidManifest.xml index b935efb489..84d3bd3279 100644 --- a/pump-common/src/main/AndroidManifest.xml +++ b/pump-common/src/main/AndroidManifest.xml @@ -1,6 +1,18 @@ - + + + + + + + + + diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt index 00ee367a8c..a302ffa3f5 100644 --- a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt @@ -4,6 +4,7 @@ import android.content.Context import android.content.Intent import android.content.ServiceConnection import android.text.format.DateFormat +import com.google.gson.GsonBuilder import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResult @@ -26,6 +27,7 @@ import info.nightscout.androidaps.utils.DecimalFormatter.to0Decimal import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.shared.logging.AAPSLogger import info.nightscout.shared.logging.LTag @@ -39,9 +41,9 @@ import org.json.JSONObject */ // When using this class, make sure that your first step is to create mConnection (see MedtronicPumpPlugin) abstract class PumpPluginAbstract protected constructor( - pluginDescription: PluginDescription?, + pluginDescription: PluginDescription, pumpType: PumpType, - injector: HasAndroidInjector?, + injector: HasAndroidInjector, rh: ResourceHelper, aapsLogger: AAPSLogger, commandQueue: CommandQueue, @@ -53,8 +55,8 @@ abstract class PumpPluginAbstract protected constructor( var dateUtil: DateUtil, var aapsSchedulers: AapsSchedulers, var pumpSync: PumpSync, - var pumpSyncStorage: info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage -) : PumpPluginBase(pluginDescription!!, injector!!, aapsLogger, rh, commandQueue), Pump, Constraints, info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncEntriesCreator { + var pumpSyncStorage: PumpSyncStorage +) : PumpPluginBase(pluginDescription, injector, aapsLogger, rh, commandQueue), Pump, Constraints, info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncEntriesCreator { private val disposable = CompositeDisposable() @@ -68,30 +70,41 @@ abstract class PumpPluginAbstract protected constructor( protected var displayConnectionMessages = false var pumpType: PumpType = PumpType.GENERIC_AAPS + get() = field set(value) { field = value pumpDescription.fillFor(value) } + protected var gson = GsonBuilder().excludeFieldsWithoutExposeAnnotation().create() + abstract fun initPumpStatusData() + open fun hasService(): Boolean { + return true + } + override fun onStart() { super.onStart() initPumpStatusData() - val intent = Intent(context, serviceClass) - context.bindService(intent, serviceConnection!!, Context.BIND_AUTO_CREATE) + if (hasService()) { + val intent = Intent(context, serviceClass) + context.bindService(intent, serviceConnection!!, Context.BIND_AUTO_CREATE) + disposable.add(rxBus + .toObservable(EventAppExit::class.java) + .observeOn(aapsSchedulers.io) + .subscribe({ _ -> context.unbindService(serviceConnection!!) }) { throwable: Throwable? -> fabricPrivacy.logException(throwable!!) } + ) + } serviceRunning = true - disposable.add(rxBus - .toObservable(EventAppExit::class.java) - .observeOn(aapsSchedulers.io) - .subscribe({ _ -> context.unbindService(serviceConnection!!) }) { throwable: Throwable? -> fabricPrivacy.logException(throwable!!) } - ) - onStartCustomActions() + onStartScheduledPumpActions() } override fun onStop() { - aapsLogger.debug(LTag.PUMP, deviceID() + " onStop()") - context.unbindService(serviceConnection!!) + aapsLogger.debug(LTag.PUMP, model().model + " onStop()") + if (hasService()) { + context.unbindService(serviceConnection!!) + } serviceRunning = false disposable.clear() super.onStop() @@ -100,7 +113,7 @@ abstract class PumpPluginAbstract protected constructor( /** * If we need to run any custom actions in onStart (triggering events, etc) */ - abstract fun onStartCustomActions() + abstract fun onStartScheduledPumpActions() /** * Service class (same one you did serviceConnection for) @@ -231,7 +244,7 @@ abstract class PumpPluginAbstract protected constructor( val extended = JSONObject() try { battery.put("percent", pumpStatusData.batteryRemaining) - status.put("status", pumpStatusData.pumpStatusType.status) + status.put("status", pumpStatusData.pumpRunningState.status) extended.put("Version", version) try { extended.put("ActiveProfile", profileName) @@ -265,50 +278,23 @@ abstract class PumpPluginAbstract protected constructor( override fun shortStatus(veryShort: Boolean): String { var ret = "" - if (pumpStatusData.lastConnection == 0L) { - ret += "LastConn: never\n" + ret += if (pumpStatusData.lastConnection == 0L) { + "LastConn: never\n" } else { - val agoMsec = System.currentTimeMillis() - pumpStatusData.lastConnection - val agoMin = (agoMsec / 60.0 / 1000.0).toInt() - ret += "LastConn: $agoMin min ago\n" + val agoMin = ((System.currentTimeMillis() - pumpStatusData.lastConnection) / 60.0 / 1000.0).toInt() + "LastConn: $agoMin min ago\n" } - if (pumpStatusData.lastBolusTime != null && pumpStatusData.lastBolusTime!!.time != 0L) { - ret += """ - LastBolus: ${to2Decimal(pumpStatusData.lastBolusAmount!!)}U @${DateFormat.format("HH:mm", pumpStatusData.lastBolusTime)} - - """.trimIndent() + pumpStatusData.lastBolusTime?.let { + if (it.time != 0L) { + ret += "LastBolus: ${to2Decimal(pumpStatusData.lastBolusAmount!!)}U @${DateFormat.format("HH:mm", it)}\n" + } } - val activeTemp = pumpSync.expectedPumpState().temporaryBasal - if (activeTemp != null) { - ret += """ - Temp: ${activeTemp.toStringFull(dateUtil)} - - """.trimIndent() - } - val activeExtendedBolus = pumpSync.expectedPumpState().extendedBolus - if (activeExtendedBolus != null) { - ret += """ - Extended: ${activeExtendedBolus.toStringFull(dateUtil)} - - """.trimIndent() - } - // if (!veryShort) { - // ret += "TDD: " + DecimalFormatter.to0Decimal(pumpStatus.dailyTotalUnits) + " / " - // + pumpStatus.maxDailyTotalUnits + " U\n"; - // } - ret += """ - IOB: ${pumpStatusData.iob}U - - """.trimIndent() - ret += """ - Reserv: ${to0Decimal(pumpStatusData.reservoirRemainingUnits)}U - - """.trimIndent() - ret += """ - Batt: ${pumpStatusData.batteryRemaining} - - """.trimIndent() + pumpSync.expectedPumpState().temporaryBasal?.let { ret += "Temp: ${it.toStringFull(dateUtil)}\n" } + pumpSync.expectedPumpState().extendedBolus?.let { ret += "Extended: ${it.toStringFull(dateUtil)}\n" } + ret += "IOB: ${pumpStatusData.iob}U\n" + ret += "Reserv: ${to0Decimal(pumpStatusData.reservoirRemainingUnits)}U\n" + ret += "Batt: ${pumpStatusData.batteryRemaining}\n" return ret } @@ -324,6 +310,7 @@ abstract class PumpPluginAbstract protected constructor( // bolus needed, ask pump to deliver it deliverBolus(detailedBolusInfo) } else { + detailedBolusInfo.timestamp = System.currentTimeMillis() // no bolus required, carb only treatment pumpSyncStorage.addCarbs(PumpDbEntryCarbs(detailedBolusInfo, this)) @@ -360,4 +347,4 @@ abstract class PumpPluginAbstract protected constructor( pumpDescription.fillFor(pumpType) this.pumpType = pumpType } -} \ No newline at end of file +} diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt new file mode 100644 index 0000000000..37df0f9e0c --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt @@ -0,0 +1,77 @@ +package info.nightscout.androidaps.plugins.pump.common.ble + +import android.bluetooth.BluetoothDevice +import android.content.Context +import android.content.Intent +import androidx.annotation.StringRes +import com.google.gson.Gson +import dagger.android.DaggerBroadcastReceiver +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.plugins.pump.common.events.EventPumpConnectionParametersChanged +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.logging.LTag +import info.nightscout.shared.sharedPreferences.SP +import javax.inject.Inject + +class BondStateReceiver( + @StringRes var deviceAddress: Int, + @StringRes var bondedFlag: Int, + var targetDevice: String, + var targetState: Int +) : DaggerBroadcastReceiver() { + + @Inject lateinit var sp: SP + @Inject lateinit var context: Context + @Inject lateinit var rh: ResourceHelper + @Inject lateinit var aapsLogger: AAPSLogger + @Inject lateinit var rxBus: RxBus + + var TAG = LTag.PUMPBTCOMM + var gson = Gson() + var applicationContext: Context? = null + + override fun onReceive(context: Context, intent: Intent) { + super.onReceive(context, intent) + val action = intent.action + val device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE) + aapsLogger.info(TAG, "in onReceive: INTENT" + gson.toJson(intent)) + if (device == null) { + aapsLogger.error(TAG, "onReceive. Device is null. Exiting.") + return + } else { + if (device.address != targetDevice) { + aapsLogger.error(TAG, "onReceive. Device is not the same as targetDevice. Exiting.") + return + } + } + + // Check if action is valid + if (action == null) return + + // Take action depending on new bond state + if (action == BluetoothDevice.ACTION_BOND_STATE_CHANGED) { + val bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.ERROR) + val previousBondState = intent.getIntExtra(BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE, -1) + aapsLogger.info(TAG, "in onReceive: bondState=$bondState, previousBondState=$previousBondState") + if (bondState == targetState) { + aapsLogger.info(TAG, "onReceive: found targeted state: $targetState") + val currentDeviceSettings = sp.getString(deviceAddress, "") + if (currentDeviceSettings.equals(targetDevice)) { + if (targetState == 12) { + sp.putBoolean(bondedFlag, true) + rxBus.send(EventPumpConnectionParametersChanged()) + } else if (targetState == 10) { + sp.putBoolean(bondedFlag, false) + rxBus.send(EventPumpConnectionParametersChanged()) + } + context.unregisterReceiver(this) + } else { + aapsLogger.error(TAG, "onReceive: Device stored in SP is not the same as target device, process interrupted") + } + } else { + aapsLogger.info(TAG, "onReceive: currentBondState=$bondState, targetBondState=$targetState") + } + } + } +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpStatus.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpStatus.kt index 9ecd30bca7..9c4ea272d9 100644 --- a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpStatus.kt +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpStatus.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.common.data -import info.nightscout.androidaps.plugins.pump.common.defs.PumpStatusType +import info.nightscout.androidaps.plugins.pump.common.defs.PumpRunningState import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import java.util.* @@ -33,12 +33,13 @@ abstract class PumpStatus(var pumpType: PumpType) { var dailyTotalUnits: Double? = null var maxDailyTotalUnits: String? = null var units: String? = null // Constants.MGDL or Constants.MMOL - var pumpStatusType = PumpStatusType.Running + var pumpRunningState = PumpRunningState.Running var basalsByHour: DoubleArray? = null - var tempBasalStart: Date? = null + var tempBasalStart: Long? = null var tempBasalAmount: Double? = 0.0 var tempBasalLength: Int? = 0 var tempBasalEnd: Long? = null + var pumpTime: PumpTimeDifferenceDto? = null abstract fun initSettings() diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpTimeDifferenceDto.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpTimeDifferenceDto.kt new file mode 100755 index 0000000000..561967c714 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/data/PumpTimeDifferenceDto.kt @@ -0,0 +1,25 @@ +package info.nightscout.androidaps.plugins.pump.common.data + +import org.joda.time.DateTime +import org.joda.time.Seconds + +/** + * Created by andy on 28/05/2021. + */ +class PumpTimeDifferenceDto constructor(var localDeviceTime: DateTime, + var pumpTime: DateTime) { + + var timeDifference = 0 + + fun calculateDifference() { + val secondsBetween = Seconds.secondsBetween(localDeviceTime, pumpTime) + timeDifference = secondsBetween.seconds + + // val diff = localDeviceTime - pumpTime + // timeDifference = (diff / 1000.0).toInt() + } + + init { + calculateDifference() + } +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/BasalProfileStatus.java b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/BasalProfileStatus.java new file mode 100755 index 0000000000..0d56ee4ef8 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/BasalProfileStatus.java @@ -0,0 +1,14 @@ +package info.nightscout.androidaps.plugins.pump.common.defs; + +/** + * Created by andy on 1/20/19. + */ + +public enum BasalProfileStatus { + + NotInitialized, // + ProfileOK, // + ProfileChanged, // + ; + +} diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpDriverState.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpDriverState.kt index f72163ce92..6f6124005d 100644 --- a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpDriverState.kt +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpDriverState.kt @@ -1,14 +1,26 @@ package info.nightscout.androidaps.plugins.pump.common.defs -enum class PumpDriverState { +import info.nightscout.androidaps.plugins.pump.common.R - NotInitialized, - Connecting, - Connected, - Initialized, - Ready, Busy, - Suspended; +// TODO there are 3 classes now, that do similar things, sort of, need to define exact rules: PumpDeviceState, PumpDriverState, PumpStatusState + +// TODO split this enum into 2 +enum class PumpDriverState(var resourceId: Int) { + + NotInitialized(R.string.pump_status_not_initialized), // this state should be set only when driver is created + Connecting(R.string.connecting), // + Connected(R.string.connected), // + Initialized(R.string.pump_status_initialized), // this is weird state that probably won't be used, since its more driver centric that communication centric + EncryptCommunication(R.string.pump_status_encrypt), // + Ready(R.string.pump_status_ready), + Busy(R.string.pump_status_busy), // + Suspended(R.string.pump_status_suspended), // + Sleeping(R.string.pump_status_sleeping), + ExecutingCommand(R.string.pump_status_executing_command), + Disconnecting(R.string.disconnecting), + Disconnected(R.string.disconnected), + ErrorCommunicatingWithPump(R.string.pump_status_error_comm); fun isConnected(): Boolean = this == Connected || this == Initialized || this == Busy || this == Suspended fun isInitialized(): Boolean = this == Initialized || this == Busy || this == Suspended -} \ No newline at end of file +} diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpHistoryEntryGroup.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpHistoryEntryGroup.kt index 4a98471dc4..189353809a 100644 --- a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpHistoryEntryGroup.kt +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpHistoryEntryGroup.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.common.defs import info.nightscout.androidaps.plugins.pump.common.R import info.nightscout.androidaps.interfaces.ResourceHelper -import java.util.* +import kotlin.streams.toList /** * This file was taken from GGC - GNU Gluco Control (ggc.sourceforge.net), application for diabetes @@ -11,9 +11,10 @@ import java.util.* * * Author: Andy {andy.rozman@gmail.com} */ -enum class PumpHistoryEntryGroup(val resourceId: Int) { +enum class PumpHistoryEntryGroup(val resourceId: Int, val pumpTypeGroupConfig: PumpTypeGroupConfig = PumpTypeGroupConfig.All) { All(R.string.history_group_all), + Base(R.string.history_group_base), Bolus(R.string.history_group_bolus), Basal(R.string.history_group_basal), Prime(R.string.history_group_prime), @@ -22,7 +23,14 @@ enum class PumpHistoryEntryGroup(val resourceId: Int) { Glucose(R.string.history_group_glucose), Notification(R.string.history_group_notification), Statistic(R.string.history_group_statistic), - Unknown(R.string.history_group_unknown); + Other(R.string.history_group_other), + Unknown(R.string.history_group_unknown), + + // Ypso + EventsOnly(R.string.history_group_events), + EventsNoStat(R.string.history_group_events_no_stat) + + ; var translated: String? = null private set @@ -33,9 +41,10 @@ enum class PumpHistoryEntryGroup(val resourceId: Int) { companion object { - private var translatedList: MutableList? = null + @JvmStatic private var translatedList: MutableList? = null - private fun doTranslation(rh: ResourceHelper) { + fun doTranslation(rh: ResourceHelper) { + if (translatedList != null) return translatedList = ArrayList() for (pumpHistoryEntryGroup in values()) { pumpHistoryEntryGroup.translated = rh.gs(pumpHistoryEntryGroup.resourceId) @@ -43,9 +52,27 @@ enum class PumpHistoryEntryGroup(val resourceId: Int) { } } + // FIXME this is just for Java compatibility reasons (can be removed when all drivers using it are in Kotlin - OmnipodEros still in java) fun getTranslatedList(rh: ResourceHelper): List { + return getTranslatedList(rh, PumpTypeGroupConfig.All) + } + + fun getTranslatedList(rh: ResourceHelper, pumpTypeGroupConfig: PumpTypeGroupConfig = PumpTypeGroupConfig.All): List { if (translatedList == null) doTranslation(rh) - return translatedList!! + + val outList: List + + if (pumpTypeGroupConfig == PumpTypeGroupConfig.All) { + outList = translatedList!!.stream() + .filter { pre -> pre.pumpTypeGroupConfig == PumpTypeGroupConfig.All } + .toList(); + } else { + outList = translatedList!!.stream() + .filter { pre -> (pre.pumpTypeGroupConfig == PumpTypeGroupConfig.All || pre.pumpTypeGroupConfig == pumpTypeGroupConfig) } + .toList(); + } + + return outList } } diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpRunningState.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpRunningState.kt new file mode 100755 index 0000000000..f9dcabbf98 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpRunningState.kt @@ -0,0 +1,9 @@ +package info.nightscout.androidaps.plugins.pump.common.defs + +// TODO there are 3 classes now, that do similar things, sort of, need to define exact rules: PumpDeviceState, PumpDriverState, PumpStatusState + +enum class PumpRunningState(val status: String) { + + Running("normal"), + Suspended("suspended"); +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpTypeGroupConfig.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpTypeGroupConfig.kt new file mode 100644 index 0000000000..cc553c732f --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpTypeGroupConfig.kt @@ -0,0 +1,8 @@ +package info.nightscout.androidaps.plugins.pump.common.defs + +enum class PumpTypeGroupConfig { + All, + Medtronic, + OmnipodEros, + YpsoPump +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpUpdateFragmentType.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpUpdateFragmentType.kt new file mode 100755 index 0000000000..0558597127 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpUpdateFragmentType.kt @@ -0,0 +1,49 @@ +package info.nightscout.androidaps.plugins.pump.common.defs + +import java.util.* + +enum class PumpUpdateFragmentType { + None, + PumpStatus, + DriverStatus, + Queue, + Bolus, + TBR, + ProfileChange, + TBRCount, + BolusCount, + TreatmentValues(Arrays.asList(Bolus, TBR, TBRCount, BolusCount, ProfileChange)), // Last Bolus, TBR, Profile Change, TBR Count, Bolus Count + Full, + Configuration, // Firmware, Errors + Battery, + Reservoir, + OtherValues(Arrays.asList(Battery, Reservoir)), // Battery, Reservoir + Custom_1, + Custom_2, + Custom_3, + Custom_4, + Custom_5, + Custom_6, + Custom_7, + Custom_8 + ; + + final var children: List? = null + + constructor() { + } + + constructor(children: List) { + this.children = children; + } + + fun isOptionIncluded(type: PumpUpdateFragmentType): Boolean { + if (this == type) + return true + else if (this.children != null && this.children!!.contains(type)) + return true; + + return false; + } + +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/PumpDriverConfiguration.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/PumpDriverConfiguration.kt new file mode 100644 index 0000000000..c5f28a4645 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/PumpDriverConfiguration.kt @@ -0,0 +1,11 @@ +package info.nightscout.androidaps.plugins.pump.common.driver + +import info.nightscout.androidaps.plugins.pump.common.driver.history.PumpHistoryDataProvider + +interface PumpDriverConfiguration { + + fun getPumpBLESelector(): PumpBLESelector + + fun getPumpHistoryDataProvider(): PumpHistoryDataProvider + +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/PumpDriverConfigurationCapable.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/PumpDriverConfigurationCapable.kt new file mode 100644 index 0000000000..3c8e66fde3 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/PumpDriverConfigurationCapable.kt @@ -0,0 +1,7 @@ +package info.nightscout.androidaps.plugins.pump.common.driver + +interface PumpDriverConfigurationCapable { + + fun getPumpDriverConfiguration(): PumpDriverConfiguration + +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelector.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelector.kt new file mode 100644 index 0000000000..530c127a4e --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelector.kt @@ -0,0 +1,105 @@ +package info.nightscout.androidaps.plugins.pump.common.driver + +import android.bluetooth.BluetoothDevice +import android.bluetooth.le.ScanFilter +import android.bluetooth.le.ScanSettings +import android.content.Context + +interface PumpBLESelector { + + /** + * Called on resume + */ + fun onResume() + + /** + * Called on destory + */ + fun onDestroy() + + /** + * This method is called when device is being removed (it can be empty if you don't need to do any special action, but if you + * have to unbound (for example), then this is method where to call it. For unbounding removeBond is available + */ + fun removeDevice(device: BluetoothDevice) + + /** + * Cleanup method after device was removed + */ + fun cleanupAfterDeviceRemoved() + + /** + * operations when scan failed + */ + fun onScanFailed(context: Context, errorCode: Int) + + /** + * operations when scan starts + */ + fun onStartLeDeviceScan(context: Context) + + /** + * operations when scan stops + */ + fun onStopLeDeviceScan(context: Context) + + /** + * operations when scan was stopped manualy (press on button) + */ + fun onManualStopLeDeviceScan(context: Context) + + /** + * operations when on non manual stop of scan (on timeout) + */ + fun onNonManualStopLeDeviceScan(context: Context) + + /** + * get Scan Filters + */ + fun getScanFilters(): List? + + /** + * get Scan Settings + */ + fun getScanSettings(): ScanSettings? + + /** + * filter device on search (for cases where we can't do it with Scan Filters + */ + fun filterDevice(device: BluetoothDevice): BluetoothDevice? + + /** + * operations when device selected + */ + fun onDeviceSelected(bluetoothDevice: BluetoothDevice, bleAddress: String, deviceName: String) + + /** + * If pump has no name, this name will be used + */ + fun getUnknownPumpName(): String + + /** + * get Address of Currently selected pump, empty string if none + */ + fun currentlySelectedPumpAddress(): String + + /** + * get Name of Currently selected pump, getUnknownPumpName() string if none + */ + fun currentlySelectedPumpName(): String + + /** + * Get Translation Text + */ + fun getText(key: PumpBLESelectorText): String + +} + +enum class PumpBLESelectorText { + SCAN_TITLE, + SELECTED_PUMP_TITLE, + REMOVE_TITLE, + REMOVE_TEXT, + NO_SELECTED_PUMP, + PUMP_CONFIGURATION +} diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelectorAbstract.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelectorAbstract.kt new file mode 100644 index 0000000000..872645fa30 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelectorAbstract.kt @@ -0,0 +1,108 @@ +package info.nightscout.androidaps.plugins.pump.common.driver.ble + +import android.bluetooth.BluetoothDevice +import android.bluetooth.le.ScanFilter +import android.bluetooth.le.ScanSettings +import android.content.Context +import android.widget.Toast +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.plugins.pump.common.R +import info.nightscout.androidaps.plugins.pump.common.driver.PumpBLESelector +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.logging.LTag +import info.nightscout.shared.sharedPreferences.SP + +abstract class PumpBLESelectorAbstract constructor( + var resourceHelper: ResourceHelper, + var aapsLogger: AAPSLogger, + var sp: SP, + var rxBus: RxBus, + var context: Context +) : PumpBLESelector { + + protected val TAG = LTag.PUMPBTCOMM + + override fun getScanSettings(): ScanSettings? { + return ScanSettings.Builder().setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY).build() + } + + override fun getScanFilters(): MutableList? { + return null + } + + override fun filterDevice(device: BluetoothDevice): BluetoothDevice? { + return device + } + + override fun onResume() { + } + + override fun onDestroy() { + } + + override fun removeDevice(device: BluetoothDevice) { + } + + override fun cleanupAfterDeviceRemoved() { + } + + override fun onManualStopLeDeviceScan(context: Context) { + } + + override fun onNonManualStopLeDeviceScan(context: Context) { + } + + //fun onDeviceSelected(bluetoothDevice: BluetoothDevice, bleAddress: String, deviceName: String) + + override fun onScanFailed(context: Context, errorCode: Int) { + Toast.makeText( + context, resourceHelper.gs(R.string.ble_config_scan_error, errorCode), + Toast.LENGTH_LONG + ).show() + } + + override fun onStartLeDeviceScan(context: Context) { + Toast.makeText(context, R.string.ble_config_scan_scanning, Toast.LENGTH_SHORT).show() + } + + override fun onStopLeDeviceScan(context: Context) { + Toast.makeText(context, R.string.ble_config_scan_finished, Toast.LENGTH_SHORT).show() + } + + protected fun removeBond(bluetoothDevice: BluetoothDevice): Boolean { + return try { + val method = bluetoothDevice.javaClass.getMethod("removeBond") + val resultObject = method.invoke(bluetoothDevice) + if (resultObject == null) { + aapsLogger.error(TAG, "ERROR: result object is null") + false + } else { + val result = resultObject as Boolean + if (result) { + aapsLogger.info(TAG, "Successfully removed bond") + } else { + aapsLogger.warn(TAG, "Bond was not removed") + } + result + } + } catch (e: Exception) { + aapsLogger.error(TAG, "ERROR: could not remove bond") + e.printStackTrace() + false + } + } + + protected fun getBondingStatusDescription(state: Int): String { + return if (state == 10) { + "BOND_NONE" + } else if (state == 11) { + "BOND_BONDING" + } else if (state == 12) { + "BOND_BONDED" + } else { + "UNKNOWN BOND STATUS ($state)" + } + } + +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpDataConverter.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpDataConverter.kt new file mode 100644 index 0000000000..0c8c8d1b25 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpDataConverter.kt @@ -0,0 +1,4 @@ +package info.nightscout.androidaps.plugins.pump.common.driver.history + +interface PumpDataConverter { +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryDataProvider.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryDataProvider.kt new file mode 100644 index 0000000000..6f2389338e --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryDataProvider.kt @@ -0,0 +1,75 @@ +package info.nightscout.androidaps.plugins.pump.common.driver.history + +import androidx.annotation.StringRes +import info.nightscout.androidaps.plugins.pump.common.R +import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup + +interface PumpHistoryDataProvider { + + /** + * Get Data, specified with PumpHistoryPeriod + */ + fun getData(period: PumpHistoryPeriod): List + + /** + * Get Initial Period + */ + fun getInitialPeriod(): PumpHistoryPeriod + + /** + * Get InitialData + */ + fun getInitialData(): List + + /** + * Get Allowed Pump History Groups (for specific pump) + */ + fun getAllowedPumpHistoryGroups(): List + + /** + * Get Spinner Width in pixels (same as specifying 150dp) + */ + fun getSpinnerWidthInPixels(): Int + + /** + * Get Translation Text + */ + fun getText(key: PumpHistoryText): String + + /** + * For filtering of items + */ + fun isItemInSelection(itemGroup: PumpHistoryEntryGroup, targetGroup: PumpHistoryEntryGroup): Boolean + +} + +enum class PumpHistoryPeriod constructor( + @StringRes var stringId: Int, + var isHours: Boolean = false +) { + + TODAY(R.string.time_today), + LAST_HOUR(R.string.time_last_hour, true), + LAST_3_HOURS(R.string.time_last_3_hours, true), + LAST_6_HOURS(R.string.time_last_6_hours, true), + LAST_12_HOURS(R.string.time_last_12_hours, true), + LAST_2_DAYS(R.string.time_last_2_days), + LAST_4_DAYS(R.string.time_last_4_days), + LAST_WEEK(R.string.time_last_week), + LAST_MONTH(R.string.time_last_month), + ALL(R.string.history_group_all) + +} + +enum class PumpHistoryText { + + PUMP_HISTORY, + + // OLD ONES + SCAN_TITLE, + SELECTED_PUMP_TITLE, + REMOVE_TITLE, + REMOVE_TEXT, + NO_SELECTED_PUMP, + PUMP_CONFIGURATION +} diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryDataProviderAbstract.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryDataProviderAbstract.kt new file mode 100644 index 0000000000..53dbbc0aba --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryDataProviderAbstract.kt @@ -0,0 +1,46 @@ +package info.nightscout.androidaps.plugins.pump.common.driver.history + +import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup +import java.util.* + +abstract class PumpHistoryDataProviderAbstract : PumpHistoryDataProvider { + + override fun getInitialData(): List { + return getData(getInitialPeriod()); + } + + override fun getSpinnerWidthInPixels(): Int { + return 150 + } + + protected fun getStartingTimeForData(period: PumpHistoryPeriod): Long { + val gregorianCalendar = GregorianCalendar() + + if (!period.isHours) { + gregorianCalendar.set(Calendar.HOUR_OF_DAY, 0) + gregorianCalendar.set(Calendar.MINUTE, 0) + gregorianCalendar.set(Calendar.SECOND, 0) + gregorianCalendar.set(Calendar.MILLISECOND, 0) + } + + when (period) { + PumpHistoryPeriod.TODAY -> return gregorianCalendar.timeInMillis + PumpHistoryPeriod.ALL -> return 0L + PumpHistoryPeriod.LAST_2_DAYS -> gregorianCalendar.add(Calendar.DAY_OF_MONTH, -1) + PumpHistoryPeriod.LAST_4_DAYS -> gregorianCalendar.add(Calendar.DAY_OF_MONTH, -3) + PumpHistoryPeriod.LAST_WEEK -> gregorianCalendar.add(Calendar.WEEK_OF_YEAR, -1) + PumpHistoryPeriod.LAST_MONTH -> gregorianCalendar.add(Calendar.MONTH, -1) + PumpHistoryPeriod.LAST_HOUR -> gregorianCalendar.add(Calendar.HOUR_OF_DAY, -1) + PumpHistoryPeriod.LAST_3_HOURS -> gregorianCalendar.add(Calendar.HOUR_OF_DAY, -3) + PumpHistoryPeriod.LAST_6_HOURS -> gregorianCalendar.add(Calendar.HOUR_OF_DAY, -6) + PumpHistoryPeriod.LAST_12_HOURS -> gregorianCalendar.add(Calendar.HOUR_OF_DAY, -12) + } + + return gregorianCalendar.timeInMillis + } + + override fun isItemInSelection(itemGroup: PumpHistoryEntryGroup, targetGroup: PumpHistoryEntryGroup): Boolean { + return itemGroup === targetGroup + } + +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryEntry.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryEntry.kt new file mode 100644 index 0000000000..02e4e91b4c --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/history/PumpHistoryEntry.kt @@ -0,0 +1,18 @@ +package info.nightscout.androidaps.plugins.pump.common.driver.history + +import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup +import info.nightscout.androidaps.interfaces.ResourceHelper + +interface PumpHistoryEntry { + + fun prepareEntryData(resourceHelper: ResourceHelper, pumpDataConverter: PumpDataConverter) + + fun getEntryDateTime(): String + + fun getEntryType(): String + + fun getEntryValue(): String + + fun getEntryTypeGroup(): PumpHistoryEntryGroup + +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventBondChanged.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventBondChanged.kt new file mode 100644 index 0000000000..8e2c8b978c --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventBondChanged.kt @@ -0,0 +1,8 @@ +package info.nightscout.androidaps.plugins.pump.common.events + +import info.nightscout.androidaps.events.Event + +class EventBondChanged( + var connectionAddress: String, + var bondStatus: Boolean +) : Event() diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpChanged.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpChanged.kt new file mode 100755 index 0000000000..36b1107882 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpChanged.kt @@ -0,0 +1,8 @@ +package info.nightscout.androidaps.plugins.pump.common.events + +import info.nightscout.androidaps.events.Event + +class EventPumpChanged(var serialNumber: String, + var connectionAddress: String, + var parameters: MutableMap? = null) : Event() { +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpConnectionParametersChanged.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpConnectionParametersChanged.kt new file mode 100644 index 0000000000..d6c5b1563a --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpConnectionParametersChanged.kt @@ -0,0 +1,6 @@ +package info.nightscout.androidaps.plugins.pump.common.events + +import info.nightscout.androidaps.events.Event + +class EventPumpConnectionParametersChanged : Event() { +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpFragmentValuesChanged.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpFragmentValuesChanged.kt new file mode 100755 index 0000000000..fcb55dcd11 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpFragmentValuesChanged.kt @@ -0,0 +1,14 @@ +package info.nightscout.androidaps.plugins.pump.common.events + +import info.nightscout.androidaps.events.Event +import info.nightscout.androidaps.plugins.pump.common.defs.PumpUpdateFragmentType + +class EventPumpFragmentValuesChanged : Event { + + var updateType: PumpUpdateFragmentType = PumpUpdateFragmentType.None + + constructor(updateType: PumpUpdateFragmentType) { + this.updateType = updateType + } + +} \ No newline at end of file diff --git a/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventRefreshButtonState.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventRefreshButtonState.kt old mode 100644 new mode 100755 similarity index 100% rename from rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventRefreshButtonState.kt rename to pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventRefreshButtonState.kt diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpBLEConfigActivity.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpBLEConfigActivity.kt new file mode 100755 index 0000000000..db19107d75 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpBLEConfigActivity.kt @@ -0,0 +1,338 @@ +package info.nightscout.androidaps.plugins.pump.common.ui + +import android.annotation.SuppressLint +import android.bluetooth.BluetoothAdapter +import android.bluetooth.BluetoothDevice +import android.bluetooth.BluetoothManager +import android.bluetooth.le.BluetoothLeScanner +import android.bluetooth.le.ScanCallback +import android.bluetooth.le.ScanFilter +import android.bluetooth.le.ScanResult +import android.bluetooth.le.ScanSettings +import android.content.Context +import android.os.Bundle +import android.os.Handler +import android.os.HandlerThread +import android.view.MenuItem +import android.view.View +import android.view.ViewGroup +import android.widget.AdapterView +import android.widget.AdapterView.OnItemClickListener +import android.widget.BaseAdapter +import android.widget.TextView +import dagger.android.support.DaggerAppCompatActivity +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.plugins.pump.common.R +import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck +import info.nightscout.androidaps.plugins.pump.common.databinding.PumpBleConfigActivityBinding +import info.nightscout.androidaps.plugins.pump.common.driver.PumpBLESelector +import info.nightscout.androidaps.plugins.pump.common.driver.PumpBLESelectorText +import info.nightscout.androidaps.plugins.pump.common.driver.PumpDriverConfigurationCapable +import info.nightscout.androidaps.utils.alertDialogs.OKDialog +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.logging.LTag +import info.nightscout.shared.sharedPreferences.SP +import org.apache.commons.lang3.StringUtils +import javax.inject.Inject + +@SuppressLint("MissingPermission") +class PumpBLEConfigActivity : DaggerAppCompatActivity() { + + @Inject lateinit var resourceHelper: ResourceHelper + @Inject lateinit var activePlugin: ActivePlugin + @Inject lateinit var sp: SP + @Inject lateinit var blePreCheck: BlePreCheck + @Inject lateinit var context: Context + @Inject lateinit var aapsLogger: AAPSLogger + @Inject lateinit var rxBus: RxBus + + private lateinit var binding: PumpBleConfigActivityBinding + private lateinit var bleSelector: PumpBLESelector + + private var settings: ScanSettings? = null + private var filters: List? = null + private var bleScanner: BluetoothLeScanner? = null + private var deviceListAdapter = LeDeviceListAdapter() + private val handler = Handler(HandlerThread(this::class.simpleName + "Handler").also { it.start() }.looper) + private val bluetoothAdapter: BluetoothAdapter? get() = (context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager?)?.adapter + var scanning = false + private val devicesMap: MutableMap = HashMap() + + private val stopScanAfterTimeoutRunnable = Runnable { + if (scanning) { + stopLeDeviceScan(false) + } + } + + @SuppressLint("MissingPermission") + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + binding = PumpBleConfigActivityBinding.inflate(layoutInflater) + setContentView(binding.root) + + if (!blePreCheck.prerequisitesCheck(this)) { + aapsLogger.error(TAG, "prerequisitesCheck failed.") + finish() + return + } + + // Configuration + val activePump = activePlugin.activePump + + if (activePump is PumpDriverConfigurationCapable) { + bleSelector = activePump.getPumpDriverConfiguration().getPumpBLESelector() + } else { + throw RuntimeException("PumpBLEConfigActivity can be used only with PumpDriverConfigurationCapable pump driver.") + } + + binding.pumpBleConfigCurrentlySelectedText.text = bleSelector.getText(PumpBLESelectorText.SELECTED_PUMP_TITLE) + binding.pumpBleConfigScanTitle.text = bleSelector.getText(PumpBLESelectorText.SCAN_TITLE) + + title = bleSelector.getText(PumpBLESelectorText.PUMP_CONFIGURATION) + supportActionBar?.setDisplayHomeAsUpEnabled(true) + supportActionBar?.setDisplayShowHomeEnabled(true) + + binding.pumpBleConfigScanDeviceList.adapter = deviceListAdapter + binding.pumpBleConfigScanDeviceList.onItemClickListener = OnItemClickListener { _: AdapterView<*>?, view: View, _: Int, _: Long -> + // stop scanning if still active + if (scanning) { + stopLeDeviceScan(true) + } + val bleAddress = (view.findViewById(R.id.pump_ble_config_scan_item_device_address) as TextView).text.toString() + val deviceName = (view.findViewById(R.id.pump_ble_config_scan_item_device_name) as TextView).text.toString() + + if (devicesMap.containsKey(bleAddress)) { + aapsLogger.debug(TAG, "Device FOUND in deviceMap: $bleAddress") + val bluetoothDevice = devicesMap[bleAddress] + bleSelector.onDeviceSelected(bluetoothDevice!!, bleAddress, deviceName) + } else { + aapsLogger.debug(TAG, "Device NOT found in deviceMap: $bleAddress") + } + + finish() + } + binding.pumpBleConfigScanStart.setOnClickListener { startLeDeviceScan() } + binding.pumpBleConfigButtonScanStop.setOnClickListener { + if (scanning) { + stopLeDeviceScan(true) + } + } + + binding.pumpBleConfigButtonRemove.setOnClickListener { + OKDialog.showConfirmation( + this@PumpBLEConfigActivity, + bleSelector.getText(PumpBLESelectorText.REMOVE_TITLE), + bleSelector.getText(PumpBLESelectorText.REMOVE_TEXT), + Runnable { + val deviceAddress: String = binding.pumpBleConfigCurrentlySelectedPumpAddress.text.toString() + aapsLogger.debug(TAG, "Removing device as selected: $deviceAddress") + if (devicesMap.containsKey(deviceAddress)) { + val bluetoothDevice = devicesMap[deviceAddress] + aapsLogger.debug(TAG, "Device can be detected near, so trying to remove bond if possible.") + bleSelector.removeDevice(bluetoothDevice!!) + } else { + val remoteDevice = bluetoothAdapter?.getRemoteDevice(deviceAddress) + if (remoteDevice != null) { + bleSelector.removeDevice(remoteDevice) + } + } + bleSelector.cleanupAfterDeviceRemoved() + updateCurrentlySelectedBTDevice() + }) + } + } + + private fun updateCurrentlySelectedBTDevice() { + val address = bleSelector.currentlySelectedPumpAddress() + if (StringUtils.isEmpty(address)) { + binding.pumpBleConfigCurrentlySelectedPumpName.text = bleSelector.getText(PumpBLESelectorText.NO_SELECTED_PUMP) + binding.pumpBleConfigCurrentlySelectedPumpAddress.visibility = View.GONE + binding.pumpBleConfigButtonRemove.visibility = View.GONE + } else { + binding.pumpBleConfigCurrentlySelectedPumpAddress.visibility = View.VISIBLE + binding.pumpBleConfigButtonRemove.visibility = View.VISIBLE + binding.pumpBleConfigCurrentlySelectedPumpName.text = bleSelector.currentlySelectedPumpName() + binding.pumpBleConfigCurrentlySelectedPumpAddress.text = address + } + } + + override fun onOptionsItemSelected(item: MenuItem): Boolean = + when (item.itemId) { + android.R.id.home -> { + finish() + true + } + + else -> false + } + + override fun onResume() { + super.onResume() + bleSelector.onResume() + prepareForScanning() + updateCurrentlySelectedBTDevice() + } + + override fun onDestroy() { + super.onDestroy() + if (scanning) { + stopLeDeviceScan(false) + } + bleSelector.onDestroy() + } + + private fun prepareForScanning() { + bleScanner = bluetoothAdapter?.bluetoothLeScanner + settings = bleSelector.getScanSettings() + filters = bleSelector.getScanFilters() + } + + private val bleScanCallback: ScanCallback = object : ScanCallback() { + + override fun onScanResult(callbackType: Int, scanRecord: ScanResult) { + aapsLogger.debug(TAG, scanRecord.toString()) + runOnUiThread { if (addDevice(scanRecord)) deviceListAdapter.notifyDataSetChanged() } + } + + override fun onBatchScanResults(results: List) { + runOnUiThread { + var added = false + for (result in results) { + aapsLogger.debug(TAG, "SCAN: " + result.advertisingSid + " name=" + result.device.address) + if (addDevice(result)) added = true + } + if (added) + deviceListAdapter.notifyDataSetChanged() + } + } + + private fun addDevice(result: ScanResult): Boolean { + var device = result.device + + device = bleSelector.filterDevice(device) + + if (device == null) { + return false + } + + deviceListAdapter.addDevice(result) + if (!devicesMap.containsKey(device.address)) { + devicesMap[device.address] = device + } + return true + } + + override fun onScanFailed(errorCode: Int) { + aapsLogger.error(TAG, "Scan Failed - Error Code: $errorCode") + bleSelector.onScanFailed(this@PumpBLEConfigActivity, errorCode) + } + } + + private fun startLeDeviceScan() { + if (bleScanner == null) { + aapsLogger.error(LTag.PUMPBTCOMM, "startLeDeviceScan failed: bleScanner is null") + return + } + deviceListAdapter.clear() + deviceListAdapter.notifyDataSetChanged() + handler.postDelayed(stopScanAfterTimeoutRunnable, SCAN_PERIOD_MILLIS) + runOnUiThread { + binding.pumpBleConfigScanStart.isEnabled = false + binding.pumpBleConfigButtonScanStop.visibility = View.VISIBLE + } + scanning = true + bleScanner?.startScan(filters, settings, bleScanCallback) + aapsLogger.debug(LTag.PUMPBTCOMM, "startLeDeviceScan: Scanning Start") + bleSelector.onStartLeDeviceScan(this@PumpBLEConfigActivity) + } + + private fun stopLeDeviceScan(manualStop: Boolean) { + if (scanning) { + scanning = false + bleScanner?.stopScan(bleScanCallback) + aapsLogger.debug(LTag.PUMPBTCOMM, "stopLeDeviceScan: Scanning Stop") + bleSelector.onStopLeDeviceScan(this@PumpBLEConfigActivity) + handler.removeCallbacks(stopScanAfterTimeoutRunnable) + } + if (manualStop) { + bleSelector.onManualStopLeDeviceScan(this@PumpBLEConfigActivity) + } else { + bleSelector.onNonManualStopLeDeviceScan(this@PumpBLEConfigActivity) + } + + runOnUiThread { + binding.pumpBleConfigScanStart.isEnabled = true + binding.pumpBleConfigButtonScanStop.visibility = View.GONE + } + } + + private inner class LeDeviceListAdapter : BaseAdapter() { + + private var devicesList: ArrayList = arrayListOf() + private var devicesMap: MutableMap = mutableMapOf() + + fun addDevice(result: ScanResult) { + if (!devicesList.contains(result.device)) { + devicesList.add(result.device) + } + devicesMap[result.device] = result.rssi + notifyDataSetChanged() + } + + fun clear() { + devicesList.clear() + devicesMap.clear() + notifyDataSetChanged() + } + + override fun getCount(): Int { + val c = devicesList.size + aapsLogger.info(TAG, "D: count=$c") + return c + } + + override fun getItem(i: Int): Any = devicesList[i] + override fun getItemId(i: Int): Long = i.toLong() + + override fun getView(i: Int, convertView: View?, viewGroup: ViewGroup?): View { + var v = convertView + val holder: ViewHolder + if (v == null) { + v = View.inflate(applicationContext, R.layout.pump_ble_config_scan_item, null) + holder = ViewHolder() + holder.deviceAddress = v.findViewById(R.id.pump_ble_config_scan_item_device_address) + holder.deviceName = v.findViewById(R.id.pump_ble_config_scan_item_device_name) + v.tag = holder + } else { + // reuse view if already exists + holder = v.tag as ViewHolder + } + + val device = devicesList[i] + var deviceName = device.name + if (StringUtils.isBlank(deviceName)) { + deviceName = bleSelector.getUnknownPumpName() + } + deviceName += " [" + devicesMap[device] + "]" + val currentlySelectedAddress = bleSelector.currentlySelectedPumpAddress() // TODO + if (currentlySelectedAddress == device.address) { + deviceName += " (" + resources.getString(R.string.ble_config_scan_selected) + ")" + } + holder.deviceName?.text = deviceName + holder.deviceAddress?.text = device.address + return v!! + } + } + + internal class ViewHolder { + var deviceName: TextView? = null + var deviceAddress: TextView? = null + } + + companion object { + private val TAG = LTag.PUMPBTCOMM + private const val SCAN_PERIOD_MILLIS: Long = 15000 + } +} \ No newline at end of file diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpHistoryActivity.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpHistoryActivity.kt new file mode 100755 index 0000000000..a29cf41094 --- /dev/null +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpHistoryActivity.kt @@ -0,0 +1,217 @@ +package info.nightscout.androidaps.plugins.pump.common.ui + +import android.content.Context +import android.os.Bundle +import android.os.SystemClock +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.AdapterView +import android.widget.ArrayAdapter +import android.widget.TextView +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView +import dagger.android.support.DaggerAppCompatActivity +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.plugins.pump.common.R +import info.nightscout.androidaps.plugins.pump.common.databinding.PumpHistoryActivityBinding +import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup +import info.nightscout.androidaps.plugins.pump.common.driver.PumpDriverConfigurationCapable +import info.nightscout.androidaps.plugins.pump.common.driver.history.PumpHistoryDataProvider +import info.nightscout.androidaps.plugins.pump.common.driver.history.PumpHistoryEntry +import info.nightscout.androidaps.plugins.pump.common.driver.history.PumpHistoryText +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.shared.logging.LTag +import javax.inject.Inject + +class PumpHistoryActivity : DaggerAppCompatActivity() { + + @Inject lateinit var resourceHelper: ResourceHelper + @Inject lateinit var aapsLogger: AAPSLogger + @Inject lateinit var activePlugin: ActivePlugin + @Inject lateinit var context: Context + + var filteredHistoryList: MutableList = mutableListOf() + var typeListFull: List? = null + var fullList: MutableList = mutableListOf() + + private lateinit var historyDataProvider: PumpHistoryDataProvider + private lateinit var binding: PumpHistoryActivityBinding + + var manualChange = false + + lateinit var recyclerViewAdapter: RecyclerViewAdapter + + private fun prepareData() { + + val allData = historyDataProvider.getInitialData() + + aapsLogger.info(LTag.PUMP, "Loaded ${allData.size} items from database. [initialSize=${historyDataProvider.getInitialPeriod()}]") + + this.fullList.addAll(allData) + } + + private fun filterHistory(group: PumpHistoryEntryGroup) { + filteredHistoryList.clear() + + if (group === PumpHistoryEntryGroup.All) { + filteredHistoryList.addAll(fullList) + } else { + for (pumpHistoryEntry in fullList) { + if (historyDataProvider.isItemInSelection(pumpHistoryEntry.getEntryTypeGroup(), group)) { + filteredHistoryList.add(pumpHistoryEntry) + } + } + } + + aapsLogger.info(LTag.PUMP, "Filtered list ${filteredHistoryList.size} items (group ${group}), from full list (${fullList.size}).") + + recyclerViewAdapter.setHistoryListInternal(filteredHistoryList) + recyclerViewAdapter.notifyDataSetChanged() + + } + + override fun onResume() { + super.onResume() + //filterHistory(selectedGroup) + //setHistoryTypeSpinner() + //aapsLogger.info(LTag.PUMP, "onResume") + //binding.pumpHistoryRoot.requestLayout() + } + + private fun setHistoryTypeSpinner() { + manualChange = true + for (i in typeListFull!!.indices) { + if (typeListFull!![i].entryGroup === selectedGroup) { + binding.pumpHistoryType.setSelection(i) + break + } + } + SystemClock.sleep(200) + manualChange = false + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + binding = PumpHistoryActivityBinding.inflate(layoutInflater) + setContentView(binding.root) + + // Configuration + val activePump = activePlugin.activePump + + if (activePump is PumpDriverConfigurationCapable) { + historyDataProvider = activePump.getPumpDriverConfiguration().getPumpHistoryDataProvider() + } else { + throw RuntimeException("PumpHistoryActivity can be used only with PumpDriverConfigurationCapable pump driver.") + } + + prepareData() + + binding.pumpHistoryRecyclerView.setHasFixedSize(true) + binding.pumpHistoryRecyclerView.layoutManager = LinearLayoutManager(this) + recyclerViewAdapter = RecyclerViewAdapter(filteredHistoryList) + binding.pumpHistoryRecyclerView.adapter = recyclerViewAdapter + binding.pumpHistoryStatus.visibility = View.GONE + typeListFull = getTypeList(historyDataProvider.getAllowedPumpHistoryGroups()) + val spinnerAdapter = ArrayAdapter(this, R.layout.spinner_centered, typeListFull!!) + + binding.pumpHistoryText.text = historyDataProvider.getText(PumpHistoryText.PUMP_HISTORY) + + binding.pumpHistoryType.adapter = spinnerAdapter + binding.pumpHistoryType.getLayoutParams().width = fromDpToSize(historyDataProvider.getSpinnerWidthInPixels()) + binding.pumpHistoryType.requestLayout(); + binding.pumpHistoryType.setOnItemSelectedListener(object : AdapterView.OnItemSelectedListener { + override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) { + if (manualChange) return + val selected = binding.pumpHistoryType.getSelectedItem() as TypeList + showingType = selected + selectedGroup = selected.entryGroup + filterHistory(selectedGroup) + val selectedText = parent!!.getChildAt(0) as TextView + selectedText.textSize = 15.0f // FIXME hack for selected item, also concerns pump_type marginTop + + binding.pumpHistoryTop.requestLayout() + } + + override fun onNothingSelected(parent: AdapterView<*>?) { + if (manualChange) return + filterHistory(PumpHistoryEntryGroup.All) + } + }) + binding.pumpHistoryTypeText.requestLayout() + } + + private fun getTypeList(list: List?): List { + val typeList = ArrayList() + for (pumpHistoryEntryGroup in list!!) { + typeList.add(TypeList(pumpHistoryEntryGroup)) + } + return typeList + } + + fun fromDpToSize(dpSize: Int): Int { + val scale = context.resources.displayMetrics.density + val pixelsFl = ((dpSize * scale) + 0.5f) + return pixelsFl.toInt() + } + + class TypeList internal constructor(var entryGroup: PumpHistoryEntryGroup) { + + var name: String + override fun toString(): String { + return name + } + + init { + name = entryGroup.translated!! + } + } + + class RecyclerViewAdapter internal constructor( + var historyList: List + ) : RecyclerView.Adapter() { + + fun setHistoryListInternal(historyList: List) { + this.historyList = historyList + } + + override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): HistoryViewHolder { + val v = LayoutInflater.from(viewGroup.context).inflate( + R.layout.pump_history_item, // + viewGroup, false + ) + return HistoryViewHolder(v) + } + + override fun onBindViewHolder(holder: HistoryViewHolder, position: Int) { + val record = historyList[position] + holder.timeView.text = record.getEntryDateTime() + holder.typeView.text = record.getEntryType() + holder.valueView.text = record.getEntryValue() + } + + override fun getItemCount(): Int { + return historyList.size + } + + class HistoryViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { + + var timeView: TextView + var typeView: TextView + var valueView: TextView + + init { + timeView = itemView.findViewById(R.id.pump_history_time) + typeView = itemView.findViewById(R.id.pump_history_source) + valueView = itemView.findViewById(R.id.pump_history_description) + } + } + + } + + companion object { + var showingType: TypeList? = null + var selectedGroup = PumpHistoryEntryGroup.All + } +} \ No newline at end of file diff --git a/pump-common/src/main/res/layout/pump_ble_config_activity.xml b/pump-common/src/main/res/layout/pump_ble_config_activity.xml new file mode 100755 index 0000000000..b72fbd7e3f --- /dev/null +++ b/pump-common/src/main/res/layout/pump_ble_config_activity.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + +