nightscout / AndroidAPS

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

Adding target for SMB disabling #2110

Open yhonatanb20 opened 2 years ago

yhonatanb20 commented 2 years ago

Hello. It would be wonderful if the target for "enable SMB with high temp targets" were customizable. Expaining: if I set a TT of 120, I want to tell aaps: "don't be too strong, I want my BG a little higher now", while if I set a TT to 180, I want tell aaps: "I'm doing sport now, so even if my BG is 170, back off, It'll go down without your help in a couple of minutes". Hence I'd love it if I could set a "disable SMB when TT is highet than ___ (ex. 140)" setting. Thanks a lot to all developers, you made my life uncomperably better.

ga-zelle commented 2 years ago

Similar to your idea I developed a system where any even TempTarget enables SMB and any off TempTarget disables SMB. So overnight I can use TT=91 and be safe from any SMB or during sport which needs full mental awareness I can use TT=120 allowing SMB if needed. Of course all that has to be enabled first by a dedicated switch. Otherwise or without any TT the normal AAPS rules apply.

It is only useful when using mg/dl because the forward/backward conversion is a bit funny. Would that meet your wishes?

yhonatanb20 commented 2 years ago

Not completely. What I was looking for was a more simple solution - simply adding an option to customize the threshold from which a TT will be considered "high", and therefore SMB will be disabled. Currently, any target above 100 mg/dl is considered "high" for the "enable SMB with high TT" setting.

ga-zelle commented 2 years ago

But isn't setting TT=141 easy for disabling SMB and setting TT=142 for enabling SMB?

yhonatanb20 commented 2 years ago

It is not quite the purpose... I'd like for ex. that any TT above 140 would disable SMB

szantos commented 1 year ago

Good idea, but new automation actions would be much more versatile: enable/disable SMB

yhonatanb20 commented 1 year ago

Hello everybody. Have any attempts been done on this topic recently? I'll repeat the rationale: if I have a hypo and eat a small meal, I will like AAPS to give SMB to cover it, but not too aggressively (to prevent further hypos), so I'll set an i.e. 120TT with "enable smb with high TT" enabled. In contrast, when I eat a small snack in order to boost bg before workout, I don't want AAPS to give SMB at all (since the workout is just coming and will do the job by itself), therfore here I'd like to set an i.e. 150TT with "enable smb with high TT" disabled (which kind of contradicts the first scenario as it requires changing the SMB settings before every workout). So currently I just set a high TT brfore workout and revert the loop to LGS mode on workout start and it works fine, but I'd very much like to have a "max TT above which SMB will be disabled" option in preferences under the "enable smb with high TT" (thus being able to customise the currently fixed rule that says "high TT => 100").