LoopKit / Loop

An automated insulin delivery app for iOS, built on LoopKit
https://loopdocs.org
Other
1.46k stars 1.28k forks source link

Enhanced Activity Mode Idea #593

Closed rsilvers129 closed 4 years ago

rsilvers129 commented 6 years ago

Yesterday I mountain biked for 4:20:00 in 92 degree weather, I once did a Marathon, and I have done 100+ mile road bike rides-so I get to use activity modes a lot. With a plain pump, I can do great simply by turning basal to 15-20% my normal rate. If I don't do this, I must eat about 30 grams of carb an hour, and that also works, but sometimes I just don't feel like eating/drinking or carrying so much food.

With OpenAPS and Loop, I set an activity-mode target to about 140. Problem is, those modes have never really worked for me unless I eat / drink non-stop. Yesterday for my 4:20 of riding, I had to eat 14 cookies to keep from going low during the ride. That amounts to one Oreo cookie every 20 minutes, or about 30 grams of carb per hour - the same as if I had a pump and did nothing to the settings. So while the activity mode gave me some extra margin of safety, it never really addressed the root problem.

My idea is for Loop to have a new configuration setting where you tell it what percentage of normal basal you want for when activity mode is active. It should accept a value from 0-100%, and I will set mine to 20%. It then reduces basal to this whenever activity mode is on.

diggabyte commented 5 years ago

@shainey I agree that activity data would be very valuable within Nightscout. It appears as though there has been some work done to allow sending activity data via xdrip. See: https://github.com/nightscout/cgm-remote-monitor/issues/3337

If/when that support is added to NS officially, it might be a lot easier for us to send HealthKit activity data directly from Loop. Might be worth opening a feature request under LoopKit specific to this to disambiguate from the discussion in this current thread. I think it's great idea.

shainey commented 5 years ago

Thanks for the feedback on this @diggabyte! I'll put some additional thought into it and then enter the Loop feature request. Thanks for you & the team's support on Loop! It's a life changer for many individuals across the globe including me!

All the best, Steve

alexk7 commented 5 years ago

Exercise is complicated.

One thing I think has not been discussed is the variation of insulin duration of action with mild exercise. My experience is that going for a walk after a bolus and a meal will lower my BG very fast, but does not change the total amount of insulin I need. Loop reacts to this by doing a temp basal of 0 for a long time which results in my BG rising afterwards. I often enter "fake carbs" for the amount that fits with the glucose change below the 0 line in the "carbohydrates" screen once I'm back to sitting at my desk. Maybe we should have variable absorption time for insulin, the same way we have for carbs. The suggestion to use exercise data (for example, from the Apple Watch) would make a lot of sense with this.

Another thing we need is a way to manually enter glucose changes that we already know will happen, like before doing anaerobic intense exercise. This is another thing I'm trying to do with fake carbs, but the math is cumbersome.

Finally, prolonged effect on insulin sensitivity could be incorporated. I believe that at some point, prolonged effect of exercise and fat/protein could completely replace any "trend-based" approximations (glucose momentum and retrospective correction) in Loop. I already run Loop with retrospective correction turned off because it does not work well with my exercise patterns.

PieterGit commented 4 years ago

Is there still activity in this issue? If not, I think it should be closed because there is no support to implement it in Loop.

diggabyte commented 4 years ago

While there's been a lot of thought put into this, the consensus seems to be that it will not move forward. I agree it should be closed.

rustymonkey commented 4 years ago

Unless I'm misunderstanding, it seems that much of what was originally proposed has been implemented in the Override functionality available via Katie's Jojo branch though there's no automatic activation of the override triggered by activity data.

ps2 commented 4 years ago

Overrides are the current step towards seeing how an activity mode might play about. There are still additional possibilities in a potential exercise mode, like increased insulin absorption speed, and delayed carb absorption, and using activity data in health. But for now, going to close this out, as most of the discussion is pre-overrides, and is lacking relevant context. Also, we don't need "idea" tickets for this, as there are many obvious possibilities. Future work in this direction should be actual work towards making something happen and realizing some of those possibilities.