General Safety Warning
As with all settings adjustments and customizations, please do not enable these patches until you have time set aside to focus on how they impact your glucose management. Do not enable them on your way to work or school or on the plane as you’re setting off for vacation.
These patches are experimental and not FDA approved for therapy. You take full responsibility for building and running this system and do so at your own risk.
Why would I use the CustomTypeOne LoopPatches?
Loop assumes that your settings are perfect; these patches give you a little more flexibility for those days when your settings aren’t perfect.
Why are some items being removed from CustomTypeOne LoopPatches (CTO LP) in dev branch?
- Some features are being handled in the dev branch through additions to the dev code
- Some features should be handled better and those who maintain the patches decided to remove them
- The CTO LP have been incorporated into the CustomizationSelect script – this script automatically figures out which version works with the Loop code you are building – it works for both Mac-Xcode and Browser Build
How do I get the CustomTypeOne LoopPatches?
You can add the LoopPatches to your code as described on the CustomizationSelect script page.
The LoopPatches are included with a few other CGM clients are added to a special fork for Loop 3. This is discussed on the Loop with LnL Patches page.
What if I want to install LoopPatches myself – or add to Loop dev?
The CustomTypeOne LoopPatches are now part of the Customization Select script. Very easy to add. The script provides the correct version automatically whether you are modifying Loop main (released code) or Loop dev (development code).
I’ve installed the Patches, but they’re not in my Loop app. What did I do wrong?
All patch settings are found in the iOS settings screen (not inside Loop). Scroll down in the iOS Settings to Loop and you will see the settings there.
How do I record values in mmol/L?
When using mmol/L, use a period, otherwise known as a full stop, instead of a comma and then check that the correct threshold is selected.
If you use a comma in your value, such as 13,9 mmol/L, you won’t get an error but it will be interpreted as 13 mmol/L. Use 13.9 instead. Only the number needs to be on the threshold row. The units match the units for your glucose sensor.
This is a nifty display feature that adds a simple vertical line on each of the 4 main charts on the main Loop screen. You’ll be amazed that you ever managed to Loop without it.
First, an advertisement and a warning:
When the next version of Loop is released, this will be part of the code (it is already in the development branch). The “Switcher Patch” is not compatible with this new code and will not be available in the next Loop release. When you run the Customization Select script and choose both Algorithm Experiments and CustomTypeOne LoopPatches, the version of the LoopPatches provided no longer includes Automatic Strategy Switching.
Be prepared to have other LoopPatches features removed as more updates are added to the development branch – this is a good thing. Eventually these patches will be removed entirely.
There are advantages to the Glucose Based Partial Application over Automatic Strategy Switching:
- Smoother transition in speed of applied corrections over glucose range
- The application factor is modified based on your current correction range, including Overrides
- The controls for Glucose Based Application Factor are on the Loop, Settings screen and have appropriate guardrails
Back to the topic of this section: Automatic Strategy Switch:
This allows Loop to auto-switch between the two Dosing Strategies – Temp Basal Only and Automatic Bolus (AB). This will force Loop to use Temp Basal any time glucose drops below the Switching BG Threshold. You can still use Temp Basal Only by selecting that for the dosing strategy in Loop settings. This will only be enacted if enabled AND Automatic Bolus is set as your Dosing Strategy within the Loop app’s Settings. It does not alter what is displayed for Loop’s Dosing Strategy selection. Some people tweak their settings by decreasing ISF to make automatic dosing more aggressive for higher glucose, but then Loop can be too aggressive for lower glucose.
The 2 primary issues this solves are:
- Better prevention of rebound lows
- Depending on your settings, you may find AB overly aggressive with a quick rise from a low glucose treatment. You may correct with just enough carbs to make glucose steady at 110mg/dL (6.1 mmol/L), but Loop sees the fast rise and predicts a higher value initially, and decides to dose insulin that is not really needed. The patch “slows” down how much insulin is delivered in response to a rapid change in glucose.
- More stable glucose overnight
- Without carbs on board, AB can cause more ups and downs overnight – once again, this is setting dependent. If this happens just before waking, you can also find issues with breakfast. If Loop has delivered an aggressive Automatic Bolus and then needed to cut basal off for a while, you will hit breakfast with the tail end of insulin activity rather than a steady state. That can result in a much harder rise when you start eating. Overnight, Temp Basal is a gentler way to keep a gentle curve within range and keep basal consistent.
+ If you are using Temp Basal only prior to applying this patch, try a switching threshold of 130 mg/dL (7.2 mmol/L) and observe how it works for you. You will be moving from a more conservative dosing strategy to a more aggressive one, so it’s good to start conservatively.
+ If your strategy prior to applying this patch is Automatic Bolus, try a switching threshold at a lower blood glucose level, such as 90 mg/dL (5.0 mmol/L; the level you choose should depend on what your current settings are). In this case, you will be moving from a more aggressive dosing strategy to a more conservative one.
The Negative IOB Patch was removed from the dev version of CTO LP on 4-Aug-2023. It is still there for those using the released code (main branch) until the next release.
- While this did work for those who chose to use it, it actually hides information that can help set basal rates
- No promises, but those testing dev are looking for better methods to handle rebound lows (which is one thing this patch helps with)
To be clear, Negative IOB isn’t actually real. It is not possible to have less than 0 U of insulin on board. Instead, negative IOB is a construct Loop uses to keep track of basal withheld.
For a user with a 1.0 U/hr basal rate, after getting that rate steadily for 6 hours, they have approximately 2.1 U of insulin active in their bodies just from basal. This is obviously assuming no temp basals or suspended pump and not counting boluses.
But Loop treats this steady state as 0 U IOB. Confused yet? This is why you can use negative IOB to determine if your basal is too aggressive. If Loop reports negative IOB, it means you have less than your scheduled basal in your system. This can mean your basal rate is set too high. This is helpful information when adjusting your settings.
For the day-to-day dealing with sports, extra exercise, sickness, cycle, etc., the way that Loop deals with negative IOB can sometimes cause issues. Loop assumes that your settings are correct and that you live in a perfect little bubble where every day is exactly like every other day. Of course, diabetes does not behave the same way even if every day was identical.
Here’s an example we’ve all seen… For some random reason, you are running lower than normal and Loop starts withholding insulin but it doesn’t stop the drop and you just keep slowly going lower and lower. Over the hours you have one juice box, 2 juice boxes, candy… nothing brings it up and IOB just keeps getting more and more negative. When the mystery cause of the low finally breaks and glucose starts to slowly climb, Loop sees negative 1.5 U of insulin and decides you need all that back or you’ll be 400 mg/dL (22.2 mmol) in 30 minutes.
The Negative IOB Factor setting adjusts the calculation by the percentage you select here whenever Loop accumulates negative IOB.
WARNING: With this setting, the accounting for insulin is actually modified. If you want to use negative IOB to check basal rates, be sure to select 100%. If you choose a really low percentage, the actual times when basal has been suspended, a negative IOB will not accumulate. This will affect the way Loop behaves.
For more information, look at this Loop Issue (Feature request) potential enhancement – negative iob multiplier.
Recommendation: Start with 100% (the Loop default) and adjust slowly. See how each adjustment works for you.
By default, Automatic Bolus uses a fixed 40% application factor for safety. What this means is that if Loop calculates that it needs to deliver a 1U correction bolus (Recommended Insulin), it will only bolus 40% and give an initial dose of 0.4U.
This setting adds the ability to adjust the partial bolus application factor without rebuilding and customizing each time that you decide to make a small adjustment.
Before using this feature, please consider:
- Your current settings are based upon the default 40% which effectively makes it your 100% baseline.
- An increase from 40% to 80% would appear to be just a minor 40% increase. But the math of the 1U calculation above means it will give a 0.8U dose. This is actually a 200% increase.
Both of these combine to make it such that simply increasing this value without other settings changes will usually result in Loop dosing more on a rise but then just cutting basal sooner and for longer on a drop. This can often lead to worse glucose results unless other settings are also changed and can lead to dangerous results if you increase this too drastically.
Recommendation: Increase gradually from 40% and observe how it works for you. No more than 60%.
When you have the Algorithm Experiments Customization added to main or are running dev branch with this feature – it is only active for the following cases:
- Dosing Strategy must be Automatic Bolus
- Algorithm Experiments setting for Glucose Based Partial Application must be set to Off
The dev code and the Algorithm Experiment customization for the main (released) code, provides an alternative method to help with stuck-on-high scenarios. Constider trying those methods. This patch is likely the next item to be removed from CTO LP.
The Basal Lock feature can be used to prevent Loop from reducing or suspending basal delivery when over the glucose value that is set for the threshold. Loop will still be allowed to increase temp basal or deliver automatic boluses based on your selected dosing strategy but will maintain the scheduled basal rate as a minimum. Be cautious and do not use a threshold that is too low as this is only intended to help combat stuck-on-high scenarios. When set properly, it may provide a safer alternative to fake carbs, overrides, super boluses, or Open Loop with a dose.
Recommendation: Try 250 mg/dL (13.9 mmol/L) as a starting point and see how it works for you. No lower than 200 (11.1 mmol/L) due to safety concerns. [Note: You just need to enter the number that you’d like to use. No need to enter mg/dL or mmol/L.]
Don’t be like the Loop “expert” who normally takes a little insulin bump if she notices a spike after a meal and decided to set the Basal Lock Threshold at the level where she typically adds the bump going up. Worked great while glucose was rising, but the low that happened after glucose started falling was not fun! Loop assumed it would be able to lower basal much sooner than it could with the patch set at a lower threshold. Take the “Don’t set this below 200 mg/dL (11.1 mmol/L)” admonition seriously. This feature is meant for stuck-on-high scenarios.