diff --git a/faqs/glossary/index.html b/faqs/glossary/index.html index 117e409532e..e61f92bf7a4 100644 --- a/faqs/glossary/index.html +++ b/faqs/glossary/index.html @@ -3359,6 +3359,7 @@
dynos (dynos): used to reboot a Nightscout Site
EmaLink (EmaLink): radio-frequency device Loop uses to control Eros pods (aka. Gen 3) and older Medtronic pumps
+EGP (EGP): Endogenous Glucose Production: glucose produced by the body from its reserves (mainly glycogen in the liver)
Event History (Event History): record of pump events (bolus or temp basal) reported and used by Loop
Expiration Date (Expiration Date): your Loop app has a finite life, the app warns you starting 3 weeks before the expiration date
fastlane (fastlane): used as part of the github Build Action method that enables building Loop without a Mac computer or Xcode
diff --git a/operation/algorithm/prediction/index.html b/operation/algorithm/prediction/index.html index 64ef118ccc0..e2b2583cc33 100644 --- a/operation/algorithm/prediction/index.html +++ b/operation/algorithm/prediction/index.html @@ -3733,7 +3733,7 @@In traditional basal/bolus pump therapy, basal rates are set to accommodate the user's endogenous glucose production (EGP) that causes blood glucose to rise. If a user's basal settings were exactly right in traditional pump therapy, the user would have perfectly flat blood glucose all day, all other factors being equal.
+In traditional basal/bolus pump therapy, basal rates are set to accommodate the user's endogenous glucose production (EGP) that causes blood glucose to rise. If a user's basal settings were exactly right in traditional pump therapy, the user would have perfectly flat blood glucose all day, all other factors being equal.
In reality, people with type 1 diabetes, and their caregivers, know that basal settings are never exactly right. Every day is a little different, and a myriad of factors that affect blood glucose (e.g., including stress, hormones, sleep, etc.) may affect insulin needs. Some people have different basal profiles to accommodate these variations. Some people regularly tune and adjust their basal rates, and/or do so at their endocrinology clinic visits.
Since the Loop algorithm assumes that the user-set basal rates are correct, it calculates the effect of insulin relative to scheduled basal rates. If basal rates are not entirely correct, Loop can compensate a bit through the retrospective correction and blood glucose momentum effects, discussed later in this page.
The insulin delivery chart below displays a bar-graph history of the temporary basal rates enacted by Loop. The display is relative to the scheduled basal rates entered in the Loop settings. A rate displayed in this chart as +0 would indicate that no temporary basal rate was set and that the basal rate being delivered was the scheduled basal rate. Positive values indicate a temporary basal rate was set above the scheduled basal rate (i.e., more insulin delivered), and negative values indicate that a temporary basal rate was set below the scheduled basal rate (i.e., less insulin delivered).
@@ -3748,7 +3748,7 @@The insulin effect can be expressed mathematically:
where BG is the expected change in blood glucose with the units (mg/dL/5min), ISF is the insulin sensitivity factor (mg/dL/U) at time t, and IA is the insulin activity (U/5min) at time t. Insulin activity can also be thought of as a velocity or rate of change in blood glucose due to insulin. The insulin activity accounts for the EGP and any active insulin from basals and boluses.
+where BG is the expected change in blood glucose with the units (mg/dL/5min), ISF is the insulin sensitivity factor (mg/dL/U) at time t, and IA is the insulin activity (U/5min) at time t. Insulin activity can also be thought of as a velocity or rate of change in blood glucose due to insulin. The insulin activity accounts for the EGP and any active insulin from basals and boluses.
Carbohydrates will raise blood glucose, but the speed and degree to which they impact blood glucose are dependent on the type of carbohydrates. High glycemic index (GI) carbohydrates will raise blood glucose quickly over a shorter time, whereas low GI foods will raise blood glucose more slowly over a longer period. Foods like candy, juice, and fruits tend to be high GI foods, while pizza, burritos, and quesadillas are usually lower GI foods. Digestion issues like gastroparesis may also contribute to variations in carbohydrate absorption.
Because carbohydrate absorption can be quite variable, Loop has a model that dynamically adjusts the expected remaining time of carbohydrate absorption. To start with, Loop allows the user to input a rough guess of how long they think the food or drink will take to absorb. The user’s guess is used as a middle of the road estimate, and Loop’s algorithm will shorten or lengthen it based on observed blood glucose change.
diff --git a/search/search_index.json b/search/search_index.json index aa4fd2e332f..75885bb12bc 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":"Welcome to the LoopDocs website where you can learn about the Loop app.
"},{"location":"#what-is-the-loop-app","title":"What is the Loop App?","text":"The Loop app is an automated insulin delivery application that you build and operate on an iPhone.
Closed Loop
: Predict, recommend and control insulin dosingOpen Loop
: Explore interface, test settings, learn to enter meals and doseLoop\u00a0Video
This site shows you step-by-step how to build, set up and operate the Loop app.
In order to become proficient with the app, you should learn the information on this site. Consider doing this over a period of time and reviewing the materials more than once.
There is a common saying in our community:
Do It Yourself (DIY) does not mean Do It Alone!
Once you are using the app, you should regularly follow one or more support forums for important updates on the Loop app. Spending this time is important for success in building and operating the Loop app safely.
This website is updated regularly to keep pace with development of the Loop app and Apple releases.
"},{"location":"#important-disclaimer","title":"Important Disclaimer","text":"Please consult with your health care professional regarding your diabetes management.
The Loop app has been, and continues to be, developed and supported by volunteers. From the code to this website, you are able to use this app because many volunteers continue to give their personal and family time.
Please add your time by reading this website before embarking on your Loop journey.
"},{"location":"translate/","title":"Translation","text":""},{"location":"translate/#language-list","title":"Language List","text":"\u0639\u0631\u0628\u064a
\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438
\u010ce\u0161tina
Deutsch
Dansk
\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac
Espa\u00f1ol
\u65e5\u672c
Suomi
Fran\u00e7ais
\u05e2\u05d1\u05e8\u05d9\u05ea
Hrvatski
\u0939\u093f\u0902\u0926\u0940
Italiano
\ud55c\uad6d\uc5b4
Norsk
Nederlands
Polski
Portugu\u00eas
Rom\u00e2n\u0103
\u0420\u0443\u0441\u0441\u043a\u0438\u0439
Sloven\u010dina
Svenska
Turkish
\u4e2d\u6587\uff08\u7b80\u4f53)
\u4e2d\u6587\uff08\u7e41\u9ad4)
"},{"location":"translate/#google-translate-links","title":"Google Translate Links","text":"Click on a language on the list of links above to turn on Google's automatic translation.
"},{"location":"translate/#change-language","title":"Change Language","text":"To modify the language choice for the whole site, copy the line below, and paste it into the URL, and then choose the desired language from the list above.
Copy and Paste in Browser URL to return to original versionhttps://loopkit.github.io/loopdocs/translate\n
OR
Use the Google Translation three-dot menu and select Go to Original URL
while on the Translation page.
Every website page gets automatically translated to the selected language as do links to other websites
The Google Translate Tool will appear at the top of each page
Automatic Translation
These links connect this site to the Google Translation service.
Once Google Translate has been turned on, clicking on a language link above shows a \"Google Translate: Can't translate this page error\".
The graphic below shows the Google Translate Tool when maximized (default) for a browser and mobile display. The tool can be minimized by tapping on the up/down carets at the right of the tool. This is very useful if the tool obstructs part of the original screen. Additional options can be selected with the three-dot menu as shown in the graphic.
"},{"location":"build/apple-developer/","title":"Apple Developer Program","text":""},{"location":"build/apple-developer/#enroll-in-apple-developer-program","title":"Enroll in Apple Developer Program","text":"Time Estimate
Summary
There are two options: Paid ($99/year) or Free (re-build weekly, Xcode only)
FAQs
The Apple ID is DIFFERENT than the Apple Developer ID.
Apple ID
Parents should set up a different Apple ID for each of their looper children and looper children should not use the parent Apple ID. Use Apple's Instructions for Create an Apple ID for your child.
The Apple Health record is a convenient record of blood glucose, insulin and carbohydrates and should be associated with only one individual.
Sharing an Apple ID among two or more loopers can cause safety issues. You don't want Sally to be dosed for Joe's lunch in addition to her own and vice versa.
To build the Loop app on a phone, you must use an Apple developer account associated with an adult (minimum age of 18). This Apple developer account is tied to the email address associated with your Apple ID. You can build apps on phones for everyone in your family with a single Apple Developer Account tied to the Apple ID of an adult.
You have two options for an individual account: free or paid.
"},{"location":"build/apple-developer/#free-developer-account","title":"Free Developer Account","text":"If you decide to use a FREE developer account, here's what you need to know:
If you decide to use a PAID developer account, here's what you need to know:
You can try a free account first before buying a paid developer account. If you start with a free account, you'll build a Loop app (let's call it FreeLoop). When you switch to a paid account, you'll be building a totally new and separate Loop app onto your phone (let's call it PaidLoop).
The two apps will look identical on your phone and they will both have the name Loop with the same icon, but they will be functionally separate from each other. Make sure you are successful building the PaidLoop app before deleting the FreeLoop app from your phone. Use the search feature on your phone to find both apps. One will have your configuration settings (FreeLoop), the other will not (PaidLoop).
Before deleting the FreeLoop, either record all the settings or take screenshots of all the relevant settings screens.
PaidLoop will know nothing about the settings and information you had stored in FreeLoop, so you will need to re-enter all your settings (basal rates, ISF, carb ratios, etc.) and configurations into the new PaidLoop. It will also not connect or control any pods you are currently using with the old FreeLoop app. The one exception is Nightscout credentials, which are stored in your keychain. If you entered your Nightscout credentials into FreeLoop, they will persist across app removal and be used by PaidLoop.
With Loop 3, if you use Nightscout, you can import settings that were uploaded to Nightscout by FreeLoop into PaidLoop, so that simplifies the transition.
Once PaidLoop is working, delete the FreeLoop instance from your phone to avoid confusion. If you followed the directions when building, you may have configured your phone to prevent deletion of Loop. Head over to Protect that App, reverse the steps, delete FreeLoop, then do the steps again to protect PaidLoop.
"},{"location":"build/apple-developer/#enrolling","title":"Enrolling","text":"To enroll in an individual paid Paid account, go to the Apple's Developer Program website Apple Developer website.
Be sure to use the credit card already associated with the email you are using for the developer account. If you switch credit cards, it can cause delays.
If you choose to use the free account, you don't have to do anything on that website. You'll just wait for the instructions on the Xcode Settings page and get your free account then.
"},{"location":"build/apple-developer/#next-steps","title":"Next Steps:","text":"Take the time to read the next three articles. You will be reminded again when you begin to set up your app.
Time Estimate
Summary
You will:
FAQs
The Loop and Learn team prepared this YouTube video showing how to build Loop 2.2.x including the steps required to update if you previously built. The steps are different now. The video may be worth watching, but once you've reviewed it, work through the new build process described on this page.
If you do watch this video, please note that you no longer are required to delete provisioning profiles as a separate step and the overall building process is streamlined.
"},{"location":"build/build-app/#build-with-browser","title":"Build with Browser","text":"If you previously used Build with Browser to install Loop on this phone, you should Disable Automatic Install from TestFlight to be sure the version of the app on the phone is the one you build with Xcode.
"},{"location":"build/build-app/#developer-mode","title":"Developer Mode
","text":"If you are running iOS 15/watchOS 8, you do not have Developer Mode
and can skip ahead to Download Loop.
If you upgrade an iOS 15 phone to iOS 16 or 17, the Loop app will not open until you enable Developer Mode
on that phone.
You will see a message similar to the next graphic.
If you are running iOS 16 or 17 with watchOS 9 or newer, you must enable Developer Mode
to run or build Loop directly from Xcode. (This is true for any app created by Xcode directly on your device.) If you want to know more, click on this Apple Link about Developer Mode
.
If you have never built an app with Xcode on a particular phone, Developer Mode
will not show up in the iOS Settings, Privacy & Security menu until you connect that phone to Xcode.
Developer Mode
on the watch and then build to the phone again while watch is paired and on your wrist.To keep all the steps in one place, the instructions for configuring phone and watch are kept in this one section. If you have never built with Xcode to this phone, skip ahead to Download Loop for now and return at the appropriate part of the script instructions below. A clear message with a link will bring you back here.
When Xcode is open and you plug in your phone, you will not be able to select the phone until you have enabled Developer Mode
. The phone will show up, but be an \"Unavailable Device\" as shown in the graphic below.
Developer Mode
on iPhone","text":"Once your phone has been plugged in to the computer while Xcode is opened and you accepted have the Trust this Computer option, you will be able to enable Developer Mode
.
Developer Mode
rowDeveloper Mode
If you are in the middle of building on a new phone, return to Initial Xcode Screens to continue.
"},{"location":"build/build-app/#developer-mode-on-watch","title":"Developer Mode
on Watch","text":"Build, Enable, Build
Reports from users indicate that when you are building to a new Apple Watch - you must first build the app with Xcode before the developer mode will be available. So plan to build with Watch paired, and then enable Developer Mode
and build again.
This must be configured on the watch itself (not the watch app on the iPhone). To determine if Developer Mode
is enabled, look at the watch face icons and find the Settings icon. Tap on it and scroll to and tap the Privacy & Security icon. Then scroll to the bottom and tap on Developer Mode
. If you don't see the Developer Mode
row under Privacy & Security, see the Extra Watch Instructions.
Developer Mode
is enabled, the slider will be green and no further action is requiredDeveloper Mode
is not enabled, the slider will be blankTurn On
optionDeveloper Mode
","text":"With the latest watchOS, there are now options that show up after you enable Developer Mode
. Go on and configure those now. Select the Settings icon on the watch, but instead of tapping on Privacy & Security, scroll all the way to the bottom and there is now a Developer row at the very bottom of the watch Settings. If you don't see this row, reboot the watch again.
There have been a lot of reports of trouble getting Developer Mode
to show up on a new Apple watch and then having further trouble getting the Loop app to show up on the watch. Previously, just having the watch paired to the phone when you build once followed, by enabling Developer Mode
on the watch and building again, was enough. If you have problems, here are extra steps to try.
These steps have been reported on Facebook and have not been tested in a controlled environment. They may not all be necessary.
At this point, be sure to reboot the watch.
"},{"location":"build/build-app/#download-loop","title":"Download Loop","text":"This page has the detailed steps to run the Build Select Script to download the Loop code, prepare your computer and build Loop.
Every attempt was made to put messages directly in the script for each step. The next few sections of this page walk you through what you will see when you run the script.
"},{"location":"build/build-app/#open-terminal","title":"Open Terminal","text":"Go to the Finder app, click on Applications, then open the Utilities folder. Locate the Terminal app and double-click Terminal to open a terminal window. The terminal window is very plain looking when you open it. That is normal.
"},{"location":"build/build-app/#build-select-script","title":"Build Select Script","text":"With the release of Loop 3, the build process is different and simpler
These instructions show each step needed to download Loop using the Build Select Script.
Copy the line below that starts with /bin/bash
by hovering the mouse near the bottom right side of the text and clicking the copy icon (should say Copy to Clipboard
when you hover over it). When you click the icon, a message that says Copied to Clipboard
will appear on your screen.
/bin/bash -c \"$(curl -fsSL \\\n https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildSelectScript.sh)\"\n
Paste the line of text into Terminal. Be sure to click anywhere in the terminal before trying to paste. (Ways to paste: Cmd+V ; or Ctrl click and select from menu or Edit
-Paste
at top of Mac screen.)
You will be informed of the menu options as shown in the graphic below. You will choose Option 1
to Build Loop.
You will be informed that you are downloading open source software. Type 1
and return if you understand the warning and agree.
The next screen informs you of what you will be downloading. Type 1
and return to begin the download or 2
to return to the main menu.
This download can take from 3 minutes to 30 minutes depending on your download speed. You can leave the room and return later to check on progress. When you read the words in the terminal, as the script runs, you may see terminology you do not understand - don't worry - you do not need to understand enumeration or submodule or cloning. You only need to review the display to look for any error messages.
New Feature
The Build-Script automatically reports when the download is successful.
The next graphic shows terminal messages for the beginning of a successful download.
If the download was successful, your terminal will be similar to the following graphic. Continue with the Download was Successful section.
If you see a failure message, scroll up in the terminal to find the error message(s) and go to Xcode Errors with Build-Select.
"},{"location":"build/build-app/#download-was-successful","title":"Download was Successful","text":"If there are no errors, hit return to continue. The next step involves signing the targets.
"},{"location":"build/build-app/#sign-targets","title":"Sign Targets","text":"What does Sign Targets Mean?
\"Sign Targets\" in Xcode identifies who built the app. You cannot deploy an app to a phone if you do not sign each target associated with that app.
Experienced Builders
This replaces several of the steps that used to be required to build Loop.
If you have never built an Xcode app using your developer ID on this computer, then the first time you use the script, you will be asked how you want to sign the targets.
I did not get this question
The script searches for your developer ID for you and skips this question if it finds it.
Skip ahead to Review LoopConfigOverride.xcconfig.
The next question, as shown in graphic below, is whether you will (1) Sign Automatically or (2) Sign Manually.
Continue with this page only if you have a paid developer account.
The following graphics show the terminal display after selecting option 1 to use Apple Developer ID.
After hitting return, the user can verify the entry.
"},{"location":"build/build-app/#review-loopconfigoverridexcconfig","title":"Review LoopConfigOverride.xcconfig","text":"Once the permanent signing file is configured, the review step is the same each time.
If there is a problem with the ID that is stored on your computer, you can modify it before continuing. The instructions, shown in the terminal message if you select option 2, Editing Instructions, are repeated here:
To edit the LoopConfigOverride.xcconfig file with a different developer ID:
You can now return to the terminal and hit return for the next step.
"},{"location":"build/build-app/#ensure-a-year","title":"Ensure a Year","text":"The next question asks if you want to ensure a year with your new app. Unless you have a good reason, you should enter 1 and continue.
"},{"location":"build/build-app/#build-loop","title":"Build Loop","text":"Build to Simulator
If you are an experienced builder and plan to build to a simulator on your Mac before building to your phone, you do not need to plug in your phone yet. You will need to select a simulator manually once Xcode opens.
For first time builders - go on and build to your phone.
"},{"location":"build/build-app/#plug-in-your-phone","title":"Plug in Your Phone","text":"Refer to the graphic below. The messages in the terminal instruct you to:
The next action of the script is to
If this is a new phone that has never had an app built from Xcode, return to Prepare your Phone and Watch. After you get developer mode turned on for the phone continue with the build instructions. If you also want to set up the watch, you'll need to build one time, follow directions in Developer Mode on Watch and then build again.
It is suggested that you wait until you've successfully built the app before closing the terminal.
"},{"location":"build/build-app/#initial-xcode-screens","title":"Initial Xcode Screens","text":"Refer to the graphic below. Your intial Xcode screen should be similar.
If there is a red x in the dashed-blue rectange region on your Xcode screen you need to click over to the Build Error page
"},{"location":"build/build-app/#first-time","title":"First Time","text":"The first time you build, there will be steps that will not be required for subsequent builds. These are clearly marked in the intructions with the word First-Time. Do not get confused when you are asked to enter your password multiple times, see Codesign / Keychain Access. Be sure to enter your Mac login password and select Always Allow
every time it is requested.
Refer to the GIF below:
Cancel Running
, just hit the build button again
If the app opened on your phone, the next two sections for first-time builders are not needed. Skip ahead to Successful Build.
If you got red error messages, skip ahead to Build Failed?
"},{"location":"build/build-app/#codesign-keychain-access","title":"Codesign / Keychain Access","text":"First Time Using Developer ID on Computer
During your first build with a given Developer ID on your computer, you will see a codesign/keychain access prompt, as shown in the graphic below. Enter the same password you use to log in to the mac, select \"Always Allow\" and then do it again each time you are asked.
It is normal for this prompt to come up repeatedly even after you enter the correct password (once for each target Loop needs to sign).
In frustration, people think the prompt must be broken because it keeps reappearing and press deny or cancel. Don't press deny. Keep entering your computer password and pressing the \"Always Allow\" button as many times as it takes. The build will then continue.
FYI: codesign is for code sign - nothing to do with design.
"},{"location":"build/build-app/#update-settings-for-developer","title":"Update Settings for Developer","text":"First Time Building on a New Device?
If this is the first time you have installed an app on your iPhone using a free account, you will see warnings in both Xcode and on your phone after a successful build and install on your phone.
Don't worry, dismiss the messages and do this extra step on the phone. These instructions are valid for iOS 15:
Sometimes, something goes wrong with the automatic signing. Just the fact that you clicked on a few places in Xcode can change a particular file required to enable automatic signing. It is possible to reset that file, but it is easier to sign manually.
Apple Developer
accountBundle Identifier
with your 10-digit Apple Developer Membership ID
embedded after com.
TEAMID
No red error messages? Skip ahead to Successful Build.
Red Errors
If you get a message that your build failed and see RED ERROR messages:
FAQ: But what about those yellow or purple warnings that remain in Xcode? Should I worry about them?
If you see yellow or purple warnings after your build is done...those are not an issue. Don't try to resolve them or fret about them. They mean nothing to the successful use of your Loop app.
NOTE: purple warnings are still warnings and can be ignored.
"},{"location":"build/build-app/#clear-the-error-message","title":"Clear the Error Message","text":"Once you've resolved a build error and start the build process again, Xcode will continue to show a red indicator on the top line from the previous failure. If you don't like seeing that, clean the build folder to clear the error. Otherwise, as long as the steps of the build are showing across the top line, Xcode is still working on the build. When the build succeeds, the red circle will disappear.
Clean Build Folder
After you see the Loop app open on your phone, you can unplug your phone and acknowledge the Xcode message: Lost connection to the debugger on . . .
. The square icon next to the play button goes away as soon as you unplug your phone from Xcode.
The Loop app on your phone closes (but does not quit) when you unplug the phone. Open the Loop app on your phone just to be sure.
Congratulations!
If you plan to build again on a backup phone, or want to try a customization, easiest for you to leave Xcode open. Otherwise, you can quit out of Xcode now.
But wait - there's more.
Protect Against Deletion
Prevent your Loop app from being deleted accidentally.
If you, or a child, deletes the app from the home screen, it is gone - you have to rebuild and reenter all settings and start a new pod or add back in your Medtronic pump.
The steps vary depending on iOS. With iOS 15 and 16, it is under Screen Time, Content & Privacy Restrictions, iTunes & App Store Purchases, Deleting Apps. Choose Don't Allow. If those steps don't help, do an internet search like this, where you use your current phone iOS version number:
Follow the instructions to prevent deletion of what is now a critical medical app.
"},{"location":"build/build-app/#important-safety-reminder","title":"IMPORTANT SAFETY REMINDER","text":"If this is your first build with Loop 3, head to the Set Up tab starting here: Loop 3 Overview.
Pro Tip: Read Along in LoopDocs as you Onboard
One of the goals for Loop 3 is to make the app robust even if you don't read the documentation, but a lot of questions may be resolved if you read along in LoopDocs as you onboard.
All those mentors who answer questions are volunteers.
Even if you don't read all the pages under the Set Up tab now, these links are important.
Add a Calendar Reminder
New Loop users: Customizations are not a required part of any Loop build. As you gain experience using your Loop app, you may want to customize some of the features. First time builders are encouraged to build with the standard, default code. You can always update your Loop app to add customizations at a later time, using the same download. Subsequent build time is much faster than the initial build for a given download.
Pro Tip
With a fresh download of code, it's always best to build to a simulator without customization to ensure the build works without errors. Then add the customizations and check the build again. Now you are ready to build to your phone to update your existing app.
To add custom configurations to your Loop or Loop Apple Watch apps, follow the step-by-step instructions on the Code Customizations page and then build the app again.
"},{"location":"build/build-app/#apple-watch","title":"Apple Watch","text":"Existing Apple Watch users: Please update your watchOS prior to building the Loop app. The minimum iOS for Loop 3 is iOS 15.1, which means watchOS 8.1. When running iOS 16.x, you will need a watchOS of 9.x.
New Apple Watch users: If you have an Apple watch and want to use it with Loop, first pair the watch with the iPhone before continuing to the next steps. If you get a new watch after building the Loop app, you'll need to redo your Loop build.
For more information, please see Operate: Apple Watch
"},{"location":"build/build-app/#build-again-with-this-download","title":"Build Again with this Download","text":"Follow the Find My Downloaded Loop Code instructions if you later wish to build with this same dowload. Plug in an unlocked phone and start at the Start Build section of this page. You may need to select the phone you just plugged in. Everything else should be ready for you the start the build process.
Don't use a really old download
Do not use a really old download.
Check the date of your download against the latest Current Release date and decide whether to get a fresh download instead.
"},{"location":"build/build-app/#xcode-errors-with-build-select","title":"Xcode Errors with Build-Select","text":"The errors shown below should be prevented - the script will attempt to correct them automatically - follow the directions in the script.
If this is not successful, the script told you the download failed and exited. Scroll up in the terminal to find the error message(s):
WARNINGS
If you see errors like these . . .
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcode-select: Failed to locate 'git', requesting installation of command line developer tools
xcode-select: error: tool 'xed' requires Xcode
You missed one of these steps:
This page is only relevant when building the dev
branch with a Mac.
For Browser Build, please see: Build Loop dev with Browser
No matter the method used to build Loop-dev, you are testing development code. Please read this link now before continuing.
dev branch
BuildLoopDev
Script","text":"There is a script to assist in building the dev branch
. It gives you the option to choose the tip of the dev branch
or to build a lightly tested commit. If you have not used the Build Select Script to build Loop previously, you may want to review that page. The command below can be pasted into the terminal of your Mac. Read the directions in the script.
Copy and Paste to start the BuildLoopDev script
/bin/bash -c \"$(curl -fsSL \\\n https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildLoopDev.sh)\"\n
Both the dev branch
and the lightly tested branch of dev
have Libre support."},{"location":"build/build-dev-mac/#buildloopdev-other-branches","title":"BuildLoopDev Other Branches","text":"You can use the BuildLoopDev script to build a specific development branch, other than dev
. See the example below that would build other-branch
, if such a branch existed. This is just an example. You need to substitute the branch you desire for other-branch
. There must be a space after the final quote, followed by a hyphen, another space and then the branch name.
other-branch
with the BuildLoopDev script/bin/bash -c \"$(curl -fsSL \\\n https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildLoopDev.sh)\" - other-branch\n
"},{"location":"build/build-dev-mac/#update-loop-dev","title":"Update Loop-dev","text":"While Loop-dev is under active development, you should monitor zulipchat and update frequently.
Checking for updates every week is a good idea. Also - subscribe to all the streams on Loop Zulipchat to make sure you don't miss critical information.
You may choose to download fresh each time you update.
You may prefer to use commands to fetch and pull the latest code without making a new clone.
The version of code that shows up under the Loop Settings screen does not change when the dev branch
is modified.
If you need help with your app, the mentors need more information. Please issue a Loop Report when asking for help. Refer to Support for how to issue a Loop Report. If you want to keep track yourself, refer to Identify Loop-dev Version
Loop
Version NumberingThe version of code that shows up under the Loop Settings screen will remain fixed until Loop-dev is released. In order to identify which version of dev you have on your phone, you need the commit.
The commit is identified by a 7-digit alphanumeric code. That code was also appended to the folder name of the downloaded code under Downloads/BuildLoop as shown in the graphic above. You can use finder to view the folder name after the script completes. It also appears in the Loop Report, refer to Support for instructions on issuing a Loop Report. After you issue the Loop Report, look at the workspaceGitRevision number near the beginning of the report.
"},{"location":"build/build-errors/","title":"Oh dear! Build errors?","text":""},{"location":"build/build-errors/#build-errors","title":"Build Errors","text":"Important
These are only relevant when building with a Mac and Xcode. For Building with Browser Build errors, please see: Errors with Browser
There are two types of build indications that may be seen: they are warnings (yellow or purple icons) and red errors. You'll see the warnings and errors in the left-hand column of the Xcode window.
Yellow and Purple warnings do not cause the build to fail, those are just warnings. You will often see yellow and purple icons. Ignore those. Do not try to do anything to fix those.
Red errors will have to be resolved before you can successfully build the app. The steps below explain how to resolve them based on the messages you are seeing.
"},{"location":"build/build-errors/#xcode-not-responding","title":"Xcode Not Responding","text":"Sometimes, Xcode stops responding. You have to fix this before any of the other steps on this page will help. The signature is that Xcode shows a colorful spinning icon and does not respond to anything you do.
This can happen sometimes. You just need to force quit Xcode. Sometimes rebooting the Mac may be required, but start with force quit. Then just open up Xcode again and keep going.
Force Quit
menu appears (should be fast)Xcode
and tap on the Force Quit
buttonNew Loop Builders
This page contains build error help for people updating their Loop app as well as brand new Loop app builders. Review the \"obvious\" errors causes first. If that doesn't help, then, skim the page until you reach Find Your Error Message or search the page (Cmd+F) or search LoopDocs for your error. Once you've identified your error message, try to resolve it. Still stuck? Read Posting for Help
Before you start trying to resolve your red errors, start with the most obvious things that can cause a red error message:
For older builds, before 3.2.0, you had to select Loop(WorkSpace) The first time you build after downloading new code, you had to manually select Loop (Workspace) instead of Loop in Xcode.
Did you check that you have the minumum Xcode version for your iOS? This is critical. If you are updating your Loop app, please review the iOS driven requirements for minimum version of macOS and Xcode.
Did you check your Apple developer account for new license agreement? Periodically, Apple will release a new developer license agreement that you need to sign before you can build new apps. You will get a build failure if there is a pending license agreement to sign. Login to your Apple developer account to check if there's a new license agreement.
Do you have a new computer, never used to build Loop? Did you Add Apple ID to Xcode?
Did you reboot, i.e., restart, your computer after updating Xcode? You should reboot following Xcode installation or update and you must make sure your command line tools match the version of Xcode you just installed. Xcode Command Line Tools
Did you get a fresh download of Loop code? If you tried to build with an old download that you used a long time ago, that old version may not be compatible with the new iOS and Xcode versions. Check also, that you are actually using the new download in Xcode. When you use the Build Select Script, it automatically opens Xcode using the new download.
If you want to build using a recent download, this section tells you how to Find My Downloaded Loop Code.
Are you are using a free developer account? Make sure you finished the removal of Siri and Push Notification capabilities described in the Free Account link.
DO NOT USE BETA VERSIONS If you are using an iOS beta version or an Xcode beta version, Loop might not build. Deleting iOS beta from a phone is a pain...so don't install it unless you know what you are doing.
If you have checked all those steps above and think you have a true build error, here's a tip that resolves 95% of all build errors when updating Loop code.
Product
menu item. Use the drop down selection for Clean Build Folder
or press Shift+Cmd+K. Either will work the same. Wait for the clean to finish before trying to build again.This is reported to fix a variety of watch building errors and cannot prepare phone for development
errors:
It may not be necessary, but the suggestion is to reboot phone, (watch) and Mac - in other words, you can try to build without rebooting, but if that fails, repeat the steps and reboot before trying again.
The next time you plug this phone into your computer, you will be asked to trust the computer on the phone (and watch). Note this is unpairing the device from Xcode and your computer, not the same as, and much faster than, unpairing your watch from your phone.
If the build fails again, look through the list below and see if you can match your error message with one of the error messages listed later in this page. If you really can't find your solution, then post for help. But help us help you.
If you build any older version of Loop with Xcode 15, you will see this error: Cycle inside Loop: building could produce unreliable results
.
Solution: Build Loop 3.2.3 or later
What about other forks
Other forks are not being maintained.
If you are using FreeAPS or Loop with Patches (from the loopnlearn GitHub username), it is time to switch to released code.
"},{"location":"build/build-errors/#new-with-xcode-14","title":"New with Xcode 14","text":"This may change, but for now, the watchOS simulator is not automatically included with the Xcode 14.x download and install. Some version of the watchOS simulator is required to build Loop, independent of whether you use a watch.
You will be asked if you want to download & install. Make sure watchOS
is selected.
If you are getting watch errors or having trouble with your watch, try this:
Tap on the Xcode name on the menu bar and select Settings.
Choose the Platform tab. If there is a missing watchOS simulator that you think might help, then download it using the GET
button. Use the minus icon (bottom left) to remove simulators that are no longer being used. (The watchOS 9.0 is required to build with Xcode 14.0.1. The watchOS 9.1 was downloaded with a release candidate for Xcode 14.1 - your screens may look different.)
STOP!! Read this section! Important!
Before you post in a Loop Social Media site asking for help with build errors, do your work first. The build errors listed below (and the checks listed above) will fix most of the problems you may encounter.
PLEASE READ THIS PAGE. The volunteers answering questions online would love to spend more time helping people use Loop and less time answering questions that can be addressed by using this page.
Therefore, try to resolve your build error yourself. Then, if you need to post for help, please include enough information with the post so the volunteers know where you are in your troubleshooting attempts.
Your Post Must Include:
Please take screenshots of your issue and use them in your posts. On an Apple computer, press Shift+Cmd+4 keys at the same time followed by pressing the space bar Space and then click on the window of interest. The screenshot will be saved to your desktop with a file name starting with the name \"Screen Shot\". Use screenshots instead of cell phone images or words whenever possible. Screenshots are higher resolution and easier to read.
Use the whole Xcode window screenshot when posting for build help.
"},{"location":"build/build-errors/#find-your-error-messages","title":"Find Your Error Message(s)","text":"To begin fixing the error, use the Report Navigator view to find your error message.
The key is to (1) READ THE ERROR MESSAGE and then (2) FIND YOUR MESSAGE IN ONE OF THE TOPICS BELOW.
Here's a super tip: Merely seeing the \"exit code\" in Xcode is not enough information to discern what error is causing your build to fail; some exit codes have multiple causes. Look at the detailed message to guide your search for the matching solution.
Notice the screenshots below have red circles highlighting certain error messages. Read your error message(s) from your screen, being guided by the red circles in the screenshots. Once you find your error message (hint: not \"exit code\"), you can either:
Take the error message from your Xcode screen and use LoopDoc's search function to enter in some of that phrase to bring up the appropriate solution topic, or
Take the error message from your Xcode screen and read through EACH OF THE TOPICS BELOW. Check each of the red circles to see if you have a match. Kind of like a matching puzzle.
For example, if you see \"Invalid active developer path (/Library/Developer/CommandLineTools)\" in your error message, use the search tool in LoopDocs with \"invalid active\". You will get a couple of links and one is the Command Line Tools fix for that error message. Click on the link and you'll find the solution.
"},{"location":"build/build-errors/#specific-error-messages","title":"Specific Error Messages","text":""},{"location":"build/build-errors/#unable-to-read-included-file-loopconfigoverridexcconfig","title":"Unable to read included fileLoopConfigOverride.xcconfig
","text":"Error Message: This error occurs inside Xcode with the build halting at the line that reads the LoopConfigOverride.xcconfig
file.
Solution:
Modify the permissions for Xcode in your macOS.
The graphic below has steps labeled 1 through 4 to guide you to the setting that must be enabled for you to build the app with Xcode.
Error Message: This error occurs during the Build target WatchApp
or Build target WatchApp Extension
.
Communication with Apple failed: Your team has no devices from which to generate a provisioning profile. Connect a device to use or manually add device IDs in Certificates, Identifiers & Profiles. https://developer.apple.com/account/
No profiles for 'com.XXX.loopkit. Loop. LoopWatch' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.XXX.loopkit.Loop.LoopWatch'.
Solution:
\u25b6\ufe0f
) againError Message:
The run destination for name's phone is not valid for running the scheme \"Loop (Workspace)\"
Solution:
First make sure your Xcode version is new enough to work with your phone iOS version and make sure developer mode is turned on for iOS 16 or newer. If so, then try this procedure:
Error Message:
Package.resolved file is corrupted or malformed; fix or delete the file to continue: unsupported schema version 2
This error is new with Loop 3, which uses Package Dependencies.
There are 2 problems shown here
Solution:
Update Xcode, which may require you to update macOS.
"},{"location":"build/build-errors/#couldnt-get-revision-for-package-dependency","title":"Couldn't Get Revision for Package Dependency","text":""},{"location":"build/build-errors/#many-search-143-for-this-error","title":"Many Search 1.4.3 for this Error","text":"This error is new with Loop 3, which uses Package Dependencies.
Error Message:
Text in error:
Solution:
Refer to the graphic below
Package Dependencies
row to display the dropdown menu (shown in the inset)This error has been seen with Loop 3. The permanent xcconfig file, created by the build script and used to sign targets, is written to a folder where the user does not have read permission.
Error Message:
Text in error:
path inserted here
Solution:
No need to quit Xcode. If your build script terminal is still open, use it. Otherwise, open a new terminal window.
Copy the lines below that start with ls -l
by hovering the mouse near the right side of the text and clicking the copy icon (should say Copy to Clipboard
when you hover over it). When you click the icon, a message that says Copied to Clipboard
will appear on your screen.
ls -l ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig\nchmod +r ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig\nls -l ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig\n
Paste the lines into the terminal. The response to the first line will be something like this:
--w------- 1 marion staff 490 Nov 8 04:58 /Users/marion/Downloads/BuildLoop/LoopConfigOverride.xcconfig\n
There will be no response after the second line - although if an error is reported, please grab a screenshot.
The response to the last line will be something like this:
-rw-r--r-- 1 marion staff 490 Nov 8 04:58 /Users/marion/Downloads/BuildLoop/LoopConfigOverride.xcconfig\n
The addition of r
where there used to be -
on the left side, means you now have permission to read that file.
Final step is to return to Xcode and clean the build folder. Otherwise Xcode remembers it could not read the file and it won't try again.
Product
menu (of Xcode), select Clean Build Folder
This error is new with Xcode 13.3 (late Sep 2021) which has a new requirement
Headers
keyword must be located before the line with the Sources
keywordrepositories
that did not have lines in that orderError Message:
Text in error:
Left window (the exact target names are not important):
Middle window:
Solution:
No need to quit Xcode - follow these steps using the Xcode Menu bar. (It's possible that only Step 1 is required, but sometimes all steps are needed.)
Product
menu (of Xcode), select Clean Build Folder
File
menu, select Close Workspace
File
menu, select Open Recent
and choose the top lineError Message:
Text in error message can be either of these:
Entitlements file \"WatchApp Extension.entitlements\" was modified . . .
or
Entitlements file \"Loop.entitlements\" was modified . . .
Solution:
No need to quit Xcode - follow these numbered steps as indicated in the graphic below.
Product
menu (of Xcode), select Clean Build Folder
It turns out that
This error is found when there is a space embedded in the path name to your LoopWorspace folder. The good news is that LoopWorkspace seems to be able to build from an iCloud or Dropbox drive.
Text in error message:
Command CompileAssetCatalog failed with a nonzero exit code. . .
Solution:
This is very similar to the steps for the WatchApp Entitlements Error but you need to repeat it for 2 targets: Loop
and WatchApp
- the graphic below matches the step numbers in the list.
Loop
folderLoop
targetGeneral
tabApp Icons Source
dropdown menuApp Icons Source
dropdown menu selection for the WatchApp
targetFor older builds only. With Loop 3.2.0 and newer, the default selection is already LoopWorkspace.
You should not see carthage errors, but if you do, you probably did not select Loop (Workspace) at the top of the Xcode window. Review the graphic from the Prepare to Build Instructions.
Or maybe you are trying to build using an old download; some older versions did require carthage. Best practice is to download new code.
Error Message:
Wrong Version of Carthage Error
Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: one of -create, -thin , -extract , -remove , -replace , -verify_arch \u2026 , -archs, -info, or -detailed_info must be specified.
Solution: Download fresh code with Build Select Script.
"},{"location":"build/build-errors/#could-not-locate-device-support-files","title":"Could Not Locate Device Support Files","text":"Error Message: \"Could not locate device support files.\" That message is telling you that your iOS on the Loop phone requires you to get a newer version of Xcode to be able to build Loop onto that phone.
Solution: Update your Xcode version; this may also require a macOS update. Please review the phone iOS driven requirements for Xcode and macOS.
"},{"location":"build/build-errors/#no-such-module-loopkit-or-similar-message","title":"No Such Module 'LoopKit' or Similar Message","text":"Error Message: If you see a Cartfile failure and several other red errors (in particular saying there is \"no such module 'LoopKit'\").
Solution: Read the Carthage Error section above.
"},{"location":"build/build-errors/#developer-license-update-pla-update","title":"Developer License Update (PLA Update)","text":"Error message: The Apple Developer Program License Agreement has been updated, In order to access certain membership resources, you must accept the latest license agreement
. Or you may see Unable to process request - PLA Update available. You currently don't have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account.
Solution: You'll need to log onto your Apple Developer account at developer.apple.com and accept the latest license agreement.
"},{"location":"build/build-errors/#could-not-get-a-container-directory-url","title":"Could Not Get a Container Directory URL","text":"Error message: \"Could not get a container directory URL. Please ensure App Groups are set up correctly in entitlements.\"
Solution: To resolve this error, you will need to click on the Loop target's signing area and then the plus-sign in the App Groups area under the signing. Copy and paste the bundle indentifier into the new container that starts with group.
and then add Group
to the end of the name. Click OK to save. Note, the line will start with lower case group.
followed by your bundle identifier and an upper case Group
added to the end of the bundle identifier.
The final App Group should now have a blue check box, the name should start with group
and end with LoopGroup
. See the screenshot as an example. Click the build button after your App Group is setup similarly and you should be good.
Error message: \"Invalid active developer path (/Library/Developer/CommandLineTools)\"
Solution: Go to your Xcode -> Settings and under the Locations tab, select your Xcode version (the figure shows 14.0.1 - yours should match your Xcode version) in the dropdown menu for Command Line Tools.
"},{"location":"build/build-errors/#device-management-could-not-launch-loop","title":"Device Management Could Not Launch Loop","text":"Error message: \"Could not launch \"Loop\". Verify the Developer App certificate for your account is trusted on your device. Open Settings and navigate to General -> Device Management, then select your Developer App certificate to trust it.\"
New Solution First try the Unpair and Reboot process above. If that doesn't work, then try the solution listed below.
Solution: If you get this message and are unable to find the Device Management option in your phone settings, then we need to do a little extra step to clear out some old info.
That should clear the out, problematic profiles and allow a successful build.
If your problem persists after that, then you might need to do total reset of your phone to clear out the pesky problem. Before you do this, you may want to Post for Help to make sure it is really necessary:
Error message: \"You already have a current iOS Development certificate or a pending certificate request.\"
Solution: This error message has recently started to appear for some new Loop builders. To resolve the issue, please log in to your Developer account at developer.apple.com and then click on \"Certificates, Identifiers & Profiles\". Under that screen, you will see \"Development\" under the \"Certificates\" section in the column on the left. You will need to click on the certificates, and choose \"revoke\" from the options that show after you click on the certificate. Confirm the warning message that will appear asking \"Do you want to revoke the certificate?\"
After you do that, return to Xcode and open up Xcode -> Settings and choose the Accounts tab. Highlight your Apple ID and click on the minus sign to delete your Apple ID.
Re-enter your Apple ID (yes...add that account right back that you literally just deleted), return to your Loop's target signing areas in Xcode and your error message should have resolved as a new certificate will have been issued and a provisioning profile should have been created automatically.
You can verify the iOS development certificates are working by clicking on \"Manage Certificates\" in Xcode -> Settings, Accounts tab and viewing the iOS Development Certificates. You should have one for your account that has a clean status similar to the screenshot below.
"},{"location":"build/build-errors/#command-codesign-failed","title":"Command CodeSign Failed","text":"Error message: \"errSecInternalComponent, Command CodeSign failed with a nonzero exit code\"
Solution: This error message is likely due to inadvertently saying \"no\" to allowing Keychain Access or changing your computer or AppleID password. Regardless, the solution is as follows:
login
highlighted and then right-click the lock next to the login
. Click the lock closed, and then click the lock to open it again. You will be prompted for a password. Enter your computer admin password. Close Keychain Access app.Product
and then select the option for Clean
. (Keyboard shortcut is Shift+Cmd+K)Error message: \"Unrecognized arguments: --cache-builds\"
Solution: This is a homebrew / carthage error, so I don't think you'll see this. If you do, download a fresh copy of Loop code and try again. If it repeats, it is time to request assistance. Please read Posting for Help.
"},{"location":"build/build-errors/#abort-with-payload","title":"Abort with Payload","text":"Error message: \"Abort with payload\" Your app will only open briefly with a white screen and then close, if you build with this error.
Solution: This error message is caused by having the Loop download folder in an iCloud mapped drive when doing the zip download. Move your Loop download folder back to the Downloads folder, then rebuild. LoopWorkspace builds with Xcode 13 appear to work fine with an iCloud drive. You may run into the spaces in your path name problem - which has a different solution.
"},{"location":"build/build-errors/#apple-watch-issues","title":"Apple Watch Issues","text":""},{"location":"build/build-errors/#apple-watch-loop-app-not-appearing","title":"Apple Watch: Loop App Not Appearing","text":"Error: Apple watch app is not appearing.
Solution: This error usually appears because you have not updated the watchOS prior to building Loop, or you didn't have your Apple watch paired at the time of building Loop.
Don't forget to open the iPhone's Watch app, select My Watch tab on the bottom left, scroll all the way down, and click Install
for the Loop app listed at the very bottom under \"available apps\".
Before trying this solution, see if the Unpair and Reboot procedure works.
Error: The Loop app appears on the list of apps available to install on the watch, but when you press \"install\", and it goes through the animation of filling in the circle while it's installing, but then at the end it just toggles back to saying \"INSTALL\".
Solution: Plug your iPhone into the computer and start Xcode. On your watch, look for a prompt that says \"Trust this computer\". Scroll down on the watch face and select the \"Trust\" button. In Xcode, go to the top menu bar and select \"Clean Build Folder\" from the Product menu option, and then rebuild your Loop app.
If the watch app still fails to install properly, the next section should work.
"},{"location":"build/build-errors/#apple-watch-loop-app-not-running-on-watch","title":"Apple Watch: Loop App Not Running on Watch","text":"Error: Tapping the Loop app icon on the watch results in flash of the watch screen and then return to the Loop app icon or a brief display of the watch interface and then return to the Loop app icon.
Solution: Plug in your iPhone, with the watch already paired, into the computer and start Xcode with your current build folder. In Xcode, from the list of schemes where you normally choose Loop (Workspace) (with Loop 3.2.x and newer, LoopWorkspace is the default), choose the WatchApp scheme (near the bottom of the list) and then select your watch (not a simulator) from the device list, see the graphics below. Press the play button to build and deploy the WatchApp directly to your watch. It will launch correctly and will not crash when you subsequently launch it from the complication or your watch Home Screen..
Warning: Make sure your watchOS is up to date with respect to your phone iOS. If not, you may need to update to be successful. On pressing clicking build/play, some people report receiving an error stating \u201ciPhone/Apple Watch are ineligible because the OS on the watch doesn\u2019t support WatchKit App Products\u201d or similar wording. This is a known issue with some Mac USB ports. Fixes in preference order are: 1) swap which USB port is in use; 2) unplug and replug the USB cable from both the iPhone and Mac; or 3) as a last resort, reboot the iPhone and Mac.
Don't forget to select Loop(Workspace) after building to the watch before trying to build to a phone.
"},{"location":"build/build-free-loop/","title":"Build Free Loop","text":""},{"location":"build/build-free-loop/#prepare-to-sign","title":"Prepare to Sign","text":"This page is not stand-alone. You typically get here after choosing to Sign Manually after a successful download using the Build Select script.
Normally this option is chosen by people building the app with the Free option or if you want to build to a simulator on your computer.
If you have a paid developer account and are building Loop 3, you are far better off choosing to configure the permanent override file with your Apple Developer ID. Refer to Sign Targets.
The instructions found on this page are for the first build. With the Free version, you need to build every week. Refer to Build Again with this Download.
"},{"location":"build/build-free-loop/#select-the-loop-folder","title":"Select the Loop Folder","text":"Don't touch that button!
You will be told exactly where on each screen you should click. Please only click in the designated places.
Follow the directions and compare your Xcode screen to the graphics as you walk through the steps.
As shown in the GIF below:
If this is the First Time your phone or watch has been connected to Xcode, you will need to tell the phone and watch to \"Trust this Computer\".
The GIF (not updated for Loop 3.2.x) below shows:
I don't see my phone
Skip this section if building to a phone and proceed to Select Signing & Capabilities Tab.
If you want to build to a simulator, follow the directions in this section and skip the rest of this page.
What does Signing Targets Mean?
\"Signing Targets\" in Xcode identifies who built the app. You cannot deploy an app to a phone without signing each target associated with that app.
The graphic below indicates in red the three places you need to click in order to begin signing targets.
Signing & Capabilities
Loop
under the word TARGETS
Team
Click Only where Instructed
All
, indicated by dashed blue oval, is selectedDebug
or Release
is accidentally tapped, you will not be able to buildAutomatically manage signing
, indicated by dashed blue rectangle, is checkedIt is time to Sign the Targets with your Apple ID.
If you chose to sign manually but have a paid account, you can skip the Free Account steps below.
You will be building multiple targets to make a complete app and must sign each one. With Loop 2.2.x, there are 4 targets. With Loop 3, there are 5 targets.
Start with the Loop target, the first one on the target list. Choose your Apple ID.
"},{"location":"build/build-free-loop/#free-account","title":"Free Account","text":"This section is required if you are using the free account.
Some features of Loop are not available with the Free option, so as you sign, you will need to remove features that are not supported.
SIRI_DISABLED
to the LoopConfigOverride.xcconfig fileSWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited)
$(inherited)
and before the slashes near the end of the lineSWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) SIRI_DISABLED
Details about removing unsupported capabilities:
Click on each of the three remaining targets shown in the red box below, and repeat the signing steps by choosing the same team name as you selected in the first target. The targets that must be signed prior to building are Loop, Loop Status Extension, Watch App, and WatchApp Extension for Loop 2.2.x, with the addition of Loop Intent Extension for Loop 3.
After signing the targets, click on the Loop icon under the PROJECTS
heading. (Refer to the bright blue box in graphic above - click on that Loop icon.)
Projects
Now that you have signed your app, return to the Build Loop page at Start Build.
"},{"location":"build/cgm/","title":"Compatible CGM","text":""},{"location":"build/cgm/#compatible-cgm","title":"Compatible CGM","text":"Time Estimate
Summary
The Loop app is compatible with:
FAQs
The Loop app uses your CGM glucose readings, carbohydrate input and therapy settings, to model your current glucose trend, predict future glucose and automatically adjust insulin dosing. A compatible CGM is essential to operation of the Loop app.
"},{"location":"build/cgm/#dexcom-g5-g6-and-one-cgm","title":"Dexcom G5, G6 and ONE CGM","text":"The Dexcom G5, G6 and ONE CGM transmits data directly to the Dexcom app on your iPhone via Bluetooth.
The Dexcom ONE, available in some countries, acts just like the G6 as far as the Loop app is concerned. The Dexcom ONE app does not provide some features, such as Dexcom Share, that come with the G6. When you set up the Loop app, select Dexcom G6 as your CGM to use Dexcom ONE CGM with the Dexcom ONE app installed on your phone.
Dexcom ONE+ is not yet compatible
There are reports that Dexcom is transitioning to the ONE+ based off the G7 platform. These devices cannot be used with the Loop app at this time.
Pay attention to social media - an early indication is that a simple patch will allow this to work, but that patch is not available - more testing is needed.
Only available in some countries. This link is for Poland Dexcom ONE+
If the Dexcom app is on the same device as the Loop app, your system can function without an internet connection. See Offline Use below.
Dexcom G5 Support
Dexcom has stopped supporting the G5 system in the US. In the US, and some other countries, the G5 is not available for download from the Apple Store. There are countries in which Dexcom does supply and support G5. The G5 capability will continue to be supported in Loop.
There are third party apps, which interface with G4 and G5 transmitters, supported by some forks of Loop. The version of the Loop app supported by these documents only works with the Dexcom apps.
"},{"location":"build/cgm/#dexcom-g7-cgm","title":"Dexcom G7 CGM","text":"Dexcom G7 is supported with version 3 or greater of the Loop app.
"},{"location":"build/cgm/#medtronic-cgm","title":"Medtronic CGM","text":"The Minimed Enlite CGM, available with the Medtronic 522/722, 523/723, and 554/754, wirelessly sends glucose readings to the pump. The Loop app can read the Medtronic CGM data directly from the pump using a RileyLink compatible device.
"},{"location":"build/cgm/#offline-use","title":"Offline Use","text":"\"Offline Use\" means using the Loop app when there is no cell data or internet available. The Loop app does not require any special setup to operate offline.
For offline use, the iPhone's Bluetooth still needs to be active; and for Dexcom users, the G5, G6 or G7 app also needs to be running on the same phone as the Loop app. If you put your iPhone into Airplane mode, remember to turn Bluetooth back on to keep both the CGM and the Loop app running. If your offline use is failing, chances are you have forgotten to update your transmitter ID in the Loop app settings when you changed transmitters.
"},{"location":"build/cgm/#dexcom-share","title":"Dexcom Share","text":"The Loop app can download Dexcom Share data for use in modeling glucose. However, this is not a typical configuration and requires internet connection for both the phone with the Dexcom app and the phone with the Loop app. The steps for adding a CGM explain that you usually enter the Dexcom transmitter ID and leave the Dexcom Share setting blank.
Dexcom ONE
The Dexcom ONE app does not support Share.
"},{"location":"build/cgm/#nightscout-as-a-remote-cgm","title":"Nightscout as a Remote CGM","text":"Version 3 or later of the Loop app can use Nightscout as a remote source for CGM data. This requires cell or WiFi connection.
"},{"location":"build/cgm/#cgms-not-supported-in-the-loop-app","title":"CGMs Not Supported in the Loop App","text":"Libre Support (for some Libre sensors) is available with Loop-dev or by adding customizations.
Loop and Learn: Loop Customization
Currently, there are no solutions for Eversense, Guardian or Libre 3 CGM to be used directly with the Loop app, but some Uploaders to Nightscout are available using an Android phone. Version 3 or later of the Loop app allows the use of Nightscout as a CGM source.
"},{"location":"build/cgm/#next-step","title":"Next Step","text":"If your compatible pump is Medtronic or Omnipod (not DASH)
If your compatible pump is Omnipod DASH
Time Estimate
Summary
FAQs
There's a wonderful community of Loopers who are willing to help you through the process. This link on Social Media Options walks you through those groups and how to join.
Volunteers provide assistance on building and using the Loop app at these sites. None of the people are paid to answer questions or spend time troubleshooting. They simply want to help others. Please decrease their support burden by doing your homework and providing the information they need when requesting help. Please click the image below to watch this video full of tips to make the most of your online resources.
Please watch this video (just under 7 minutes) to learn about using announcements and searches in Facebook groups and the LoopDocs pages.
Note, the LoopDocs menus were reorganized after this video was prepared to make it easier to progress through the pages.
"},{"location":"build/community/#screenshots","title":"Screenshots","text":"Please take screenshots of your issue and include them in your posts. On an Apple computer, press Shift+Cmd+4 keys at the same time and a little crosshairs tool will appear. Click-and-drag across the area you'd like to include in the screenshot. When you let go of the button, the screenshot will be saved to your desktop with a file name starting with the name Screen Shot
. To capture an entire window, press Shift+Cmd+4 keys at the same time followed by pressing Space (the space bar) and then click on the window of interest.
Use screenshots instead of cell phone images whenever possible. Screenshots are higher resolution and easier to read.
Take a wide screenshot (full window capture) when asking for help with settings or Xcode build errors. Nightscout and Xcode have lots of valuable information off-to-the-side that can be valuable for troubleshooters.
"},{"location":"build/community/#descriptive-language","title":"Descriptive Language","text":"Use descriptive language - the most accurate, detailed words possible - when asking for help. Try to avoid the word \"it\" and instead use details and information to explain why you're asking for help, what you've already tried, and what happened when you tried those things (including screenshots). Let's illustrate with a couple of examples.
"},{"location":"build/community/#example-1","title":"Example 1","text":"The Loop app no longer allows you to enter your correction range in the wrong order, i.e., 110 to 90; but it once did and the Loop app would stop working. We're using that problem as an example below.
Bad: \"It's not working.
\" <----makes me wonder what \"it\" is? What part of \"it\" isn't working exactly? The app? The glucose control? The pump integration? Alarms? Bolusing? CGM
Ok: \"My Loop app won't open.
\" <---- Ok, so now I know the Loop app itself seems to be the problem, but still don't know if this is a build error or an error that has happened after building. The solutions might be different.
Better: \"My Loop app was working yesterday just fine, and now today it's not doing the things like I expect.
\" <----- Getting closer. Now, I know this is not a build error and that it sounds like a more recent issue. I'm starting to narrow down the potential causes. This is about as much detail as it takes for me, as a volunteer, to consider helping. I might not have to ask 42 questions, but instead only 4 questions to find the remaining information for troubleshooting. If there were more details, it would save time.
Awesome: \"My Loop app was working yesterday. Around lunch time, I went into the settings screen and made some adjustments and ever since it just turns white and closes no matter what I try.
\" <---- DEFINITELY getting closer. Now I have a strong suspicion about where the bug is happening and can help with a couple links.
GOLD MEDAL WORTHY: \"My Loop app was working yesterday. Around lunch time, I went into the settings screen and made some adjustments to correction ranges. Ever since I did that, the app immediately turns white and shuts down. I have tried restarting my phone, but it has not fixed the problem. I tried searching the docs for 'loop closing' but didn't see results that matched my issue.
\" <----- This person is doing an outstanding job of describing the problem. Lots of good details. Has shown initiative to try to use the resources already. This person did an excellent job of helping all of us help them.
This example is not quite as old, but does refer to details from older Loop and iOS versions. It exemplifies the details needed to assist someone with a build error.
Build with Browser
If you are using the Build with Browser method, we still need descriptive details but we do not need screenshots. All that is required is to list your GitHub user name. The volunteers can then read your publicly available log files. (All private information is automatically redacted in those logs.)
Bad: \"My Loop app won't build.
\" <----- What step are you on? What is the iOS on your phone? What kind of computer are you using? What macOS? What Xcode version? Have you built successfully before or is this new?
Ok: \"I'm trying to update my Loop app and am getting a few errors that I don't understand.
\" <----- Wow, sure would be nice to know what those error messages are. Are they red or yellow? A screenshot sure would help here.
Awesome: \"I have a macOS Big Sur 11.5.3 computer with Xcode 12.5.1 and my phone is running iOS 14.7.1. Downloaded Loop-master (2.2.6) this morning and I'm getting some red errors about an exit code that I don't understand. I've tried everything in the docs and nothing worked.
\" <---- While I'm super happy they \"tried everything\", I'm no closer to knowing what the exact error message is nor which \"stuff\" exactly they tried. But all the version numbers are included.
GOLD MEDAL WORTHY: \"I have a macOS Big Sur 11.5.3 computer with Xcode 12.5.1 and my phone is running iOS 14.7.1. Downloaded Loop-master (2.2.6) this morning and I'm getting some red errors about an exit code 645 that I don't understand. Here's the screenshot of the error message. I tried searching the docs for \"exit code 645\" and didn't see any responses that helped.
\" <---- This is the kind of detail that will get you to an answer very fast.
Often, the best answer to your question is sending a link to the answer in LoopDocs or LoopTips. This provides you a quick, accurate and complete answer. We understand that there is so much information in these sites that it can be hard to find answers. Mentors know the docs well, are experts at using the search tools and will send direct links to the sections that best answer your question.
If you've searched the docs and read relevant info already, please include that in your post or your reply. That way you don't get linked back to the part you are confused about. And if you have already read the specific section a mentor just linked, be specific about why your problem is not addressed by that link. Or just say \"I'm confused when the doc says this\". Letting us know when these docs can be improved is very useful.
"},{"location":"build/community/#next-step","title":"Next Step","text":"Now you are ready to build or continue with setting up the Loop app.
"},{"location":"build/community/#return-to-set-up","title":"Return to Set Up","text":"If you are a new looper who got to these pages from the Set Up app page - congratulations. Now that you've reviewed these introductory pages, please continue with the Brand New Loopers section of the Set Up Overview page.
"},{"location":"build/community/#build-with-browser","title":"Build with Browser","text":"Click here if you want to Build with Browser.
"},{"location":"build/community/#build-with-mac","title":"Build with Mac:","text":"Click here if you want to Build with Mac.
"},{"location":"build/computer/","title":"Compatible Computer","text":""},{"location":"build/computer/#compatible-computer","title":"Compatible Computer","text":"Time Estimate
If you are building with a Mac and Xcode:
Hint: OS stands for Operating System
Build with Browser
If you do not have a Mac, you can build\u00a0Loop 3\u00a0with any computer using a browser. If you want to use that method, review this list and head over to Build with Browser.
Summary
Your computer, iPhone and Xcode must have compatible versions to build the Loop app using a Mac.
If you are buying a Mac specifically to use the build with Mac method, chose one with capabably of being updated to the Sonoma (macOS 14) operating system and at least 256 GB (512 GB is better). The Build with Browser method works on any computer or tablet.
FAQs
If you have access to a computer with MacOS 13.5 or newer, you can skip ahead to Check Space Available.
"},{"location":"build/computer/#compatible-versions","title":"Compatible Versions","text":"The current development version and the next release of\u00a0Loop\u00a0will require Xcode version 15 regardless of the iOS on the phone. This requires macOS 13.5 or higher. As an alternative, use Build with Browser, which supports iOS 15, 16, and 17.
When this page was last updated, macOS 14.0 and Xcode 15.0 were tested to successfully build the app for phones with iOS 15 through iOS 17.0.2.
The table below lists the minimum requirements to build the current release of\u00a0Loop 3.2.3. If your macOS or Xcode version is higher, you can build with Mac.
Find your phone iOS in the table below. If your iOS is not listed, e.g., 16.6, choose the first row that is less than your iOS.
iOS Version minimum Xcode minimum macOS 17.0 15.0 13.5 16.4 14.3 13.0 16.2 14.2 12.5 15.1 14.1 12.5iOS Dictates Your Computer Needs
The more up-to-date you keep your phone iOS, the more up-to-date your computer and macOS needs to be to build the Loop app with the Mac build method. A new build is required at least once a year. More information on iOS is on the Xcode Version page.
There are important security updates that go along with iOS updates. Please install those iOS updates as soon as you can.
Do not use any of the beta macOS versions. (If you don't know what that means, you aren't using one.)
"},{"location":"build/computer/#check-your-macos-version","title":"Check Your macOS Version","text":"To find your macOS version, click on the Apple icon in the computer's upper left corner and select About this Mac
. The graphic below highlights the macOS version with a red rectangle. Your computer can be a MacBook, iMac, macMini, etc. It will work to build Loop if it has the minimum required macOS version and enough storage.
With the Ventura macOS version, the About this Mac
display changed. For Ventura, when you tap on the More Info
icon, it opens the General -> About screen from the System Settings menu. This is very similar to the phone Settings -> General -> About screen.
Sonoma, macOS 14.0, is expected to be released 26 September 2023.
If you do not have the required minimum macOS version
Software Update
button on the screen shown aboveSystem Settings
General
and Software Update
, just like you would on the phone interfaceApple says upgrading to macOS Ventura requires 26 GB of available storage.
"},{"location":"build/computer/#check-the-space-available","title":"Check the Space Available","text":"You need to have 50 GB free space in order to install Xcode as directed on the Xcode Version page. At the top of the menu on the graphic above, click on the Storage Tab highlighted with a red rectangle, or, if running Ventura, tap on More Info to open the About screen (under System Settings->General), which includes storage at the bottom of the display.
To free up space, move things like photos to an external drive. The Xcode application cannot be run from an external drive.
If you are evaluating a used computer, it's best to have at least 256 GB total disk space (more is better).
"},{"location":"build/computer/#which-macs-are-compatible-with-macos-ventura","title":"Which Macs Are Compatible with macOS Ventura?","text":"Ventura is required for building the Loop app on a phone running iOS 16.4 or higher with the Mac method. You can install Ventura on the following:
Look into building with GitHub Actions - no need to worry about versions for Mac OS or Xcode - all done for you on GitHub (some configuration required). Works with any computer (PC or Mac or Tablet).
"},{"location":"build/computer/#next-step","title":"Next Step:","text":"If you already have an Apple Developer ID or you are using a free ID, next step is Xcode Version.
Free ID
The free ID method only works when using the build with Mac method. The Build with Browser method requires a paid developer ID ($99/year) but does not require a Mac computer.
"},{"location":"build/custom-mac/","title":"Customize using Mac","text":""},{"location":"build/custom-mac/#overview","title":"Overview","text":"This page is only relevant when building with a Mac.
For Building with a Browser, please see: Customize using Browser
For new Loopers, please build the code before you make any changes. Start with Open Loop and familiarize yourself with the interface. Later, you can make the customization(s) you desire and build again. The second build will be much easier than your first build.
These customizations require you to modify the code used to build the Loop app and then build the app again with the modified code.
You take responsibility
You are responsible when you decide to use customizations.
Be sure to report what changes you made if you need to ask for assistance with your app.
"},{"location":"build/custom-mac/#customizations-prepared-for-you","title":"Customizations Prepared for You","text":"Some customizations are the same for everyone and have been prepared for easy use.
The Loop and Learn team is committed to maintaining these prepared customizations and provides an easy method to add your selection from these customizations to your version of Loop.
Please read the documentation for these on the Loop and Learn: Customization Select Page:
If you are using main
branch to build Loop 3.2.3
and rely on either xDrip4iOS or GlucoseDirect to read your CGM and transfer the readings to the Loop app, you need to review this section of the Loop and Learn customization page.
Alternatively, you can switch to the dev
branch, which already supports Libre. Build Loop dev with Mac
Some customizations must be created for yourself. These are of two basic types: Custom Edits and Build-Time Flag.
The information needed to modify the code to make these customizations is found in the Versions tab because the information is independent of build method (think of these as your personal versions). The links are found below.
When preparing these personal edits using a Mac, there is a page explaining how to open Xcode to the correct folder (where code is stored on your Mac) and incorporate those changes into your personal copy of LoopWorkspace
on your Mac before building.
The code changes required for these customizations are the same regardless of the build method. The pages that provide the documentation on modifying and incorporating these changes are found at the links above.
"},{"location":"build/edit-mac/","title":"Custom Edits with Mac","text":""},{"location":"build/edit-mac/#overview","title":"Overview","text":"When applying a customization using Mac, the downloaded code should be fairly recent. If you are not sure, get a fresh download. If you know your downloaded code is the Current Release, you can skip the download and use the same folder as last time.
"},{"location":"build/edit-mac/#find-my-downloaded-loop-code","title":"Find My Downloaded Loop Code","text":"Refer to the graphic below. The Downloads folder in Finder is highlighted on the upper left. The full path to Loop.xcworkspace is highlighted along the bottom.
Loop to LoopWorkspace
Note that the directory Loop.xcworkspace
has been renamed to LoopWorkspace.xcworkspace
in the released code. For experienced builders - you realize this is good because the build process is easier.
The words were updated, but it will take time for the graphics to be updated.
Experienced Builders
Experienced builders will often build a fresh download to a simulator for their phone iOS (not their phone) to ensure download is good and is compatible with macOS, Xcode and phone iOS. Once the build is successful, they apply their customizations and build again to the simulator. Last step is to build the customized version to their real phone.
"},{"location":"build/edit-mac/#instructions-for-finding-the-lines","title":"Instructions for Finding the Lines","text":"For each customization, you are given landmarks to find the correct location in the code when you review Version: Custom Edits. You can choose to search using the Key_Phrase
or navigate to the file in the folder structure and look for ( Cmd+L # ) the line number.
use the copy button at right, paste into search\nThe copy button for this exampe is just for practice\nDo not paste the result anywhere\n
To search using the Key_Phrase
(see graphic below for clarification):
Key_Phrase
; click on it to copy the phraseFind in Workspace
1 result in 1 file
(for most cases)Key_Phrase
Key_Phrase
was selected to limit the search to just the relevant line (if possible)Key_Phrase
gets you close but not exactly on the line where you need to make the modifications - please read carefullyEach customization will also show Module, Folder and File bullet below the key phrase.
If you use the Loop and Learn: Customization Select Script, it automatically locates your most recent download, makes the customization you select in that download and then opens Xcode for you.
But sometimes, you need to find your downloaded code and make your own changes in Xcode. This section tells you how to do this.
Refer to the graphic below. The Downloads folder in Finder is highlighted on the upper left. The full path to Loop.xcworkspace is highlighted along the bottom. Double clicking on that file opens Xcode; but to apply customizations, you need to type commands in the terminal.
New Terminal at Folder
(near the bottom of the list)This new terminal window is ready to accept commands as needed when the instructions say to start a terminal in the LoopWorkspace folder.
To confirm you are in the correct location, type pwd
and return in the terminal. The response must end in LoopWorkspace. For example, using the graphic below, the response to pwd
should be similar to:
/Users/marion/Downloads/BuildLoop/Loop-20220803-1145/LoopWorkspace
The folders listed in the code customization steps are the actual directory names as stored on your computer. However, a shortened name is used for some folders when being displayed as icons in Xcode. Some people prefer to search through the folder icons to find a file instead of using the Find in Workspace
feature.
In the graphic below, the user searched for an item found for both Eros and DASH pods (in two different files). The top part of the graphic shows the result of the search with user clicking on one instance. On the right side of the top graphic (highlighted by red rectangle) is the name of the selected file on the computer with the full directory name.
These folder icon names are different from the directory names on the computer:
Folder Icon Name Directory Name ShareClient dexcom-share-client-swift RileyLink rileylink_ios Amplitude Amplitude-iOSAll other icons and directory names match.
"},{"location":"build/edit-mac/#modify-and-save","title":"Modify and Save","text":"Key_Phrase
or Module, Folder, File
method described on Version: Custom Edits can be used to find the lines inside Xcode on your MacThe Loop app uses the Health app to record blood glucose, insulin, and carbohydrate data. The blood glucose, insulin, and carbohydrate data stored in the Health app can also be accessed and uploaded by the Tidepool Mobile app which enables the display of your data on the Tidepool web-based display tool. Please review the settings below to ensure you have the proper settings.
"},{"location":"build/health/#loop-permissions","title":"Loop Permissions","text":"You need to set up Loop's permissions to read and write some data in the Health app. When you finish building your first Loop app, the Health app screen for Loop permissions automatically appears. (People who have been looping a while should be aware that the permissions are slightly different now.) Do not enable permission for Loop to read carbohydrates from the Apple Health app.
You can also get to this screen (for iOS 15) by iPhone -> Settings -> Health (heart icon) -> Data Access & Devices -> Loop.
New Instructions
Loop does not need to read carbohydrates from the Health app.
The old instructions suggested turning on all switches. This is NOT necessary for carbohydrates and can be dangerous if
Blood Glucose: Permission to Write and Read
Carbohydrates: Permission to Write ONLY
Insulin Delivery: Permission to Write and Read
Sleep: Permission to Read
You also need to enable your Dexcom Mobile app to write to the Health app. The steps shown in the figure below are valid for iOS 12.
For iOS 13/14, the menu items are: iPhone -> Settings -> Health (heart icon) -> Data Access & Devices -> Dexcom app. Make sure Dexcom has permission to write Blood Glucose (after the 3 hour delay). If you do not do this, you will have a maximum history of 3 hours displayed in the Loop Glucose screen.
"},{"location":"build/loop-data/","title":"Loop Data","text":""},{"location":"build/loop-data/#make-plans-for-your-loop-data","title":"Make Plans for yourLoop Data
","text":"Time Estimate
Summary
FAQs
Take some time to familiarize yourself with these data options and choose your preferred system(s). Many Loopers use all three for various aspects.
Loop 2
allows overrides to be enabled or disabled remotelyLoop 3
allows remote commands for carbs, bolus, or overridesNightscout options include free or nominal cost sites you build yourself or there are several Nightscout as a Service vendors who provide turn-key sites for a monthly fee. Links to the options are found in the Nightscout: Documentation.
Nightscout provides a secure, real-time Dashboard with status of the Loop app visible to anyone with access codes and the internet. It is required for remote commanding.
If you plan to use remote commanding with Nightscout, please read these links with additional information:
Now you are ready to Meet the Community.
"},{"location":"build/overview/","title":"Mac Overview","text":""},{"location":"build/overview/#build-with-mac-requirements","title":"Build with Mac Requirements","text":"The complete requirements for building Loop with a Mac and Xcode are summarized below. The first list contains the common requirements that are the same regardless of build method. The second list contains the additional requirements for building with a Mac and Xcode.
Each requirement in the list is linked to the LoopDocs pages with more information.
"},{"location":"build/overview/#common-requirements","title":"Common Requirements","text":"If using a Mac to build to a Simulator to try things out, the only requirements are a computer and Xcode.
"},{"location":"build/overview/#getting-ready-to-build","title":"Getting Ready to Build","text":"Review the Common Requirements pages, listed above.
Then review the Build pages for the method you have chosen. Read the top three boxes on each page: icons for those boxes are displayed below for reference. On a desktop, you can use n
for next and p
for previous.
Time Estimate
Summary
FAQs
Next, read pages completely and skim Oh dear! Build errors?. Most of the mistakes you can make when building with Xcode and a Mac have already been made. The Build Errors page shows how to fix them.
When you are ready to proceed, complete the tasks on each page. You can do one a day, take a week per page or blaze through them quickly. Just be sure to read carefully and if you are confused - reach out for help: How to Find Help.
After you build Loop on your phone, keep following along in the docs as you Set up and Operate your Loop app.
"},{"location":"build/overview/#what-if-i-get-stuck","title":"What if I get stuck?","text":"Try to:
Time Estimate
Summary
FAQs
Nightscout
monitoring of the Loop app is a priority, then a cell plan may be desired.The Loop app requires an Apple device and uses the Apple Health app to store and retrieve your blood glucose and insulin data and to store your carbohydrate records. Older iPads do not support Apple Health which is required for the Loop app. It may be possible with newer iPads and newer iOS, but this has not been tested.
You need a minimum version of the mobile operating software, called the iOS, to be installed on your iPhone. The Loop app is compatible with iPhone devices with iOS 15.1 or newer.
These devices are compatible.
These devices are compatible (now), but are limited to iOS 16.
These devices are compatible (now), but are limited to iOS 15.
s
Your iOS version can be found under the phone Settings -> General -> About display as shown below. The iOS number is found on the Software Version
line.
Do not use any of the beta iOS versions. (If you are uncertain what that means, then you are not using one.)
"},{"location":"build/phone/#developer-mode-mac-build-only","title":"Developer Mode - Mac Build Only","text":"When you build the Loop app using Build with Browser, you are not required to enable Developer Mode on the phone or watch.
With iOS 16 or newer and watchOS 9 or newer, Apple added a feature. If you want to know more, click on this Apple Link about Developer Mode.
When you build the Loop app on your phone from Xcode directly and then transition to or start with iOS 16 or newer, you need to have Developer Mode enabled. This is also a requirement to use the Loop app on a watch paired to your phone running watchOS 9 or newer. You will be told to enable it in the Build the Loop App: Prepare your Phone and Watch instructions.
Developer Mode with iOS 16 or newer, watchOS 9 or newer
If you already have the Loop app built with Xcode on your phone/watch when you update to iOS 16 or newer/watchOS 9 or newer or newer, you will be told that the Loop app requires Developer Mode to run.
You will not be able to run the Loop app on your phone (or watch) until you have enabled Developer Mode on the device(s).
"},{"location":"build/phone/#battery-health","title":"Battery Health","text":"Make sure the battery on your phone is solid. Your phone will become a critical health device - you want it to keep working.
Low Power Mode
With newer iOS, some people have reported the Loop app continues working in the background (phone locked) even in Low Power Mode. Others have reported they still get red loops. You can experiment to determine if your phone/iOS/app is able to maintain green loops in low-power mode. Otherwise, the best practice is to avoid Low Power Mode.
"},{"location":"build/phone/#use-automatic-time","title":"Use Automatic Time","text":"Be sure to set the phone to automatic time. Do not try to defeat a game by modifying time on the same phone used to control your insulin.
Please read: The Loop Phone Must be on Automatic Time.
"},{"location":"build/phone/#turn-off-automatic-updates","title":"Turn Off Automatic Updates","text":"Apple provides updates regularly to the iOS. Often, these updates include critical security patches in addition to improved new features.
Please be proactive - install updates as soon as the all-clear is given for using the Loop app with that iOS update.
If a limitation on your Mac prevents you from updating your phone to the latest iOS, consider using Build with Browser.
"},{"location":"build/phone/#why-turn-off-automatic-updates","title":"Why Turn off Automatic Updates?","text":"When iOS updates are released, the Loop and Learn Version Updates page is typically updated faster than LoopDocs. Check to see if a new update is causing an issue with the Loop app or your CGM before accepting the update from Apple.
Within a few days, the \"All-Clear\" or (very rare) the \"WAIT there is a problem\" message will be posted.
"},{"location":"build/phone/#next-step-compatible-pump","title":"Next Step: Compatible Pump","text":"Now you are ready to check if you have a Compatible Insulin Pump.
"},{"location":"build/pump/","title":"Compatible Pump","text":""},{"location":"build/pump/#compatible-pump","title":"Compatible Pump","text":"Time Estimate
Summary
FAQs
There are three types of pumps compatible with Loop.
If you have one of the pumps listed above, you are good to go on Loop! Congrats!
"},{"location":"build/pump/#extra-details-on-medtronic","title":"Extra Details on Medtronic","text":"There are a number of Medtronic insulin pumps manufactured between 2006 \u2013 2012 which are compatible with the Loop app. Compatibility has two requirements: (1) pump model and (2) firmware.
"},{"location":"build/pump/#medtronic-pump-model","title":"Medtronic Pump Model","text":"To determine your pump model, look at the backside of your pump. There should be a sticker on the underside of the pump. On the right-hand side of the sticker, it says REF MMT-XXXXXX
Some pumps may have an \u201cL\u201d or \u201cS\u201d or \"R\" before the pump region, e.g. a model number like MMT-722LNAS. This does not affect compatibility with the Loop app.
"},{"location":"build/pump/#medtronic-pump-firmware","title":"Medtronic Pump Firmware","text":"A pump\u2019s firmware is the internal software that runs your pump. Older Medtronic firmware allows the Loop app to act as a \u201cremote control\u201d to set temp basals and report back pump data. Newer firmware disabled that \u201cremote control\u201d access and therefore cannot be used with these DIY closed-loop systems. There is currently no ability to downgrade a pump\u2019s firmware or replace it with older firmware. Before you buy a used pump, make sure you are getting one with compatible firmware.
The firmware on all 515/715 and 522/722 model Medtronic pumps is compatible with Loop. You will only need to check the firmware version for 523/723 and 554/754 model Medtronic pumps.
To find your pump\u2019s firmware you will need to power it on. If the pump has not been powered on for some time (i.e., has been in storage without a battery for a while), it will run through a start-up count and the firmware version will appear on the bottom right of the pump\u2019s screen. Don\u2019t turn away, as the version number will only be displayed for a little while before the screen moves onto other information displays.
If the pump has been active recently or has a reservoir installed, follow these steps:
Press the button on your pump.
Scroll down with the button to the bottom of the status display.
Read the bottom line of the display.
If you are in the position of being able to shop around for different pump models, there are some slight differences between the Loop-compatible Medtronic pumps.
500 vs 700: The difference between the Medtronic 500 series and the 700 series pumps is the size of the insulin reservoirs. The 500 series pumps use a 180 unit reservoir, and the 700 series pumps use a 300 unit reservoir (or smaller 180 unit reservoir, if you want).
x15/x22 vs x23/x54: The differences noteworthy between the x15 and x22 pumps versus the x23 and x54 series pumps are:
Additionally, because of the way the Loop app fetches information from the pump, the x23/x54 series of pumps are slightly better at conserving battery life through the use of the MySentry packets to collect information from the pump. x22 pumps do not use MySentry.
The x23/x54 series pumps are also faster at delivering boluses greater than 10 units. On an x23 pump, a 13-unit bolus takes 5:00 minutes to complete. On an x22 pump, a 13-unit bolus takes 8:40 minutes to complete.
Finding a compatible Medtronic pump is probably the most difficult part for most new Loopers. Our suggestions:
Talk to friends in the diabetic community.
Ask your endocrinologist.
Ask at a local JDRF chapter meeting if someone has an old backup pump they'd be willing to donate to you.
Join diabetic supply groups on Facebook; both for-trade and for-sale groups.
Check Craigslist often and be willing to expand your search area to include larger cities.
Check out the HelpAround, NextDoor, OfferUp, and/or LetGo apps for pumps.
Looping in a time of covid
The most success appears to come from either one-on-one discussions with fellow diabetics/doctors or using apps (Craigslist, NextDoor, LetGo, HelpAround). If you are using Craigslist, you may wish to use an app on your iPhone to make the searching easier. There are apps to search multiple cities at once for your keywords and set up alerts.
"},{"location":"build/pump/#safe-purchasing","title":"Safe Purchasing","text":"If you choose to purchase from a remote or unknown seller, here are some tips for safe purchasing:
Use PayPal and purchase using the \"Goods and Services\" payment option. This costs nothing for the buyer, but the seller will lose 2.95% of the sale to PayPal fees. PayPal offers some protection for both buyer and seller in the event of fraud.
Ask for photos of the pump. Check to make sure the serial number of the pump on the backside matches the serial number of the pump showing in the display menu. Ask for a short video of the pump, or at least a photo of the pump turned on, so that you can see the pump's firmware and model number. Cracks and some wear on these pumps are expected. These pumps are not usually free of marks. Many people are successfully looping on pumps that have cracks and rub marks, but you may want to ask if you are concerned about any you see in photos.
Beware if the bottom of the reservoir/motor sleeve has the drive support cap pushed out, as shown here. Those pumps will generally not work (or only work intermittently), however some people have successfully repaired those pumps as shown in that link. Just be aware that it should be checked in advance.
Repairs to cracks or missing bits of plastic on battery cap area and reservoir caps are possible and not very difficult in most situations. You can read more about how to repair those here.
Ask for shipping that includes a tracking number. USPS Priority Mail's smallest box is a great option. It's only $7.20 domestically in the US and includes tracking. Ask the seller to add a small bit of packing protection such as bubble wrap around the pump to keep it safe during shipping. Make sure you get a tracking number within a reasonable period of time after you have paid.
Red flags that may indicate a scam:
Asking for payment through \"friends and family\" on PayPal, especially if you don't know the person or have any solid references for them. Paying in that way offers you no buyer protection. It's just like giving the seller cash, so you had better trust the seller.
Offering an \"almost new\" pump is a big red flag. These pumps should be at least 5-years-old by now. Do you really think a 5 year old pump should be unused and sitting in shrink wrap at this point? This seems highly suspicious. There are some out there, but they are very infrequent.
Not able to provide new pictures of the pump when requested. Sure they posted some pictures with the ad, but what if they just downloaded them from other people's ads? The seller should be able to furnish a couple of \"new\" photos at your request. A good one to ask for is the battery and reservoir tops so you can see the condition of those.
Medtronic will not typically sell pump supplies directly to customers who have not previously purchased a registered Medtronic pump. Ask your insurance about purchasing pump supplies through a durable medical equipment (DME) provider. Typically, the DME provider will coordinate with your insurance and doctor's office to get the necessary insurance approval and prescriptions for the supplies. If you are brand new to Medtronic infusion sites, you may want to ask for help from friends to try a variety of infusion sets before purchasing a full 90-day supply of any type in particular.
"},{"location":"build/pump/#omnipod-pumps","title":"Omnipod Pumps","text":"Reminder and Disclaimer
The use of Omnipod pumps with the Loop app is not supported by Insulet, although they are aware it is happening. Do not call Insulet asking for help with your Loop app build, setup, or operation. You are fully responsible for your use of the Loop app and do so at your own risk. Please read these documents and familiarize yourself with the Loop app before using it.
"},{"location":"build/pump/#omnipod-eros","title":"Omnipod Eros","text":"Eros pods (also known as Gen 3) were launched in 2013 and continue to be sold by Insulet. Insulet has announced they will stop providing Eros pods in the US in December 2023. As far as we know, there are no timelines announced for the discontinuation of Eros pods for other countries. Insulet doesn't specifically call these \"Eros\" anymore, they just use the term \"omnipod system\". For clarity, from Insulet's webpage:
Alternative Names for Omnipod Eros Pump and Pods
Eros pump is also known as Classic, or UST400, or Omnipod Insulin Management System.
Pharmacy sites sometimes may refer to the Eros pods as Gen 3 but they are the same exact pods.
Eros system has a big Personal Diabetes Manager (PDM) that does not look like a phone.
"},{"location":"build/pump/#omnipod-dash","title":"Omnipod DASH","text":"The DASH system has the newer, slimmer locked-android Personal Diabetes Manager (PDM) and built-in BLE communications in the pod, so there is no requirement for a RileyLink compatible device.
A RileyLink-compatible device is not required to use DASH with the Loop app. The communication with your iPhone uses Bluetooth.
Loop 3.0
and later works with DASH pods. If your version of the Loop app is 2.2.9 or earlier, you cannot use DASH pods.
Loop does not support Omnipod 5 pods.
"},{"location":"build/pump/#next-step-compatible-cgm","title":"Next Step: Compatible CGM","text":"Now you are ready to check if you have a Compatible CGM.
"},{"location":"build/rileylink/","title":"RileyLink","text":""},{"location":"build/rileylink/#order-a-rileylink-compatible-device","title":"Order a RileyLink Compatible Device","text":"Not needed for DASH
Time Estimate
Summary
FAQs
The RileyLink compatible device is required to allow your phone to talk to compatible Medtronic and Omnipod Eros pumps. It is not needed for Omnipod DASH pumps.
Details for RileyLink
The RileyLink compatible device is an open-source hardware device that can bridge Bluetooth Low Energy (BLE) to the radio-frequency wireless communication used by compatible Medtronic and Omnipod Eros pumps.
Loop 3 has Omnipod DASH support, among other new features. When using Omnipod DASH, the RileyLink compatible device is not necessary. If you are using Medtronic or Omnipod Eros (not DASH), you still need the device regardless of which version of Loop you are running.
Medtronic and Omnipod Eros pumps require a RileyLink compatible device.
"},{"location":"build/rileylink/#rileylink-compatible-devices","title":"RileyLink Compatible Devices","text":"The RileyLink protocol defines a specific Bluetooth interface and way of opening a Sub-GHz radio channel to pumps. All RileyLink compatible devices follow the RileyLink protocol.
There used to be just one option, the original RileyLink. Now there are more options, so you have to make a decision. Depending on your choice, be sure to have the correct charger and cables or batteries handy and add spare compatible supplies to your diabetes go-bag.
There is an entire FAQs page on RileyLink Compatible Devices.
Sections of interest include:
While you are waiting for the RileyLink compatible device to arrive, you can proceed with these build directions and can try one of the Simulated Loop options. After that, unless you are using Omnipod DASH, you'll have to wait for your device.
The population of DIY loopers (Loop and Android APS) has grown enough that you might be able to find someone local to loan you their spare.
"},{"location":"build/rileylink/#next-step-enroll-in-apple-developer-program","title":"Next Step: Enroll in Apple Developer Program","text":"Now you are ready to enroll in the Apple Developer Program.
"},{"location":"build/test-settings/","title":"Test Settings","text":""},{"location":"build/test-settings/#test-settings","title":"Test Settings","text":"Time Estimate
Open Loop
while you testSummary
Closed Loop
mode, test and validate your basal rates, ISF (correction factor), and CR (carb ratios)FAQs
Loop is just a fancy calculator underneath the hood. The math problems it solves depend on the settings you provide. So test settings before using the Loop app.
"},{"location":"build/test-settings/#basal-rates","title":"Basal Rates","text":"Correct basal rates keep your blood glucose steady without food present. The standard method is to test your basal by having a relaxing 4-6 hours without eating at least two hours before you begin the test. Does your blood sugar stay steady? Or do you climb and need a correction? Or do you go low and need to eat? Setting basal is a crucial step to setting yourself up for success with the Loop app. It determines how much of the insulin delivered (from basal and bolus) is counted as insulin on board (IOB).
Basal Tricks
The Loop app keeps track of how much more or less insulin than your scheduled basal rates are required to keep glucose in target. Once you become a proficient looper, you can tune your basal by looking at IOB overnight or when food and exercise are not involved.
"},{"location":"build/test-settings/#insulin-sensitivity-factor","title":"Insulin Sensitivity Factor","text":"The Insulin Sensitivity Factor (ISF), sometimes called Correction Factor, is how much one unit of insulin will bring down your glucose. The higher the value of this setting, the more sensitive to insulin you are. An ISF of 50 or 100 (2.8 or 5.5) means one unit of insulin lowers your glucose 50 or 100 mg/dL (2.8 or 5.5 mmol/L) in the absence of food or activity, when basal rates are correct.
Test ISF after you test and determine your basal rates. Simply bring yourself to a higher glucose with a glucose tab or choose a time when you are \"stuck\" higher than your target.
The Carb Ratio (CR) is the amount of carbs covered by one unit of insulin. Ideally, a good carb ratio will restore your glucose close to its starting point within 3 hours of the meal. (High fat/protein meals may cause glucose to be impacted longer.)
If you are spiking higher than you\u2019d like after a meal, but still coming back to the starting glucose, consider pre-bolusing your meal earlier (maybe by 15-20 minutes) rather than changing the carb ratio.
"},{"location":"build/test-settings/#other-resources","title":"Other Resources","text":"Check the companion site LoopTips. Several direct links to discussions are provided below:
If you\u2019re fascinated by this topic, read the book 'Think Like A Pancreas' by Gary Scheiner for a really great discussion.
"},{"location":"build/test-settings/#next-step-make-plans-for-loop-data","title":"Next Step: Make Plans forLoop Data
","text":"Now you are ready to make plans for Loop Data.
"},{"location":"build/testflight-xcode/","title":"TestFlight from Xcode","text":""},{"location":"build/testflight-xcode/#introduction","title":"Introduction","text":"There are several different methods for making use of TestFlight:
This guide can also be followed to install other apps you build with Xcode via TestFlight. Examples include Loop Follow
, Loop Caregiver
, xDrip4iOS
and GlucoseDirect
.
Some useful features of using TestFlight to install Loop:
Since apps built with TestFlight expire after 90 days, it is suggested you also setup a build using the Build with Browser method even if you don't plan on using it. The GitHub build can be updated in a few minutes from any browser and is an extra layer of protection in these scenarios if you do not have access to your Mac for a rebuild:
In all cases, except accidental deletion of Loop or loss of phone, the Loop you install from TestFlight builds over your existing app and you keep all your settings including your pump.
"},{"location":"build/testflight-xcode/#build-to-testflight-via-xcode","title":"Build to TestFlight via Xcode","text":""},{"location":"build/testflight-xcode/#initial-steps","title":"Initial Steps","text":"Before creating the app or uploading it to TestFlight, use the Build with Mac guide to sign your targets and build Loop to a simulator phone in Xcode. This checks to ensure the app you upload to your TestFlight will work as expected.
"},{"location":"build/testflight-xcode/#archive-the-project","title":"Archive the Project","text":"Change the build target to from building to a simulated phone to LoopWorkspace > Any iOS Device (arm64) like the image below.
Now go to the top menu and choose Product > Clean Build Folder. Once it's done, it should say \"Clean Finished\".
Go back to the top menu and choose Product > Archive. This will build Loop into a file rather than a phone or simulator. It should take about the same amount of time as building to a phone or simulator does.
"},{"location":"build/testflight-xcode/#upload-the-archive","title":"Upload the Archive","text":"Once the archive finishes building, it should automatically open the Archives window. If you want to open this window without re-archiving, click the following in the top menu: Xcode > Window > Organizer.
Select the archive and click Distribute App. If you've archived the project before, be sure to select the archive you intend to upload - most likely the one with the most recent Creation Date.
On the next screen, App Store Connect is selected by default. Click Next.
On the next screen, Upload is selected by default. Click Next.
"},{"location":"build/testflight-xcode/#first-time-archive-upload","title":"First-Time Archive Upload","text":"If you have already created a TestFlight for Loop via Xcode or the GitHub Build method, the next screen will not be shown, so skip ahead to Subsequent Archive Upload.
If this is the first time you're creating a TestFlight for Loop, enter the following on the next screen and click Next:
On the next screen, leave everything checked and click Next.
On the next screen, leave it set to Automatically manage signing and click Next. You will see a few messages as it performs some tasks. Be patient.
When you see the next screen, click Upload.
Wait until uploading is finished. Don't be alarmed if you see the following screen, just click Done.
"},{"location":"build/testflight-xcode/#deploy-app","title":"Deploy App","text":"Now that it's uploaded to TestFlight, it will take a little bit before it finishes processing and becomes available for installation on your iPhone. You can check appstoreconnect.apple.com/apps to find it's progress by clicking Test Flight and then iOS under Builds in the upper left. Once it no longer says \"Processing\" and instead says \"Ready to Submit\" next to the build's number, it should be available and ready to install on your iPhone.
To install Loop from TestFlight onto your iPhone, follow the instructions on the GitHub Deploy page.
"},{"location":"build/testflight-xcode/#update-app","title":"Update App","text":"Apps installed via TestFlight are only valid for a maximum of 90 days, so you must upload a new build to TestFlight at least every 90 days.
To update, simply repeat all the steps on this page.
Add a Calendar Reminder
Note that the built-in Loop Notification for expiration has not been modified to read TestFlight expiration, yet.
So, please add a calendar reminder.
"},{"location":"build/updating/","title":"Update/Rebuild with Mac","text":""},{"location":"build/updating/#overview","title":"Overview","text":"This page is only relevant when building with a Mac and Xcode.
For Browser Build, please see: Update/Rebuild with Browser
Time Estimate
Summary
Summary of tasks to prepare for and update your app:
In each of the sections below, follow links to sections of other build pages then hit the back button on your browser to return to this page.
FAQs
Under ordinary circumstances, you do not have to update your Loop app until it expires (1 year for a paid account). However, we encourage regular updates when a new version of iOS, or of Loop, is released because they often contain bug fixes or improvements which may increase operational stability.
"},{"location":"build/updating/#ios-updates","title":"iOS Updates","text":"Under ordinary circumstance, updating the iOS on your phone does not require a rebuild of the app on your phone. However, it's important to be prepared in case of an emergency, such as a lost phone.
Best Practice
It is good practice to first check if your computer (macOS or Xcode) will require an update to support building Loop to your phone BEFORE applying an iOS update to your Looping phone.
Follow these \"safe Looping\" steps for updating your iOS:
Loop Releases provides information about current and previous Loop versions.
Updating to iOS 16 (watchOS 9 or newer) requires enabling Developer Mode. Your existing app will not open until you take this step. Once enabled, the app opens again. A rebuild is not required.
"},{"location":"build/updating/#loop-is-no-longer-available","title":"\"Loop\" is No Longer Available","text":"The apps built and signed by you in Xcode with a paid developer account will last for 12 months; then they expire and must be rebuilt. At least once per year you will have to rebuild your app and go through this update process. If you do not update and the \"provisioning profile\" on your phone expires, you will see the \"Loop\" is No Longer Available message. You will be given multiple Loop App Expiration Notifications on the Loop phone, but might miss them if you are a caregiver.
When you see \"Loop\" is No Longer Available on your phone, the only solution is to rebuild the app. All of your settings are still present on your phone, but your \"provisioning profile\" expired and you need to generate a new one. Once you build Loop on your phone, following the instructions on this page, all your settings will be maintained - assuming you build with the same Apple Developers ID that was used initially.
"},{"location":"build/updating/#macos-and-xcode-versions","title":"macOS and Xcode Versions","text":""},{"location":"build/updating/#determine-required-xcode-and-macos-versions","title":"Determine Required Xcode and macOS Versions","text":"Between Loop app builds, there's a high likelihood that Apple has updated one or more of the systems involved in your Loop app. If you don't have the minimum Xcode version required for your phone iOS, you cannot build on that phone. Sometimes you must also update the macOS version to allow you to use the required Xcode version.
Based on the iOS on your phone, or the iOS you plan to install on your phone, determine the required macOS and Xcode versions. Click on this link versions for iOS, macOS and Xcode to determine the versions needed and then hit the back button in your browser to finish the steps on this updating page.
If you are tired of the macOS and Xcode version update requirements, check out the Build with Browser option.
First macOS and Then Xcode
Your macOS must meet the minimum requirement for the Xcode version you need to support your current iOS as detailed in that link above.
Don't be that person. Follow the directions.
Minimum means you need to have at least that version - newer versions build just fine.
"},{"location":"build/updating/#verify-update-macos","title":"Verify / Update macOS","text":"Click on this link Check your Xcode Version to find your Xcode version number.
If you need to update your Xcode, follow the instructions at this link Install Xcode and continue through Xcode Settings.
Advanced users: If you are finding installation of Xcode from the App Store incredibly slow, try the alternate method of Direct Download of Xcode.
Direct Download
Make sure your new computer has the macOS and Xcode required by your phone iOS. Be sure Xcode Command Line Tools are installed and that you Add Apple ID to Xcode.
"},{"location":"build/updating/#missing-xcode-or-command-line-tools","title":"Missing Xcode or Command Line Tools","text":"WARNING
If you fail to have Xcode or Xcode Command Line Tools installed, you will get one of these errors (or something similar) when you attempt to run the Build Select Script:
Follow Xcode Settings page after updating Xcode
Make sure to restart your computer after updating Xcode and follow the instructions on the Xcode Settings page. There's a known issue that happens often enough to be frustrating if you skip those steps. It's not always required...but this is a good easy ounce of prevention step.\n
"},{"location":"build/updating/#check-your-developer-account","title":"Check your Developer Account","text":"Apple updates its License Agreement for the Developer Program frequently. You need to login to your developer account to manually check if there is a new agreement to accept. If you see a big red or orange banner across the top of your Developer Account announcing a new license agreement like shown below...please read and accept it before building Loop.
"},{"location":"build/updating/#ready-to-build-loop","title":"Ready to Build Loop","text":"As long as there are no errors, you are now ready to proceed to Build the Loop App: Developer Mode
After building the new app, you may choose to return to this page and follow the instructions to Delete Old Copies. This is optional, but cleans up space on your computer.
"},{"location":"build/updating/#delete-old-copies","title":"Delete Old Copies","text":"This step is optional, but if your computer is low on space, it helps to clean up old downloads your are no longer using.
There is an easy way to do this. The Build Select Script used to download and build Loop provides Maintenance Utilities to help free up disk space.
Please review Loop and Learn: Build Select Script for more information.
Copy the line below that starts with /bin/bash
by hovering the mouse near the bottom right side of the text and clicking the copy icon (should say Copy to Clipboard
when you hover over it). When you click the icon, a message that says Copied to Clipboard
will appear on your screen.
/bin/bash -c \"$(curl -fsSL \\\n https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildSelectScript.sh)\"\n
Paste the line of text into Terminal. Be sure to click anywhere in the terminal before trying to paste. (Ways to paste: Cmd+V ; or Ctrl click and select from menu or Edit
-Paste
at top of Mac screen.)
If you prefer to clean up old downloads yourself, keep reading.
Where is the old folder?
Assuming you used the Build Select Script, your downloads are in the ~/Downloads/BuildLoop folder as shown in the graphic below. If you are tight on space, the older folders can be deleted. Best practice, download fresh and build Loop; and then go back and delete all but the most recent copy. The nice thing about the Build Select script is it automatically generates the folder name with the date and time of the download. Delete each unwanted folder, one at a time.
If you see a file (not a folder) in ~/Downloads/BuildLoop called LoopConfigOverride.xcconfig, keep that around. If you delete it, you'll need to recover it from the trash, regenerate it (if you know how) or sign your targets manually for your current download.
The Scripts folder can also be left alone, but if you delete it, it is regenerated with the next use of the Build Select Script.
"},{"location":"build/updating/#background-information","title":"Background Information","text":"New Loopers do not need to read the rest of this page.
Experienced Loopers may wonder what happened to deleting derived data.
If you build frequently, you do not have to delete the profiles every time. When the build script asks if you want to \"Ensure a Year?\", you can skip that step.
On the other hand, you may need to delete the provisioning profiles or saved Xcode information about a version of LoopWorkspace (or other app) currently on your computer. The maintenance utilities found in the BuildSelectScrip can be run to delete your provisioning profiles or clear derived data. Or you can use the individual commands in the next sections to do the same thing.
"},{"location":"build/updating/#delete-provisioning-profiles","title":"Delete Provisioning Profiles","text":"You can delete your provisioning profiles by copying this command and pasting it into any terminal. This does not affect any build you currently have on your phone - this just forces your current computer to generate a new one next time you build with Xcode.
Copy and Paste to manually remove your Provisioning Profiles on your computerrm ~/Library/MobileDevice/Provisioning\\ Profiles/*.mobileprovision\n
"},{"location":"build/updating/#delete-derived-data","title":"Delete Derived Data","text":"If you build using the same clone on your computer and then update that clone, sometimes you want to remove derived information that Xcode remembers and force it to start fresh.
First quit out of Xcode. The following command will delete all derived information for all your clones, so next time you build any app from an existing clone on your computer, the build will take longer. All dependencies will download again. So wait until you see the \"indexing\" indication on Xcode before trying to build.
Copy and Paste to manually force Xcode on your computer to start freshrm -rf ~/Library/Developer/Xcode/DerivedData\n
"},{"location":"build/updating/#revoke-certificate-issue","title":"Revoke Certificate Issue","text":"What does it look like if you run into the Revoke Certificate message? When you prepare to Sign the Targets with Xcode, you'll see the message highlighted in the figure below.
More information is shown in the orange box below.
Revoke certificate
The important part of this message is:
WAIT - You might not need to revoke your certificate
If you revoke and keep going:
Be aware that you will have to rebuild to every device that used the certificate you just revoked and if you have other apps built with this certificate, they will stop working too.
"},{"location":"build/updating/#direct-download-of-xcode","title":"Direct Download of Xcode","text":"Many people find updating Xcode from the App Store to be incredibly slow - especially when a new version has just been released. This method still takes time and enough space on your disk but is faster than going through the App Store. Depending on your internet speed, this download can be done in about an hour. Then once it is downloaded, expect another fifteen minutes to several hours (depending on the speed of your computer) for the \"xip\" file to \"expand\".
The instructions do not hold your hand.
Here are the different steps you need to follow when doing the Direct Download instead of the App Store method:
Time Estimate
Summary
FAQs
(personal team)
beside it even though I enrolled in the paid Developer Account program...what should I do?\" You should check your spam email box in case Apple sent you an email there. Make sure you've waited the 48 hours that Apple says it may take to get your account approved. If it's been 48 hours and you still don't see anything in your email, contact Apple support and ask them about the status of your enrollment. It may be held up by something on their end.Open Xcode from your Applications folder. If it offers to start a new project with you, just close that window.
Click on the Xcode->About Xcode menu item. The version number is displayed.
"},{"location":"build/xcode-settings/#privacy-settings","title":"Privacy Settings","text":"This is not typical, but it does happen.
Some people have their macOS privacy settings configured so that Xcode does not have permission to access their ~/Downloads
folder. This will cause a lot of grief when trying to use the Build Select Script to build an app with Xcode. This will be mentioned on the build errors page, but this is a good time to check. The graphic below has steps labeled 1 through 4 to guide you to the setting that must be enabled for you to build the app with Xcode.
Yes, watchOS simulators are required to build Loop. If Xcode asks if you want to download them - say yes. It's slow but you cannot build Loop without the simulator.
The very first time you open Xcode it may install a package of command line tools. Wait patiently until it finishes. The command line tools may have installed without asking.
Xcode
in the top menu bar (just to the right of the Apple icon in the upper-left corner) and select Settings
in the drop-down menuLocations
tab in the Settings window to see the dropdown menu for Command Line Tools. Make sure the Xcode version listed matches what you just installed (not the version in this graphic)Go to the Xcode Settings window from above, click on the Accounts
tab and then press the + in the lower-left corner to add an Apple ID account.
The Xcode Accounts Tab, shown in the graphic (from Xcode 13) below allows you to have more than one account available to choose from when you sign your targets (another new term that is explained later). Normally, you would only have one.
In the graphic, whichever item is selected on the left side (highlighted by Xcode in blue) shows up with more details on the right side of the display. If the Free account had been selected, the information shown in the red inset would have been displayed.
Free and Paid
The graphic below shows examples for a paid account and a free account. You will only see one.
"},{"location":"build/xcode-settings/#free-developer-account","title":"Free Developer Account","text":"If you want to use a free developer account, you will simply enter your Apple ID in this section and Xcode will automatically enroll your Apple ID in the free developer program. It will show up with the (Personal Team)
and User
indication.
If you enrolled in the paid account already and have confirmation that your account is active, enter the Apple ID of the paid developer account. It will show up with just your name and the Admin
indication. If you have enrolled and are waiting, the (Personal Team)
and User
indication shows up until the paid account is confirmed by Apple.
Description
The description line is initially empty. You can add your own description or just leave the line blank. Text added to the decription line shows up in two places: To the left, just above the email address and to the right once that Apple ID is selected.
You are now done setting up Xcode. Great job! You will not need to redo the account setup steps on any subsequent builds or updates of your Loop app. Xcode will remember these settings.
"},{"location":"build/xcode-settings/#next-step-build-loop","title":"Next Step: Build Loop","text":"Now you are ready to Build the Loop App.
"},{"location":"build/xcode-version/","title":"Xcode Version","text":""},{"location":"build/xcode-version/#install-required-xcode-version","title":"Install Required Xcode Version","text":"Time Estimate
Summary
FAQs
Xcode is a free application for Apple computers. You will use Xcode to turn the \"raw\" Loop source code into an iOS application and install it onto your iPhone. Which version of Xcode you install on your computer depends on the iOS version you have on the iPhone you are going to be installing Loop on and the macOS version you have on your computer.
Because of the complexity of these dependencies, please read this entire page.
Or - look into building with GitHub Actions - no Mac computer required, no need to worry about versions for Mac OS or Xcode - all done for you on GitHub (some configuration required).
"},{"location":"build/xcode-version/#which-version-of-xcode-do-i-need","title":"Which version of Xcode do I need?","text":"First, choose a version of Xcode appropriate for your iOS device. Then, determine the minimum macOS version required for that Xcode version. Update to at least that minimum macOS version. Then follow the instructions to download and install Xcode (or update an existing installation):
Have you turned off automatic updates on your iOS device?
Loop and iOS Updates
Please Read: Turn Off Automatic Updates
Before manually accepting an iOS update, be sure you have compatible versions of Xcode and MacOS.
Minimum Xcode Version
The minimum version of Xcode you need depends on the iOS version you have on your phone.
Please Read: Minimum Version List
Can't find the required Xcode version
Don't be the person who posts for help saying, \"I'm trying to update my Loop app but am getting errors.\" When asked what Xcode version they have and if they've updated, they respond, \"I don't have any Xcode updates available in the App Store, so I must be running the most current version.\"
Actually, they forgot to check for macOS updates and therefore cannot see the needed Xcode update yet.
"},{"location":"build/xcode-version/#after-update-reboot","title":"After Update - Reboot","text":"After any update of macOS or Xcode, it is always a good idea to reboot your computer.
"},{"location":"build/xcode-version/#how-do-all-the-minimum-versions-relate-to-each-other","title":"How do all the minimum versions relate to each other?","text":""},{"location":"build/xcode-version/#compatible-versions","title":"Compatible Versions","text":"The current development version and the next release of\u00a0Loop\u00a0will require Xcode version 15 regardless of the iOS on the phone. This requires macOS 13.5 or higher. As an alternative, use Build with Browser, which supports iOS 15, 16, and 17.
When this page was last updated, macOS 14.0 and Xcode 15.0 were tested to successfully build the app for phones with iOS 15 through iOS 17.0.2.
The table below lists the minimum requirements to build the current release of\u00a0Loop 3.2.3. If your macOS or Xcode version is higher, you can build with Mac.
Find your phone iOS in the table below. If your iOS is not listed, e.g., 16.6, choose the first row that is less than your iOS.
iOS Version minimum Xcode minimum macOS 17.0 15.0 13.5 16.4 14.3 13.0 16.2 14.2 12.5 15.1 14.1 12.5"},{"location":"build/xcode-version/#wikipedia-chart-for-apple-versions","title":"Wikipedia Chart for Apple Versions","text":"This graphic (copied from Wikipedia and last updated March 2023) is not updated with every iOS update - use it as a map to read the minimum requirements. Every attempt will be made to update the words in the Minimum Version List promptly - that's much easier than updating a graphic.
Follow this link to Wikipedia and scroll down to the current version of this figure - the graphic shown below is a map of how to read the current version of this figure at Wikipedia.
"},{"location":"build/xcode-version/#what-happens-if-you-try-using-too-old-of-xcode","title":"What happens if you try using too old of Xcode?","text":"It isn't some catastrophic failure if you try to build with an outdated Xcode without realizing it. If the build fails, nothing happens to your phone (or Loop on your phone if you are rebuilding). Nothing is copied from the computer to the phone until after you see the Build Succeeded message. You'll see a pretty obvious error message during your Loop build. Check Oh dear! Build errors?.
Some error messages that have shown up in earlier updates:
Package.resolved file corrupted or malformed\n
This is for trying to select an iOS 17 phone when building with Xcode 14:
Could not locate device support files\n
This is for building development code with Xcode 14 instead of Xcode 15:
Loop Widget errors like:\nCommand SwiftCompile failed with a nonzero exit code\nCannot infer contextual base in reference to member 'widget'\n
"},{"location":"build/xcode-version/#next-step-xcode-settings","title":"Next Step: Xcode Settings","text":"Now you are ready to set up Xcode Settings.
"},{"location":"faqs/algorithm-faqs/","title":"Algorithm FAQs","text":""},{"location":"faqs/algorithm-faqs/#does-loop-learn-or-detect-changes-in-your-insulin-needs","title":"Does Loop \"learn\" or detect changes in your insulin needs?","text":"The answer is both Yes and No.
Yes in that:
No in that:
Perhaps in subsequent versions of Loop, auto-adjustment of settings or machine learning could be incorporated. Until then, you will need to tell Loop if your underlying settings change or make temporary adjustments for short term issues.
The use of Overrides can be quite helpful for short-term changes.
"},{"location":"faqs/algorithm-faqs/#what-does-negative-active-insulin-mean","title":"What does negative Active Insulin mean?","text":"When Loop withholds or suspends some of your scheduled basal insulin, that starts an accumulation of insulin deficit. If you have a kinked cannula and insulin is not delivered, you'd call yourself \"lacking insulin\" (negative IOB).
When Loop reports negative IOB, it is a sign that Loop has been actively helping you prevent a low blood sugar. If you find significant negative IOB regularly, you probably need to adjust/test your settings. Glucose that continues to decrease (away from a meal) when IOB goes negative is typically a sign that the scheduled basal rate is too high.
Developer Notes
Scheduled basal rates are meant to counteract your endogenous glucose production. Another way of saying this is that Loop expects your body to be producing an amount of glucose at a rate that is handled by your basal insulin settings.
Your body doesn't really produce glucose at a fixed rate, but that's how it's modeled in Loop.
\"All models are wrong, but some are useful.\" (Quote attributed to British statistician George E. P. Box.)
"},{"location":"faqs/algorithm-faqs/#how-is-iob-calculated","title":"How is IOB calculated?","text":"Insulin on board (IOB) is calculated from the amount of insulin delivered above or below the scheduled basal rate. For each dose of insulin, the insulin model is used to determine how much of that insulin is active over time. Loop is adding up all the amounts over the full Duration of Insulin Action (DIA). The DIA is 6 hours for most rapid insulin in the models used by Loop.
IOB is plotted on the Active Insulin Chart in the main Loop display.
"},{"location":"faqs/algorithm-faqs/#how-do-delivery-limits-affect-automatic-dosing","title":"How do Delivery Limits Affect Automatic Dosing?","text":"With each cycle, Loop\u00a0generates a glucose prediction and a recommended dose (positive or negative) to bring you to your correction range.
Let \\(\\mathit{dose}\\) be the amount the app thinks you need for this cycle before considering Delivery Limits. The relationship between \\(\\mathit{dose}\\), delivery limits: \\(\\mathit{maximumBolus}\\) and \\(\\mathit{maximumBasalRate}\\), and current IOB: \\(\\mathit{currentIOB}\\) are detailed in the following sections:
In this case, where you are manually requesting a bolus recommendation by using the double orange triangles (circled below) in the toolbar at the bottom of the Loop status screen, only the \\(\\mathit{maximumBolus}\\) Delivery Limit is considered.
Because this will be an automatic dose, the app will not provide a dose that would exceed an IOB of 2 times the \\(\\mathit{maximumBolus}\\). The term automatic dose refers to insulin the app automatically delivers above your scheduled basal rate.
\\[ autoDose = minimum (dose, {2*maximumBolus} - currentIOB) \\]Note that a manual dose can exceed \\(\\mathit{autoDose}\\). There will be no warning if this happens. But no additional automatic dosing will happen until IOB is below \\(\\mathit{2*maximumBolus}\\). As long as the prediction is above the correction range, scheduled basal continues regardless of IOB.
"},{"location":"faqs/algorithm-faqs/#automatic-bolus-constant-partial-application-factor","title":"Automatic Bolus: Constant Partial Application Factor","text":"There is a new feature coming with the next release, available now with customization or the development version, called Glucose Based Partial Application Factor. This feature is disabled by default. When disabled, the Partial Application Factor is a constant 40%.
When Glucose Based Partial Application Factor is enabled, the application factor is modified based on the current glucose level. The value ranges from 20% at lower glucose to 80% at higher glucose. Let \\(\\mathit{gbpa\\%}\\) represent the application factor, then:
This automatic method uses both Delivery Limits: \\(\\mathit{maximumBasalRate}\\) and \\(\\mathit{maximumBolus}\\). As explained above, the \\(\\mathit{maximumBolus}\\) is used to calculate \\(\\mathit{autoDose}\\).
The desired dose, \\(\\mathit{autoDose}\\), is multiplied by two (to get an hourly rate) and then added to the scheduled basal rate to determine the desired temporary basal rate (\\(\\mathit{BR_temp}\\)) with a duration of half-an-hour to provide that amount of insulin. This calculated \\(\\mathit{BR_temp}\\) is compared to \\(\\mathit{maximumBasalRate}\\).
There is more detail about the Loop Algorithm at the bottom of the Operate tab.
Loop uses Apple HealthKit as long term storage for glucose, insulin and carbohydrates. But there is more going on than simple storage.
It is important that permissions for Loop be properly configured for the Health app.
Loop 3.x.x
: See Apple Health PermissionsLoop 2.2.x
: See Health PermissionsTo view the list of data stored in Health
To Set Blood Glucose, Carbohydrates and Insulin as Favorites
The health app on the Loop phone provides useful plots of data since you started to Loop with that Apple ID. Examples for insulin delivery and carbohydrates are shown in the graphic below. New versions of iOS modified details of the display with the same or improved capabilities.
"},{"location":"faqs/apple-health-faqs/#healthkit-details","title":"HealthKit Details","text":""},{"location":"faqs/apple-health-faqs/#glucose-and-apple-healthkit","title":"Glucose and Apple HealthKit","text":"For Dexcom users with the Dexcom app on the Loop phone, the Dexcom app writes the value to Health with a 3-hour delay.
Loop reads the Dexcom information at the same time the Dexcom app gets the reading from the transmitter. It uses the glucose value to update predictions and stores it in Health.
If you look at your Health glucose readings, you'll notice the Loop icon for the last 3 hours and the Dexcom icon for times earlier than that.
All other CGM readings are reported with the Loop icon and there is no transition after 3 hours.
"},{"location":"faqs/apple-health-faqs/#carbohydrates-and-apple-healthkit","title":"Carbohydrates and Apple HealthKit","text":"In Loop* 2.2.x
, if you set Apple Health app permissions to allow it, Loop will read carbohydrates from the Health app. If you give a third-party app permission to store carbohydrate data in Health, and do not realize that Loop reads that information, you might get unexpected insulin delivery based off those carbs. To avoid that unanticipated behavior, the directions tell you to set permissions to allow Loop to write to carbohydrate storage but not read.
In Loop 3
, the option to read from Health carbohydrates is explicitly disabled and can only be enabled by setting up special parameters when you build the app. The insructions for the code customization are not in LoopDocs yet. If it is important to you to use a third-party app to record carbohydrates and have Loop read the information and automatically dose with insulin, ask for help in zulipchat.
The relationship between Loop and Apple HealthKit is very important to understand if you ever need to do one of these actions:
Be Cautious
Allowing users to delete events is fairly risky. If a user deletes a dose accidentally, or does not understand the IOB impact while in closed loop is enabled, then Loop may start giving insulin that is not needed.
One method to deal with insulin that wasn't given is to go disable closed loop for 3 to 6 hours. However, if you take care, you can remove insulin from Loop.
Developer Notes: Pump Events and Insulin Delivery
Loop stores Pump Events separately from Insulin Delivery. With permissions set to allow Loop to read insulin from Health (recommended), the Insulin Delivery store contains doses entered from Health as well as the subset of pump events that represent doses.
Pump Events are displayed by tapping an insulin chart on the main screen and viewing the Event History tab.
When you delete a pump event using the Event History interface in Loop, the associated entry in Insulin Delivery is not deleted.
"},{"location":"faqs/apple-health-faqs/#bolus","title":"Bolus","text":"Event History
and in the Health app insulin data listEvent History
list, but leave that same entry in Health, Loop reads it back from HealthEvent History
and Health data; it is best if you do this within one loop cycleEvent History
but you could not find it in Health, look again after the next loop cycleEvent History
, Loop reports it to Health againEvent History
list and Health data; it is best if you do this within one loop cyclePro Tip
Write on a piece of paper the times and values you think you should delete.
Look at those values in both Event History
and Health Insulin data list.
Record what Loop is reporting as IOB.
Review the values one more time, and then delete those entries in both places. Review IOB again. If you made a mistake, you can refer to that written list and adjust appropriately.
"},{"location":"faqs/apple-health-faqs/#basal","title":"Basal","text":"Loop keeps track of how much basal is delivered so the IOB is properly reported. In older versions of Loop, there may be occasional display glitches, but the internal accounting is correct and updates every Loop Cycle.
Developer Notes: Scheduled Basal is Not a Pump Event
Scheduled basal is not a pump event so you will not see it listed in the Event History tab.
Scheduled basal does not affect IOB when delivered as scheduled.
The Insulin Delivery store keeps track of the insulin delivered via scheduled basal.
Loop updates the amount of insulin delivered through basal (both scheduled and temporary) to Health at regular intervals - this does not happen every Loop Cycle when basal rates are not changing. The updates to Health happen:
A simple example to illustrate this - for a pump with smallest insulin delivery of 0.05 U:
Schedule Temp Basal (TB) Health Explanation 12:00 AM0.4 U/hr --- --- Start of Day / Start of Example 06:00 AM0.5 U/hr --- 06:00 AMBasal2.4 U Loop reports insulin delivered by basal for the last 6 hours when the scheduled basal rate has a new entry --- 07:15 AM0.0 U/hr 07:15 AMBasal0.6 U Loop reports insulin delivered by basal since last report up to time TB starts --- 07:45 AMTB expires 07:45 AMBasal0 U No insulin was delivered during TB 08:00 AM0.4 U/hr --- 08:00 AMBasal0.1 U Loop reports insulin delivered by basal since last report; the scheduled basal rate has a new entry"},{"location":"faqs/apple-health-faqs/#tidepool-and-apple-healthkit","title":"Tidepool and Apple HealthKit","text":"If you have a Tidepool account and use the Tidepool uploader on your Loop phone, the data in Health is uploaded to your Tidepool database where you can view displays with the Tidepool web browser tool.
"},{"location":"faqs/apple-health-faqs/#how-do-i-modify-apple-healthkit-permissions","title":"How Do I Modify Apple HealthKit Permissions","text":""},{"location":"faqs/apple-health-faqs/#loop-health-permissions","title":"Loop Health Permissions","text":"You can review and modify the Apple HealthKit permissions for the Loop app.
Open the Apple Health app ( icon)
At this point, you can review and modify the settings.
"},{"location":"faqs/apple-health-faqs/#cgm-health-permissions","title":"CGM Health Permissions","text":"If you choose to, you may add permission for your CGM app to write to Apple Health. Loop will read glucose from Apple Health, but only while the phone is unlocked and the app is open.
Note that if a glucose value is added to Apple Health \"now\", Loop will pick up that value and use it for the glucose prediction. This can happen with a finger-stick entry or some Libre third-party apps, but not with Dexcom, which has a 3-hour delay before writing to Health.
"},{"location":"faqs/apple-health-faqs/#dexcom","title":"Dexcom","text":"The Dexcom app for both G6 and G7 has a 3-hour delay before writing to the Health app. If you tap Glucose data in Health, scroll to the bottom to select Show All Data
and then scroll back in time, notice the Loop
icon is replaced by either the G6
or G7
icon starting 3 hours ago.
If you happen to wear a Dexcom G6 and G7 sensor at the same time, then starting 3 hours in the past, both sensor traces will show up in the Loop Glucose chart
.
Loop only uses data from the CGM you selected as your CGM for closed-loop insulin delivery, but don't be surprised at the double trace if you want to wear both during the transition from G6 to G7.
Add Permission to Health for Dexcom to Write Glucose
If either the G6 or the G7 has permission to write to Apple Health, then Loop will delete the Loop glucose data in Apple Health that are older than 3 hours and newer than 1 week. The Dexcom app will write its glucose values to Health when each value is 3 hours old.
If you transition from G6 to G7 (or alternate back and forth), be sure that at least the app you are currently using has permission to write to health. (I inadvertently forgot to turn on health permission for G7. By the time I noticed, I had a gap of several days in my Apple Health storage of glucose values.)
"},{"location":"faqs/apple-health-faqs/#libre","title":"Libre","text":"There are several choices for reading Libre sensors.
With Loop dev
(will be Loop 3.4.x
after release), LibreTransmitter is integrated with the Loop
app.
The frequent updates (1-minute glucose data) provided by Libre did cause some issues with released versions (Loop 3.0
and Loop 3.2.x
with customizations that use various third-party apps to read the Libre). These were fixed initially by modifying the third-party apps to limit how frequently they supplied glucose data.
With Loop dev
(will be Loop 3.4.x
after release), the Loop app only initiates a closed-loop cycle automatically following a new glucose value if it has been more than 4.2 minutes since the last one.
Loop 3.0
and Loop 3.2.x
versions do not have that limitation on how frequently Loop responds to a new glucose reading. There is a Customization that incorporates the 4.2 minute interval check which can be applied to Loop 3.2.2.
The glucose units (mg/dL or mmol/L) Loop uses match what is in Apple Health. Once you connect a device that reports glucose to the phone, make sure the units match the device. Note - you can change units for Dexcom Share and it translates units for you - not sure about other devices.
The next release of the Loop app and the current Loop-dev branch includes Libre support in addition to the CGM listed below.
The Loop app supports G5, G6, G7, Dexcom ONE, Dexcom Share, Nightscout and the Medtronic CGM systems compatible with Looping pumps.
Libre Support (for some Libre sensors):
There are more details on the Compatible CGM page.
"},{"location":"faqs/cgm-faqs/#do-i-need-wait-for-a-new-sensor-session-to-start-loop","title":"Do I need wait for a new sensor session to start Loop?","text":"No, you can start Looping mid-sensor session. There's no need to do anything special with regards to your CGM session when starting or ending the Loop app.
"},{"location":"faqs/cgm-faqs/#what-do-i-do-when-sensor-is-in-warm-up","title":"What do I do when sensor is in warm-up?","text":"The Loop app will stop automatically adjusting insulin when the most recent glucose value is older than 15 minutes. This is indicated by seeing three dashes in place of the glucose reading on the HUD.
No Recent Glucose
is displayed, making it easier to add the fingerstick value directly in Loop, which also saves it in Apple HealthWith no recent glucose readings, your pump returns to the scheduled basal delivery (within 30 min or less).
Loop continues to accept carb entries and manual bolus commands. Manual Temp Basal can also be commanded.
"},{"location":"faqs/cgm-faqs/#dexcom-g7-warmup","title":"Dexcom G7 Warmup","text":"The Dexcom G7 begins warming up as soon as you insert the device and completes in less than half an hour. Many Loopers use the combination of this warmup upon insertion and the 12-hour grace period offered by the G7 to have continuous CGM readings with no gap.
After waiting for the sensor to settle, stop the old sensor and connect to the new sensor
When you change transmitters (prior to Dexcom G7), you will need to update the transmitter ID in your Loopsettings. The instructions for Dexcom are provided below:
Delete CGM
button at the very bottom of the CGM info pageNot Connected
and select Forget This Device
If you don't update your transmitter ID when you change active transmitters, and you included your Dexcom share credentials, then the Loop app uses your Dexcom Share server to get your CGM data and will not work without cell or wifi connection. When the Loop app is using data from Dexcom Share servers, a small cloud will appear above the BG reading in the Loop app and should tip you off that maybe you forgot to update your transmitter ID. It's best not to enter Share Credentials. This makes it really obvious that you need to update the CGM settings in the Loop app at transmitter change time.
"},{"location":"faqs/cgm-faqs/#dexcom-g7","title":"Dexcom G7","text":"With Dexcom G7, the Loop app automatically picks up the active sensor/transmitter pair from the Dexcom G7 app on the phone. Once Dexcom G7 is added to the Loop app as the CGM, the Looper does not need to do anything to the Loop app after selecting the new sensor/transmitter pair in the Dexcom G7 app.
"},{"location":"faqs/cgm-faqs/#dexcom-g5-g6-and-one","title":"Dexcom G5, G6 and ONE","text":"The diagram below illustrates the steps needed to switch transmitters on Dexcom G5, G6, and ONE (for the version of ONE based on G6). This typically needs to be done every three months when a new transmitter is started.
sequenceDiagram\n actor user as User\n participant dexcom as Dexcom App\n participant loop_app as Loop App\n\n autonumber\n user ->> loop_app: Delete CGM\n user ->> dexcom: Stop old Sensor\n activate dexcom\n Note over dexcom: Switching sensors and transmitters... \u23f1\ufe0f\n user -->> user: Remove old Sensor and old Transmitter\n user ->> dexcom: Enter/Scan new Transmitter ID\n user ->> dexcom: Enter/Scan new Sensor Code\n user -->> user: Insert new Sensor then attach new transmitter\n user ->> dexcom: Pair then Start new Sensor\n deactivate dexcom\n dexcom -->> user: New Sensor warming up... \n activate dexcom\n Note over dexcom: New sensor warmup... \u23f1\ufe0f\n user ->> loop_app: Add CGM\n user ->> loop_app: Enter new Transmitter Serial Number\n user ->> loop_app: Enable Remote Upload\n dexcom -->> user: New Sensor operational\n deactivate dexcom
"},{"location":"faqs/cgm-faqs/#can-i-use-libre-sensors-with-a-reader-like-miao-miao","title":"Can I use Libre sensors with a reader like Miao Miao?","text":"If you use Loop dev code, then any Libre sensor supported by LibreTransmitter can be used with the Loop app.
See Which CGMs are supported by the Loop app?.
"},{"location":"faqs/cgm-faqs/#can-i-use-eversense","title":"Can I use Eversense?","text":"There is a method to upload Eversense to Nightscout using an Android phone, but there is no method to read an Eversense directly with an iPhone at this time.
You can use Nightscout as a CGM with Eversense, but that requires internet access.
"},{"location":"faqs/cgm-faqs/#can-the-loop-app-read-cgm-data-from-nightscout","title":"Can the Loop app read CGM data from Nightscout?","text":"Yes.
"},{"location":"faqs/cgm-faqs/#what-other-cgm-apps-can-be-used-with-loop","title":"What other CGM apps can be used with Loop?","text":"If you are willing to build a development version of Loop, the dev branch incorporates LibreTransmitter into the Loop app itself. Please read about Loop Development before building dev and using the dev app.
You can add xDrip4iOS and GlucoseDirect as a CGM option to the Loop app by applying a code customization.
Please read the docs for xDrip4iOS and Glucose Direct. You must build these apps yourself to Loop; you cannot use the TestFlight pre-built versions.
"},{"location":"faqs/glossary/","title":"Glossary","text":"Each item in the glossary is also a Tooltip. The word or phrase is repeated in parentheses to assist those using Google Translate.
When Google Translate is selected:
Actions\u00a0 (Actions): a custom application for the GitHub Actions platform that performs a complex but frequently repeated task; specifically used to build Loop from a browser
Activated\u00a0 (Activated): for Omnipod: time at which insulin was injected into pod and 2 beeps were heard
Anchor Links\u00a0 (Anchor Links): any header on a LoopDocs page can be used as a link, tap on the paragraph symbol at the end of the header to view the link in the URL
API_SECRET\u00a0 (API_SECRET): password (min 12 characters) needed to access Nightscout Site
API\u00a0 (API): Application Programming Interface
APN\u00a0 (APN): Apple Push Notification service, required for issuing remote command via Nightscout
App Group\u00a0 (App Group): a unique identifier that Apple users for a given app, yours has your TEAMID embedded in it, group.com.TEAMID.loopkit.LoopGroup
Automatic Bolus\u00a0 (Automatic Bolus): provide a fraction of the recommended insulin automatically with each updated CGM reading (default 40%)
BAGE\u00a0 (BAGE): pump battery age on Nightscout site
Big Sur\u00a0 (Big Sur): older version for operating system for Mac, macOS 11.x
BLE\u00a0 (BLE): Bluetooth low energy, used for communication by phones, CGM and some pumps
Build Select Script\u00a0 (Build Select Script): by running a command in your terminal, this menu-driven tool assists in building Loop
branch\u00a0 (branch): version of code within a single repository or workspace repository
CAGE\u00a0 (CAGE): cannula (or pump site) age on Nightscout site
carthage\u00a0 (carthage): a program that used to be required to build Loop - no longer needed
Catalina\u00a0 (Catalina): older version for operating system for Mac, macOS 10.x
Certificate\u00a0 (Certificate): Apple certificate is used to sign your iOS or Mac apps - tied to but different from your permanent Developer ID
CGM\u00a0 (CGM): continuous glucose monitor, wearable medical device that measures and reports glucose in interstitial fluid
Closed Loop\u00a0 (Closed Loop): Loop will make automated adjustments of insulin delivery using predictions based off user entries, settings, IOB and COB
Open Loop\u00a0 (Open Loop): Loop will not make automated adjustments of insulin delivery but predictions and recommendation features are available
clone\u00a0 (clone): create a copy of a repository on your computer including revision history and ability to update using git commands
COB\u00a0 (COB): Carbs on Board, affects automated insulin delivery: the g of carbohydrates that Loop expects to be absorbed and uses for glucose prediction
commit\u00a0 (commit): a formal change to files in a repository; each commit has an alphanumeric identifier (SHA-1)
Config Vars\u00a0 (Config Vars): configuration parameters for a Nightscout Site
Correction Factor\u00a0 (Correction Factor): how many points your blood sugar will drop for each unit of insulin; Loop calls this Insulin Sensitivity Factor (ISF)
Correction Range\u00a0 (Correction Range): Loop recommends changes to basal and / or bolus to bring glucose predictions into this range
CR\u00a0 (CR): Carb Ratio; how many grams of carbs are covered by one unit of rapid-acting insulin
Delivery Limits\u00a0 (Delivery Limits): max bolus and max basal rates allowed by your therapy settings
Developer Mode\u00a0 (Developer Mode): Extra security for iOS 16 and newer; this must be turned on to allow an app built from Xcode directly to the phone to run on a phone or watch
DIA\u00a0 (DIA): Duration of Insulin Action, the full time insulin is active including a long, low-level tail
DIY\u00a0 (DIY): Do it yourself, a common acronym for the open-source software community (and the maker community)
Dosing Strategy\u00a0 (Dosing Strategy): chosen method for increased insulin dosing: (1) High Temp Basal or (2) Automatic Bolus with scheduled basal
dynos\u00a0 (dynos): used to reboot a Nightscout Site
EmaLink\u00a0 (EmaLink): radio-frequency device Loop uses to control Eros pods (aka. Gen 3) and older Medtronic pumps
Event History\u00a0 (Event History): record of pump events (bolus or temp basal) reported and used by Loop
Expiration Date\u00a0 (Expiration Date): your Loop app has a finite life, the app warns you starting 3 weeks before the expiration date
fastlane\u00a0 (fastlane): used as part of the github Build Action method that enables building Loop without a Mac computer or Xcode
Finder\u00a0 (Finder): graphical folder and file display on Mac
fork\u00a0 (fork): a copy of code in a github repository other than the original
GBPA\u00a0 (GBPA): Glucose Based Partial Application: modification to Automatic Bolus Dosing Strategy
GIF\u00a0 (GIF): Graphics Interchange Format (GIF) can be used for small animations and low-resolution video clips
git\u00a0 (git): a tool for version control
GitHub\u00a0 (GitHub): an online service for storing repositories, accessible from a browser
github.com\u00a0 (github.com): an online service for storing repositories, accessible from a browser
GitHub Personal Access Token\u00a0 (GitHub Personal Access Token): used to enable Browser Build of Loop
Glucose Chart\u00a0 (Glucose Chart): Display of measured and predicted glucose values
Glucose Safety Limit\u00a0 (Glucose Safety Limit): Loop will not suggest insulin delivery when glucose prediction (in next 3 hours) goes below this limit; in Loop 2 this was called Suspend Threshold
GMT\u00a0 (GMT): Greenwich Mean Time is mean (average) solar time at 0 degrees longitude, see UTC
Guardrails\u00a0 (Guardrails): limits in the code for user selected settings, recommended and absolute limits are provided
Hamburger Menu\u00a0 (Hamburger Menu): three parallel lines that, when tapped, open a new menu
HUD\u00a0 (HUD): Heads-Up Display at top of Loop main screen, phone in portrait mode
ICE\u00a0 (ICE): Insulin Counteraction Effect - Loop models the expected glucose change based on carbs entered, absorption time and your settings; and adjusts based on measured glucose
Identifiers\u00a0 (Identifiers): names of modules found on your Apple Developer Identifiers page that are required for GitHub build method
IOB\u00a0 (IOB): Insulin on Board, affects automated insulin delivery: the current active insulin (above or below the basal rate) that Loop calculates and uses for glucose prediction
iOS\u00a0 (iOS): operating system used by Apple Mobile devices (iPhone, iPod, iPad)
IRC\u00a0 (IRC): Integral Retrospective Correction: Optional alternative to Retrospective Correction that integrates glucose deviations over a longer time frame
ISF\u00a0 (ISF): Insulin Sensitivity Factor; how many points your blood sugar will drop for each unit of insulin; sometimes called Correction Factor
Issue\u00a0 (Issue): On github - a formal method to report a problem, either code behavior or documentation
JSON\u00a0 (JSON): JavaScript Object Notation; a standard data interchange format that is text-based and human readable
macOS\u00a0 (macOS): operating system for Mac computer
Lock your Phone\u00a0 (Lock your Phone): click the button on the side of the phone to lock it - prevent accidental touch, i.e., accidental Loop command
Loop 3\u00a0 (Loop 3): Latest release with major updates
Loop Cycle\u00a0 (Loop Cycle): typically 5 minutes: new CGM reading, prediction update, pump update and, if in Closed Loop, dosing update if needed
Loop Caregiver\u00a0 (Loop Caregiver): An app you can build to provide remote commands to Loop
using Nightscout
Loop Follow\u00a0 (Loop Follow): An app you can build to provide extra alarms and views of important information - can use Dexcom Share or Nightscout
to include Loop
information
Loop\u00a0 (Loop): With a capital L, Loop is one of several do-it-yourself artifical pancreas systems
Match-Secrets\u00a0 (Match-Secrets): a private repository you must create in your github account, stores keys required to build with github Build Actions
MTB\u00a0 (MTB): Manual Temp Basal: user initiated temporary basal, Omnipod Common feature
MDT\u00a0 (MDT): common abbreviation for Medtronic pumps
modal\u00a0 (modal): message or alert appearing in front of app that must be acknowledged to return to app
Modules\u00a0 (Modules): the Loop code uses a number of modules to handle different components of the entire app
Monterey\u00a0 (Monterey): operating system for Mac, macOS 12.x
Nightscout\u00a0 (Nightscout): a personal website used to view your glucose and diabetes management data, Loop
can upload to Nightscout
Onboarding\u00a0 (Onboarding): familiarize new, and existing, Loop users with settings in Loop 3 and ensure the Therapy Settings are all entered and are within safety guardrails
Omnipod\u00a0 (Omnipod): Insulet tubeless insulin pump; Loop supports Eros (with RileyLink) and DASH. Eros is also known as Classic, UST400, and System.
OrangeLink\u00a0 (OrangeLink): radio-frequency device Loop uses to control Eros pods (aka. Gen 3) and older Medtronic pumps
OTP\u00a0 (OTP): one-time password, this is used to enable caregivers to securely execute remote commands to a Looper's phone
Override\u00a0 (Override): a modification to Loop settings that can change the correction range, the sensitivity (basal, ISF and CR) or both
Package Dependencies\u00a0 (Package Dependencies): packages that must be downloaded by Xcode (once) to build the app after downloading the LoopWorkspace to your computer
pill\u00a0 (pill): on Nightscout, small boxes with information, tap for extra details
PR\u00a0 (PR): Pull Request - a formal method to request changes to a repository
prebolus\u00a0 (prebolus): take some or all of a meal bolus before eating
Pre-Meal Range\u00a0 (Pre-Meal Range): modify the correction range for up to one hour by tapping on an icon in the toolbar
Provisioning Profile\u00a0 (Provisioning Profile): associates your app with your Developer ID and limits app lifetime to 1 year (paid) or 1 week (free)
Pull Request\u00a0 (Pull Request): formal method to request changes to a repository
QR\u00a0 (QR): a machine-readable code consisting of an array of black and white squares
Quit the Loop App\u00a0 (Quit the Loop App): quit out of the app - different from closing the app - typically you swipe up in the app switcher
repository\u00a0 (repository): contains project files and each file's revision history
RileyLink\u00a0 (RileyLink): radio-frequency device Loop uses to control Eros pods (aka. Gen 3) and older Medtronic pumps
RC\u00a0 (RC): Retrospective Correction: part of the Loop model that considers actual glucose compared to earlier predictions
SAGE\u00a0 (SAGE): sensor age on Nightscout site
Secrets\u00a0 (Secrets): a method to securely embed personal information into your fork of LoopWorkspace to enable GitHub to have access required to build Loop
TEAMID\u00a0 (TEAMID): One of 6 Secrets: Apple Developer account member number
FASTLANE_ISSUER_ID\u00a0 (FASTLANE_ISSUER_ID): One of 6 Secrets: the issuer ID is associated with your Apple Developer ID and never changes
FASTLANE_KEY_ID\u00a0 (FASTLANE_KEY_ID): One of 6 Secrets: Key ID provided when you create an API key in App Store Connect; it is associated with the FASTLANE_KEY
FASTLANE_KEY\u00a0 (FASTLANE_KEY): One of 6 Secrets: Really long key (several lines); it and FASTLANE_KEY_ID are generated together
GH_PAT\u00a0 (GH_PAT): One of 6 Secrets: Generated with your GitHub account; set it to never expire
MATCH_PASSWORD\u00a0 (MATCH_PASSWORD): One of 6 Secrets: password you make up but must save and cannot change without deleting the Match-Secrets repository
SHA-1\u00a0 (SHA-1): Secure Hash Algorithm 1; used to generate an alphanumeric code for commits in git (github)
Sign Targets\u00a0 (Sign Targets): associate a Developer ID with an app; must sign all targets for a given app
submodules\u00a0 (submodules): for Loop, submodules are repositories defined in the Workspace repository that are required to build the app
Table of Contents\u00a0 (Table of Contents): (TOC) is the list of level 2 and 3 headers on a given page; the title at the top of the page is a level 1 header
Temp Basal Only\u00a0 (Temp Basal Only): provide the recommended insulin automatically using an increase in temp basal over half an hour (limited by max temp basal)
Temp Basal\u00a0 (Temp Basal): modify the scheduled basal rate for a pump
Terminal\u00a0 (Terminal): interface for entering commands to the computer
TestFlight\u00a0 (TestFlight): a method to distribute apps without direct connection
Therapy Settings\u00a0 (Therapy Settings): Basal Rates, ISF, CR, correction and safety ranges and delivery limits
Tokens\u00a0 (Tokens): on Nightscout, configure access permissions using tokens
Tooltip\u00a0 (Tooltip): brief definitions provided for important terms and abbreviations on the website
URL\u00a0 (URL): website address (Uniform Resource Locator)
UTC\u00a0 (UTC): Coordinated Universal Time is a time standard for civil time and time zones worldwide
Ventura\u00a0 (Ventura): operating system for Mac, macOS 13.x
watchOS\u00a0 (watchOS): Apple watch operating system; must be compatible with phone iOS
workflow\u00a0 (workflow): a set of instructions to GitHub to perform an action; the instruction files are found in the .github/workflows folder of the repository
Workspace\u00a0 (Workspace): a grouping of several repositories into a complete package
Xcode Preferences\u00a0 (Xcode Preferences): older name for Xcode Settings
Xcode Settings\u00a0 (Xcode Settings): as of Xcode 14, Xcode menu uses Settings instead of Preferences
Xcode\u00a0 (Xcode): program used to build an app
"},{"location":"faqs/loop-faqs/","title":"Loop FAQs","text":""},{"location":"faqs/loop-faqs/#what-do-i-need-to-loop","title":"What do I need to Loop?","text":"Please click on the Requirements link.
"},{"location":"faqs/loop-faqs/#can-i-download-the-loop-app-from-the-app-store","title":"Can I download the Loop app from the App store?","text":"No. The Loop app is not available for download. You must build your own Loop app. The Loop app app will not be available in the Apple App store because that would be distribution of a medical device, and we are not in that \"business\". You can build yourself, but we are not distributors.
Each step needed to successfully build your Loop app is found in these docs. The harder part will be having the patience to read all the documents before you start. New Loop users are so excited to get started that they often skip reading all the great info that these docs contain. As you begin the build...please include time to read the documents that follow what happens after you successfully build your Loop app.
If you have any questions, use the Search feature to find topics in LoopDocs.
"},{"location":"faqs/loop-faqs/#can-i-use-an-android-phone-or-ipad-for-loop","title":"Can I use an android phone or iPad for Loop?","text":"Loop requires an Apple device. Older iPads do not support Apple Health which is required for Loop. It may be possible with newer iPads and newer iOS, but this has not been tested.
There is open source software that runs on Android phones. Check out AndroidAPS Documention.
"},{"location":"faqs/loop-faqs/#do-i-have-to-be-tech-smart-to-build-loop","title":"Do I have to be \"tech-smart\" to build Loop?","text":"No. You do not need any experience in code or computers to build Loop. If you already own a computer or tablet and an iPhone, you already have the required level of experience. Beyond that, simply read the directions slowly and diligently...all the information you will need are in these documents.
Often times the non-tech people do better than the tech people in building Loop. Why? Because the non-tech people take the time to read slowly and look at the screenshots in the directions. The tech people often skim and miss steps...which then leads to build errors that have to be retraced and fixed.
"},{"location":"faqs/loop-faqs/#is-there-a-cheat-sheet-for-a-school-nurse-to-use","title":"Is there a cheat sheet for a school nurse to use?","text":"Sure, you can give this one a try. School nurse's cheat sheet download
"},{"location":"faqs/loop-faqs/#how-long-does-it-take-to-build-loop","title":"How long does it take to build Loop?","text":"The answer is varied, but a few hours from start to finish, depending on where you are starting and how comfortable you are with your computer.
Start at the Requirements Overview to decide which build method you wish to use. Each method starts with an overview page.
Once you choose your method, you can break the required steps into shorter bits of effort.
Yes, there are some costs, beyond the obvious costs of owning a pump and CGM.
There are no other costs, ongoing or initial, to use the Loop app beyond what you already pay for your CGM, pump supplies and insulin.
"},{"location":"faqs/loop-faqs/#rileylink-options","title":"RileyLink Options","text":"This is not required for DASH users.
There are several options for RileyLink Compatible Devices at this time. They typically cost around $150. This is a one-time cost and the devices should last for years (unless it goes swimming, goes through the wash, gets run over by a car, etc.). It's fine to buy one device and make sure you want to Loop, but if you can afford it, go on and get two or get two different kinds. Once you Loop, you'll want a backup.
Many used devices are available in the community. You may find posts for resale on this Facebook Group Looping in a time of covid. This is a private FB group where you must agree to the rules.
Posts offering to buy or sell items in the support FB groups like The Looped Group, Loop and Learn or Little Loopers will be immediately taken down, or you will be directed to the appropriate location and comments will be turned off. FB can shut down groups without warning if they detect sales and the support groups are too important to risk.
"},{"location":"faqs/loop-faqs/#free-developer-account-options","title":"Free Developer Account Options","text":"The Apple Developer License can be done for free, however, you will have to rebuild your Loop app every 7 days and you must use a computer with Xcode, Build with Mac. That could get very tedious. The $99 annual Apple Developer program enrollment is an excellent investment.
"},{"location":"faqs/loop-faqs/#do-i-need-to-own-my-own-apple-computer","title":"Do I need to own my own Apple computer?","text":"You no longer need to own an Apple computer - see Build with Browser.
If you chose Build with Mac, then you still don't have to own an Apple computer, but you do need to at least borrow one - or you can build using a virtual Mac if you have a PC with Intel chips (see next section).
If you are borrowing an Apple computer, look at the required minimum settings associated with your iPhone Compatible Computer and Xcode Version. It would be really good to have the longer-term ability to borrow that computer again for updating Loop later when needed.
"},{"location":"faqs/loop-faqs/#can-i-use-a-pc-or-windows-computer-to-build","title":"Can I use a PC or Windows computer to build?","text":"You can build the Loop app using just a browser on any device: Build with Browser.
If you want to use Build with Mac, there is a hacked way of installing macOS on a Windows computer called a Virtual Machine. This link provides some helpful information. This Virtual Machine method will not work on PCs that have AMD processors, only Intel. Double-check that your computer uses an Intel processor before attempting the virtual machine method. If you want to try this, there are mentors on The Looped Facebook Group who can assist.
"},{"location":"faqs/loop-faqs/#how-often-do-i-need-to-get-on-the-computer-for-loop","title":"How often do I need to get on the computer for Loop?","text":"When you use the Browser Build method, you need to access a browser at least once every 90 days to Update with Browser. This is simple enough to do that you can do the steps on your phone in just a few minutes. Several people are already working on automated methods so that won't be required, but a manual Build Actions step is required for now.
When you use Build with Mac: the short answer is (1) when you first build and (2) once per year minimum after that. (If you decide to use a free Apple Developer Account, you will need to get on the computer every 7 days.)
Loop code is updated periodically to include new features and bug fixes. When those updates are released, you'll need access to a browser or an Apple computer again to update your Loop app.
Loop updates are not available through the iPhone's app store...instead you do the app update yourself
In general, there are updates to the Loop app released a few times a year - these can occur more frequently after a major release.
"},{"location":"faqs/loop-faqs/#will-i-need-to-build-a-new-loop-app-if-i-switch-between-medtronic-and-omnipod","title":"Will I need to build a new Loop app if I switch between Medtronic and Omnipod?","text":"No. The Loop app lets you move between different pump types from within the same Loop app. See Change Pump Type.
"},{"location":"faqs/loop-faqs/#can-i-use-my-apple-developer-account-to-build-for-others","title":"Can I use my Apple Developer account to build for others?","text":"If there is more than one Looper in the family, you only need to have one Apple Developer ID and only one annual payment. The developer must be an adult.
With the Build with Browser method, you just add each Looper to your TestFlight test group and they get updates whenever you Build a new version on GitHub.
With the Build with Mac method, you just plug into your computer each phone on which you want to build the Loop app. (New Xcode and newer iOS phones allow you to build across WiFi after the initial connection with Xcode.)
It's a good idea to let someone else in the family know how to build and have access to your Apple password (and for Browser Build, your GitHub password) in case you're out of town. It's also a good idea to build the Loop app on a backup phone especially for travel.
The Apple Developer ID and the Apple ID are two different things. PLEASE read this: Loopers Need Their Own Apple ID.
"},{"location":"faqs/loop-faqs/#what-happens-when-i-switch-apple-developer-id","title":"What happens when I switch Apple Developer ID?","text":"The Loop app on the phone is different if the build uses a different Apple Developer ID from the one currently on the phone. So if the Apple Developer ID used for a new Loop build is different from the one used for the existing Loop app, there will be two Loop apps on the phone. The Looper will have to on-board the new app, enter all the settings again and delete the old app.
"},{"location":"faqs/loop-faqs/#can-i-use-someone-elses-apple-developer-account","title":"Can I use someone else's Apple Developer account?","text":"It's best that you build your own Loop app using your own Apple Developer ID.
One developer account can only be \"linked\" to a limited number of devices. So one person \"loaning out\" their developer license to a lot of people will quickly exceed the number of allowed devices. In those cases, that person will be told they need to revoke the certificates on some devices (essentially dropping old ones to make room for new ones). If they revoke your device certificate (and they can do that without you knowing through their developer portal), your Loop app will immediately stop working and not even open.
Your Loop app will also die immediately if their developer account is not renewed or expires.
Moral of the story, out of all the ways to save money...borrowing someone's developer account is not a good place to save money. You don't want your Loop app to suddenly stop working.
"},{"location":"faqs/loop-faqs/#how-can-i-find-a-compatible-pump-supplies","title":"How can I find a compatible pump? supplies?","text":"You can use Omnipod DASH and Eros pumps with the Loop app. You do not need the Omnipod Personal Diabetes Manager (PDM), just the pod supplies. Your insurance or pharmacy coverage may cover some of the cost. See Which pods work with the Loop app? for more details.
There is a whole page with detailed information about Medtronic pumps; how to find them, how to find supplies, and assessing whether your Medtronic pump is compatible. Please check out that page for more info.
Some Looping equipment can be found on this Facebook Group Looping in a time of covid. This is a private FB group where you must agree to the rules.
"},{"location":"faqs/loop-faqs/#can-i-pay-someone-else-to-do-build-the-app-for-me","title":"Can I pay someone else to do build the app for me?","text":"We do not know whether someone who builds the app for you incurs legal responsibility if something goes wrong while you are using a version they built for you.
There are a few companies that provide the Loop app as a service.
Best Practice: Learn to Build
You are strongly encouraged to build the Loop app for yourself.
For Medtronic users, you simply go back to old school pump use until you get a new RileyLink compatible device. You can either let your temp basal finish by itself (30 minutes or less) or cancel the temp basal on the pump's menu. For bolusing, you'd go back to using the pump's bolus commands. When you get a device (either finding your old one or getting your backup device out) and the Loop app running again, you'll want to do one thing. Enter in any carbs to the Loop app that you may have eaten in the recent past that could still be affecting blood glucose. While the Loop app will read whatever insulin deliveries had happened while the RileyLink compatible device was missing, it will not read any carbs you entered into the pump...so make sure to add those to the Loop app and backdate them to the time they were eaten. That will help make the transition back to closed loop smoother.
For Pod users, your Pod will finish any currently running temporary basal rate (maximum of 30 minutes) and then revert back to your scheduled basal rate. Without a RileyLink compatible device, you will be receiving normal basals, but will need to pull out pens/syringe for boluses. If you have a backup device, you can simply connect to the new device on the same Loop app and it will work with the existing pod session. If you don't have a backup device, you'll have to remove the pod and start a new pod paired with your PDM until you get a new device.
"},{"location":"faqs/loop-faqs/#what-if-i-lose-or-get-a-new-iphone","title":"What if I lose or get a new iPhone?","text":"If you lose your phone - follow the same dosing protocol as if you lost your rileylink.
When you get a new iPhone, you can plan ahead. There's a whole FAQs page about transferring your Loop information to a new phone. New Phone.
"},{"location":"faqs/loop-faqs/#what-about-other-pumps-when-will-they-loop","title":"What about other pumps? When will they Loop?","text":"Hey now...let's be grateful for what we have first. The ability to use the Loop app is the result of tremendous amounts of effort, time, and sacrifice by volunteers. Cracking the pumps for the Loop app use is a large undertaking. If and when another set of people spend a large amount of time figuring out other pumps, then they could conceivably be added to Loop. But you don't need to let us know that you'd love to see more pumps compatible with Loop. There is just an awful lot of work that needs to happen and it is neither quick nor easy.
Yes, this is technically possible. You can have multiple Loop apps built onto the same iPhone. However, having multiple Loop apps on a single phone may lead to unexpected conflicts that can negatively affect your Loop's ability to stay green (keep looping). Additionally, your Pod will only work on one Loop app at a time anyways. So for smooth looping, just keep one Loop app on any phone for looping use.
"},{"location":"faqs/loop-faqs/#will-i-be-able-to-the-loop-app-on-a-plane-or-in-the-mountains","title":"Will I be able to the Loop app on a plane? Or in the mountains?","text":"Yes. The Loop app does not require internet or cell coverage to work. So long as the Loop user has Bluetooth enabled on the iPhone, then the CGM and DASH pod (or RileyLink for Eros or Medtronic pumps) will still be able to do their work with the Loop app and your pump/Pod.
One exception - if you've chosen to use a CGM source that does require the internet, you will need to have cell or internet coverage. This ability is provided as a service to folks who cannot get their CGM data any other way. It is also a convenience for people testing the code.
"},{"location":"faqs/loop-faqs/#what-happened-to-freeaps","title":"What happened to FreeAPS?","text":"FreeAPS hasn't really had an owner to develop it for several years, but many depended on it. Because of that, the Loop and Learn team kept it on life-support. It was updated in early 2023 to include DASH, but that was the last improvement. It is strongly recommended people switch to Loop 3
or iAPS
. Do not use an application without an owner.
Many features people used with FreeAPS are now included in Loop 3
or can be added with customization. The dev
branch has Libre support, see Build Loop Dev.
The addition of customizations has been simplified.
Please do not blindly apply customizations. First read the documentation provided at the links above carefully.
"},{"location":"faqs/new-phone/","title":"New Phone Tips","text":""},{"location":"faqs/new-phone/#overview","title":"Overview","text":"Time Estimate
At least a few hours.
You can choose to keep Looping on the old phone and swap later. Most vendors give you more than a week to turn in your old device for credit.
Phone Transition Overview - Detailed steps below
Don't start right before a meal:
Keep your old phone (if you can, connected to WiFi) and use it for the Loop app:
Two methods to transfer your phone information (plan for 1 hour, may be faster):
What happens after you transfer your phone information:
When ready to start using the new phone to control your app:
Plan to stay in Open Loop until all Glucose, Insulin and Carbohydrate Apple Health records transfer:
Plan Ahead
Changing phones means you have to rebuild the Loop app onto the new phone. When you transfer information from your old phone to your new one, all your\u00a0Loop\u00a0information is included and the\u00a0Loop\u00a0icon will appear, but the app will not open until you install\u00a0Loop\u00a0from either TestFlight or Mac with Xcode.
The records on the new phone are from the time you started the transfer from the old phone to the new phone. The more recent records are transferred via Apple Health. You may want to adjust carbs after the transfer because those are not read by the Loop app. But if you enter them again and you are uploading to Nightscout or Tidepool - they will show up twice. Best to have COB and IOB close to zero when you start using your new phone.
Some people don't have access to their old phone. There are instructions for handling that on this page. It makes the whole process more stressful, but remember, pods continue to deliver basal rate and Medtronic pumps can be controlled on the pump itself. Use your backup plan until you can get\u00a0Loop\u00a0running on a new phone.
"},{"location":"faqs/new-phone/#forced-ios-update","title":"Forced iOS Update","text":"When you change phones, Apple will force you to the latest iOS version available for your new phone.
"},{"location":"faqs/new-phone/#prepare-before-upgrade","title":"Prepare Before Upgrade","text":"If you are using Dexcom, record the transmitter or sensor number in case it doesn't transfer
If you still have your old phone, you can prepare before switching to the new phone.
If you don't have your old phone, hopefully you have an iCloud backup and can use that to transfer your information to your new phone.
Keep the Old Phone Until the Loop app is Working on the New One
Even if you plan to turn your old phone in for a rebate, you can ask to keep the old one for a week or two. Most vendors will agree to this.
Update your old phone to the latest iOS the hardware supports - this simplifies the automatic transfer process Apple provides to move all your data and apps from your old phone to your new phone.
New Phone Checklist for Build with Browser
New Phone Checklist for Build with Mac
Different Developer ID
If you need to build the Loop app with a different developer ID on the new phone, the settings and pump information will not transfer.
If you cannot keep the old phone, or it is not available, then skip ahead to the Use the New Phone.
It is easier if you transfer information from the old phone to the new phone before you install and open\u00a0Loop\u00a0on the new phone. If this is not possible, then you will do the normal Onboarding for a new\u00a0Loop\u00a0app.
Closed Loop
.Closed Loop
disabled until you complete the full transfer and checkout.Preparatory steps:
When building:
If you have trouble finding the new phone in Xcode or trouble building, you should try to reboot phone, watch, quit Xcode, restart computer, delete old provisioning profiles and then ask for help
"},{"location":"faqs/new-phone/#prepare-to-change-phone-used-for-the-loop-app","title":"Prepare to Change Phone used for the Loop App","text":"On old phone (if available):
Bluetooth must be off on the old phone.
It is now time to transfer the CGM to the new phone.
The Dexcom app might have transferred successfully, but it\u2019s not a bad idea to install that fresh from the App Store on the new phone. Doing so may be required.
On the new phone, open the Dexcom app and pair to the transmitter (G5, G6 or One) or enter the four-digit code for G7
Wait for Dexcom to connect
Placeholder for\u00a0Libre CGM instructions. Suggested procedures from the community are encouraged.
Stay in Open Loop (closed loop disabled) until you complete the full transfer and checkout.
Check Every Setting
Do a manual bolus of the smallest possible amount to make sure\u00a0Loop\u00a0and pump are working.
Monitor CGM values to ensure new readings are coming in.
Check Glucose, Insulin and Carbohydrate records
Apple Health\u00a0History
Your Glucose, IOB and COB may not have correct history on your new phone.
Loop\u00a0 reads from\u00a0Apple Health\u00a0and will restore Glucose and Insulin records if health is stored on iCloud and synchronized between old and new phone - but this can take a long time to synchronize
The Loop app does not read Carbohydrates from Apple Health, so stay Open Loop if you have high COB from an entry on the old phone
Be prepared to spend 3 to 6 hours in Open Loop.
Once you are happy with the configuration of\u00a0Loop\u00a0on your new phone, your glucose is being read and your COB and IOB on the new phone is valid, then you can restore Closed Loop.
Once you are using\u00a0Loop\u00a0on your new phone, you can delete the pump from the old phone.
You can either keep the Old Phone as a backup, reset it and turn it in for credit or give it to some deserving individual.
"},{"location":"faqs/omnipod-faqs/","title":"Omnipod FAQs","text":""},{"location":"faqs/omnipod-faqs/#which-pods-work-with-the-loop-app","title":"Which pods work with the Loop app?","text":"You can use DASH and Eros Omnipod pods with the Loop app. You cannot use Omnipod 5 pods.
You do not need the Omnipod Personal Diabetes Manager (PDM), just the pod supplies. Your insurance or pharmacy coverage may cover some of the cost.
Alternative Names for Omnipod Pods
All three types of pods can be packaged five to a box, don't let the 5-pack indication confuse you.
Eros pods are also known as Classic or UST400
DASH pods have DASH in the name
Omnipod 5 pods have 5 in the name
DASH pumps communicate with the phone via Bluetooth so they do not require a RileyLink compatible device.
"},{"location":"faqs/omnipod-faqs/#what-about-tidepool-loop","title":"What about Tidepool Loop?","text":"Tidepool Loop was approved by the FDA in Jan 2023, but at the current time, there are no announced pump or CGM partners. What does this mean?
Tidepool Loop, cleared by the FDA, is the first:
With this approval, there is now an FDA-approved pathway for independent selection of an app, a pump, and a CGM. Stay tuned for updates at https://tidepool.org/tidepool-loop.
"},{"location":"faqs/omnipod-faqs/#do-i-still-need-a-pdm-with-omnipod-loop","title":"Do I still need a PDM with Omnipod Loop?","text":"No, pods are monogamous little creatures. They will pair with only one device at a time for safety reasons...so a pod is either paired with a PDM or your Loop app on your iPhone. In other words, your PDM can stay in the diabetes closet while you are Looping. You cannot use the PDM for a pod that has been activated with the Loop app. That doesn't mean you should get rid of your PDM if you have one. Instead, keep it for backup situations if you lose your phone. See below for what to do if you lose your phone or RileyLink.
"},{"location":"faqs/omnipod-faqs/#can-i-cancel-a-bolus","title":"Can I cancel a bolus?","text":"Yes, you can cancel a bolus in progress. In fact, because it is very easy to cancel, make sure your phone is locked prior to being put away to avoid inadvertently cancelling a bolus. (This behavior is very similar to the Insulet PDM - which also needs to be locked once a bolus has started.)
As soon as a bolus is initiated, look at your phone in portrait orientation. You will see a bolus message indicating the progress of the bolus. This message is highlighted with a red rectangle in the graphic below. If you tap on this part of the display, the bolus is immediately cancelled.
Bolused
is based on the time since the bolus was startedWith Loop 3, disabling the setting for Closed-Loop immediately restores the basal rate on the pump to the scheduled basal rate, which effectively cancels the temp basal.
You can tap on disable Closed-Loop and then immediately tap on enable Closed-Loop if all you want to do is cancel the current temp basal. If you do restore Closed-Loop, then Loop will resume automatic insulin delivery adjustments within 5 minutes.
Bolus in progress
Even if a bolus is in progress, you can still switch to Open-Loop and restore scheduled basal. The current bolus continues unless you separately cancel the bolus.
"},{"location":"faqs/omnipod-faqs/#cancel-temp-basal-with-loop-v22x","title":"Cancel Temp Basal with Loop v2.2.x","text":"If you are running Loop v2.2.x, the method for canceling a temp basal is to suspend the pump and then resume delivery. This also interrupts any bolus that might be in progress.
Be sure to follow the suspend with the resume command. Otherwise, all insulin delivery is stopped and remains stopped until the user either clicks on the \"Tap to Resume\" command from the main screen or the \"resume delivery\" command accessed in the pump settings display. The resume insulin delivery command returns insulin delivery to your scheduled basal rate.
If a bolus was interrupted, the bolus will not resume.
As long as you are in closed-loop mode, the Loop app will resume automatic insulin delivery adjustments within 5 minutes.
"},{"location":"faqs/omnipod-faqs/#can-i-set-my-own-temp-basal-on-loop","title":"Can I set my own temp basal on Loop?","text":"With version 3, the Loop app provides a Manual Temp Basal feature.
"},{"location":"faqs/omnipod-faqs/#what-if-i-lose-my-phone-or-rileylink","title":"What if I lose my phone or RileyLink?","text":"For pod users, your pod will finish any currently running temporary basal rate and then revert back to your scheduled basal rate. Without a phone or RileyLink, however, you will not be able to affect any pod use; no basal change, suspend, cancel, or bolus. To do anything other than let basals continue, you will need to take action depending on the situation.
Lost RileyLink only: You can replace your missing RileyLink with one from your backup supplies. No problem to switch out to a different Rileylink mid-pod session. If you don't have a backup RileyLink to use, then you will need to remove the pod and put on a new pod paired with your PDM until you can get a new RileyLink. In the interim, you are still getting basal from the pod. If you are taking bolus insulin via injection, just add it to Apple Health under insulin. The Loop app will read it and keep making predictions for you. Once you inject, then add the carbs that go with that injection into Loop.
Lost iPhone only: You will need to remove the pod and put on a new pod paired with your PDM or a backup phone (with a copy of the Loop app on it). You cannot use the old pod with a new device. In the interim, the pod will continue to deliver your scheduled basal until the pod reaches 80 hours. See New Phone for more information.
Lost both RileyLink and phone: You're having a really bad day. You'll need a hug and to follow the same directions as if you lost the phone as shown in the bullet above.
There is more communication between the pod and the controller (your Loop phone) than is typical with the PDM (Insulet provided controller). This increases the load on the pod battery. Most people have no increase in pod failures, but there are steps to take to limit \"extra pod battery use\". Every time the Loop app requests an update of the pod state or issues a command (bolus, basal schedule, temp basal), messages are exchanged with the pod.
If you get a pod that is failing to pair, please see this page for steps on how to fix the problem. Follow these steps before filling and trying another pod. If the pod is not screaming, you can probably recover it.
"},{"location":"faqs/omnipod-faqs/#what-do-you-do-to-stop-a-screaming-pod","title":"What do you do to stop a screaming pod?","text":"Screaming pods indicate the pod is out of insulin or out of time (80 hours) or there has been a critical pod fault. In all these cases, there is no more delivery of insulin.
The first step is to use your phone to Deactivate
the pod. You may need to go to the pod settings and tap on the Replace Pod row or the app may take you to the screen with a Deactivate button directly. This only works if the app is able to communicate with the pod. Sometimes this is not possible. After you attempt to deactivate two times, the app will \"discard\" the pod as active if communication fails and enable you to pair a new pod. But you still need to make that noise go away.
If you are not successful at deactivating a pod and you've tried the steps at Reset-Loop-to-Pump-Communications, make sure the old pod is removed from the area before trying to connect a new pod. (Placing it in a microwave temporarily prevents the phone from detecting that pod.) The paperclip trick (next paragraph) only breaks the sound connection, the pod electronics is still active.
Once you have removed the screaming pod, it can be silenced using a paperclip. Simply put the paperclip in the small hole that is on the bottom (the side opposite where the cannula is) of the pod as shown. Push the paperclip in until you hear a little click, that click is breaking the circuit that connects the speaker to the electronics.
"},{"location":"faqs/overview-faqs/","title":"FAQs Overview","text":""},{"location":"faqs/overview-faqs/#frequently-asked-questions-faqs-overview","title":"Frequently Asked Questions (FAQs) Overview","text":"The FAQs tab of LoopDocs contains pages with safety tips, frequently asked questions and the Glossary.
Map to this section:
A RileyLink compatible device is required to use the Loop app with Medtronic pumps or Omnipod Eros pods.
A rileylink is not required with DASH pods.
The device uses the RileyLink protocol to communicate information to/from your pump by radio communications and to/from your iPhone using Bluetooth. You will need the device within range of your phone and pump so that these communications can happen. Put it in a purse, pocket, SPIbelt. Clip it to a backpack, belt, or bra...but please do bring it with you..
Purchase information for these devices is found in RileyLink Compatible Devices
"},{"location":"faqs/rileylink-faqs/#adding-or-changing-rileylink","title":"Adding or Changing RileyLink","text":"You can add or change the RileyLink compatible device in use without affecting the pump that is connected to the Loop app. You can even have more than one connected, although only one will be used at a time.
If you are connecting to a new Medtronic pump or switching between Medtronic and Omnipod, please follow the Modify Pump instructions under Set up App.
Change Connected Devices:
You can have more than one RileyLink compatible device turned on and connected. Loop only uses one device at a time. Remember - if you do have two devices in use, make sure they are both charged (or have batteries).
Example of using more than one device:
All the RileyLink compatible devices communicate with the pump through radio frequency communications and with the phone through Bluetooth.
Bluetooth (BT) Troubleshooting
If your iPhone has BT issues, your Loop will have failures. There have been reports of BT audio devices (such as BT pairings in your car or home audio BT speakers) interfering with the Loop. If you are finding Loop failures frequently happening at a particular location, you may try to troubleshoot if there are BT problems in the area.
Your BT signal strength can be seen in the Loop settings, Pump settings, Device menu, on the Signal Strength
line. As you move closer and further away from your phone, you can watch that number dynamically change. This line is not displaying the signal strength of your pump RF communications, just BT between the RileyLink compatible device and the phone.
You will notice the Signal Strength is a negative number and in units of dB. Remember that number line from elementary school? A signal strength of -50\u00a0dB is a stronger signal than -80\u00a0dB.
"},{"location":"faqs/rileylink-faqs/#range","title":"Range","text":"The range at which RileyLink compatible devices will function is dependent on the environment that you are in and the specific device design. Both the OrangeLink and some sizes of the EmaLink have reported longer ranges than RileyLink (typically 10 to 20 ft) - but they still need to be \"near enough\".
What influences this distance for a given device? The biggest external influences are (1) body-blocking and (2) \"noisy\" environments. The human body is a lot of water, and water is an excellent blocker of wireless communication. So, sleeping on a pod and smothering it entirely with your body can decrease the ability of the device to communicate with the pod. Environments with a high concentration of wireless signals can also interfere with device communications and make closer proximity a benefit. Where might those kinds of situations happen? Concerts, conferences, and sporting arenas are pretty prone to interference.
Many people keep their device on the same side of their body as their pump during the day. They use a pocket, carabiner, lanyard, SPIbelt - the options are endless. What you don't want to do is put it in a blocking bag that has RFID blocking (some travel fanny packs have that).
"},{"location":"faqs/rileylink-faqs/#what-happens-if-loop-loses-communication","title":"What happens if Loop loses communication?","text":"While you are out of the communication range for your RileyLink compatible device(s), any running temp basal will keep going until it finishes (the longest temp basal that Loop sets are for 30 minutes duration...so within 30 minutes or less your pump would go back to your regularly scheduled basal). When you come back into range of your device, Loop will pick back up within 5-10 minutes without you needing to do anything.
"},{"location":"faqs/rileylink-faqs/#are-these-devices-waterproof","title":"Are these devices waterproof?","text":"The electronics are not waterproof but there are waterproof cases available and some have wireless charging available. Check with the manufacturer.
RileyLink Compatible Device Information
"},{"location":"faqs/rileylink-faqs/#firmware-version","title":"Firmware version","text":"In Loop settings, tap on your pump, find your device (RileyLink or other) and tap on that menu. The figure below shows firmware specific to the RileyLink. If you have another type of device, the firmware value reported will be different. (Note - the displays for Ema, Orange and Riley have been updated to include device-specific features as shown in the RileyLink Display page. The graphic below shows the original RileyLink display.)
With RileyLink, the firmware displayed should match or be a higher version number than what is shown in the figure above, e.g., subg_rfspy 2.2/ble_rfspy 2.0
. (If you are running with a very old RileyLink from pre-Aug 2018, it might be a lower number.) Check it when the device is working well and make a note of what it says. If you're having Red Loops, you might want to check firmware and connected state. Make sure, after power cycling your device, that the correct firmware is displayed AND that there are two items shown.
subg_rfspy 2.2
is the sub-gigahertz radio frequency firmware that talks to the insulin pump (if this does not show up, the device will talk to the phone but not the pump)ble_rfspy 2.0
is the Bluetooth firmware that talks to the phone (if this is not working, you will not even see the device in the list)HINT: You might need to quit the Loop app. (Don't just close it, actually quit.) Then do the power cycle on the RileyLink compatible device to attempt to have both sets of firmware boot up. When you restart the Loop app, it may show the correct firmware. Don't give up after one failure, try several times.
If several power cycles do not make the correct firmware show up, contact the manufacturer for assistance.
"},{"location":"faqs/rileylink-faqs/#orangelink-firmware","title":"OrangeLink Firmware","text":"The OrangeLink devices allow the user to update the firmware on the device using an app on the phone itself (available for iPhone 7 and later devices).
A number of OrangeLink Pro devices were shipped with FW2.6 and for people who already had OrangeLink devices, a version of FW2.6 was offered for download. However, this firmware did not work well with Loop (or AndroidAPS).
Firmware/Hardware Labeling
Earlier versions of the OrangeLink firmware did not put the hardware (HW) version and the firmware version (FW) in the \"correct\" location to hand off to Loop for interpretation. Do not worry if you are running on any FW version 1.x or 2.x and your HW version number doesn't say 1.0 or 1.1. This has been fixed for FW versions 3.x.
"},{"location":"faqs/rileylink-faqs/#emalink-and-orangelink-features","title":"EmaLink and OrangeLink Features","text":"Some of the features of the OrangeLink were added to the RileyLink Display with Loop 2.2.x. However, as mentioned above, the FW and HW information in some OrangeLink firmware was inconsistent in earlier versions. The consequence is that the OrangeLink Pro screen does not show the Find Device feature that many people want to use with the versions of firmware that provide good communication with Loop. The patch listed below fixes this issue.
The EmaLink features were not added with Loop 2.2.x. The patch listed below adds some EmaLink features.
"},{"location":"faqs/rileylink-faqs/#emalink-and-orangelink-patch","title":"EmaLink and OrangeLink Patch","text":"A patch was developed to update the RileyLink screen of the Loop app that detects the OrangeLink hardware for all versions of the OrangeLink firmware and adds the battery level reporting and notification to the EmaLink screen. Click on the link below. There are detailed instructions on how to use this patch for Loop 2.2.x.
Since the RileyLink version of the communication link device has been around the longest, some additional information about that device has been added to LoopDocs throughout the years. The rest of this page is specific just to the RileyLink device.
"},{"location":"faqs/rileylink-faqs/#rileylink-assembly","title":"RileyLink Assembly","text":"Your RileyLink will come with the Lithium-ion Polymer (LiPo) battery disconnected and the parts not already inside the case. It will be up to you to put the RileyLink in the case and attach the battery.
Make sure the LiPo battery is well-plugged into the connection. Line up the little ridge appropriately, and push fairly firmly to get the connection tight. Poor battery cable connection can make the Loop communications fail. See photos below, for example.
Common new user errors
The most common two errors for new RileyLink owners are (1) not fully pushing in the LiPo battery cable connection and (2) failing to charge the RileyLink. Compare your LiPo battery cable with the photos; it takes a bit of oomph to push that plug fully in like the photos shown below. Remember to charge your RileyLink each night.
Loose battery cable on left. Proper battery cable on right
Finally, the board and the battery fit into the slim case fairly tightly as well. Click on the image below to watch a helpful assembly video.
"},{"location":"faqs/rileylink-faqs/#rileylink-lights","title":"RileyLink Lights","text":"The RileyLink has several lights that you may notice from time to time. There is no 'power' light. If you suspect that your RileyLink is not being powered, try turning it off and on using the small sliding switch. You should see lights in the middle of the board flash when you do this. If they flash, that means the board has power.
Red light: Charging light. The red light will remain on while RileyLink is charging, and it will turn off when charging is complete. You may notice the red light turn on periodically even after charging is complete...it's just \"topping off\".
Green light: Bluetooth connection light. The green light will remain on while you have a BT connection with your iPhone. If that green light fails to stay on, you should troubleshoot your BT connections. Try restarting BT on your iPhone and/or turning the RileyLink off/on by its power switch.
Blue light: Pump communications. If you have an older firmware on your RileyLink, some of the blue lights will flash periodically as it communicates with the pump. It's just letting you know that it is busy talking and collecting info. You will also see increased blue flashes if you have \"Enabled Diagnostic LEDs\" for Medtronic users that have the RileyLinks with updated firmware (shipping since late August 2018).
A solid blue light that consistently remains lit on the board could mean one of two things:
A temporary issue that can be resolved by rebooting the RileyLink physically (turning the switch off/on), or
An electrical short or damage to the board. Sweat and moisture are most likely culprits, so try to keep case free from those environments. Don't keep RileyLink in sports bras or waistband next to skin, for example, while exercising.
If your blue light remains on despite trying a restart, it is time to pull out your backup RileyLink.
"},{"location":"faqs/rileylink-faqs/#rileylink-charging","title":"RileyLink Charging","text":"The battery that comes with RileyLink is not charged completely when it is shipped, so be sure to charge it up before initial use. RileyLink takes about 2 hours to fully charge (the red light will turn off when fully charged, read note above about red light patterns) and should easily last at least a full day of constant Loop use. Typically, it can go into the 30-hour range without any problems. Most people charge their RileyLink each night when they are sleeping. You don't have to worry about leaving the RileyLink plugged in \"too long\" for charging. It will automatically stop charging the battery when it is fully charged.
Since the best practice is to charge your RileyLink overnight while you sleep, and the battery lasts safely over 24 hours, there is no battery level indicator for the RileyLink. The RileyLink's charge level is not viewable on Nightscout, nor within the Loop app. If you forget to charge your RileyLink overnight, you can recharge it with a portable USB battery in a pinch. A short mini-USB cable could be a good addition to a small gear bag.
"},{"location":"faqs/rileylink-faqs/#what-are-the-differences-between-the-rileylink-medtronic-and-omnipod-antennas","title":"What are the differences between the RileyLink Medtronic and Omnipod Antennas?","text":"There are two types of antennas for RileyLinks; each antenna is optimized for the pump you are using. Otherwise they are identical. See RileyLink Compatible Devices for other devices. The OrangeLink has both antennas included in its design and can talk to either Medtronic or Omnipod. The EmaLink requires selection for type of pump.
The color of the RileyLink circuit board in the photos below is irrelevant.
"},{"location":"faqs/rileylink-faqs/#what-will-happen-if-your-rileylink-has-the-wrong-antenna","title":"What will happen if your RileyLink has the wrong antenna?","text":"You can technically use that RileyLink with either pump on Loop. But, you will have significant frustrations and probably a lot of red loops. With mismatched antenna/pump, the device needs to be very close (think inches) and in clear line-of-sight to pump/pod. This makes everyday living (and sleeping) a bit hard. If you use the appropriate-antenna-for-your-pump device, the distances the pump/pod and RileyLink can tolerate from each other is much more \"real world\" friendly and stable. The OrangeLink contains both antennas so will work with either pump. This may be a good choice if you like to switch between Medtronic and Omnipod.
In a pinch, if you have a RileyLink that you used with a Medtronic pump and have switched to Omnipod, it might work as a backup, but you won't love it.
"},{"location":"faqs/rileylink-faqs/#how-long-will-my-rileylink-go-between-charging","title":"How long will my RileyLink go between charging?","text":"RileyLinks can go about 30-36 hours on a single charge. There is no way to see the remaining charge level, so most people just get into the habit of charging overnight while they sleep. The actual time to fully recharge is about 1 or 2 hours; you'll know it is fully charged when the red light turns off. After a full charge, the red light will turn off and then periodically turn on for short times while it \"tops off\" while still on a charger.
"},{"location":"faqs/rileylink-faqs/#how-can-i-tell-how-much-charge-my-rileylink-has","title":"How can I tell how much charge my RileyLink has?","text":"You can't. There is no charge level indicator. Just charge it nightly, and you won't have a problem. Full battery charge should last about 30-36 hours depending on battery health. Charging takes less than 2 hours.
"},{"location":"faqs/rileylink-faqs/#how-long-will-my-rileylink-battery-last","title":"How long will my RileyLink battery last?","text":"Eventually, Lithium-ion Polymer (LiPo) batteries will lose charging capacity. You would want to replace if you notice the battery not lasting the full day. Many people report using their battery for more than 2 years without issue.
Be aware that if a battery is failing, it may swell. If you notice that the RileyLink battery is swollen, remove the swollen battery from your home and place in a fire-safe area and recycle it properly. Either order a new battery or pull out your spare.
After a year of use (and a year of being dropped), the antenna may no longer be securely soldered. If you are getting a lot of red loops, it might be a poor antenna connection instead of a failing battery. Check the solder joint at the antenna. The solder should be shiny and the antenna base should be firmly attached to the board.
"},{"location":"faqs/rileylink-faqs/#rileylink-battery","title":"RileyLink Battery","text":"Keep your RileyLink and its Lithium-ion Polymer (LiPo) battery protected from damage. LiPo batteries are unsafe when damaged or punctured, so the case is an important part of safe Looping. If your battery is damaged in some way, please disconnect it immediately, and dispose of it (it should be recycled). You can order new RileyLink batteries on the GetRileyLink website
"},{"location":"faqs/rileylink-faqs/#rileylink-battery-removal","title":"RileyLink Battery Removal","text":"To remove the LiPo battery from the RileyLink, please do so slowly and patiently. Work the battery connection side to side slowly to loosen it from the plug. Some people have reported success using small, curved needle-nose pliers such as hemostats. Others have used small flathead screwdrivers as shown in this video.
"},{"location":"faqs/safety-faqs/","title":"Safety Tips","text":""},{"location":"faqs/safety-faqs/#know-your-settings","title":"Know your settings","text":"Do not enter settings that you are unsure of. For example, if you haven't any idea what your carb ratio is, please don't enter a wild guess. Instead, test your settings and talk to your health care provider about what your appropriate settings should be.
"},{"location":"faqs/safety-faqs/#ios-focus-notifications","title":"iOS Focus Notifications","text":"iPhones have Focus modes to enable maximum flexibility for notifications. These modes must be configured by each user to allow important notifications from your diabetes apps.
Set up every Focus mode you use to allow glucose alerts or you will not get them.
Critical notifications, for example, urgent low from Dexcom, are enabled regardless of your Focus settings. But regular low and high glucose notifications might be suppressed. Open source apps, like the Loop app, can only be allowed to notify during a Focus mode when configured by the user.
Under iOS Settings, select Focus, then choose the Focus mode you want to adjust.
The graphic below has numbered highlights to follow along for configuring Sleep focus initially:
The little clock icon indicates that time-sensitive notifications are enabled. The other icons represent the apps you added to have permission to notify you when in this Focus mode.
Be sure to do this for every Focus mode you use.
"},{"location":"faqs/safety-faqs/#understand-the-app-displays","title":"Understand the App Displays","text":"If you do not understand the components displayed in the graphic below, please spend time reviewing the information at Displays.
"},{"location":"faqs/safety-faqs/#carb-entry-and-insulin-delivery","title":"Carb Entry and Insulin Delivery","text":"If you configured the app with closed-loop enabled:
If you entered carbs and then changed your mind on the amount or the time at which they were eaten, use these instructions to delete or edit them. This will make\u00a0Loop\u00a0better able to predict blood glucose and adjust insulin delivery appropriately.
"},{"location":"faqs/safety-faqs/#how-to-cancel-a-bolus","title":"How to Cancel a Bolus","text":"Once a bolus starts, the progress of that bolus appears in the HUD Status Row. Note that the phone must be held in portrait mode to see this. Simply tap on the row that shows the delivery to halt the bolus.
"},{"location":"faqs/safety-faqs/#understand-delivery-limits","title":"Understand Delivery Limits","text":"With each cycle, Loop\u00a0generates a glucose prediction and a recommended dose (positive or negative) to bring you to your correction range.
For more information, please read How do Delivery Limits Affect Automatic Dosing?.
"},{"location":"faqs/safety-faqs/#health-app-permissions","title":"Health app permissions","text":"For older versions of\u00a0Loop, or if you customized\u00a0Loop 3\u00a0to read carbohydrates from third-party apps, be aware that you cannot edit those entries inside the\u00a0Loop\u00a0app.
If you let other apps, such as MyFitnessPal, write carbohydrates to the Health app, Loop\u00a0could read those carbohydrates and you could be dosed for those carbohydrates.
Users often reach out if the glucose prediction shown on the Loop app screen is very low - negative even.
It is pretty common for new users to think a 10% override setting should behave similarly to a 10% temporary basal rate setting on a manual pump. This is not true.
Read this section on the override page for information: Avoid Extreme Insulin Needs Setting
"},{"location":"faqs/safety-faqs/#scenario-2-entry-error-into-apple-health","title":"Scenario 2: Entry Error into Apple Health","text":"With version 3 of the Loop app, it is no longer necessary to enter glucose or insulin manually into the Apple Health app for the Loop app to read. There are methods within the Loop app for entering a fingerstick value or non-pump insulin.
However, some people are used to entering information into Apple Health directly - and it still works. The Loop app will read entries from Apple Health. But if you do this:
A recent user entered a fingerstick value into the insulin record in Apple Health. They use mmol/L glucose units, so it wasn't as obvious as it would have been for someone using mg/dL. At any rate, they could not figure out why their child had such a high IOB and were afraid the pump had delivered 10 U of insulin! Once they deleted the incorrect entry from Apple Health, the Loop app was able to make the appropriate prediction.
"},{"location":"faqs/safety-faqs/#beware-the-medtronic-easy-bolus-button","title":"Beware the Medtronic Easy Bolus button","text":"Medtronic's easy bolus button has been the cause of several accidental boluses when the pump has been carried in a pocket. Best practice would be to disable the Easy Bolus button since you will be doing boluses from the phone anyways.
"},{"location":"faqs/safety-faqs/#finish-your-medtronic-priming","title":"Finish your Medtronic priming","text":"After a site change and reservoir rewind, Medtronic's pump will have a menu on the pump screen related to finishing your prime. Make sure you complete that screen and always return to the main menu. Medtronic's pump won't resume basal insulin delivery until that priming screen is completed.
"},{"location":"faqs/time-faqs/","title":"Time FAQs","text":""},{"location":"faqs/time-faqs/#the-loop-phone-must-be-on-automatic-time","title":"The Loop Phone Must be on Automatic Time","text":"The Loop Phone is a Medical Device
There have been several instances where a Looper disabled automatic time to change the time on their Loop phone.
As of January 2023, this change in time is detected and the Loop app stops all automatic dosing of insulin other than your scheduled basal rates and begins to aggressively warn the user.
One scenario should be enough to convince you not to do this:
You can configure the iPhone to only allow automatic time.
The ability to use anything other than automatic time is disabled as long as that iOS setting has a passcode. Parents can use this for children. Adults can use this too in case they need a reminder not to change the time - you must first disable the passcode.
This does not affect automatic time zone changes, those are handled by the phone without need for interaction.
"},{"location":"faqs/time-faqs/#remove-future-glucose","title":"Remove Future Glucose","text":"If you have future glucose from a manual time change or just entering something into Apple Health with the wrong timestamp:
The Loop app is very aggressive at warning you if you make this mistake. you will get a notification - even when you are in a different app. The graphic below shows the alert when you next view the Loop app after turning off automatic time and changing the time. Even if you respond right away, you may have at least one glucose reading in the future when you see this alert. Please Remove Future Glucose.
The rest of this page is about changing time zones.
This is safe because the Loop app keeps track of records internally using UTC.
"},{"location":"faqs/time-faqs/#time-zones-daylight-savings-time-summer-time","title":"Time Zones, Daylight Savings Time, Summer Time","text":"The Loop app operates across time zones and time changes. The phone that is running the Loop app will automatically update the time, but you choose when to modify the time zone for \"pump time\".
What Therapy Settings are set by \"pump time\"?
Time Change comments:
Medtronic Users
Do not use the Medtronic pump menus to change your pump's time when Looping.
"},{"location":"faqs/time-faqs/#iphone","title":"iPhone","text":"The Loop app will warn you if your phone does not have time configured to automatically update. The configuration is under iOS Settings -> General -> Time & Date.
Do not ever adjust the time manually on your Looping phone to \"defeat\" time-based rules for a game. Your phone with the Loop app is now a critical medical device - make sure anyone who uses your phone understands this.
"},{"location":"faqs/time-faqs/#minimed-pump-and-cgm","title":"Minimed Pump and CGM","text":"The Minimed pump doesn't expose a universal clock, instead it exposes the components of a date (YMDHIS). It has no concept of political time zones, and just continues to increment its components on schedule. Therefore, the Loop app assumes that the pump's date, until changed, remains at a fixed offset from UTC.
That offset is stored by the Loop app the first time the pump ID is changed, and every time the pump's time is changed using the \"Change Time Zone\" command.
"},{"location":"faqs/time-faqs/#dexcom-cgm","title":"Dexcom CGM","text":"No particular input is needed on your part for the Loop app to work with Dexcom CGM data. All times use UTC. However for Dexcom receiver users, at time changes you may want to manually change your receiver's time setting just so the time visually appears correct when you are viewing the screen.
"},{"location":"faqs/time-faqs/#airports","title":"Airports","text":"RileyLinks, pumps and CGM have no problem going through any of the airport security systems. You can carry it with you in the airplane cabin and it can go through the x-ray scanner that your carry-on bags go through.
"},{"location":"faqs/time-faqs/#airplane-mode","title":"Airplane Mode","text":"Nothing wrong with airplane mode, but many people forget about it at the time they travel. So, you can do this simple preparation step now:
Turn airplane mode on. Then make sure your Bluetooth is still slid \u201con\u201d. If Bluetooth isn\u2019t on, then go slide it on again. Now go ahead and turn airplane mode off again.
Why did we just do that? Because in older versions of iOS, airplane mode turned off Bluetooth the first time you ever use it. New iOS don't do that, but worth checking.
But, if you remember to turn Bluetooth back on while in airplane mode, two things happen (1) your CGM and the Loop app will work while in airplane and (2) airplane mode will \u201cremember\u201d the next time that you like Bluetooth left on in airplane mode and will not turn it off the next time you slide airplane mode on. So now you\u2019ve just prevented yourself from forgetting to turn Bluetooth on the next time you fly and are in a hurry to meet your lovely seat mate and stow your luggage. You can safely follow cabin instructions and put phone in airplane mode without losing access to the Loop app or CGM.
"},{"location":"faqs/update-faqs/","title":"Update/Rebuild Loop FAQs","text":""},{"location":"faqs/update-faqs/#overview","title":"Overview","text":"First, please take a minute to understand what the words mean.
Update the Loop App is the process of building a new version of code, updated from that already on your phone
Rebuild the Loop App is the process of building the same version of code, identical to that already on your phone
In both cases, you build the code to install over an existing app on your phone or onto a new device.
Check Apple Developer Account
If you have an updated agreement, be sure to accept it before you update or rebuild.
Apple Program License Agreement
If you have a very slow download speed or if you do a lot of customizations, it may be worth your time to decide if you need a new download.
LoopKit/Loop releases
There's a whole page devoted to just this topic: New Phone
"},{"location":"faqs/update-faqs/#when-should-i-update","title":"When Should I Update?","text":"Updating the Loop app is the same idea as what happens to your other apps on your iPhone when you update them from the App Store on the phone. A newer version of the same app appears on the phone, simply updating-in-place the same the Loop app you were using with an updated version.
Regardless of the build method, always check your Apple Developer Account status.
Apple updates its License Agreement for the Developer Program frequently. You need to log in to your developer account to manually check if there is a new agreement to accept. If you see a big red or orange banner across the top of your Developer Account announcing a new license agreement like shown below...please read and accept it before building Loop.
"},{"location":"faqs/update-faqs/#updates-with-the-browser-build-method","title":"Updates with the Browser build method:","text":"Go to Update/Rebuild with Browser and follow the instructions.
"},{"location":"faqs/update-faqs/#updates-with-the-build-with-mac-method","title":"Updates with the build with Mac method:","text":"ALWAYS start with the Update/Rebuild with Mac before any new build with Mac. That page is important because it will offer information on the updates you may need for your Mac and Xcode before building.
Do not simply build with your old downloaded folder from months ago. There is a high likelihood that your original code from awhile ago is outdated and might not build with the current phone iOS. Grab new code and you will get the compatible version that has all the latest and greatest features and bug fixes.
"},{"location":"faqs/update-faqs/#will-i-have-to-delete-my-old-loop-app","title":"Will I have to delete my old Loop app?","text":"No. Do not delete your old Loop app. In fact, that is a bad idea as you will lose your currently paired pod and/or settings if you do that. So, don't delete.
No. The Loop app is simply updated in-place, written right over the old version.
The only exception to this is if you update/build using a different developer signing team than your current Loop app.
Yes. That's why we don't delete the app. Your settings will be saved so long as you use the same developer ID.
"},{"location":"faqs/update-faqs/#will-my-pod-still-work-when-i-update","title":"Will my pod still work when I update?","text":"Yes. So long as you use the same developer ID as you originally built the app with before.
"},{"location":"faqs/update-faqs/#how-can-i-confirm-what-version-was-installed","title":"How can I confirm what version was installed?","text":"The Loop app version is given at the top of the Loop settings page.
There is more detailed information about how the Loop app was built at the top of the Issue Report as shown in the graphic in the next section.
"},{"location":"faqs/update-faqs/#when-will-my-app-expire","title":"When will my app expire?","text":"The information in the graphic below shows the Build Details included at the very beginning of a Loop Report (Loop, Setting, Support, Issue Report
).
Up through version 3.2.3, the Browser Build versions do not report the correct date in the Expiration Alert. The date reported is correct with Mac Build or later versions using the Broswer Build.
runner
in the * sourceRoot
line in the graphic above* buildDateString
, that is approximately when the app expires* profileExpiration
line in the Build Details* sourceRoot
line will be recognizable as where on your computer the download is locatedDoes not matter. Changing the branch and even the fork is an update action. Nothing about the information above changes with the following exception.
The exception to the rule is if you build Loop 3
on your phone and want to return to Loop 2.2.x
or any FreeAPS fork
.
Loop 3
and Loop 2.2.x
Loop 3
can read the data stored by Loop 2.2.x
, but the reverse is not trueLoop 3
to FreeAPS
, you need to first record settings, delete the old app and then build the desired app, enter your settings and add your pump (new pod required for Omnipod)Assuming your macOS and Xcode updates are done, then plan on about 30 minutes for a Mac build. The Browser build steps are very fast, but then you need to wait about an hour for the build to complete and appear in TestFlight.
"},{"location":"gh-actions/automatic/","title":"Automatic Update & Build","text":""},{"location":"gh-actions/automatic/#overview","title":"Overview","text":"After the next release of the Loop app (version 3.4.0), this page will be required for all versions when building with a browser.
Before that release, this page is only relevant when building the dev
branch with a browser and only when the dev
branch is the default branch.
For someone using development code for their own use, they probably want to decide when to update their fork
to the most recent commit. They can still have the advantage of automatic building without automatic updates. There may be other configurations someone would choose. These options are added to Loop 3.3.0 (dev
branch) and later.
You can affect the default behavior:
You can modify the automation by creating and using some variables.
To configure the automated build more granularly involves creating up to two environment variables: SCHEDULED_BUILD
and/or SCHEDULED_SYNC
. See How to configure a variable.
Note that the weekly and monthly Build Loop
actions will continue, but the actions are modified if one or more of these variables is set to false. A successful Action Log will still appear, even if no automatic activity happens.
SCHEDULED_SYNC
to false and either do not create SCHEDULED_BUILD
or set it to trueSCHEDULED_BUILD
to false and either do not create SCHEDULED_SYNC
or set it to trueSCHEDULED _SYNC
SCHEDULED _BUILD
Automatic Actions true
(or NA) true
(or NA) keep-alive, weekly update check (auto update/build), monthly build with auto update true
(or NA) false
keep-alive, weekly update check with auto update, only builds if update detected false
true
(or NA) keep-alive, monthly build, no auto update false
false
no automatic activity, no keep-alive"},{"location":"gh-actions/automatic/#how-to-configure-a-variable","title":"How to configure a variable","text":"Secrets and Variables
.Actions
Variables
tabNew repository variable
button (upper right)SCHEDULED_BUILD
in the \"Name\" fieldfalse
in the \"Value\" fieldAdd variable
button to save.New repository variable
button (upper right)SCHEDULED_SYNC
in the \"Name\" fieldfalse
in the \"Value\" fieldAdd variable
button to saveYour build will run on the following conditions:
alive
branch if necessaryfalse
), no updates, keep-alive or building happens when Build Loop
runsSCHEDULED_SYNC
set tofalse
), it will only run once a month, on the first of the month, no update will happen; keep-alive will runSCHEDULED_BUILD
set tofalse
), it will run once weekly, every Wednesday, to check for changes; if there are changes, it will update and build; keep-alive will runTo enable the scheduled build and sync, the GH_PAT
must hold the workflow
permission scopes. This permission serves as the enabler for automatic and scheduled builds with browser build. To disable this, follow these steps:
repo
, workflow
next to the FastLane Access Token
link, then automatic building is enabledworkflow
boxrepo
boxUpdate token
buttonrepo
permissionIf you choose not to have automatic building enabled, be sure the GH_PAT
has repo
scope or you won't be able to manually build.
What if I decide I don't want the automatic building feature?
If you are using the released version of Loop, please leave automatic building running
If you are taking a break from Loop and want to stop monthly Build emails, consider disabling actions for the Build Loop
action for your app.
If you are done with Loop, you can delete the whole repository; but you should be sure about this because you'll need to start over with Configure to Use Browser to restore ability to build Loop with GitHub.
This page is only relevant when building the dev
branch with a browser.
For Mac, please see: Build Loop dev
with Mac
No matter the method used to build Loop-dev, you are testing development code. Please read this link now before continuing.
dev
branchFor Experienced Builders
Building the development (dev
branch) is not typically used for your first attempt at building the Loop app.
The instructions on this page assume you are familiar with building the Loop app using a browser as detailed on Configure to use Browser
dev branch
You can build any desired branch (available at LoopKit/LoopWorkspace) using the GitHub Browser build method. This section is suitable if you have already built either dev
or main branch using the GitHub First-Time instructions.
The graphics on this page show the dev
branch. If you want a different branch, just substitute that branch name for dev
.
Overview of what you will do
LoopWorkspace fork
must have the branch
you wantdev
- you must get the dev
branch from LoopKit4. Build Loop
and then click on the Run Workflow
dropdown, you must select dev
there before clicking the green Run workflow
button - see Build Branch
Branch
","text":"Your LoopWorkspace fork
is at https://github.com/username/LoopWorkspace
where you substitute your actual GitHub username
. You need to be logged into GitHub. Review the graphic below as you go through the steps.
branch
icon to display the branches
as shown in the lower half of the graphic below:branch
you want is not listed, then continue with Step 2Branch
New branch
button and follow the Add Branch
stepsBranch
","text":"Each step in the list below matches with the number in the graphic. In the top half of the graphic, the left side shows the initial display and the right side shows the display after making the indicated selections:
dev
Branch
name box labeled 3 in the graphic and type dev
fork
should always match the branch name you are adding; check that you type it correctlyBranch
","text":"Tap the Code
button (upper left) and ensure this branch in your fork
is up to date.
dev
branch)fork
button and then the Update branch buttonLook in this section for one-time changes for building dev
with a browser that require special, one-time actions.
If you have already completed the One-Time Changes, skip ahead to Build Branch
.
dev
","text":"When updating from\u00a0Loop\u00a03.2.x to dev
, you will need to take some extra steps.
You have a choice:
dev
, see Change Default Branch
and then your\u00a0Loop\u00a0app will be automatically updated and automatically built at least once a monthdev
branch in the drop-down menuHere is a summary of the extra steps; each step has an associated link. This assumes you have already updated your fork
and are at the correct branch.
repo, workflow
and to never expireNew Indentifier
Create Certificates
alive branch
","text":"What about the alive branch
alive branch
dev branch
and you have workflow
permission added to the scope
for your GitHub Personal Access Token
alive branch
and run the Create Certificates
againIdentifier
","text":"The bundle ID
for the \"widget
\" changed from \"SmallStatusWidget
\" to the more descriptive \"LoopWidgetExtension
\".
dev branch
App Group
to this one new IdentifierAll other identifiers should be already set up. If they are not, please go through the steps on the Configure to Use Browser page to figure out what you are missing.
NAME
IDENTIFIER
Loop Widget Extension
com.TEAMID.loopkit.Loop.LoopWidgetExtension
LoopWidgetExtension
\" identifiergroup.com.TEAMID.loopkit.LoopGroup
where you use your TEAMID
You must create certificates again to cover the new Identifier name and to provide support for the addition of the Libre sensors. (This step is required whether you use Libre or not - Loop needs permission to have that capability). Once the certificate action succeeds, then run the action to build Loop.
dev branch
Build Loop
(see Build Branch
)Branch
","text":"If you want a branch to be the one you build all the time, you may choose to Change Default Branch
. This is not necessary except for special cases.
If you have one branch as default, for example main, and choose to build a different branch, there is an extra step when you Build Loop
. Refer to step 4 in the graphic below. Use the branch dropdown menu to select the branch you want before hitting the green Run workflow button.
!!!
"},{"location":"gh-actions/build-dev-browser/#change-default-branch","title":"Change DefaultBranch
","text":"There can be several reasons why you would change your default branch.
These are the steps to modify the default branch.
For this example, we show how to change from a default branch of main
to a default branch of dev
. Note - only the owner of the repository can take this action and they must be logged in. Otherwise the Settings tab does not appear.
For the numbered steps below, refer to the graphic found under each group of steps.
Click on the Settings Icon near the top right of your LoopWorkspace
Default Branch
as shown in the graphicTo the right of the default branch name there is a pencil and a left-right arrow icon
Switch default branch to another branch
dialogmain
dev
Click on the Update
button
You will be presented with an are-you-sure question.
I understand, update the default branch.
buttonYour default branch has been changed.
"},{"location":"gh-actions/build-dev-browser/#automatic-update-build","title":"Automatic Update & Build","text":"The automatic update and build features of the development branch are only available if you set the dev
branch as your default branch. Be sure to read the Automatic Update & Build if you did this.
This page is only relevant when building with a browser.
For Mac, please see: Customize with Mac
For new Loopers, please build the code before you make any changes. Start with Open Loop and familiarize yourself with the interface. Later, you can make the customization(s) you desire and build again. The second build will be much easier than your first build.
These customizations require you to modify the code used to build the Loop app and then build the app again with the modified code.
You take responsibility
You are responsible when you decide to use customizations.
Be sure to report what changes you made if you need to ask for assistance with your app.
"},{"location":"gh-actions/custom-browser/#customizations-prepared-for-you","title":"Customizations Prepared for You","text":"Some customizations are the same for everyone and have been prepared for easy use.
The Loop and Learn team commits to maintaining these prepared customizations and provides an easy method to add your selection from these customizations to your version of Loop.
Please read the documentation for these on the Loop and Learn: Customization Select Page:
fork
of your LoopWorkspace
repository. There are several sections you need to review on the Loop and Learn page:main
dev
If you are using main
branch to build Loop 3.2.3
and rely on either xDrip4iOS or GlucoseDirect to read your CGM and transfer the readings to the Loop app, you need to review this section of the Loop and Learn customization page.
Alternatively, you can switch to the dev
branch, which already supports Libre. Build Loop dev with Browser
Some customizations must be created for yourself. These are of two basic types: Custom Edits and Build-Time Flag.
The information needed to modify the code to make these customizations is found in the Versions tab because the information is independent of build method (think of these as your personal versions). The links are found below.
When preparing these personal edits using a browser, there is a page explaining how to get these edits into your personal fork
of LoopWorkspace
prior to building.
The code changes required for these customizations are the same regardless of the build method. The pages that provide the documentation on modifying and incorporating these changes are found at the links above.
"},{"location":"gh-actions/edit-browser/","title":"Custom Edits with Browser","text":""},{"location":"gh-actions/edit-browser/#hot-topics","title":"Hot Topics","text":"Pro Tip
The method on this page allows you to create a set of personalized customizations that you can use in addition to the Loop and Learn: Prepared Customizations. You can use (and re-use) your customizations with either Browser Build or Mac builds so you don't have to repeat the customization with every update.
Modules vs Submodule
This page has instructions to set up your own fork
for the Modules, otherwise known as submodules, associated with\u00a0LoopWorkspace\u00a0that are needed for a selected customization.
Each Module has its own GitHub repository
;and you will be working with your fork
of that Module at https://github.com/username/Module, where username is your username.
What is a SHA-1?
SHA-1 means Secure Hash Algorithm 1; which is used to generate an alphanumeric code.
Each time you save a change to your\u00a0GitHub repository, a unique SHA-1 is created. That identifier is used to tell GitHub a specific change that you want applied or identifies a specific version for that repository
. These work for any compatible fork
from the original\u00a0GitHub repository.
Ignore\u00a0Compare & pull request\u00a0Prompts
Please do not click on boxes that GitHub might show you that ask if you want to Compare & pull request.
This would be an attempt to merge changes from your fork
back to the original version that everyone uses. These changes are for you only. Ignore those prompts.
Time Estimate
Summary
Fork
the Module (if needed) - this is your fork
where you will make changesSync
the Module (if needed)fork
where you will make changesFAQs
You do this using any browser on a computer or laptop. (Phone is not recommended - screen is too small.)
There is some background information at the bottom of this page starting at\u00a0LoopWorkspace\u00a0if you want to know what you are doing. Otherwise, just follow the steps like a cookbook.
"},{"location":"gh-actions/edit-browser/#decide-which-modules-you-want-to-modify","title":"Decide Which Modules You Want to Modify","text":"Decide which Version: Custom Edits changes you want to make. Each customization lists a Module name.
Look also at the Stable line for the desired customization:
Review Only
Review this section so you know what to expect. The actual steps will come later, starting with Create your Fork
for Selected Module or Edit Module in Browser.
In the next sections, the exact process for making changes will be documented. But the steps may feel confusing. There are no links here because you are supposed to review the steps before taking action in the next section.
fork
main
branch
for your fork
using the SHA-1 tablefork
Later, you will use information from your fork
to create your customizations. (Suggestion - use same file as your Secrets, or at least keep the customization file in the same folder). Details are found at the Prepare the Customizations section.
What should you do if you see the message:
There was an error committing your changes: File could not be edited
This is fairly rare, but it can happen. A user got this error when editing a file using GitHub:
The solution was to make sure the email address in their GitHub profile was correct. See GitHub Discussions for more information.
"},{"location":"gh-actions/edit-browser/#create-your-fork-for-selected-module","title":"Create yourFork
for Selected Module","text":"Choose your link:
Fork
: if you do not have a fork
of this ModuleFork
for Module: if you have a fork
but need guidance on whether it is the right fork
New Release
If you have previously used this process for a prior release, use the same Modules you already copied.
You can often reuse customizations that you created earlier even with a new release. Attempt to use your existing patches before creating new ones.
If a customization did not work, then
fork
of each ModuleSkip ahead to Personalized Customization for this Module.
"},{"location":"gh-actions/edit-browser/#new-fork","title":"NewFork
","text":"If you want a modification that uses a particular Module, you must make a fork
of that module to your account in GitHub. You will repeat the Fork
and Modify steps for each module.
fork
fork
will show up in the browserThis table lists all the modules referred to on the Code Customization page linked above:
ModuleFork
From Loop https://github.com/LoopKit/Loop LoopKit https://github.com/LoopKit/LoopKit OmniBLE (for DASH) https://github.com/LoopKit/OmniBLE OmniKit (for Eros) https://github.com/LoopKit/OmniKit Remember - you can only have a single fork
of a given\u00a0GitHub repository. If you already have a fork
, you don't need another one; but it must be a linked to the URL listed the Module Table.
I already have a fork
Go to Existing Fork
for Module and follow the directions.
When you\u00a0\"fork a repository\", the default\u00a0branch\u00a0is the one that should be forked
.
branch
if needed","text":"dev
branch, regardless of the Stable notation, there is no need to create a special branch
, simply update the default branch to the latest (sync it) and use the current version of the customization when you skip ahead to Personalized Customization for this Modulemain
and dev
and you want to build the main
branch, you need to create a branch for this Module that is consistent with the version you wish to customize.Open your browser to your https://github.com/username/Module URL. If you already created the branch
you need, you do not need to create a new one.
If you are customizing a released version, use the Table of SHA-1 under your version number below. Copy the SHA-1 for your Module so you can paste it into the URL in Step 2 below. Notice the suggested branch name for that table. You will use this in Step 3.3 below.
You should create a branch
following the numbered steps and watching the GIF. Each Frame in the GIF corresponds to a numbered step below.
/tree/SHA-1
where you change SHA-1 to be the value in the table below and hit returnbranch
iconbranch
name in the blank spacebranch
buttonThis will be updated with each release. The versions for the dev
branch are not reported here because they are frequently updated. If customizing dev, use the default branch for each Module and sync
that branch if needed.
Suggested branch
name is v-3.2.3
Repository
SHA-1 LoopWorkspace
81a3d9b03305a4b2a844bd6bac14a14f27626fef Loop
c6b058b4276681600979aaeba518c635f06ac135 LoopKit
9835a29f1bac9f75023f39c376479a2e6a6c8ccd OmniBLE
f21360781c0b8eee26c531d20f1b0aa192a227f2 OmniKit
c1e0d395975c93d15b3f84ac21097e40b7d5d93f"},{"location":"gh-actions/edit-browser/#personalized-customization-for-this-module","title":"Personalized Customization for this Module","text":"Navigate to the file you need to modify (using the instructions to find the lines from the Version: Custom Edit page)
Pro Tip
Look at the files you want to change - if more than one change is desired for a single file - do them at the same time.
This section provides the steps to make a single customization for the Module. If you need more than one, just repeat the process and make additional\u00a0\"\"patch\" branches.
"},{"location":"gh-actions/edit-browser/#example-gif","title":"Example GIF","text":"The GIF showing the creation of one customization is shown below. Please review the 4 frames of the GIF, read the detailed instructions below and then review the GIF again. In case you are concerned by the\u00a0\"Pull Request\u00a0shown here; this is to your own fork
, not back to the original.
You will be using the \"pencil\" tool in the browser display for your fork
.
Are there detailed instructions?
For more information about editing with GitHub:
The bullets below go with Frame 1 of the GIF above:
The bullets below go with Frame 2 of the GIF above:
fork
(this does not go back to the original)Between Frame 2 and 3 of the GIF, your display will look similar to the graphic below:
You see there an opportunity to\u00a0\"Compare & pull request\"
fork
back to the originalThe\u00a0branches\u00a0selection is highlighted with a brown rectangle in the graphic above.
Your screen should now look like Frame 3 of the GIF above:
Now your display should look like Frame 4 of the GIF above:
For example:
# OmniBLE: Increase insulin at insert by 0.35 U\nSHA-1 = 5e9f4f407ff5544663f496d2e3a5ed8aa4f32a68\n
Warning - that is not a valid SHA-1 for this change. Do not try to copy it and use it. You must make your own personalized changes.
Later on, you will create the actual command needed to insert into build_loop.yml so you can add this customization when your build the app.
Repeat this process until you've done all your customizations for this Module and then move on to the next Module.
"},{"location":"gh-actions/edit-browser/#prepare-the-customizations","title":"Prepare the Customizations","text":"Once you prepare the commands, then you will edit the build_loop.yml file of your fork
of\u00a0LoopWorkspace.
Ensure your fork
is from\u00a0LoopKit/LoopWorkspace
If your\u00a0LoopWorkspace fork\u00a0did not come from\u00a0LoopKit/LoopWorkspace, then delete your existing fork
and make a new one. See Already Have\u00a0LoopWorkspace?.
fork
For each customization you want to include, create a pair of lines consisting of the comment (must start with a #) followed by the\u00a0curl
\u00a0statement pointing to the SHA-1 that has the customization.
Save the customization lines in your text file for later use in the build_loop.yml file.
Customization Template:# Module: File: code customization description\ncurl https://github.com/username/Module/commit/SHA-1.patch | git apply -v --directory=Module\n
where:
curl
\u00a0means copy from URL.patch
\u00a0after the SHA-1 informs GitHub to format that code change so it can be applied to your fork
--directory=Module
\u00a0is critical to apply the customization to the correct ModuleTo view the exact code change associated with that patch, open a browser at the URL of\u00a0https://github.com/username/Module/commit/SHA-1
.
The final step is to update your\u00a0LoopWorkspace fork\u00a0to apply these customizations by adding those customization lines into the build_loop.yml file.
Return to your\u00a0GitHub fork for LoopWorkspace\u00a0and make sure to sync it if needed.
# Patch Fastlane Match to not print tables
# Customize Loop: Download and apply patches\n - name: Customize Loop\n run: |\n\n # For each patch, edit comment line (keep the #) then update curl (and remove the #)\n\n # Submodule Loop patches:\n # Loop: Filename: customization details\n #curl https://github.com/username/Loop/commit/SHA-1.patch | git apply -v --directory=Loop\n\n # Submodule LoopKit patches:\n # LoopKit: Filename: customization details\n #curl https://github.com/username/LoopKit/commit/SHA-1.patch | git apply -v --directory=LoopKit\n\n # Submodule xxxxx patches: Follow prototype above\n
"},{"location":"gh-actions/edit-browser/#add-personal-customizations-to-build_loopyml","title":"Add Personal Customizations to build_loop.yml","text":"Open the text file in which you saved the customization lines.
For a given submodule, paste the comment / curl command as indicated in the template above.
The indenting needs to match, so tab or (shift-tab) to line up the columns.
Once you are done with all the edits for build_loop.yml you will commit the changes to your fork
directly.
fork
as you wantWhen you are ready, it's time to build with your customizations.
"},{"location":"gh-actions/edit-browser/#build-with-customizations","title":"Build with Customizations","text":"At the top of the display, click on\u00a0Actions.
Wait about 2 minutes before walking away to make sure there are no errors. If you get an error, then look for the first \"did not apply\" error message and fix the customization right before that line.
In about 1 hour, your customized app will be available for installation on your phone via TestFlight.
"},{"location":"gh-actions/edit-browser/#customization-and-sha-1","title":"Customization and SHA-1","text":"When you commit your customization to your branch
of your fork
, there is a new SHA-1 associated with that step. The SHA-1 for a given branch, typically main
or dev
identifies to a mentor exactly which version of code you used for your build.
The SHA-1 for customized code will not be recognized by a developer or mentor. If you are having a problem and need to ask for help you need to identify what the SHA-1 was before you added your customizations.
If you are on main
branch and it is up-to-date, this is less of an issue. If you are on dev
branch, that can require some investigation.
The easy method is to provide a mentor with your GitHub username and they can figure out the base version you are using aside from customization. They can also identify the customizations you added.
"},{"location":"gh-actions/edit-browser/#identify-your-base-version","title":"Identify Your Base Version","text":"If you want to do this yourself, this section explains the steps.
Step 1: In your customized LoopWorkspace fork
: tap on Code
at upper left
fork
is behind the LoopKit
repository
, consider updating your fork
fork
will be ahead of the LoopKit
repository
main
branch in the graphic below - it is one commit
ahead of LoopKit
as indicated by the message highlighted by the red rectangleStep 2: Click on the clock symbol, highlighted by blue rectangle in the previous graphic, to view the commit
history - the history is presented in reverse chronological order
Step 3: Look at the commit
descriptions for your fork
; several examples are shown below
commit
made by the developers that is included in your fork
is the one a mentor will recognizeThe first example is for main
with one customization
commit
is highlighted in the blue rectangleThe second example is for dev
where the fork
was synched both before and after customizations were applied
repository
- note that the SHA-1 here is specific to this repo and does not help a mentor identify the base version of your buildFork
for Module","text":"What if you already have a fork
of one of the modules?
Your existing fork
is from a username other than LoopKit
fork
you do not care about, you can delete the repository
.fork
, you are probably experienced enough to know how to solve the issue.Instructions to delete a repository
are found at\u00a0GitHub Docs
Once deleted, go to Create Your Fork
for Selected Module.
The\u00a0LoopWorkspace repository\u00a0is the umbrella organization holding all the pieces needed to build the Loop app. It provides a list of pointers to a specific version for each of the Modules used in the workspace.
You are telling GitHub to apply specific customizations when it builds your app for you. It extracts from GitHub all the code needed, applies your specific customizations and then starts the build.
"},{"location":"gh-actions/gh-deploy/","title":"Install on Phone","text":""},{"location":"gh-actions/gh-deploy/#general-installation-information","title":"General Installation Information","text":"This is only available with\u00a0Loop 3.
The Loop app must be built at least every 90 days when using a browser to build.
After you Build the Loop App with a browser and it has automatically uploaded to the TestFlight app, you are ready to install on as many phones as you and your family members need.
If you later need to add an adult family member to your list, refer to Set Up Users and Access (TestFlight).
Children (under 13 in US, varies by country) cannot use TestFlight with their ID. When you use TestFlight for a Child, you will need to use your ID on their phone (not the whole phone - just the Media & Purchase portion), so send the TestFlight invitation to the email associated with your ID.
If you already have the TestFlight app installed on your phone, skip ahead to Install App with TestFlight.
To install TestFlight, refer to the GIF below:
Once you get an email that the TestFlight processing completed, you can install the app on your phone. Note this can be half-hour to an hour after the build displays the green check mark on your browser.
The first time you use TestFlight on any phone associated with a given email, you must Redeem
the code sent to that email inviting you to test the app. The GIF below is for someone who has never used TestFlight.
If you already have the\u00a0Loop\u00a0app on the phone, you'll see the warning about possible loss of data. Don't worry, all your settings remain. Go ahead with the installation.
Automatic features will be available when the next version is released and are available now in 3.3.0 (when\u00a0dev is the default branch). The instructions on the Configure to Use Browser page will, unless you make a change, automatically take the following actions when you update to the next release or use dev
:
It is already true that, unless you make a change, the default setting will:
Recommended settings:
If you are running the development code, you may prefer to turn off the automatic update, but keep the automatic build. To read more about modifying automatic update and build options, please read Modify Automatic Building.
"},{"location":"gh-actions/gh-deploy/#disable-automatic-install-from-testflight","title":"Disable Automatic Install from TestFlight","text":"Once the app is installed one time, you can adjust whether it is automatically installed when updated versions are available. We recommend you disable automatic installation so you can choose when to switch to a newer build, which in some cases, may be a newer version.
Go back to the TestFlight app on your phone and tap on your app name in the list to see an expanded screen similar to the graphic below. The row to enable or disable automatic updates is highlighted in the graphic, which shows the feature disabled. This is recommended for all users.
When you are ready to install, just open the TestFlight app and click Install to get the most recent build and then click Open when it completes the installation. All your settings and connections to CGM and Pump are maintained.
If you tap on the bottom row that says Previous Builds
, highlighted by the dashed-green rectangle, you can view and choose an older build (as long as it has not expired).
The adult (Apple Developer Account owner) can log into Media & Purchase (see steps below) without affecting the child Apple ID associated with a phone (and thus their health records used by\u00a0Loop). After the adult installs or updates the app using TestFlight, they probably should reverse those steps to remove their credentials from Media & Purchase.
Media & Purchase affects access to the App Store, Books, Music and Podcasts.
On the Child phone:
my kids phone
Suppose you really don't like the name you picked initially for the\u00a0Loop\u00a0app that shows up in the TestFlight app.
You can change it.
Open this link: App Store Connect Apps and log in as needed.
If you get an error when building with a browser, use this page to figure out what to do.
If you are still unsuccessful, then post your request for help along with your GitHub username. Mentors can go to your public\u00a0GitHub repository, check the status and then view your log files directly.
Username, Not Pictures
If you've been around the DIY community for a while, you know the mantra about screenshots. Well, when using a browser to build, screenshots are close to useless.
All that is needed to assist is your GitHub username.
But first - try to diagnose it yourself using this page.
"},{"location":"gh-actions/gh-errors/#most-common-mistakes","title":"Most Common Mistakes","text":"These are some of the most common errors to date.
Secrets
App Group Identifier
to all 4 of the required identifiers in this step: Add App Group
to Identifiers
GH_PAT
, FASTLANE_ISSUER_ID
and FASTLANE_KEY
contain both upper and lower-case characters and all the values are case-sensitiveTEAMID
, you typed what you thought you saw instead of using copy and pasteIf you are running development code, skip ahead to Preview for Next Version.
"},{"location":"gh-actions/gh-errors/#misleading-error-message","title":"Misleading Error Message","text":"If there are Apple Developer agreements you have not accepted, you may get errors when you try to Build that indicate your Apple Secrets
are incorrect even if they are not.
FASTLANE_ISSUER_ID
, FASTLANE_KEY_ID
or FASTLANE_KEY
is not correctIf you need detailed instructions, click on this Apple Program License Agreement
Help Page.
You can also get this message if the credit card used to purchase the Developer account is not current, e.g., no longer valid or expiration date has passed.
One user reported: The expiration date on the credit card used for auto-renew of my developer account was updated and the value in the Apple account did not match the new one. After updating my account with the new expiration date - Browser Build succeeded again.
"},{"location":"gh-actions/gh-errors/#find-your-error","title":"Find Your Error","text":"For Version 3.2.3 and earlier - later versions have an improved method for display errors.
There is a separate section for each step in the process. First, you must follow the Examine the Error instructions to view the record of the failed action. Then go to the section for the Action you were trying to complete to look for possible error strings to copy into the search box.
Validate Secrets
Add Identifiers
ErrorsCreate Certificates
ErrorsBuild Loop
Errors before a successful buildBuild Loop
Errors after a successful buildIf you discover a new error, please reach out to help us update the documentation.
"},{"location":"gh-actions/gh-errors/#examine-the-error","title":"Examine the Error","text":"It doesn't matter which action you are running; after the action completes, you will either see a green check mark for success or a red x mark for failure. The graphic below shows an example for the Add Identifiers
action.
If you click on the action name, it opens a secondary screen as shown below.
Click on the top link to view the record of the failed action as shown in the graphic below. You will be pasting strings into the search box (highlighted with a green rectangle) to look for a documented error. Please read the instructions below the graphic.
Where to find my GitHub username?
You can find it:
Loopworkspace
, after github.com
in between the forward slashes (/
). https://github.com/username/Loopworkspaceor on the GitHub website
As your GitHub username
is case-sensitive, use copy and paste.
Validate Secrets
Errors","text":"To generate the graphic below, some items were deliberately set to be incorrect in the Secrets list. Representative error messages are shown when running the validate secrets action.
"},{"location":"gh-actions/gh-errors/#action-add-identifiers-errors","title":"Action:Add Identifiers
Errors","text":"Use the Examine the Error instructions to find your error message.
There are two errors that we are familiar with at this point. Look for text matching what is listed below and view what has caused this error to be seen.
"},{"location":"gh-actions/gh-errors/#error-credentials-missing-invalid","title":"Error: credentials missing / invalid","text":"Copy the words on the line below and paste them into the search function for your action log.
Authentication credentials are missing or invalid\n
The full error looks like this:
Authentication credentials are missing or invalid. - Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens`
This can be caused by an error in the value (or spelling) of one of these keys:
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
GH_PAT
Use a Text-Only Editor
If you used a \"smart\" editor when saving your Secrets in an archive file before pasting them into the repository Secrets
, it might have changed a lowercase letter to an uppercase letter.
If even one character is capitalized when it should not be, you will not succeed at the Add Identifiers step.
"},{"location":"gh-actions/gh-errors/#error-invalid-curve-name","title":"Error:Invalid curve name
","text":"If you see:
invalid curve name\n
This was caused by an error in the format of the value entered for the FASTLANE_KEY
.
Make sure you copy in a text editor from the first hyphen to the last hyphen.
"},{"location":"gh-actions/gh-errors/#action-create-certificates-errors","title":"Action:Create Certificates
Errors","text":"Use the Examine the Error instructions to find your error message.
"},{"location":"gh-actions/gh-errors/#error-wrong-teamid-in-secrets","title":"Error: Wrong TEAMID inSecrets
","text":"Copy the words on the line below and paste them into the search function for your action log.
error: No profile for team '***' matching 'match AppStore\n
If that phrase is found, then:
TEAMID
entered in your Secrets
TEAMID
Add Identifiers
and before Action: Create Certificates
Follow these steps:
Open each link below in a separate tab
It is best to open each link below in a separate tab so you can return to this list and keep using the links in each step.
Delete all the identifiers that you can, following the steps in Configure to Use Browser: Delete Identifiers
TEAMID
TEAMID
, but do not use themEnter your TEAMID
correctly in the repository Secrets
TEAMID
.GH_PAT
, you'll do the same but for TEAMID
) Update SecretsRun Action: Configure to Use Browser: Add Identifiers
again
Follow all the steps in this section with the correct TEAMID
Configure to Use Browser: Configure Identifiers for Loop but when you get to the Configure to Use Browser: Create Loop App in App Store Connect, you need to return to this page and follow the instructions below to remove the app and add a new one.
The first time through, you created an app with a Bundle ID
that does NOT include your TEAMID
.
You will remove that app and create a new one.
"},{"location":"gh-actions/gh-errors/#remove-app-with-incorrect-teamid","title":"Remove App with IncorrectTEAMID
","text":"Go to App Store Connect / Apps
and follow the numbered steps in the graphic below.
General
, click on App Information
Bundle ID
is the incorrect oneBundle ID
says: com.NOT_YOUR_TEAMID.loopkit.Loop
Remove App
Remove
Restore App
Apps
at the very top of the screen and proceed to the next stepThat App with the wrong Bundle ID
remains in the App store but it is hidden so it won't confuse you.
TEAMID
","text":"Now click on the Add Apps
button or the (plus sign) if you have other apps in the App Store.
Follow the Configure to Use Browser: Create Loop App in App Store Connect directions with these additions:
Bundle ID
you choose is for Loop and contains your TEAMID
, it should look like: com.TEAMID.loopkit.Loop
SKU
for your Loop App (try 1234
, if you used 123
before)You should be able to continue with the Configure to Use Browser Steps to Create Certificates
and then proceed from there with Build Loop
and keep going.
Copy the words on the line below and paste them into the search function for your action log.
Error cloning certificates\n
The full error looks like this:
Error cloning certificates repo, please make sure you have read access to the repository you want to use
or
Error cloning certificates git repo, please make sure you have access to the repository - see instructions above
If you see this phrase, the fastlane
package that is utilized during the 3. Create Certificates
action cannot access your repository to create certificates for your Loop app. This is due to insufficient repository access rights that were not granted during the creation of your GH_PAT
token.
To fix this error:
Fastlane Access Token
) that was created during Configure to Use Browser: Setup GitHub: Create GitHub Personal Access Token
Tokens (classic)
is highlighted in the menu on the leftFastlane Access Token
) to open its detail pageSelect Scopes
will be checked\u00a0\u2013 this is what's causing the issue.workflow
permission scope (the graphic does not match the words, you want to use workflow
to get both repo
and workflow
scope)Update token
(it's a long way, ignore all other settings, do not check anything else)After you have clicked Update token
you should see the token overview again with the message Some of the scopes you\u2019ve selected are included in other scopes. Only the minimum set of necessary scopes has been saved.
(You can dismiss the message using the X
near the upper right side if it appears).
NOTE: for next release or if using the dev branch - you want GH_PAT
to have repo, workflow
scope. So click on the workflow scope now and save yourself a step later.
You should be able to continue with the Configure to Use Browser Steps to Create Certificates
and then proceed from there with Build Loop
and keep going.
Copy the words on the line below and paste them into the search function for your log file.
Could not create another Distribution certificate\n
The full error message is:
Could not create another Distribution certificate, reached the maximum number of available Distribution certificates
These steps are needed to make room for a Certificate
:
Distribution Certificate
Distribution Certificates
Type
column - do not delete a Development
Certificate
Development
Type
certificate associated with an Xcode build for your Loop app - it will stop working and you will be very sadDistribution
Certificate
and revoke itCertificate
:Action
: Create Certificates
Action
: Build Loop
But what about TestFlight builds?
Previous builds using this method that are already in TestFlight are not affected by deleting the Distribution Certificate
.
Copy the words on the line below and paste them into the search function for your log file.
decrypt the repo\n
The full error message is:
Couldn't decrypt the repo, please make sure you enter the right password
If you know you entered the incorrect MATCH_PASSWORD
in your repository Secrets
, go and fix it now and try again.
Otherwise, you need to follow the steps to Reset Match-Secrets.
"},{"location":"gh-actions/gh-errors/#action-build-loop-errors","title":"Action:Build Loop
Errors","text":"Run Create Certificates
First
You must run Action: Create Certificates
before attempting to run Action: Build Loop
Use Examine the Error
For each section below, copy the phrase into the search function of the log. If you find it, solve that error. If not, move on to the next one.
"},{"location":"gh-actions/gh-errors/#could-not-find-an-app-on-app-store-connect","title":"Could not find an app on App Store Connect
","text":"Copy the words on the line below and paste them into the search function for your action log.
Could not find an app on App Store Connect\n
If that phrase is found, then:
Make sure you completed the Create Loop App in App Store Connect Step
Create Certificates
Build Loop
This can also be caused if you correctly created the Loop App but entered an incorrect value for the TEAMID
.
TEAMID
, check this link: Certificates, Identifiers & Profiles for entries with the incorrect TEAMID
embeddedTEAMID
is 0123456789
, but you entered 000123
, you may see both of these in your identifiers listcom.0123456789.loopkit.Loop
com.000123.loopkit.Loop
TEAMID
and rerun all three steps:Add Identifier
Create Certificates
Build Loop
Error: Provisioning Profile
","text":"Copy the words on the line below and paste them into the search function for your action log.
error: Provisioning profile \"match AppStore\n
If that phrase is found one, or more times, it means you missed a step when configuring the Loop identifier or missed associating your Loop App Group with one or more identifiers.
For example, if you see:
error: Provisioning profile \"match AppStore com.***.loopkit.Loop\" doesn't include the com.apple.developer.usernotifications.time-sensitive entitlement.
Go back to First-Time: Add or Review Configuration for Loop Identifier and make sure you enabled the Time-Sensitive notification
for Loop.
For example, you might see:
error: Provisioning profile \"match AppStore com.***.loopkit.Loop.SmallStatusWidget
error: Provisioning profile \"match AppStore com.***.loopkit.Loop.statuswidget
error: Provisioning profile \"match AppStore com.***.loopkit.Loop.Loop-Intent-Extension
Return to Add App Group to Other Identifiers and fix the missing items.
You must create certificates again before you can build Loop:
Create Certificates
Build Loop
A new one cannot be created because you enabled
","text":"Copy the words on the line below and paste them into the search function for your action log.
A new one cannot be created because you enabled\n
If that phrase is found with lines similar to the following:
[31mA new one cannot be created because you enabled `readonly`\u001b[0m\n[31mProvisioning profiles in your repo for type `appstore`:\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.statuswidget.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.SmallStatusWidget.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.LoopWatch.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.Loop-Intent-Extension.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.LoopWatch.watchkitextension.mobileprovision'\u001b[0m\n
This tells you, the Bundle ID
you selected in First-Time: Create Loop App in App Store Connect does NOT have your TEAMID
embedded in the name.
Once you have created an app in the App Store that is not based on your TEAMID
, you cannot delete it, but you can Remove it (i.e. hide it so that it is no longer visible on this page and you don't accidentally click on it).
Bundle ID
and click on itApp Information
(under General
)Bundle ID
listed does not include your TEAMID
Remove App
Remove
At this point, get your correct TEAMID
, fix your Secrets file to have the correct TEAMID
and then return to First-Time: Configure Secrets. This time you will be updating TEAMID
in the repository secret list.
Build Loop
Errors","text":"This section is only for people who have successfully built using GitHub Build Actions.
Use the Examine the Error instructions to find your error message.
"},{"location":"gh-actions/gh-errors/#could-not-install-wwdr-certificate","title":"Could not install WWDR certificate
","text":"Assuming you have successfully built using the Browser-Build / GitHub method before:
Could not install WWDR certificate
, make sure your Apple developer account is in good standing and that there are no agreements that need to be acceptedMatch-Secrets
","text":"This is not the first thing to try, but sometimes it is the best approach.
There might be several reasons to do this:
MATCH_PASSWORD
and want to build one of the Other AppsMATCH_PASSWORD
but you are getting Error: Could not decryptThese steps are needed to reset your Match-Secrets
:
Match-Secrets
RepositoryMatch-Secrets
RepositoryMatch-Secrets
Action
: Validate Secrets
automatically creates a new private Match-Secrets
repository if you don't have oneAction
: Create Certificates
Secrets
and try againAction
: Build Loop
Other Apps
All DIY iOS apps that have an associated GitHub Browser Build
method require the same 6 Secrets
.
If you add an app to your GitHub username (by forking the repository and adding Secrets
) and then build it, it encrypts your Certificate
using MATCH_PASSWORD
.
If you already have the other apps configured and then you delete Match-Secrets
and add a new one, you will need to run Create Certificates
for each app before the next time you build each app - go ahead and do that now so you don't forget.
Error annotations are available for Version 3.3.0 and later. These were contributed by community volunteers along with the improvements to enable automatic updates and automatic builds.
"},{"location":"gh-actions/gh-errors/#examine-annotation","title":"Examine Annotation","text":"If a\u00a0GitHub Action\u00a0fails, you will see a clear notification.
First consider the following results from the\u00a0GitHub Action: 1. Validate Secrets.
Your screen may look similar to the graphic below. The name in parentheses refers to the branch used to develop these wonderful messages. Yours may be (dev) or (main), once 3.4.0 is released.
But there are so many reasons why this could happen. The first step is to click on the link highlighted by the red rectangle in the graphic above. This opens a new detailed view. The GIF below shows two different error messages. The first frame shows the error in the Annotation box at the bottom (you may need to scroll down to see this), and you may need to click on \"Show More\" to see the full message as seen in the second frame. The third frame of the GIF shows a different message. Each one these messages is designed to make it easier for you to diagnose your own problem.
Notice that\u00a0GitHub Action: 1. Validate Secrets\u00a0is broken into three jobs each of which will either pass and show a green check or fail and show a red check. The secrets are validated with each action, so you will see this a lot.
For example, the graphic below shows a failure of\u00a0GitHub Action: 3. Create Certificates\u00a0.
This is an example of a message that is not terribly descriptive - which is why it is shown here. In this case, you can click on just the one job that failed. There will be less to sort through to find your error. The most likely reason for this error is Error: Could not Create.
If you run across an error that does not have a nice message, be sure to post as discussed in Help with Errors. You may be contributing to future improvements for this process.
"},{"location":"gh-actions/gh-first-time/","title":"Configure to use Browser","text":""},{"location":"gh-actions/gh-first-time/#build-the-loop-app-using-github","title":"Build the Loop App using GitHub","text":"Time Estimate (click to open/close)repositories
: 1-2 hoursSecrets
(requires Apple Developer Account): 1 hourAction
steps: 30 minutes to 2 hoursThere is a lot of introductory information on this page.
A narrated video is available:
Once you have Apple Developer and GitHub accounts, the steps below are a high-level summary with links to the detailed section of this LoopDocs page.
You can think of the first part as a scavenger hunt where you find or generate and save six Secrets
.
Secrets
GH_PAT
SecretNow it's time to use those Secrets
to build the Loop app
Match-Secrets
private repositoryLoopWorkspace
)Secrets
to your copy of LoopWorkspace repositoryAction: 1. Validate Secrets
Action: 2. Add Identifiers
App Store
(personal use only, not for distribution)Action: 3. Create Certificates
Action: 4. Build Loop
Internal TestFlight Group
This page contains fully detailed steps including graphics, which makes it incredibly long.
Responding to a user request, step number indicators were added to this page.
Some sections have a Section Summary:
skip forward
symbol () to skip to the next instructionAn automatic table of contents (TOC) should appear for each page on the right side of your browser (if the browser is \"wide\" enough). If not, tap on the hamburger menu (upper left) and then this page name to see the TOC.
For sparse instructions, click on the link below:
In addition to this page, there is a narrated video of each step needed to build using a browser.
Click in the comments for a full index of topics. If you have issues with a part of this page, use the index to advance to the relevant part of the video. Subtitles are in English. You can choose a different language but the automatic translation feature may provide translations that are not completely accurate.
"},{"location":"gh-actions/gh-first-time/#step-1-of-12","title":"Step 1 of 12","text":"Step 1 of 12 is Prerequisites, things you must complete before you start.
"},{"location":"gh-actions/gh-first-time/#prerequisites","title":"Prerequisites","text":""},{"location":"gh-actions/gh-first-time/#prerequisites-to-build-the-loop-app","title":"Prerequisites to Build the Loop App","text":"There are two prerequisites to build the Loop app using GitHub Browser Build
.
To install Loop, you need the free TestFlight app, from the Apple App Store, installed on your Compatible Phone.
"},{"location":"gh-actions/gh-first-time/#prerequisites-to-use-loop","title":"Prerequisites to Use Loop","text":"To use Loop, you need a Compatible Pump and Compatible CGM. For pumps other than Omnipod DASH, you also need a RileyLink Compatible Device.
"},{"location":"gh-actions/gh-first-time/#new-terms-with-github-browser-build","title":"New Terms withGitHub Browser Build
","text":"You can read details about new terms with GitHub build or skip ahead to Save Your Information.
The GitHub Browser Build
may use new and unfamiliar terms.
Some of these terms have ToolTips, so hover your mouse over those - or review them in the Glossary.
Secrets
discussed on this page, are listed after Secrets
in the Glossary.If this summary of terms is confusing, finish reviewing the whole page and then come back.
Actions
: available in your GitHub account to build your app (once you follow the instructions on this page)Loop 3
, the actions: Validate Secrets
, Add Identifiers
, Create Certificates
, and Build Loop
enable users to build the Loop app from a browser on any computerGitHub Browser Build
Actions are not operating as you expect, check GitHub Status to see if it is GitHub problem.Secrets
: are required to enable GitHub to build the Loop app using GitHub ActionsSecrets
must be added to your fork of LoopWorkspaceSecrets
work for any branch in your fork (main
or dev
, for example)Secrets
can be added to Other Apps configured with the same GitHub Browser Build
methodSecrets
only once, see Use a GitHub Organization Account, and have them available for every repository in that organization accountKey
:Application Programming Interface Key
Secrets
Identifiers
: are required to build the Loop app with GitHub Browser Build
(these are automatically generated for you)App Group
Loop
, Loop Intent Extension
, Loop Status Extension
and Small Status Widget
Small Status Widget
was renamed Loop Widget Extension
WatchApp
and WatchAppExtension
Identifier
screen, has NAME
and IDENTIFIER
columnsNAME
column may start with XC
IDENTIFIER
column match the table in Add App Group
to IdentifiersApp Store Connect
: a website available for Apple Developers to review apps build with your Apple Developer accountGitHub Browser Build
Everyone needs to read this section!
You need to keep a digital copy of your 6 Secrets
.
Secrets
to build the app with a browserSecrets
; use a text-only editor like NotePad (PC) or TextEdit (Mac)Secrets
file for easy referenceArchive Your Information
To complete the steps on this page, you will need a username, email address, and password for Apple and GitHub. You will find, generate or make up six Secrets
as instructed.
Be sure to use a Text-Only editor like NotePad (PC) or TextEdit (Mac) to archive your information.
A Note about Capitalization and Spaces
In places, you use a name like \"FastLane API Key
\" or \"FastLane Access Token
\". Please copy from the docs to use those exact names.
The Secrets
that you add use names that are capitalized and use underscore _ instead of spaces. Be precise and careful.
Use a Text-Only Editor
Be sure to use a Text-Only editor like NotePad (PC) or TextEdit (Mac) to archive your information.
If you use a \"smart\" editor, it may change lower-case letters to upper-case letters at the beginning of a line when you paste items into your archive file.
If even one character is capitalized when it should not be, you will get Errors with Browser Build.
If you use a smart editor to store your FASTLANE_KEY, you are likely to get the mysterious invalid curve name
error.
Step 2 of 12 is Save Six Secrets
.
The creation of accounts at Apple and GitHub, if you don't already have them, are not numbered. Using those accounts, there are 5 Substeps for Step 2.
"},{"location":"gh-actions/gh-first-time/#save-six-secrets","title":"Save SixSecrets
","text":"Section Summary (click to open/close) You require 6 Secrets
(alphanumeric items) to use the GitHub Browser Build
method and if you use the GitHub Browser Build
method to build more than Loop, e.g., Loop Follow
or Loop Caregiver
, you must use the same 6 Secrets
for each app you build with this method.
Each secret is identified with ALL_CAPITAL_LETTER_NAMES
.
Secrets
are from your Apple AccountSecrets
in a text file using a text editorSecrets
are case-sensitive To skip the detailed instructions, click on Collect the Four Apple Secrets
You need to save your information digitally, so you can copy and paste. The information is created in one place and used in another. Refer to Configure Secrets
for how the Secrets
are used. In addition to the 6 Secrets
, other important information to keep handy (like usernames and passwords) is listed below. Be sure to keep this file secure.
Created at developer.apple.com
Secrets
TEAMID
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
Created at github.com
https://github.com/username
https://github.com/username/LoopWorkspace
GH_PAT
)Created yourself
MATCH_PASSWORD
)Apple Secrets
","text":"Section Summary (click to open/close) You will be saving 4 Secrets
from your Apple Account in this step.
TEAMID
.FastLane API Key
\".FASTLANE_ISSUER_ID
.FASTLANE_KEY_ID
.API Key
itself, and open it in a text editor. The contents of this file will be used for FASTLANE_KEY
. Copy the full text, including the \"-----BEGIN PRIVATE KEY-----\" and \"-----END PRIVATE KEY-----\" lines. To skip the detailed instructions, click on Collect the GH_PAT
Secret
This section provides detailed instructions for the four Secrets
associated with your Apple Developer ID.
TEAMID
This 10-character identifier is associated with your Apple Developer ID and never changes FASTLANE_ISSUER_ID
The issuer ID is associated with your Apple Developer ID and never changes FASTLANE_KEY_ID
Key ID provided when you create an API Key
in App Store Connect; it is associated with the FASTLANE_KEY
FASTLANE_KEY
Copy the full key from the text file you downloaded when generating the API Key
- Filename has FASTLANE_KEY_ID
value embedded in it.Include everything in the file from -----BEGIN PRIVATE KEY-----
and ending in -----END PRIVATE KEY-----
"},{"location":"gh-actions/gh-first-time/#new-apple-developer-account","title":"New Apple Developer Account","text":" If you have an Apple Developer Account, skip ahead to Find TEAMID
.
If not, you need to purchase one ($99 annual fee). It may take a few days for the account to be enabled.
Next section, Find TEAMID
, is Substep 1 out of 5 for Step 2.
TEAMID
","text":"Sign in to your Apple Developer account at this link: Apple Developer portal page.
Account
in the top menu barClick the Membership Details
icon
Next to the Team ID
field, is a 10-character ID number. This is your Apple Developer TEAMID
.
Record this for use as TEAMID
in your Secrets
file. You will also need it when you Create \u00a0App Group.
If you get this wrong, you will have errors at the very end, which require you to delete some items and repeat some steps on this page
Do not \"type\" what you think you see
Copy and paste the Team ID
from the webpage.
TEAMID
must be 10 characters8
\u00a0when it should be a\u00a0B
Next section, Generate API Key
, is Substep 2 out of 5 for Step 2.
API Key
","text":"Paid Apple Developer Account is Required
To generate the API Key
, you must have a paid Apple Developer account.
If you are waiting for Apple to enable your account, you can skip ahead to create a New GitHub Account and Create GitHub Personal Access Token
. You then pause at Configure Secrets
until your Apple account is active.
Click this link to open in a new tab: App Store Connect/Access/Integrations/API
Click the Integrations
tab as indicated in the graphic above
If this is your first time here, you will see:
\"Permission is required to access the App Store Connect API. You can request access on behalf of your organization.
\"
Request Access
and follow directions until access is grantedOnce access is granted, click on the Generate API Key
button
If you did not get routed through the permission is required
screens click the blue + sign
A new Generate API Key
dialog box will appear as shown in the graphic below
FastLane API Key
\" and choose Admin
in the access drop-down menuAdmin
\" is selected and then click on the \"Generate
\" button.Next section, Copy API Key Secrets
, is Substep 3 out of 5 for Step 2. In this Substep you are dealing with 2 of the Apple Secrets
.
API Key Secrets
","text":"The Integrations
screen appears again with content similar to the graphic below; the key information is blanked out for security.
Review the graphic and then follow the directions below to save more parameters you will need to Configure Secrets
Issuer ID
above the word Active (this is the same for all keys that you generate with this Apple Developer ID)Copy
button - this copies the Issuer ID
into your paste bufferFASTLANE_ISSUER_ID
Key ID
and the Copy Key ID
button shows upCopy Key ID
button - this copies the Key ID
into your paste bufferFASTLANE_KEY_ID
Click on the Download API Key
button - you will be warned you can only download this once.
Find your AuthKey
download in your downloads folder. The name of the file will be \"AuthKey_KeyID.p8
\" where KeyID
matches your FASTLANE_KEY_ID
Choose Application...
\" and then select \"TextEdit
\" (on a Mac, NotePad on a PC, or any text-only editor you prefer)The contents of this file will be used for FASTLANE_KEY
-----BEGIN PRIVATE KEY-----
\" and \"-----END PRIVATE KEY-----
\" linesFASTLANE_KEY
API Key
\u00a0 vs\u00a0APN Key
If you use Remote Commands with Nightscout
, you may notice the Application Programming Interface (API) key has the same type of format as the Apple Push Notification (APN) key. The keys for both of these purposes are p8 keys, but they should not be confused with each other.
The Secrets
for building with GitHub use the\u00a0API Key
.
The config vars for Nightscout
use the\u00a0APN Key
.
Nightscout
and building with GitHub Browser Build
LOOP_PUSH_SERVER_ENVIRONMENT
with a value of production
or remote commands will not work with Nightscout
Nightscout
directly or using Loop Caregiver
In summary, from this section, you have found or generated the following and saved copies for later use
TEAMID
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
Time for a Break?
This is a good place to pause if you need to. Just note where you are on the page so you can return later.
"},{"location":"gh-actions/gh-first-time/#collect-the-gh_pat-secret","title":"Collect theGH_PAT
Secret","text":" If you already have a GitHub Account, skip ahead to Create GitHub Personal Access Token
.
If you do not already have a GitHub account, you need to create one. Be sure to record the email, password, and username for your GitHub account.
Decide on a couple of usernames that you will be happy with - this will get embedded into your GitHub URL. Your first choice might not be available, so be prepared with several candidates. Your personal URL will be: https://github.com/username
.
N
for no - you still get important account information with that emailContinue
Free
option by selecting Continue for Free
The free level comes with plenty of storage and compute time to build the Loop app.
"},{"location":"gh-actions/gh-first-time/#substep-24-for-step-2","title":"Substep 2.4 for Step 2","text":"Next section, Create GitHub Personal Access Token
, is Substep 4 out of 5 for Step 2.
GitHub Personal Access Token
","text":"Section Summary (click to open/close) Log into your GitHub account to create a personal access token, which you will save as GH_PAT
.
Click to create a new personal access token
:
FastLane Access Token
\"No expiration
workflow
permission scope
(repo
will be automatically selected)GH_PAT
To skip the detailed instructions, click on Make up a Password.
You must be logged into your GitHub account before starting this step. If you are continuing, you are already logged in.
Personal Access Token
and giving it the name \"FastLane Access Token
\"Open this link: https://github.com/settings/tokens/new
Tokens (classic)
is highlightedclassic Token
tokens
, that is fineFastLane Access Token
No expiration
(use the drop-down menu to select)workflow
permission scoperepo
scope as well - this is normalGenerate token
(it's a long way, ignore all other settings, do not check anything else)A new screen appears showing your access token
token
and record it - once you leave this screen you can't see it againGH_PAT
when you set up your SecretsGH_PAT
if you lose it, but then you have to update that in the Secrets
for all repositories using GitHub Build.Next section, Make up a Password, is Substep 5 out of 5 for Step 2.
"},{"location":"gh-actions/gh-first-time/#make-up-a-password","title":"Make up a Password","text":"If you have not already made up a password, do it now and record it as MATCH_PASSWORD
.
Step 3 of 12 is Prepare your Repositories. This step has 2 Substeps.
"},{"location":"gh-actions/gh-first-time/#prepare-your-repositories","title":"Prepare your Repositories","text":""},{"location":"gh-actions/gh-first-time/#substep-31-for-step-3","title":"Substep 3.1 for Step 3","text":"Next section, Create Match-Secrets, is Substep 1 of 2 for Step 3. This is done only one time for a given GitHub username.
"},{"location":"gh-actions/gh-first-time/#create-match-secrets","title":"Create Match-Secrets","text":"Section Summary (click to open/close)The creation of the Match-Secrets
repository is a common step for all GitHub Browser Builds
; do this step only once. You must be logged into your GitHub account.
Click on the link to create a new empty repository titled Match-Secrets
. It should be private.
Once created, you will not take any direct actions with this repository; it needs to be there for GitHub to use as you progress through the steps.
To skip the detailed instructions, click on Fork LoopWorkspace
Open your github.com URL (this is https://github.com/username
), (username
is the name you chose above).
Create a new private repository - you can either click on the link below or follow the instructions with the first graphic:
or
At the top right of the screen, click on the + sign and select New Repository
This shows you a screen similar to the following graphic which has 3 regions highlighted:
Repository name
, type Match-Secrets
(use a hyphen between Match
and Secrets
)Private
(red circle) to make the repository privateMatch-Secrets
repository as private.Create repository
\"A screen will appear with a lot of options - do not do anything on this screen.
You will not directly interact with your Match-Secrets
repository.
Next section, Fork LoopWorkspace, is Substep 2 out of 2 for Step 3.
If you are creating an app other than the Loop app, you substitute the appropriate URL for the app you are building.
"},{"location":"gh-actions/gh-first-time/#fork-loopworkspace","title":"Fork LoopWorkspace","text":"Section Summary (click to open/close)Fork https://github.com/LoopKit/LoopWorkspace into your account.
To skip the detailed instructions, click on Configure Secrets
Existing Fork
If you already have a fork of LoopWorkspace
, click on Already Have LoopWorkspace to decide what to do. That section provides links to return you to these instructions.
LoopWorkspace
repository owned by LoopKit
.Fork
button is in the same place)Fork
Now your screen should look like the graphic below
Owner
)LoopWorkspace
is the repository name (Repository Name
)Copy the main branch only
\" checkedCreate fork
buttonAfter creating the \u00a0fork, your screen should be similar to the next graphic - it will say main
for the branch instead of dev
because this graphic was prepared before the release of Loop 3
. You may or may not see the messages you are told to dismiss in the next two bullets. No worries if you don't see them.
x
) to dismiss the Successfully fetched
messageDismiss
button to remove the \"Your branch is not protected
\" messageCarefully compare your screen to the graphic below paying attention to the highlighted sections.
main
This branch is up to date with LoopKit/LoopWorkspace:main
\"Time for a Break?
This is a good place to pause if you need to. Just note where you are on the page so you can return later.
"},{"location":"gh-actions/gh-first-time/#step-4-of-12","title":"Step 4 of 12","text":" Step 4 of 12 is Configure Secrets
. This step does not have Substeps, however, you must enter all 6 SECRETS
.
If you are already feeling overwhelmed - skip this tip.
If you plan to build more that one app, you will making a fork of each repository associated with each app, and then you must add the 6 Secrets
to each repository. It is not hard but it can get tiresome.
There is a way to enter the 6 Secrets
only one time for all your repositories, but this requires setting up a free GitHub organization. This is also not hard, but it modifies some of displays you see on GitHub. If you are interested, refer to Use a GitHub Organization Account
Secrets
","text":"Section Summary (click to open/close) These Secrets
are the same for any repository for which you use GitHub Browser Build
.
Loop Caregiver
, for which you also use GitHub Browser Build
For each of the following Secrets
, tap on \"New repository secret\", then add the name of the secret, along with the value you recorded for it:
TEAMID
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
GH_PAT
MATCH_PASSWORD
To skip the detailed instructions, click on Validate Secrets
.
Branches
and Repositories
fork of LoopWorkspace
and work for any branch
(main
or dev
, for example)repositories
Secrets
","text":"Log into GitHub.
Return to your forked copy of LoopWorkspace
Your repositories
\"You should see (at least) 2 repositories: Match-Secrets
and LoopWorkspace
LoopWorkspace
to open that repositoryClick on the Settings Icon near the top right of your LoopWorkspace
Settings
, make your browser wider or scroll to the rightSettings
, then you are not on your fork or you need to sign in to your GitHub accountAfter you click on \u2699\ufe0f Settings
, your screen should look like the graphic below
On the left side, find the Secrets and variables
dropdown and choose Actions
After you select Actions
, your screen should look like the graphic below
Secrets
","text":"New repository secret
(highlighted above)Secret
name is provided for you to copy and pasteName *
, click on YOUR_SECRET_NAME
and paste one of the 6 secret names, as directed in Enter Each SecretSecret *
box and paste the value for that secretAdd Secret
, the secret will be addedTEAMID
added and ready for saveEnter the name of each Secret
found in Save Your Information and your value for that Secret
.
Add Secret
TEAMID
TEAMID
is incorrect, the initial Actions
will succeed but Build Loop
will fail and you will have some clean-up to doYou can copy the names of the Secrets
by hovering to the right of each word below until you see the copy button (). Click on the button to copy the Secret
name and paste it into GitHub where you see YOUR_SECRET_NAME
. This avoids spelling errors.
TEAMID\n
FASTLANE_ISSUER_ID\n
FASTLANE_KEY_ID\n
FASTLANE_KEY\n
GH_PAT\n
MATCH_PASSWORD\n
FASTLANE_KEY
value, copy the entire contents from-----BEGIN PRIVATE KEY-----
through-----END PRIVATE KEY-----
MATCH_PASSWORD
value - if you did not already make up a password and save it with your other Secrets
, do it nowMATCH_PASSWORD
must be the same for any repository using this method (Other Apps)Once all six Secrets
have been added to your LoopWorkspace
, your screen should look similar to the graphic below.
Secrets
are spelled correctlyNew repository secret
with the correct nameTime for a Break?
This is a good place to pause if you need to. Just note where you are on the page so you can return later.
"},{"location":"gh-actions/gh-first-time/#step-5-of-12","title":"Step 5 of 12","text":"Step 5 of 12 is Validate Secrets. This step has 2 Substeps.
"},{"location":"gh-actions/gh-first-time/#substep-51-for-step-5","title":"Substep 5.1 for Step 5","text":"Next section, First Use of Actions Tab, is Substep 1 out of 2 for Step 5. This is done only once for a given repository.
"},{"location":"gh-actions/gh-first-time/#first-use-of-actions-tab","title":"First Use of Actions Tab","text":"Near the top middle of your LoopWorkspace
fork\u00a0 is an Actions
tab. This section provides detailed directions to enable Actions
.
Click on the Actions
tab of your LoopWorkspace
repository.
Workflows aren't being run on this forked repository
as shown in the graphic belowTap on the green button that says: I understand my workflows, go ahead and enable them
The workflows
are now displayed on the left side as shown in the graphic below. (Dismiss the Actions Enabled
message using the X
near the upper right side if it appears).
Next section, Validate Secrets
, is Substep 2 out of 2 for Step 5. This should only be needed one time, unless you modify any of your Secrets
.
Secrets
","text":"Section Summary (click to open/close) This step validates most of your six Secrets
and provides error messages if it detects an issue with one or more.
1. Validate Secrets
.Run workflow
button.Secrets
are added and that they are correctly formatted. If errors are detected, please check the run log for details. To skip the detailed instructions, click on Add Identifiers
Near the top middle of your LoopWorkspace
fork, click on the Actions
tab.
Actions
on this repository before, and need instructions (in addition to what GitHub shows), please back up to First use of Actions Tab.Refer to the graphic below for the numbered steps:
Actions
tab of your LoopWorkspace
repositoryValidate Secrets
Run Workflow
to show a drop-down menumain
)Tap the green button that says Run workflow
.
The Validate Secrets
Action\u00a0 should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
X
(): Step 6 of 12 is Add Identifiers
. This step has no Substeps.
This should only be needed one time, unless the developers add or modify an identifier.
For example going from version 3.2.x to version 3.3 or higher requires this to be repeated. There will be clear instructions on to update page when you need to do this.
"},{"location":"gh-actions/gh-first-time/#add-identifiers","title":"Add Identifiers
","text":"Section Summary (click to open/close) Run workflow
button.To skip the detailed instructions, click on Configure Identifiers for Loop.
Refer to the graphic below for the numbered steps:
Actions
tab of your LoopWorkspace
repositoryAdd Identifiers
Run Workflow
to show a drop-down menumain
)Tap the green button that says Run workflow
.
The Add Identifiers
Action\u00a0 should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
X
():Step 7 of 12 is Configure Identifiers for Loop. This step has 2 Substeps, some of which may not be required but are numbered so you can check them off.
This should only be needed one time, unless the developers add or modify an identifier.
For example going from version 3.2.x to version 3.3 or higher requires this to be repeated. There will be clear instructions on to update page when you need to do this.
"},{"location":"gh-actions/gh-first-time/#configure-identifiers-for-loop","title":"Configure Identifiers for Loop","text":"Some steps can be skipped if you previously built the Loop app with a Mac using Xcode.
Please read carefully to avoid confusion.
"},{"location":"gh-actions/gh-first-time/#substep-71-for-step-7","title":"Substep 7.1 for Step 7","text":"Next section, Create App Group
, is Substep 1 out of 2 for Step 7. This is only required one time and can be skipped if you previously built this app with Xcode.
App Group
","text":"Section Summary (click to open/close) If you have already built the Loop app via Xcode using this Apple ID, skip ahead to Previous Xcode Builders.
App Group
on the Apple Developer site.TEAMID
. To skip the detailed instructions, click on Add App Group
to Identifiers
The Loop
App Group already exists if you previously built the Loop app using Xcode with this Apple Developer ID. In that case, skip ahead to Previous Xcode Builders.
If you have never built the Loop app with Xcode using your TEAMID
, you need to create an App Group associated with your TEAMID
.
Description
, use Loop App Group
.Identifier
, enter group.com.TEAMID.loopkit.LoopGroup
, substituting your team id for TEAMID
.TEAMID
must be correct and the Loop
App Group must match the format shown in the previous stepContinue
and then Register
.If you ever built the Loop app using Mac, skip ahead to Previous Xcode Builders.
"},{"location":"gh-actions/gh-first-time/#new-builders","title":"New Builders","text":"Click this link: Certificates, Identifiers & Profiles: Identifiers List
on the Apple Developer site.
If you never built using Xcode, then after the Add Identifiers
Action, you will see the six items under NAME
in the table below with the associated IDENTIFIER
information. Your Developer ID
replaces the TEAMID
in the identifier.
Skip ahead to Table with Name and Identifier for Loop 3
.
Click this link: Certificates, Identifiers & Profiles: Identifiers List
on the Apple Developer site.
Because you built the Loop app using Xcode, then the NAME
associated with at least the Loop identifier
will appear as XC com.TEAMID.loopkit.Loop
under the NAME
column. Ignore the NAME
column and key off what you see under the IDENTIFIER
column of the table. Only the six listed in the table below need to appear when building Loop 3
.
Loop 3
","text":"NAME
IDENTIFIER
Loop
com.TEAMID.loopkit.Loop
Loop Intent Extension
com.TEAMID.loopkit.Loop.Loop-Intent-Extension
Loop Status Extension
com.TEAMID.loopkit.Loop.statuswidget
Small Status Widget
com.TEAMID.loopkit.Loop.SmallStatusWidget
WatchApp
com.TEAMID.loopkit.Loop.LoopWatch
WatchAppExtension
com.TEAMID.loopkit.Loop.LoopWatch.watchkitextension
Loop dev Builders
The name and identifier for \"Small Status Widget
\" has been renamed to \"Loop Widget Extension
\". This only affects those using the dev branch until the next release. At that time, this table will be updated.
If you are building with the dev branch, follow the directions at One-Time Changes.
"},{"location":"gh-actions/gh-first-time/#substep-72-for-step-7","title":"Substep 7.2 for Step 7","text":"Next section, Add or Review Configuration for Loop Identifier
, is Substep 2 out of 2 for Step 7.
This should only be needed one time, unless the developers add or modify an identifier.
For example going from version 3.2.x to version 3.3 or higher requires this to be repeated. There will be clear instructions on to update page when you need to do this.
"},{"location":"gh-actions/gh-first-time/#add-or-review-configuration-for-loop-identifier","title":"Add or Review Configuration forLoop Identifier
","text":"Section Summary (click to open/close) Note 1 - If you previously built with Xcode, the Names
listed below may be different, but the Identifiers
will match. A table was provided above that lists both Names
and Identifiers
. The Add Identifier Action that you completed above generates 6 identifiers, but only 4 need to be modified as indicated in this step.
Note 2 - Depending on your build history, you may find some of the Identifiers are already configured - and you are just verifying the status; but in other cases, you will need to configure the Identifiers.
Loop
Loop Intent Extension
Loop Status Extension
Small Status Widget
(released code) / Loop Widget Extension
(dev branch)Loop Identifier
only, you must add a check box next to Time Sensitive Notifications
To skip the detailed instructions, click on Create Loop App in App Store Connect
Find and click on the row for the Loop identifier
on the Certificates, Identifiers & Profiles: Identifiers List page. Look in the IDENTIFIER
column to find com.TEAMID.loopkit.Loop
. The name in the NAME
column may be different than Loop.
NAME
IDENTIFIER
Loop
com.TEAMID.loopkit.Loop
The Edit Your App ID Configuration
screen will open. Take two actions for the Loop identifier
.
App Services
column, scroll down to the App Groups
rowCapabilities
column) for App Groups
is checkedXC Loop
) - If the word Edit
shows up under NOTES
, move on to step 2 belowConfigure
shows up, tap on itApp Group Assignment
screenLoop
App Group that uses your TEAMID
in group.com.TEAMID.loopkit.LoopGroup
and then Continue
Continue scrolling down to the Time Sensitive Notifications
row
Time Sensitive Notifications
is checked as shown in the following graphicLoop
identifierNow scroll slowly back up to the top of the page. As you go, confirm that each of these is configured with a check mark; if any are missing, click to enable.
Time Sensitive Notifications
Siri
(formerly known as SiriKit
)Push Notifications
HealthKit
App Groups
(enabled with group.com.TEAMID.loopkit.LoopGroup
)If you modified settings for an identifier, the Save
button at the top right will become active. Click on Save
before leaving this page - otherwise, the change does not take effect.
Save
Modify App Capabilities
confirmation screenConfirm
If you did not need to make changes, the Save
button will not be active.
< All Identifiers
button at the top leftThe full list of Identifiers should be displayed again.
"},{"location":"gh-actions/gh-first-time/#add-app-group-to-identifiers","title":"AddApp Group
to Identifiers","text":"You will now be checking the status for 3 more identifiers to ensure the App Group
is configured to use the Loop
App Group. You must add or confirm the App Group for these 3 identifiers (for released code):
NAME
IDENTIFIER
Loop Intent Extension
com.TEAMID.loopkit.Loop.Loop-Intent-Extension
Loop Status Extension
com.TEAMID.loopkit.Loop.statuswidget
Small Status Widget
com.TEAMID.loopkit.Loop.SmallStatusWidget
Double-check when finished with this step
When you think you have completed this step, double check to make sure all 4 Identifiers
listed in the table have the App Group
added.
If not, Create Certificates
will succeed but Build Loop
will fail.
If you are building the dev branch, the Small Status Widget
was renamed. Look for it and add the App Group to it now.
NAME
IDENTIFIER
Loop Widget Extension
com.TEAMID.loopkit.Loop.LoopWidgetExtension
"},{"location":"gh-actions/gh-first-time/#back-to-how-to-instruction-for-main-or-dev","title":"Back to How-to Instruction for main or dev","text":"Find and click on a given identifier row on the Certificates, Identifiers & Profiles: Identifiers List page.
The Edit Your App ID Configuration
screen will open. Take one action for each of these three identifiers.
Looking at the App Services
column, scroll down to the App Groups
row
Capabilities column
) for App Groups
is checkedEdit
shows up under NOTES
, return to the identifiers listConfigure
shows up, tap on itApp Group Assignment
screenLoop App Group
that uses your TEAMID
in group.com.TEAMID.loopkit.LoopGroup
and then Continue
If you had to modify a given identifier, the Save
button at the top right will become active
Save
Modify App Capabilities confirmation
screenConfirm
If you did not need to make changes, the Save
button will not be active.
< All Identifiers
button at the top leftThe full list of Identifiers should be displayed again.
"},{"location":"gh-actions/gh-first-time/#step-8-of-12","title":"Step 8 of 12","text":"Step 8 of 12 is Create Loop App in App Store Connect. This step has no Substeps. It is only required one time.
If you are building other apps using this page as a guide, you must complete this step one time for each app.
"},{"location":"gh-actions/gh-first-time/#create-loop-app-in-app-store-connect","title":"Create Loop App in App Store Connect","text":"Section Summary (click to open/close)If you have created a Loop app in App Store Connect before, skip ahead to Create Certificates.
com.TEAMID.loopkit.Loop
, with TEAMID matching your team id.You do not need to fill out the next form. That is for submitting to the app store.
To skip the detailed instructions, click on Create Certificates.
If you have created a Loop app
in App Store Connect before, skip ahead to Create Certificates.
If you have previously used some kind of remote build, like diawi
or TestFlight
, you may have your Loop in the App Store but can't see it. Don't worry - there are instructions for this case.
Open this link: App Store Connect / Apps
to view your apps; log in if needed.
All Statuses
dropdown. If you get to step 3 and cannot find your com.TEAMID.loopkit.Loop
in the Bundle ID drop-down, this means you need to follow Find My Loop.Click the Add Apps
button or the blue \"plus\" icon ( ) and select New App
as shown in the graphic below
The New App
dialog box opens and should appear similar to the graphic below. Before you fill anything out, make sure your Bundle ID
is available in the dropdown menu (it shows as Choose
in the graphic below). If you do not see com.TEAMID.loopkit.Loop
, with TEAMID
matching your TEAMID
in the dropdown menu; back out of this screen and follow the directions in Find My Loop instead.
iOS
.Loop_ABC
where ABC
are your initialsLoop_ABC_123
Loop Logo
Bundle ID
that matches com.TEAMID.loopkit.Loop
SKU
can be anything; for example 123
.Full Access
\".One last check - if the Bundle ID
has a number other than your actual 10-digit TEAMID
embedded in it, you will be creating an App in the App Store that you cannot use
Create
TEAMID
Secret and follow the steps in Delete IdentifiersCreate
but do not fill out the next form. That is for submitting to the app store and you will not be doing that.You are done with this activity and can close the browser tab. It's time to head back to your GitHub account and Create Certificates
"},{"location":"gh-actions/gh-first-time/#find-my-loop","title":"Find My Loop","text":"This section is for people who were not able to follow the instructions in the last section because com.TEAMID.loopkit.Loop
, with TEAMID
matching your TEAMID
, was not in the dropdown menu for Bundle ID
.
There are two possible reasons:
App Group
to Identifiers or one of the predecessor steps; review those stepsYou may have no memory of ever setting up Loop
in App Store Connect. If you previously used some kind of remote build, like diawi
, your Loop
may be there as a Removed App.
Open this link: App Store Connect / Apps, look for the All Statuses
dropdown indicator, and select Removed Apps
Click on the App name:
Ensure this is the app you want by selecting App Information
, highlighted on the left side in the graphic below.
Bundle ID
(not in view in this graphic) - confirm it is correct.com.TEAMID.loopkit.Loop
with your TEAMID includedThen scroll down to the bottom and choose Restore App
.
Make sure User Access
is set to Full Access
and click on Restore
.
You are done with this step and ready to Create Certificates
Step 9 of 12 is Create Certificates
. This step has no Substeps.
The next section will be required again in the future for these cases:
Create Certificates
","text":"Section Summary (click to open/close) Run workflow
button.To skip the detailed instructions, click on Build the Loop App
Refer to the graphic below for the numbered steps:
Actions
\" tab of your LoopWorkspace
repositoryCreate Certificates
\"Run Workflow
\" to show a drop-down menumain
)Tap the green button that says \"Run workflow
\".
Wait a minute or two for the action to finish
Create Certificates
. (The Add Identifiers
might not be required but it is fast and should be done as a matter of routine.)Step 10 of 12 is Build the Loop App. This step has no Substeps.
The next section is repeated every time you need to manually build. With the next release, building can be configured to be automatic, but for now, plan to run this once a month so you always have a fresh build in your TestFlight app.
"},{"location":"gh-actions/gh-first-time/#build-the-loop-app","title":"Build the Loop App","text":"Section Summary (click to open/close)Run workflow
button.To skip the detailed instructions, click on Set Up Users and Access (TestFlight).
Refer to the graphic below for the first four steps:
Actions
\" tab of your LoopWorkspace
repository.Build Loop
\".Run Workflow
\" to show a drop-down menumain
)Tap the green button that says \"Run workflow
\".
Wait a few minutes to make sure there is not an early failure
App Store Connect
.You can ignore an email from Apple that there are things you must fix in your app:
Did you get a red X? Head over to the Errors with Browser to page find a solution.
"},{"location":"gh-actions/gh-first-time/#successful-build","title":"Successful Build","text":"Congratulations
If you get the green check mark, your app successfully built. Just a few more steps.
"},{"location":"gh-actions/gh-first-time/#step-11-of-12","title":"Step 11 of 12","text":"Step 11 of 12 is Set Up Users and Access (TestFlight). This step has no Substeps.
The next section is repeated if you need to add a User to your account. For example, you want to add another adult who can install the app on your child's phone or you want a spouse or friend to have a copy of the app on their phone as backup for a trip.
As a developer, you are already included as a user with the Role of Account Holder, Admin.
"},{"location":"gh-actions/gh-first-time/#set-up-users-and-access-testflight","title":"Set Up Users and Access (TestFlight)","text":"Once the first build completes, you will be able to configure TestFlight for the app.
Add Each Users One Time
Once you add a user to have access to your TestFlight for this app, you don't need to do it again - it remains available to them across rebuilds and different versions for that app.
You are configuring a private capability for your family using an Internal Testing group. You need the Apple ID email address for each adult installing from your build. When building for a child, you will use your own Apple ID, not theirs. See TestFlight for a Child.
First you need to add the email address(es) to your App Store Connect Access Users list:
Customer Support
is a good choiceTestFlight
group for your appOpen this link: App Store Connect / Apps to view your apps; log in if needed. Then select your Loop app. Click on the TestFlight
tab then click the blue plus button () next to Internal Testing
to add a group.
Fill out the name you want for the Internal Testing
group
Enable automatic distribution
Create
when done (this can always be modified later)As soon as you create the group, you'll be asked who should be included
GitHub Browser Build
methodAdd
when you are doneStep 12 of 12 is Install on Phone. This step has no Substeps.
The next section is repeated for every phone that you want to install a given build from TestFlight. Because a TestFlight app only last 90 days, you should probably build and install at least every 60 days.
"},{"location":"gh-actions/gh-first-time/#install-on-phone","title":"Install on Phone","text":"The Install on Phone page walks you through the steps to use the TestFlight app to install the Loop app on a phone.
But wait - there's more.
Most people won't need the information on the rest of this page.
"},{"location":"gh-actions/gh-first-time/#already-haveloopworkspace","title":"Already Have\u00a0LoopWorkspace?","text":"Some people may already have a copy of LoopWorkspace
.
If your copy is not from LoopKit
, follow the Delete and Start Fresh directions.
If your copy is from LoopKit
:
LoopWorkspace
repository (https://github.com/username/LoopWorkspace
) where you use your GitHub username
in the URLSync fork
button and follow the instructionsGitHub Personal Access Token
If your fork is not from LoopKit
:
When you have already built the Loop app with Xcode, the Identifier names will not match the directions and you might have trouble deciding which ones to configure. Your existing Loop
identifier will have a name that starts with XC
as shown below, where your 10-digit TEAMID
is used.
Name: XC com TEAMID loopkit Loop
Identifier: com.TEAMID.loopkit.Loop
The Identifier
that is associated with the Loop
identifier cannot be deleted if it is already in the App Store but all others can. If you attempt to delete the XC
Loop identifier, you may be told it cannot be deleted because it is in use in the app store. That's OK. Same for other identifiers (if you build a bunch of Apps). If a Bundle ID
has ever been associated with an app in the App Store, you cannot delete the Identifier
.
To make it easy when configuring the identifiers, go through and delete as many as you can.
TEAMID
Loop
identifier with your TEAMID
, it will refuse, don't worry, just keep goingTEAMID
TEAMID
, then delete it if you can and Update Secrets
with your correct TEAMID
Loop identifier
that does not have your TEAMID
, but you already added to the App Store, it will refuse, don't worry, just keep goingIf coming here from the Errors with Browser page because you enter the wrong TEAMID
in Secrets
- return to that page once you've deleted as many identifiers as you can: Errors: Wrong TEAMID in Secrets.
If you were just trying to clean up the identifiers, then follow these steps:
App Group
to IdentifiersOnce Loop 3 was released with the ability to build using a browser, a lot of other apps in the DIY universe added the same feature.
Only apps that are companions to\u00a0Loop\u00a0are included on this page.
If you want to build another DIY app that is not included here, look for the file fastlane/testflight.md
in the GitHub repository associated with that app and open it in a browser. The instructions for that app should be located in that file.
The same technique is used and the same six Secrets
are applied to each repository
. Those secrets are tied to your Apple Developer ID and your GitHub account.
The Loop Caregiver App Requires an App Group
As of 2023 December 8, the updated version of the Loop Caregiver app requires the addition of an App Group
to an expanded list of Identifiers
.
Repository
App Group
to LoopCaregiver
Optional - Set up a Organization Account
If you are going to be building a lot of different apps, you can choose to set up a free organization account with GitHub and use that to build.
Pros:
Secrets
can be added to the organization one-time and apply to every repositoryCons:
For more information, see Use a GitHub Organization Account.
"},{"location":"gh-actions/gh-other-apps/#multiple-copies-of-loop-follow","title":"Multiple Copies ofLoop Follow
","text":"For the convenience of caregivers who use Loop Follow
to monitor multiple people, updates were added in v2.1.2 to make this more convenient. This works regardless of the build method. (Build with Browser or Build with Mac).
Loop Follow
Loop Follow
screenIf you have already built using the Browser Build method, it is easy to build other apps which use the same method. Skip ahead to Fork and Add Secrets
If this is the first repository you have built with the Browser Build method, you must first complete the initial steps found on Configure to Use Browser. When you reach the point where
Use the repository
for the application you are building
Many graphics on this page show\u00a0LoopWorkspace, just remember to use the repository
for the app you want to build, that is either\u00a0Loop Caregiver\u00a0or \u00a0Loop Follow.
fork
the repository
for the app you plan to builddev branch
main branch
Repositories
","text":"App Fork from this Address Documentation Loop Caregiver https://github.com/LoopKit/LoopCaregiver LoopDocs: Loop Caregiver Loop Follow https://github.com/loopandlearn/LoopFollow Loop Follow The two repositories below are only if you need to follow a second or third looper. All others should use just the table above. The instructions for the second and third looper are otherwise identical to the first looper. Note that LoopCaregiver
can follow multiple Loopers; you select the person inside the app.
Repository
","text":"If you just created the fork
, you can skip this section.
If you are returning to this page to update an app, please follow these steps. Each step has a link to instructions on the Update LoopWorkspace
page. Follow the Update Fork
directions for the repository
of the app you are updating:
Fork
Then return to this page.
Normally you skip ahead to Build App after an update.
If you are updating the LoopCaregiver app after the 2023 December 8 update, you need to go to Add Identifiers after updating the fork
.
Secrets
for this App","text":"If you choose to use the optional GitHub organization method, you can skip this section:
repositories
in your GitHub organization use the organization Secrets
Secrets
to your GitHub Organization instead of this sectionSecrets
After successfully creating your fork of the repository for this app:
If you have already built Loop using the Browser Build method, skip ahead to Add Existing Secrets
If this is the first repository you have built with GitHub
Secrets
, except you will apply the Secrets
to the repository for the app you are planning to buildSecrets
on this page.Secrets
","text":"MATCH_PASSWORD
An early version of GitHub First-Time had incorrect information about the need to save MATCH_PASSWORD.
If you did not save your MATCH_PASSWORD in your file with all your Secrets
, you will need to delete your Match-Secrets repository, create a new one and then add all your Secrets
into all you repositories again and run all the Actions again.
Instructions are found at Reset Match-Secrets.
Open the text file in which you maintain a copy of your 6 Secrets
so you can copy each value into the Secrets
for this repository.
Click on the Settings Icon near the top right of your repository
Secrets and variables
dropdown and choose ActionsTap on New repository secret
and add each of the 6 Secrets
Once all six Secrets
are added, proceed to the first Action to validate your secrets.
Secrets
","text":"The first action step is to Validate Secrets
. Near the top middle of your Repository fork, click on the Actions
tab.
Actions
with this repository you'll be informed that Workflows aren't being run on this forked repository
I understand my workflows, go ahead and enable them
The workflows are now displayed: look at the list on the left side similar to that shown in the graphic below. (You can dismiss the Actions Enabled message using the X near the upper right side if it appears).
This step validates most of your six Secrets
and provides error messages if it detects an issue with one or more.
Validate Secrets
Run Workflow
to show a drop-down menumain
for LoopFollow, dev
for LoopCaregiver)Run workflow
.The Validate Secrets
Action\u00a0 should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
X
():Secrets
Errors tells you what to search for in the fileSecrets
Near the top middle of your Repository fork, click on the \"Actions\" tab.
Refer to the graphic below for the numbered steps:
main
for LoopFollow, dev
for LoopCaregiver)Tap the green button that says \"Run workflow\"
The Add Identifier
Action\u00a0 should succeed or fail in a few minutes.
X
():Open this link: Certificates, Identifiers & Profiles: Identifiers List on the apple developer site.
After successfully performing the Add Identifiers Action
, you will see the identifier for your app with a Name and Bundle ID matching that in the table below. You will see your unique TEAMID embedded in the identifier. (If you previously built this App with Xcode, the name may start with XC but the ending should match.)
If you build from a second or third repository
for Loop Follow
, the Name will end in Second
or Third
and Bundle ID will have .Second
or .Third
at the end.
The Loop Caregiver app requires updates to the Identifiers
after they are generated.
The Loop Follow app does not require this extra step. You can skip ahead to Create App in App Store Connect.
"},{"location":"gh-actions/gh-other-apps/#add-app-group-to-loopcaregiver","title":"AddApp Group
to LoopCaregiver
","text":"As of 2023 December 8, the Loop Caregiver app requires the addition of an App Group
to an expanded list of Identifiers
. Follow these steps one time to be able to build the Loop Caregiver app after this update.
App Group
Exists","text":"Open this link to view your applicationGroup
Identifiers
: App Group Identifiers
NAME
of LoopCaregiver App Group
and the IDENTIFIER
contains your TEAMID
in this format: group.com.TEAMID.loopkit.LoopCaregiverGroup
App Group
to Identifiers
App Group
for the Loop Caregiver App","text":"Open this link: Register an App Group on the Apple Developer site.
Description
, use LoopCaregiver App Group
Identifier
, enter group.com.TEAMID.loopkit.LoopCaregiverGroup
, substituting your team id for TEAMID
.TEAMID
must be correct and the LoopCaregiverGroup
App Group must match the format shown aboveContinue
and then Register
.App Group
to Identifiers
","text":"Click to open this link in a new tab: Certificates, Identifiers & Profiles: Identifiers List
on the Apple Developer site.
LoopCaregiver
","text":"All five of these identifiers should be found after running the Add Identifier
action on GitHub.
If you do not see them, please sync your LoopCaregiver
repository and then run the Add Identifier
action. The NAME
might begin with an XC
if you previously built with Xcode. However, the IDENTIFIER
column value should match.
NAME
IDENTIFIER
LoopCaregiver
com.TEAMID.loopkit.LoopCaregiver
LoopCaregiverIntentExtension
com.TEAMID.loopkit.LoopCaregiver.IntentExtension
LoopCaregiverWatch
com.TEAMID.loopkit.LoopCaregiver.watchkitapp
LoopCaregiverWatchWidgetExtension
com.TEAMID.loopkit.LoopCaregiver.watchkitapp.WidgetExtension
LoopCaregiverWidgetExtension
com.TEAMID.loopkit.LoopCaregiver.WidgetExtension
"},{"location":"gh-actions/gh-other-apps/#add-loopcaregivergroup-to-each-identifier","title":"Add LoopCaregiverGroup
to each Identifier","text":"Find and click on the row for the LoopCaregiver
on the Certificates, Identifiers & Profiles: Identifiers List page. Look in the IDENTIFIER
column to find com.TEAMID.loopkit.LoopCaregiver
. The NAME
might begin with an XC
if you previously built with Xcode. However, the IDENTIFIER
column value should match.
NAME
IDENTIFIER
LoopCaregiver
com.TEAMID.loopkit.LoopCaregiver
The Edit Your App ID Configuration
screen will open.
App Services
column, scroll down to the App Groups
rowCapabilities
column) for App Groups
is checkedEdit
or Configure
, whichever shows upApp Group Assignment
screenLoopCaregiver
App Group that uses your TEAMID
in group.com.TEAMID.loopkit.LoopCaregiver
Loop App Group
is checked, you should uncheck itContinue
, otherwise, tap Cancel
If you modified settings for an identifier, the Save
button at the top right will become active. Click on Save
before leaving this page - otherwise, the change does not take effect.
Save
Modify App Capabilities
confirmation screenConfirm
If you did not need to make changes, the Save
button will not be active.
< All Identifiers
button at the top leftThe full list of Identifiers should be displayed again.
Continue down the list until every identifier in the table below has the App Group
for LoopCaregiver App Group
added to it. (DO NOT SELECT the Loop App Group
) If you miss any, the GitHub action to 3. Create Certificates
will succeed but the GitHub action to 4. Build LoopCaregiver
will fail.
NAME
IDENTIFIER
LoopCaregiver
com.TEAMID.loopkit.LoopCaregiver
LoopCaregiverIntentExtension
com.TEAMID.loopkit.LoopCaregiver.IntentExtension
LoopCaregiverWatch
com.TEAMID.loopkit.LoopCaregiver.watchkitapp
LoopCaregiverWatchWidgetExtension
com.TEAMID.loopkit.LoopCaregiver.watchkitapp.WidgetExtension
LoopCaregiverWidgetExtension
com.TEAMID.loopkit.LoopCaregiver.WidgetExtension
"},{"location":"gh-actions/gh-other-apps/#create-app-in-app-store-connect","title":"Create App in App Store Connect","text":"You will be following the directions below to create an App in App Store Connect if you don't already have one.
This requires you to provide some information. Examine the table below for the bundle ID associated with your app.
App Name Bundle ID Loop Caregiver com.TEAMID.loopkit.LoopCaregiver Loop Follow com.TEAMID.LoopFollowIf you build from a second or third repository
for Loop Follow
, the Bundle ID will have .Second
or .Third
at the end.
Open this link: App Store Connect / Apps to view your apps; log in if needed.
If this App already exists, you can continue to Create Certificates
Click the Add Apps button or the blue \"plus\" icon and select New App as shown in the graphic below
The New App dialog box opens and should appear similar to the graphic below. Before you fill anything out, make sure your Bundle ID is available in the dropdown menu. If you do not see the Bundle ID for your app; back out of this screen and follow the directions in Configure to Use Browser: Find My Loop, where you'll be finding App Name instead of Loop.
Click Create but do not fill out the next form. That is for submitting to the app store and you will not be doing that.
You are done with this activity. Before you close this browser window, note the TestFlight tab at the top of the page. You'll be using that tab after you complete the next two actions.
"},{"location":"gh-actions/gh-other-apps/#create-certificates","title":"Create Certificates","text":"Refer to the graphic below for the numbered steps:
main
for LoopFollow, dev
for LoopCaregiver)Tap the green button that says \"Run workflow\".
Wait a minute or two for the action to finish
The graphic below is an example from Loop, your screen will show your app and associated repository
If you are building the Loop Caregiver app, skip ahead to Build Action.
"},{"location":"gh-actions/gh-other-apps/#display-name-customization-for-loop-follow","title":"Display Name Customization forLoop Follow
","text":"If you build Loop Follow
for one, two or three loopers, you may choose to customize your fork
or forks
to insert a custom display name.
LoopFollowDisplayNameConfig.xcconfig
display_name = LoopFollow
(or LoopFollow_Second
or LoopFollow_Third
)display_name = LF custom name
main
branchContinue to build as instructed below. After you install the app on your phone, iPad or Mac via TestFlight, that custom name is what is displayed. The prefix LF is suggested to make it easier to find the custom named Loop Follow
app in the list of apps, but is not required.
Refer to the graphic below for the first four steps:
main
for LoopFollow, dev
for LoopCaregiver)Tap the green button that says \"Run workflow\".
Wait a few minutes to make sure there is not an early failure
Once the first build completes, you will be able to configure TestFlight for the app - follow the template for setting up TestFlight for Loop found in Configure to Use Browser: Set Up Users and Access (TestFlight).
"},{"location":"gh-actions/gh-other-apps/#install-on-phone","title":"Install on Phone","text":"The Install on Phone walks you through the steps to install the app to a phone. When going through those steps, replace your App Name for\u00a0Loop. Everything else is the same.
"},{"location":"gh-actions/gh-other-apps/#use-a-github-organization-account","title":"Use a GitHub Organization Account","text":"This section is optional. It is provided to assist:
Secrets
repeatedlySecrets
just one time instead of entering them for each repository
individuallyPrerequisite: You need a personal GitHub account.
In the instructions below, use your GitHub username instead of my-name
.
my-name-org
(of course naming is up to you)my-name
and click on your icon (at upper right) and choose SettingsCreate a free organization
.Set up your organization
screen:my-name-org
into the Organization name
boxmy-name
accountMy personal account
Complete setup
my-name
my-name
account The GitHub personal access token used as one of the 6 Secrets
is associated with your personal account (my-name
); so if you already have one, you just keep using it.
There are three steps to using this account moving forward:
One-time only: You need to add your 6 Secrets
to this organization account (instructions are in next section)
One-time only: Create a Match-Secrets
repository in the my-name-org
account
github.com/my-name-org
)Repositories
New repository
my-name-org
as owner and enter Match-Secrets
as the namePrivate
and tap on the Create
buttonMatch-Secrets
For each repository: you need to fork
for each app you wish to build to the new my-name-org
account
fork
fork
directionsFork LoopWorkspace
Repositories
when building apps other than the Loop appThen, for every build, you will use just the organization account. The original account is maintained to give you access to GitHub and holds your GitHub personal access token.
WARNING - If you have forks
of DIY apps in your original my-name
account that are configured to build automatically, you want to disable that and have only the my-name-org
account be configured for automatic building. Refer to Disable Building for Personal GitHub account.
Secrets
to your GitHub Organization","text":"Adding the Secrets
to an organization is similar to adding them to each repository
for a personal GitHub account. The difference is you add them at the organization level and then they are available to each repository
in that organization.
Follow the directions below to prepare to add secrets to the organization and then skip (when provided the link) to the per-repository directions for more details about adding each secret.
Make sure you are in the organization for GitHub:
Your Organizations
my-name-org
github.com/my-name-org
Secrets and variables
and click on the drop-down symbol and choose Actions
New organization secret
Secrets
, for adding Secrets
repository
and indicate the button will says New repository secret
- your screen will show New organization secret
Secrets
are entered for your organization account my-name-org
Secrets
are entered, they are used by every repository you fork with this organization as the ownerThe GitHub personal access token used as one of the 6 Secrets
is associated with your personal account (my-name
); so if you already have one, you just keep using it. If not, follow these instructions to get or configure a new one.
Once you have your apps building as you expected from the my-name-org
organization account, you should configure your personal account to stop any automatic building that may be taking place.
repository
","text":"You can delete the DIY repositories from your personal account
Your Repositories
my-name
instead of my-name-org
You can disable the build actions from the repositories in your personal account
Your Repositories
my-name
instead of my-name-org
To build the\u00a0Loop\u00a0app using a browser, you need:
Once you have the\u00a0Loop\u00a0app in TestFlight, you need:
Steps that must be completed to configure for building with a browser are found at:
This is a very long page because there are a lot of steps and each step is explained with graphics of what you will see when you work through the steps.
"},{"location":"gh-actions/gh-overview/#how-to-video-to-build-with-a-browser","title":"How-to Video to Build with a Browser","text":"In addition to the webpage linked above, there is a narrated video of each step needed to build using a browser.
Click in the comments for a full index of topics. If you have issues with a step, use the index to advance to the relevant part of the video. Subtitles are in English. You can choose a different language but the automatic translation feature may provide translations that are not completely accurate.
"},{"location":"gh-actions/gh-overview/#install-on-phone","title":"Install on Phone","text":"Instructions to install on your phone are found at:
Instructions to make updates are found at:
There is also a helpful video for this process:
If you get an error, please consult:
For experienced and/or advanced users who want to build the development version of the app, there is additional information at the link below. If you have not built using the browser build method before, it is suggested you first build the released version. Once you have a successful build, then follow the steps for the development version. Building the app is independent of installing the app on your phone from TestFlight.
Try to:
This page is only relevant when building with a browser.
For Mac, please see: Update/Rebuild with Mac
Time Estimate (click to open/close)Build the Loop App
Once a Year Renew Certificate
The Loop app must be built at least every 90 days when you build with a browser - this is TestFlight requirement.
Most users will start at How to Update or Rebuild.
If your GitHub Personal Access Token
has expired, we recommend you update it with No Expiration
as explained at GitHub Token.
If you are running Loop-dev
, be sure to review these instructions but modify for the branch you are using: refer to Build Loop dev with Browser
No Expiration
.Personal Access Token
to never expire and to support the automatic rebuild feature? See this section Regenerate Token.GH_PAT
only affect future builds. Previous build are available for the full 90 days.Distribution Certificate
. These only last one year. See this section Renew CertificateUnder ordinary circumstances, you do not have to rebuild or update your Loop app until TestFlight forces you to (90 days). However, there is no harm in building more frequently.
Summary of Update Steps
Fork
Ignore the email that says you need to fix \"issues\" in your app. You are not selling the app in the app store; so no action is required. The app you built is for personal use for you or a family member.
There is also a helpful video for updating (it does not include the Renew Certificates step, which is only done once a year):
This is Step 1 of 6 - it may not always be necessary, but please check every time.
Sign in to your Apple Developer account. If there are agreements you have not accepted, you will get errors when you try to Build that indicate your Apple Secrets
are incorrect - that is very unlikely. You may also need to update your credit card information if it has changed, for example, if there is a new expiration date.
FASTLANE_ISSUER_ID
, FASTLANE_KEY_ID
or FASTLANE_KEY
If you need detailed instructions, click on this Apple Program License Agreement
Help Page.
Apple Program License Agreement
(only)Paid Applications Schedule Agreement
App Store
Wait After You Agree
It typically takes 15 minutes before your updated agreement is available so you can complete your build.
If your build with browser fails, wait longer. An hour wait was reported by one person.
"},{"location":"gh-actions/gh-update/#renew-certificate","title":"Renew Certificate","text":"This is Step 2 of 6 - it is only needed once a year - you should get an email from Apple 30 days before your Distribution Certificate
expires. (Don't worry if you did not see the email.)
Apps in TestFlight are not affected when a certificate expires or is revoked.
This is only a summary - please follow the detailed steps below carefully.
Delete all your Distribution Certificates
. Apple only allows you to have 2 of these. So get rid of the old ones so you will be able to create a new one that will last a full year. (Step 1 below.)
The Certificate in question is embedded in your Match-Secrets repository
. In order to proceed, you need to remove the old certificate from Match-Secrets
. Later this will be automated and can be done without modifying your Match-Secrets repository
, but for now the easiest way to do that is to just delete the certs/distribution
folder in your current Match-Secrets repository
.
Finally, for every app that you build with this method, you need to run Create Certificates
for that app. (Step 4 below.)
Distribution Certificate
","text":"Delete and Create
Do not miss the final step in this section. After you delete certificates, you must run the Action for Create Certificates
before you can build an app again.
Match-Secrets
RepositoryType
column - do not delete a Development Certificate
Distribution Certificate
, your certificate already expired and was removed by Apple; so skip ahead to Step 2Fork
Distribution Certificate
and revoke itNavigate to your Match-Secrets
Repository
https://github.com/username
where username
is replaced by your GitHub usernameDelete the certs/distribution
folder of your Match-Secrets
repository
using these instructions. The GIF below indicates the places to click with numbered red rectangles:
certs/distribution
Delete directory
Commit changes
in the upper right and then accept the suggested choice by clicking on Commit changes
in the lower rightDeleting the certs/distribution folder did not work for me
Some people reported trouble with this step. The other option is to delete and create a new Match-Secrets
repository: see Reset Match-Secrets
While still within your Github account, navigate to your fork of LoopWorkspace.
Repositories
and select LoopWorkspace
Action
: Create Certificates
Other Apps
If you build other apps using the build with browser method, they have just had their certificates revoked.
Create Certificates
for that apprepositories
nowFork
","text":"This is Step 3 of 6 - it may not always be necessary, but please check every time.
Open your GitHub account and select your LoopWorkspace repository
from your repositories list.
fork
is up to date with LoopKit version, you will see the message This branch is up to date with LoopKit/LoopWorkspace:{branch}
- there is no need to build again unless your Loop app in TestFlight is about to expire - in which case, proceed to Build the Loop Appfork
shows a message such as This branch is 3 commits behind LoopKit:main
and you want to update and build, then click Sync Fork
by tapping where the red rectangle is shown in the graphic above, then in the pop-up window, tap on Update branch
fork
shows a message such as This branch is 3 commits behind LoopKit:main and 4 commits ahead of LoopKit:main
; you might need to manually sync and choose to discard changes
; you can always customize again after the updateBuilding a different branch
Do I need to do anything special to build a different branch?
Yes: please follow instructions at Build Development Version
"},{"location":"gh-actions/gh-update/#build-the-loop-app","title":"Build the Loop App","text":"This is Step 4 of 6 - this is always required.
Refer to graphic below as you follow the steps to build the Loop app.
Actions
tab4. Build Loop
workflow on the leftRun workflow
to see the dropdownRun workflow
button in the dropdownIf a new release is announced at Current Release, look to see if there are instructions about extra steps required with the release. (The release after 3.2.3 will certainly have extra instructions.)
If you are using the dev branch, head over to Build Development Version for information.
Otherwise, head over to Errors with Browser.
"},{"location":"gh-actions/gh-update/#apple-email-to-ignore","title":"Apple Email to Ignore","text":"You can ignore an email from Apple that there are things you must fix in your app:
You'll receive an App Store Connect email confirming that the build has completed processing, and a TestFlight email confirming the new app is ready to test.
Could not install WWDR certificate
This is Step 6 of 6 - once you finish this, you are done and your app will last 90 days.
Open the TestFlight app on the Loopers phone and install the most recent version of the Loop app. Most Loopers have automatic update disabled on their phones, so this is a manual process. Don't forget.
The updated Loop app will show up in your TestFlight app on the Looper's phone.
Calendar Reminder
This is a good time to put a calendar reminder in your favorite app.
Set it up for a few days before the TestFlight app will expire.
"},{"location":"gh-actions/gh-update/#automatic-update-disabled","title":"Automatic Update Disabled","text":"Option 1: If you chose to Disable Automatic Install from TestFlight, you control when to install the app on the phone.
Install
as shown in the GIF belowWe strongly recommend you toggle off Automatic Updates to allow you to be in full control over when the app is updated. This is even more important if you're using automatic builds from GitHub for version 3.3 or later.
Option 2: If you chose to enable Automatic Updates from TestFlight for the Loop app, the updated build will be installed over your existing app as soon as it uploaded to TestFlight.
Open
instead of Install
If you are a typical user who just builds a single version for yourself or your child, you do not need to read this section.
This section provides detailed instructions if you want to choose a previous build to install on your phone. Typically, the most recent build is selected but there may be special cases:
branch
or set of customizations; you can install a previous build once you are done with the testThis section covers two topics.
About half an hour after the build action completes, the new build will appear in the TestFlight screen at this link: App Store Connect / Apps
TestFlight
tab to see a screen similar to the graphic belowSelect the build to which you wish to add testing notes. When you tap on that icon, it opens a screen similar to that in the next graphic.
Click inside the box under Test Details. Insert the text you want to see on the phone before you install this version of the app. Tap the Save
button at upper right and then < iOS Builds
at upper left.
In this example, the branch and commit number are included followed by an indication that this version includes the customizations preferred by this person. Your test details can be as simple as \"Use this for Charlie\".
Commit Number
If your build includes customizations, your commit number will not match what the developer expects to see if you need to ask for help.
Use this section Customization and SHA-1 to determine the SHA-1 before customization.
"},{"location":"gh-actions/gh-update/#select-a-previous-build","title":"Select a Previous Build","text":"First open the TestFlight app on your phone and select the Loop app.
Near the bottom of the screen is a row labeled previous builds.
The following graphic shows the view seen in the TestFlight app on the phone. By adding test details (as explained in the previous section), the desired build is clear. For most people - they will just use the most recent build. This procedure is useful for those who build often or who support multiple family members.
"},{"location":"gh-actions/gh-update/#the-loop-app-build-details","title":"The Loop App Build Details","text":"In the Loop app, once installed on your phone, tap on Settings -> Support -> Issue Report
. The graphic below shows an example of the Build Details included in the report.
profileExpiration
listed here is irrelevant - the app expires when the TestFlight expiration indicatessourceRoot
that starts with /Users/runner/work/LoopWorkspace
buildDateString
is when the app was built and transferred to TestFlight, not when it was installed on your phoneYour GitHub Personal Access Token
should be configured:
Never expire
repo, workflow
permission scopeIf you are not logged in to GitHub and have not logged in recently, then you may see the authentication screen when doing the steps below.
Authenticate if requested by clicking on the green Send SMS
button or entering your password.
Once you are authenticated, you will have access to view your personal access token.
"},{"location":"gh-actions/gh-update/#modify-personal-access-token","title":"ModifyPersonal Access Token
","text":"If your Personal Access Token
has not expired but does not have the correct permission, you should modify it. Do not regenerate it.
Click on the link to view your token and compare it to the graphic below.
Personal Access Token
The graphic above has a blue rectangle added to indicate where you should see your token. If yours does not look like this, click on the link (FastLane Access Token
) to open a new display. Watch the GIF below - there are 4 frames, the last one has the Update token button.
FastLane Access Token
) to open a new displayUpdate token
buttonAfter you click on the Update token
button, your FastLane Access Token
should now show repo, workflow
and look like the earlier graphic above.
The only reason to regenerate a token is if it is set to expire. Do not do the next section unless you have to.
"},{"location":"gh-actions/gh-update/#regenerate-token","title":"Regenerate Token","text":"If your Personal Access Token
has expired or has an expiration date, you can regenerate the new one at any time.
Update new GH_PAT to Secrets
After you get your new token, immediately add it to your Secrets
for any app you build with this method. You don't have to rebuild the app, but it's a good idea to at least run Action 1. Validate Secrets
for each repository to make sure you did not make a mistake.
You can regenerate your GitHub Personal Access Token
at any time by clicking on the link below. (it will open in a new browser tab.)
The FastLane Access Token
is a clickable link.
After you click on FastLane Access Token
your screen should be similar to the graphic below.
Your existing TestFlight builds are fine
The yellow GitHub warning by the Regenerate Token
button is for new builds you make in the future.
Previous builds are still available in TestFlight and are not affected by this action.
Note - selecting the workflow
check box below is new. If yours does not show that selection, add it before you click on Regenerate token (red highlight in graphic below).
Click on Regenerate token (red highlight in previous graphic) to see screen similar to next graphic.
Be sure to change the Expiration from 30 days
to No Expiration
. When you select No Expiration
a GitHub warning appears. Click on the green Regenerate Token
button (red highlight in following graphic).
The next screen shows your new token. Copy the token using the copy icon and save it along with your other secret settings.
The next step is to update GH_PAT in your Secrets
. (If you build other apps with this method - update the GH_PAT for all of them right now - do not forget.)
Secrets
","text":"This example is for updating GH_PAT in the Secrets
for your repository
, but the same method can be applied when changing any of the Secrets
.
Open the repository
for which you will update Secrets
. On the far right is a Settings selection. If you don't see Settings (if last item on row is Insights), then you are not on your fork
or you need to sign in to your GitHub account. You should see username/LoopWorkspace
with forked
from LoopKit/LoopWorkspace
underneath.
Refer to the GIF for help. There are 3 frames.
Secrets and variables
on the left side and click on the drop down indicator to display Actions
.Action secrets / New repository secret
row, until you see the list of your current Secrets
. Scroll all the way to the top of the screen and tap on your LoopWorkspace link. Then follow the How to Update or Rebuild instructions to start a new build.
"},{"location":"gh-actions/gh-update/#build-development-version","title":"Build Development Version","text":"The information to build a development (dev
or any other branch) has been moved to a new page: Build dev with Browser
Volunteers generously provide support for Loop via online platforms. You have several options for joining conversations on Loop and asking for help. Links to the main platforms are listed below. Non-US Loop users in Italy, Australia, and several other countries have also formed Facebook (FB) groups.
If you are having trouble building or using your Loop app, there are some important steps to get responses to your question, while also being considerate of our volunteers' time.
One of our awesome Loop volunteers captured the domain names loopdocs.org
and looptips.org
. So you can find these valuable websites by simply typing loopdocs or looptips followed by .org in your browser. In other words, you don't need to remember or type https://loopkit.github.io/loopdocs/
.
There are a lot of links you can click on this website.
If you click on the link, you are moved to the new location and must hit the back button on your browser to return.
You can choose to open that link in a new window or new tab.
Keyboard Navigation
When viewing the site at a computer, you can use keys as shortcuts:
n
for next pagep
for previous pages
for searchThe website navigation depends on whether you are on a mobile device or a computer (with browser width > 1220 pixels).
It is not uncommon to have a question about Loop. But, it is exceptionally rare to have the question not already answered in LoopDocs, so please search for answers by selecting the Search tool (upper right) or typing s
then a search term at a computer. As you begin to type, suggested completions and links to pages are displayed. Click on the item you think answers your question.
Please submit suggestions for updates and improvements to this documentation. There are many pages of content and we welcome reviewers to help find typos and outdated info/links. If you notice a typo, poor word choice or some explanation that could be improved or clarified, there are a few options. The first two options use github, a website where open-source code and documentation is often shared. You can only use github if you have an account (it's free).
If you decide to do a GitHub Pull Request (PR) or create an Issue, first look to see if someone has already opened a PR or Issue on the topic so you don't create a duplicate.
New Issue
buttonHelpful tips for providing LoopDocs feedback through Facebook and/or Zulipchat:
Take a deep breath
It is totally understandable if the thought of building and operating your own\u00a0Loop\u00a0app feels intimidating.
As you learn the information explained in\u00a0LoopDocs, this will start feeling more comfortable.
"},{"location":"intro/overview-intro/#loopdocscontents","title":"LoopDocs\u00a0Contents","text":"The\u00a0LoopDocs\u00a0website is organized as follows
You will notice many links in the LoopDocs pages pointing to detailed information.
If you notice an arrow pointing up and to the right beside the link:
This link format is used anytime the link will take you to a different website
The LoopDocs pages contain words that may be unfamiliar. For a definition of any word with a dashed underline, simply hover your mouse over the word, or tap on the word on a mobile device, to view the definition. For example, Omnipod has a tooltip.
Every tooltip definition is also found in the Glossary - so head over there if you have trouble reading a tooltip.
"},{"location":"intro/overview-intro/#buildingloop","title":"Building\u00a0Loop","text":"The process for building the\u00a0Loop\u00a0app is divided into short segments (sections or pages) in the Build tabs of\u00a0LoopDocs.
Best Practice: Learn to Build
You are strongly encouraged to build\u00a0Loop\u00a0for yourself.
You can build\u00a0Loop\u00a0and practice with a simulated phone, CGM and/or pump. You can \"dose\" the simulated pump and your real pump at the same time and watch the glucose predictions.
Starting with a simulator can help you decide if you want to move forward with purchasing additional items required to use the app. You can:
Locked Phone or App in Background
Do not expect the simulator to work when the phone is locked or the app is in the background. The app relies on a real insulin pump or a real CGM to wake up the app when the phone is locked or the app is in the background. The simulator cannot do this.
Please review Simulator Build for more information.
"},{"location":"intro/overview-intro/#operatingloop","title":"Operating\u00a0Loop","text":"A significant amount of content is provided on this website and via link to other sources.
Please review these pages when initially setting up and learning to use\u00a0Loop.
Some techniques are specific to\u00a0Loop, but the general concepts of how man-made insulin works and strategies to test basal, carb ratios and insulin sensitivity apply to all the hybrid closed-loop systems, commercial and open source.
"},{"location":"intro/overview-intro/#development-history","title":"Development History","text":"Loop\u00a0is an open-source, shared project. The entire project has been, and continues to be, done by volunteers. From the code to the website, you're getting all this because dozens of volunteers have given their time, so please add your time by reading this website thoroughly before embarking on your\u00a0Loop\u00a0journey.
Here are development history links to other resources for you to explore.
The early history of\u00a0Loop\u00a0development:
The early days and the many advances brought about by the #We Are Not Waiting
diabetes community:
How the Omnipod Eros pods were cracked to work with\u00a0Loop:
With the release of\u00a0Loop 3\u00a0, there are two ways to build the app.
The Build Steps have been split into two tabs:
There are some requirements common to both methods. Some requirements are specific to only one method.
"},{"location":"intro/requirements/#common-requirements","title":"Common Requirements","text":"These requirements are independent of how you build the Loop app:
If you plan to build using the Build with Browser instructions, you also need:
Detailed instructions are included in the link above.
"},{"location":"intro/requirements/#added-requirements-to-build-with-mac","title":"Added Requirements to Build with Mac","text":"If you plan to build using the Build with Mac instructions, you also need:
Go through the Common Requirements to see what you need to actually Loop.
Simulator Option
If you want to test the Loop app without attaching CGM or pump hardware, you can run a simulated CGM or simulated pump. You can use actual CGM data using Dexcom Share or Nightscout as a Remote CGM.
These simulators are part of the Loop app and are available with either build method you choose.
Check out the Simulator page.
Once you have chosen your Build Method, go through the pages for that build method several times before beginning, especially if this is new to you.
When you are ready to proceed, work through the tasks on each page. Take your time. You can do one a day, take a week per page or blaze through them quickly. Just be sure to read carefully and if you are confused - reach out for help: How to Find Help.
After you build Loop on your phone, keep following along in the docs as you Set up and Operate your Loop app.
"},{"location":"intro/requirements/#next-steps","title":"Next Steps:","text":""},{"location":"intro/requirements/#review-the-common-requirements","title":"Review the Common Requirements","text":"Before you start either build method, review the Common Requirements. First one is Compatible iPhone. On each page, keep clicking Next (or n) until you've finished with the Intro pages and are ready to Build.
"},{"location":"intro/requirements/#build-with-browser","title":"Build with Browser","text":"Click on the link if you are done reviewing the common requirements and you want to skip ahead to Build with Browser.
"},{"location":"intro/requirements/#build-with-mac","title":"Build with Mac","text":"Click on the link if you are done reviewing the common requirements and you want to skip ahead to Build with Mac.
"},{"location":"loop-3/add-cgm/","title":"Add CGM","text":""},{"location":"loop-3/add-cgm/#cgm-choices","title":"CGM Choices","text":"A CGM can be added from the Heads-Up-Display (HUD) or from the Loop Settings screen \u2699\ufe0f.
The HUD will look like the graphic below if no CGM or Pump is connected with Loop:
Loop can be connected to the following CGMs:
To add a CGM, go to the Settings screen \u2699\ufe0f, tap on Add CGM
, and tap on your CGM.
If you later decide to use a different CGM type, you must first delete the CGM and then add CGM to choose the new one.
Set up Focus Mode
Don't forgot to check your iOS Focus Notifications when you add or change your CGM.
dev
branch only) must have Loop notifications turned on to get CGM alertsLoop provides an option to upload CGM values to a remote service like Nightscout or Tidepool. In many cases this can be a preferred solution.
With Loop 3, the data-store on the Loop phone keeps a full week of data. If there is an interruption in the upload, when it is restored, Loop will fill in up to 1-week of CGM data that was not previously uploaded.
Some people use Dexcom Share to feed their remote services. There have been outages with Share. When those occur, the data is not back-filled like it is with Loop.
This is the reason why there's a comment under each CGM below to select Upload Readings.
"},{"location":"loop-3/add-cgm/#dexcom-g5-g6-one","title":"Dexcom G5, G6, ONE","text":"To use the Dexcom G5, G6 or ONE:
Dexcom G6
for either G6 or ONEShare Credentials
Tap to set
You can find the transmitter ID in your Dexcom G6 app or on the back of the transmitter box (please refer to the below screenshots).
It is suggested that you enable Remote Upload from Loop.
"},{"location":"loop-3/add-cgm/#change-dexcom-sensor","title":"Change Dexcom Sensor","text":"When you change a Dexcom G5, G6 or ONE sensor, you do this in the Dexcom app. When the sensor completes warmup and CGM values are once again reported in the Dexcom app, Loop picks these values up because you are using the same Dexcom Transmitter.
"},{"location":"loop-3/add-cgm/#change-dexcom-transmitter","title":"Change Dexcom Transmitter","text":"When you change the Dexcom G5, G6 or ONE Transmitter, you need to delete your CGM selection from Loop and then add it back after you complete the pairing with the transmitter in your Dexcom app.
FYI: When You Change Dexcom Transmitters (click to open)Before you change Dexcom transmitters, select the Delete CGM
button at the very bottom of the CGM info page in Loop. If you leave the transmitter connected in Loop, you may have trouble pairing your new transmitter. If pairing does work, then Loop will not get CGM data from the Dexcom app on your phone.
Follow the instructions here: What do I do when I switch Dexcom transmitters?.
The Dexcom G7 is handled differently - Loop automatically detects when a new sensor/transmitter pair is added to the Dexcom G7 app.
Your selection to enable Remote Upload from Loop must be repeated with each new Transmitter. The default setting is disabled.
"},{"location":"loop-3/add-cgm/#about-dexcom-share-credentials","title":"About Dexcom Share credentials","text":"You do NOT need your Share account info listed in Loop settings if you are using a G5 or G6 system. The transmitter ID is sufficient. In fact, you should leave your Share credentials blank so that you don't accidentally become internet-dependent for CGM data if you forget to update your transmitter ID when you start a new transmitter.
"},{"location":"loop-3/add-cgm/#dexcom-g7","title":"Dexcom G7","text":"This is only available on Loop 3.
You must have the G7 app on the same phone as Loop. When the G7 app switches to the next sensor/transmitter assembly, Loop automatically switches too.
It is suggested that you enable Remote Upload from Loop.
Don't forget Health Permissions
For those switching from Dexcom G6 to Dexcom G7, you might forget to add permission for the G7 app to write to Apple Health. If you want long-term history of those CGM readings to persist in Apple Health, turn on the permission for the Dexcom app to write glucose to Health.
If either the G6 or the G7 has permission to write to Apple Health, then Loop will delete the Loop glucose data in Apple Health that are older than 3 hours and newer than 1 week. The Dexcom app will write its glucose values to Health when each value is 3 hours old.
"},{"location":"loop-3/add-cgm/#medtronic-enlite-cgm","title":"Medtronic Enlite CGM","text":"The Medtronic Enlite CGM is only available if you have connected it to your compatible Medtronic Pump.
If you need to use Dexcom Share
If the dexcom is on another phone, you can use Share if internet / cell coverage is good.
Dexcom Share is not available for Dexcom ONE CGM.
The Dexcom Share credentials (in other words, account login) is the same as what you used to log in to the active Dexcom app on your iPhone. Dexcom Share account is not always the same login info as your Dexcom Clarity account. The information is entered when you first log in to the app and then is never displayed again, nor visible under any information screens. If you have forgotten your G5/G6 account info, you can delete the Dexcom app and redownload it to try logging in again. This will not cause a restart of any sensor sessions in progress.
If you do not enter your Share credentials correctly into Loop, you will get an error when Loop tries to access your Share account to backfill CGM data. An example of the error message is shown in the graphic below. If you see that message, delete your Share account from Loop settings and try again.
"},{"location":"loop-3/add-cgm/#nightscout-remote-cgm","title":"Nightscout Remote CGM","text":"If the user is already uploading CGM data to their Nightscout URL, they can select that as a source for CGM data for Loop. The user must acknowledge they understand the risks of using a remote source that requires internet, as shown in the graphic below.
In addition to the risks of missing data if the internet is not reliable, you must also make sure the CGM data sent to Nightscout is reliable.
DANGER - Make sure Nightscout CGM Data is Reliable
Just because you can use Nightscout as a CGM source does not mean you should.
If you decide to use Nightscout as a CGM source, make sure the data stored in Nightscout is reliable. If the app you choose uploads bad results to Nightscout, you don't want Loop to use that bad data.
Sensors that can be added to Nightscout via other apps include Dexcom, some Libre and some Medtronic sensors. Please refer to Nightscout Docs: Configure your Uploader.
There are third party apps that bring Libre data to your Loop phone and there are customization instructions starting at Libre Support for Loop 3.2.x Code that explain how to modify Loop 3 to use one of those apps. Please use these steps to get a version of Loop that does not rely on internet access to work.
It is suggested that you use Open Loop during warmup until the new sensor begins to provide reasonable data. This is especially important with European Libre 2 using direct bluetooth connection.
The xDrip4iOS app (which can also be found in the app store under the name Shuggah) may have a problem during warmup of a new sensor (European Libre 2 using direct bluetooth connection). There were two instances of crazy high values being reported and picked up by Loop 3. One Shuggah user and one xDrip4iOS user who connected via Nighscout as a CGM with Loop 3 had serious overdose of insulin because of bad readings with a new sensor. The developers of xDrip4iOS fixed their application - so make sure you have the latest version. Those developers have no control over what is provided by Shuggah.
The user must enter both the URL and API_SECRET for their site to ensure the security of the data. The URL must start with https://
and cannot have any extra spaces in the line.
When using Nightscout Remote CGM, if the user needs to change credentials or switch to a different CGM, the user must go through the Loop->Settings \u2699\ufe0f->CGM menu.
"},{"location":"loop-3/add-cgm/#change-cgm","title":"Change CGM","text":"To change CGMs, delete your existing CGM and then add a new CGM.
"},{"location":"loop-3/add-cgm/#change-a-nightscout-remote-cgm","title":"Change a Nightscout Remote CGM","text":"For Nightscout Remote CGM, the Nightscout URL is opened when tapping on the CGM icon in the Heads-Up Display, while the credential sections with the Delete CGM
row are shown when tapping on Loop Settings
\u2699\ufe0f, and selecting CGM.
After deleting a CGM, the Head-Up-Display at the top of the Loop main screen will show the Add CGM
icon.
Other CGM, you can tap on the CGM from either the Heads-Up Display or tap on Settings
\u2699\ufe0f, and select your CGM.
Scroll to the bottom of the screen and select Delete CGM
.
For some CGM that can be added to Loop 3 with a patch, the words may be different, but the steps are the same.
"},{"location":"loop-3/add-cgm/#dexcom-g5-g6-and-one-not-g7","title":"Dexcom G5, G6 and One (not G7)","text":"For older Dexcom sensors, the transmitter is replaced separately about once every three months. In order to enter a new transmitter number, you must first delete the CGM and then add the CGM.
Detailed instructions are found at CGM FAQs: What do I do when I switch Dexcom transmitters?.
Once the Dexcom G7 has been added to Loop, the user only needs to let the Dexcom G7 app know when to use the new sensor. The Loop app automatically switches to the new sensor with no additional steps required by the Looper.
"},{"location":"loop-3/add-pump/","title":"Add Pump","text":""},{"location":"loop-3/add-pump/#pump-choices","title":"Pump Choices","text":"You can choose a pump from the Heads-Up-Display (HUD) or from the Loop Settings screen.
The HUD looks like the graphic below if no CGM or Pump is chosen:
Switching Pumps?
To change the pump connected to Loop go to Change Pump Type.
Loopers can choose from 3 pumps and a simulator:
Omnipod Terms
The Loop app and LoopDocs use these terms:
Here is an overview of the different steps for adding each pump. Before changing pumps, you need to delete the old pump first. See Change Pump Type section below.
"},{"location":"loop-3/add-pump/#steps-for-omnipod","title":"Steps for Omnipod","text":"Tap on Add Pump in the Settings screen to see pump options (shown in the graphic below).
Tap on your Pump.
Medtronic pump users - skip ahead to Insulin Type.
"},{"location":"loop-3/add-pump/#omnipod-common-1","title":"Omnipod Common 1","text":""},{"location":"loop-3/add-pump/#pod-nofication-defaults","title":"Pod Nofication Defaults","text":"Here are the common screens for adding Omnipod or Omnipod DASH showing the default settings. You can change the default settings later.
After you complete these screens, you select the insulin type.
"},{"location":"loop-3/add-pump/#insulin-type","title":"Insulin Type","text":"For all pumps, you can choose from the insulin types below.
To add a Omnipod DASH pump, skip ahead to Omnipod Commom 2.
Omnipod and Medtronic users should continue to select a RileyLink compatible device.
"},{"location":"loop-3/add-pump/#omnipod-or-medtronic","title":"Omnipod or Medtronic","text":""},{"location":"loop-3/add-pump/#select-rileylink","title":"Select RileyLink","text":"For Omnipod and Medtronic pumps, you need a RileyLink compatible device to Loop. The Device and your phone must be kept close to your pump for Loop to work.
A new RileyLink compatible device is not listed next to its slider until after you connect the device to Loop. Find the little toggle in the device list, switch on that toggle, and the RileyLink will appear after the toggle is green.
You can personalize the name once it is connected to Loop.
All RileyLink compatible devices in the nearby area, not already connected to a Loop app, will display in the RileyLink Setup screen. Select your RileyLink by sliding the toggle to display green and then press the blue Continue
button at the bottom of the screen.
If your device does not appear:
If you are adding a Medtronic pump, skip ahead to Medtronic.
"},{"location":"loop-3/add-pump/#omnipod-common-2","title":"Omnipod Common 2","text":"After selecting a RileyLink for Omnipod, all other actions for Omnipod and Omnipod DASH are the same. Once a pod is paired, the Pump display is the same, except the Omnipod screen has a RileyLink Devices section.
For Omnipod (left) and Omnipod DASH (right), you should see the Pair Pod
screen.
At this point - you should hit Cancel
(upper right of screen) and review the Omnipod Common page before pairing a pod.
New Looper / New Podder
Carefully review the Pair Pod instructions and the rest of the Omnipod Common page before continuing. Then, when you are ready, pair a pod.
If you are not ready to fill and attach a pod with insulin, try filling a pod with water and let it drip into a ziplock bag to test running Loop on the pod. (Be sure the pod is not near anything when you hit \"Insert Cannula\".)
You may enjoy reading Rufus the Bear.
"},{"location":"loop-3/add-pump/#medtronic","title":"Medtronic","text":"If you followed this page to add your Medtronic pump, you have completed the first three steps. If not, you can prepare your pump now, then do those first three steps using Loop (follow the links). All other steps be completed before you Connect the Pump.
Loop requires these settings on your Medtronic pump.
Check with your users guide (can be found online if you don't have one) for more detailed instructions on your model of pump if you're not sure how to accomplish these steps.
If you have basal rates, insulin to sensitivity factor and carb ratios in your pump - these will be overwritten (using the Therapy Setting values) when you connect your pump to Loop. If those rates are important to you, record them prior to continuing.
Pump Error. Max setting exceeded
.Temp Basal Type
to Insulin Rate (U/hr)
.ON
and enter any random ID (010101 will work - avoid using all zeros). This setting is found in the pump's Utilities menu (for x23 continue to Connect Devices, Remotes) and turn ON
the Remote Options.The final step is to connect your Medtronic pump to Loop.
CM
instead of CA
for the region code. Select CA/CM
in the dropdown menu.Connect
button to connect the pump to Loop.Continue
buttonPump Error. Max setting exceeded
. (See note below for other reasons you might see this message.)Connect
to retry.Max setting exceeded
It turns out the \"Max setting exceeded\" error might be displayed even when Max Bolus and Max Basal Rate are already set appropriately on the pump.
If you get an error Bolus in progress
on the pump when trying to connect, you probably need to rewind and load insulin into the reservoir.
If the pump has alerted that it is out of insulin, you cannot pair to Loop as a new pump.
"},{"location":"loop-3/add-pump/#final-steps","title":"Final steps","text":"Once you have successfully connected to the Medtronic pump, click on Continue
:
Continue
for eachFor x23 and x54 Medtronic pump users only
For x23 and x54 Medtronic pump users, there is a packet of information special to those pumps called MySentry messages. If you have never setup this part of the pump previously, you may see a screen, called \"Pump Broadcasts\", at this point in the setup process.Follow the directions on the screen. They will require you to take some manual steps on your pump to \"pair\" it with your Loop app.Basically, you will need to go to your pump's main menu, scroll down to Utilities, then Connect Devices, then Other Devices, turn that setting On, and then select Find Device. Once you do that, click on theContinue
button in Loop app and the pairing will take place. This will allow those MySentry packets of information to flow to Loop app.This step does not apply for x22 or x15 pump users, since those pumps do not have MySentry capabilities. Now that your pump is paired with Loop, you should select the type of battery you are using and decide whether to use My Sentry:
The Medtronic status and commands available are shown in the Pump Setting page.
"},{"location":"loop-3/add-pump/#change-pump-type","title":"Change Pump Type","text":"Before changing from one pump type to another pump type, you must delete the old pump type.
If you are using Medtronic, scroll to the bottom of the pump screen and select Delete Pump
Before switching between Omnipod and Omnipod DASH or any kind of Omnipod to Medtronic, you must deactivate your current pod
Switch to other insulin delivery device
button will not be available with an active podFollow along in the GIF below - it cycles though these steps.
Switch to other insulin delivery device
and follow the directions to complete the taskNow the new pump type can be selected from settings or tapping on the add pump icon on the HUD
The Head-Up-Display at the top of the Loop main screen will now show the add pump icon.
"},{"location":"loop-3/displays-v3/","title":"Displays","text":"This page has detailed information about Loop 3 Displays.
If you are running Loop v2.2.x, follow this link: Loop v2.2.x Displays.
"},{"location":"loop-3/displays-v3/#main-loop-screen","title":"Main Loop Screen","text":"The main Loop screen contains a Heads-Up Display (HUD) at the top (when in portrait mode) with various charts in the middle and a toolbar at the bottom. As part of the HUD, important messages will appear in the Status Row location.
"},{"location":"loop-3/displays-v3/#landscape","title":"Landscape","text":"When the device is in landscape mode, the HUD is no longer visible, but the chart history is increased. In landscape, the exact number of hours varies by phone, but on my test phone, each chart displays the last 8 hours of history along with the next 6 hours of glucose prediction. The toolbar is always visible while the chart display can be scrolled up and down to view charts of interest.
"},{"location":"loop-3/displays-v3/#heads-up-display","title":"Heads-Up Display","text":"The Heads-Up Display (HUD) shows 3 icons:
There is a Status Row
underneath those three icons that is used to display bolus progress, some alerts and important messages. The Status Row
is also a button that performs an action depending on the message. These are described in the table in the HUD Status Row section. The Status Row
is only visible in portrait mode, so make sure to orient your device to look for these messages.
There are several charts on the main screen to help you navigate and understand Loop. Tapping on a chart on your phone opens up additional information.
"},{"location":"loop-3/displays-v3/#glucose-chart","title":"Glucose Chart","text":"The Glucose Chart displays glucose values in your preferred units.
mg/dL or mmol/L
If your preferred glucose unit is not selected, follow these instructions to change Glucose Units.
The vertical scale is automatically adjusted by Loop to be as useful as possible while including the highest and lowest readings in the chart.
The horizontal axis is set to go forward from the current time through your DIA (insulin duration), so you can see what Loop thinks glucose will be eventually. It then goes back in time as far as there is room, based upon the width in pixels of your screen. Note, if you turn your device to landscape mode you will have more screen real estate and thus will be able to see further back in time.
The glucose Correction Range is shown as a blue bar on the glucose chart. Single-value ranges (such as 100-100 mg/dL), will have a narrower blue bar. When a temporary override range is enabled, a darker blue bar indicates the correction range during that override.
Negative Glucose Prediction
If you have a crazy negative glucose prediction - it is likely that you set an Override with a tiny Overall Insulin Needs percentage.
Best approach:
If you tap on the Glucose Chart itself, it will open the Predicted Glucose chart described below.
"},{"location":"loop-3/displays-v3/#predicted-glucose-chart","title":"Predicted Glucose Chart","text":"The predicted glucose view is a great way to gain insight into the various components\u2019 importance in Loop\u2019s prediction of eventual glucose.
The graph at the top of this view will match your Glucose Chart. Below this chart you will see an explanation of the variables Loop takes into account in predicting your future glucose value: Carbohydrates, Insulin, Glucose Momentum and Retrospective Correction. You can tap on any of the entries to see the effects of that component by looking at the dashed lines.
Display Only
These elements are not turned on and off in the Loop predictions. They just modify the graph so you can view the relative effects.
"},{"location":"loop-3/displays-v3/#active-insulin-chart","title":"Active Insulin Chart","text":"The Active Insulin chart displays the total insulin contribution from both temp basals and boluses. Active IOB can be either positive or negative. Negative IOB results from the suspension of normally scheduled basals.
The active insulin displayed in the upper right corner of the chart updates as soon as Loop issues a command to your pump.
It may later be modified and the Event History updated if:
There are some times when communication is interrupted at a critical moment in the communication cycle. When that happens the Loop Alert - Unable to Reach Pump modal screen appears on your device. Typically, this resolves by itself. Click the link above for more information.
Medtronic Only: So long as you have Event History as the Preferred Data Source in Loop settings, primed insulin deliveries (e.g., cannula fills or manual primes) will not be counted towards IOB.
"},{"location":"loop-3/displays-v3/#insulin-delivery-chart","title":"Insulin Delivery Chart","text":"The Insulin Delivery chart displays a history of the temp basals enacted by Loop. The display is relative to the scheduled basal rates entered in the Loop settings. So, a rate displayed in this chart as +0 units
would indicate no temp basal was set, and Loop defaulted to the scheduled basal rate. Individual boluses are indicated by an orange triangle on the chart (shown in the graphic above, near the left-most time). The total insulin delivered since midnight, including all basals and boluses AND (Medtronic Only) priming insulin, is given in the upper right corner of the graph.
Please note that for safety reasons, Loop will assume a bolus was successful, even if it is not sure that the pump responded as expected. Once the communications with the pump settle down, Loop will (almost always) be able to reconcile whether a dose went through as expected. Occasionally, the bolus may be temporarily rendered (drawn) as a very high temp basal rate vs. a (triangle) discrete bolus event. This does NOT mean that the Loop actually enacted a high temp basal rate...only that the bolus is being drawn on the chart as the equivalent of a high temp basal rate.
"},{"location":"loop-3/displays-v3/#event-history-reservoir-and-non-pump-insulin","title":"Event History, Reservoir and Non-Pump Insulin","text":"Clicking on either the Active Insulin or Insulin Delivery charts will open your Insulin Delivery history. The top of the screen will display the current IOB and the total insulin delivered for the day since midnight (or since the time the loop became active if you started Loop after midnight). There are three tabs that can be viewed, with Event History shown by default:
Event History: Event history is a detailed accounting of all pump/pod actions. Both Medtronic and Omnipod users will have a detailed record of event history. If you tap on an event, you get more detail. Turn your phone to landscape to improve readability.
Reservoir:
Non-Pump Insulin: The user can enter insulin taken by another method such as inhaled or by injection. The user can choose a different insulin type than used by the pump. This is explained further at this link.
Previous Pod Insulin History
For those who want to delete some recorded insulin near the end of a pod because the site was not absorbing properly, this can be done in Apple Health.
Before attempting that modification, please read this entire section on How does Loop use Apple HealthKit in detail.
Pay special attention to Insulin and Apple HealthKit section.
"},{"location":"loop-3/displays-v3/#active-carbohydrates-chart","title":"Active Carbohydrates Chart","text":"The Carbohydrate chart displays the carbs used by Loop to predict glucose changes. The active COB is displayed in the upper right corner of the chart. Clicking on the chart will open the Carb Entries history and you can edit/delete any previous entries through that screen. Please read the Meal Entry page for more information about entering and editing carb entries.
"},{"location":"loop-3/displays-v3/#ice-chart","title":"ICE Chart","text":"Click this link for even more details about Insulin Counteraction Effects. It's a good idea to read both the Meal Entry and ICE pages - this is an important concept.
"},{"location":"loop-3/displays-v3/#toolbar","title":"Toolbar","text":"The toolbar is always found at the bottom of the main Loop screen in both portrait and landscape orientation. By tapping on one of these icons, you can begin a Meal Entry, start a Pre-Meal Range, initiate a Manual Bolus, select an Override or go to the Loop Settings screen.
From left to right, the icons are:
Meal Entry- click on this icon to enter meals. Detailed info regarding how to enter, save, and edit meal entries can be found in the Meal Entry page.
Pre-Meal Range - click on this icon to start the Pre-Meal Range for one hour or until carbs are entered. (plate symbol turns dark green when active)
Bolus - click on this icon to open the Bolus tool.
Overrides - click on this icon to select a saved or custom Override or to cancel an override if one is active (heart symbol turns dark blue when active)
Loop Settings - click on this icon to make changes to any of your Loop settings.
Very Detailed Section
This section is packed with an incredible amount of detail. Remember it exists and come back when you need a reference to Loop 3 icons and messages.
If you are a new looper your eyes may glaze over the first time through. Don't worry. But do come back and read this section again after you've used the system in Open Loop mode (before you enable Closed Loop mode). And then come back again after a day or so of closed loop testing.
Experienced loopers need to read the detail on this page. There are important changes from Loop 2.2.x.
The Heads-Up-Display, visible in portrait mode, shows the Glucose Status on the left, the Loop Status in the middle and the Pump Status on the right. Once a CGM and pump have been added to Loop, the Loop Status icon will update and ideally be similar to the graphic below.
The Loop Status Icon is the colored circle in the center of the main Loop display. The three colors displayed are Green, Yellow or Red. In all cases, more information is displayed by tapping on the Loop Status Icon, which brings up a modal message indicating the last time a loop cycle completed and other descriptive text.
"},{"location":"loop-3/displays-v3/#loop-cycle","title":"Loop Cycle","text":"A complete Loop cycle, at high level, includes these steps:
This table shows examples of Loop Status Icons and what each icon means.
Icon Meaning A green circle indicates the app is in Closed Loop mode and it completed a cycle within the last 5 minutes. A yellow circle indicates the app is in Closed Loop mode and it has completed a cycle in the last 5-15 minutes.It is not unusual to have a few instances of yellow loops per day. They can be caused by being out of range (physically), Bluetooth or RileyLink \u201cnoise\u201d interference, or even that the pump was giving a bolus.Most yellow loops will self-resolve without needing any special troubleshooting. A red circle indicates the Loop has not completed in over 15 minutes.This is not a typical state, and you should troubleshoot the problem.In this case, either the Glucose Icon or the Pump Icon or both will display analert
graphic. When the circle is open at the top, Loop is operating in \u201copen-loop\u201d mode. The color code is the same as for closed loop except the cycle involves updating predictions from available blood glucose values and obtaining pump status; but the app will not make any automated changes in insulin delivery.While Manual Temp Basal (MTB) is active, the Open Loop icon will be displayed until MTB expires or is cancelled. Note that MTB is only implemented in Loop 3 for Omnipod and Omnipod DASH, at the current time. Fun Fact
The loop status icon will pulse slightly when Loop is communicating with the pump. The pulsing will stop when the communication has completed (green loop) or given up (yellow or red loop).
"},{"location":"loop-3/displays-v3/#example-loop-status-modal-messages","title":"Example Loop Status Modal Messages","text":"When you tap on the Loop Icon on the main screen, you will see a message similar to one of those shown below. The message content depends on:
On your phone, you should see the green, yellow or red icon in the background - the color is not captured when taking screenshots of the modal message.
"},{"location":"loop-3/displays-v3/#glucose-status-icon","title":"Glucose Status Icon","text":"The table below shows examples of the Glucose Status Icon and what each icon means. The Glucose Color Code is provided below the table.
Icon Meaning The current glucose reading is displayed. It can be from the CGM or from a finger stick. The value must have been updated within the last 15 minutes to be displayed.For the example shown, a valid trend arrow is available and is blue. Color codes are explained at this link. The last glucose reading from the CGM or from a finger stick is stale, i.e., it was acquired more than 15 minutes ago. In this case, the glucose prediction will stop updating.The HUD Status Row message enables user to enter fingerstick glucose value if desired.If in closed-loop mode, no changes will be made to insulin delivery. If a temporary basal is running, it continues running for the scheduled duration. Once the temporary basal expires, the pump resumes the scheduled basal rate.When the app issues a temporary basal, the duration is always 30 minutes.The user can enter a manual temporary basal duration up to the limits of their pump. If no CGM is currently selected, the Add CGM icon is displayed. The user can add a CGM following these instructions. If no CGM is currently selected, but a glucose value was acquired within the last 15 minutes (from fingerstick or a different CGM), that value is displayed along with a plus sign. By tapping on the icon, the user can add a CGM following these instructions."},{"location":"loop-3/displays-v3/#glucose-color-code","title":"Glucose Color Code","text":"Glucose Range Glucose Value Color Trend Arrow Color 55 mg/dL (3.0 mmol/L) or below red regardless of background color red 56 to 79 mg/dL (3.1 and 4.4 mmol/L) black (light mode) / white (dark mode) yellow 80 to 199 mg/dL (4.4 to 11.0 mmol/L) black (light mode) / white (dark mode) blue 200 mg/dL (11.1 mmol/L) or above black (light mode) / white (dark mode) yellow"},{"location":"loop-3/displays-v3/#cgm-display","title":"CGM Display","text":"Tapping on the CGM icon in the HUD shows more information about the last CGM reading.
For Dexcom G5/G6 and Share, the same screen is obtained by tapping on Loop Settings->CGM.
For Nightscout Remote CGM, the Nightscout URL is opened when tapping on the CGM icon in the HUD, while the credential sections is shown when tapping on Loop Settings->CGM.
The graphic below shows the result of tapping on the CGM icon when using a Dexcom G6. It includes the time of the last reading to the nearest second, along with other information about that sensor and transmitter. It also has an option to go to the Dexcom app on the same device.
"},{"location":"loop-3/displays-v3/#pump-status-icon","title":"Pump Status Icon","text":"The nominal pump icon displays high-level status information for the pump with two main components: left side is the basal delivery status and right side is the reservoir status. For Pods, a lifecycle line is displayed underneath the pump icon during the last 24 hours of nominal pod life.
The table below shows examples for a few nominal Pump Status Icons and Alert messages that might be shown. In all cases, tapping on the Pump Status Icon opens the Pump Settings screen with more information.
Icon Meaning This nominal pump status graphic is for a Pod with temp basal less than scheduled basal rate and no reported reservoir level. This nominal pump status graphic is for a Medtronic pump running scheduled basal rate and with a half-full reservoir.For a Pod, the reservoir shows full until pod estimates reservoir is below 50 U remaining. This nominal pump status graphic is for a pump running a high temp basal rate with the reservoir level reported. When the reservoir level is above the notification level, the reservoir graphic is orange. This pump status graphic indicates 2 alerts: (1) the 15 U reservoir level is less than the notification level of 20 U selected by this user and (2) a small clock icon is added to the display to indicate the phone time zone and pump time zone do not match. When the reservoir level is below the notification level, the reservoir graphic is yellow.Follow the link for time zone information. This alert message indicates the reservoir reports 0 U. Although pumps will continue to deliver some insulin after this point (max of 4 U for pods, or until all insulin is gone for both pods and Medtronic), the user should be aware that insulin delivery could stop at any moment.Note that if you see a display of 0 U in yellow, that means there is 0.5 U or less reported by the pump. This alert message indicates no pod is currently paired so no insulin is being delivered.Tap on the icon to reach the pod setting screen and pair a new pod, or switch to a different source for providing insulin. This alert message indicates all insulin delivery has been suspended. A Status Row message appears to enable the user to resume delivery with one tap. Alternatively, insulin can be resumed by tapping on the Pump Icon to enter the Pump Setting display and resume from that screen. This alert message indicates the user has initiated a manual temp basal (MTB). While the MTB is active, the Loop Icon Status will also display an Open Loop symbol to indicate no automatic adjustments are made until MTB expires or is canceled. The lifecycle indicator across the bottom of the pod status indicates a pod within the final 24 hours of nominal life.Tapping on the icon takes the user to the pump settings display where the rate and duration of the MTB are displayed. This alert message indicates it has been more than 15 minutes since the app was able to communicate with the pump.Follow these troubleshooting steps. This alert message indicates no pump has been added. Follow the instruction for adding a pump."},{"location":"loop-3/displays-v3/#time-zone","title":"Time Zone","text":"Loop allows your pump to have a different time zone from your phone.
Your daily schedule for basal rates, correction ranges, insulin sensitivity factors and carb ratios is displayed with respect to midnight on \"pump time\". When you first Add Pump to Loop, the pump and phone are in the same time zone, but it's important to understand what happens when the time zone changes on the phone.
The scheduled rates for basal, correction range, ISF and CR follow the pump time
To change the pump time zone to match your phone, select the Pump Settings display
The display to modify time zone is slightly different for Loop 2.2.x and Loop 3 (links below):
You can choose to leave the pump and phone time zones different; the pump icon on the HUD (Loop 3 only) will show the clock icon to remind you. Many people do this for short trips.
"},{"location":"loop-3/displays-v3/#other-time-changes","title":"Other Time Changes","text":"What about other time changes? Suppose the iOS -> General -> Time & Date is modified to manually change the time, but the time zone is not adjusted. (Sometimes this is done to defeat limits on games. Do Not do this on a Looping phone. If you have an \"old\" glucose reading in the \"future\" - Loop will not predict correctly which may have dangerous consequences.) There will not be an obvious display in the HUD or Omnipod screen (which keys off time zone) but you will get regular warnings that phone does not have automatic time set.
Loop 3 will display this warning modal screen if it detects a problem with the Phone time. It leaves it up the user to decide what action should be taken. To make this warning stop, go to iOS -> General -> Time & Date and enable Set Automatically.
"},{"location":"loop-3/displays-v3/#hud-status-row","title":"HUD Status Row","text":"The Status Row is located immediately below the CGM, Loop and Pump Icons and is used to provide status, action buttons and information. The messages in the table are in order of priority. For example, a No Recent Glucose
message is displayed even when an Override
is active.
Bolus In Progress
The bolus messages are displayed with the highest priority:
No Recent Glucose
, you must either wait for the bolus to complete or cancel the bolus by tapping on the Status Row
Starting Bolus
information message is displayed. Tapping on this message has no action.As soon as the app issues a command to the pump (or sends it to the RileyLink to be delivered to the pump), the bolus in progress message appears. As soon as a bolus is started, from either a manual command or an automatic bolus, the bolus in progress message is displayed. Tapping on the Status Row
causes the app to attempt to cancel the bolus. The app can only cancel a bolus if communication is active between the app and the pump.The message says Bolused
valueof
totalU
. The value is based on a timer, so it is possible for an occlusion or other fault to occur while the app indicates bolus is in progress.In case of a fault, the user can tap on the pump icon to force a new pump status reading. For the case of pods, this allows you to silence a screaming pod quickly. Once the app communicates with the pump, the actual delivery status will be updated. If the user taps on the bolus in progress message in the Status Row
, the message changes to Canceling Bolus. Tapping on this message has no action. As soon the app determines that the pump is suspended, the Insulin Suspended, Tap to Resume
message is displayed. Tapping on the Status Row
resumes scheduled basal delivery if communication is active between the app and the pump.Medtronic pump users who suspend directly on the pump will notice a delay before this message is displayed. It is best to use the app Pump Settings screen to suspend the pump. If a higher priority message is not displayed in the Status Row
and the glucose value is stale (more than 15 minutes old), the No Recent Glucose, Tap to Add
message is displayed. Tapping on the Status Row
opens the Manual Bolus screen for entry of a Fingerstick Glucose. Note that if you choose not to accept a recommended bolus on this screen but you want to save the Fingerstick value, you need to tap the Bolus line to force it to 0 U and then tap Save Without Bolusing
. However, be aware that, in Closed Loop mode, the app will use that glucose value for the next 15 minutes and may adjust insulin delivery accordingly. If a higher priority message is not displayed in the Status Row
and an override is active, the override symbol and name, along with the time at which the override expires, is displayed. Tapping on the Status Row
opens the screen for that particular override to enable the user to edit the override. Note that any changes made to that override are applied just to the current session. If you want the override permanently modified, refer to the Overrides instructions. If a higher priority message is not displayed in the Status Row
and the Pre-Meal Range is active in the toolbar, the Pre-meal Preset, until time stamp
is displayed. Tapping on the status row has no effect for this message.New with Loop 3: The Pre-Meal Preset can be engaged with an Override. When both are active, the Pre-Meal Range supersedes the range of the active Override, but the other settings for that Override still apply. When both are active, the Status Row
message reflects the Override with both the Pre-Meal and Override icons in the toolbar highlighted."},{"location":"loop-3/features/","title":"Features","text":""},{"location":"loop-3/features/#work-in-progress","title":"Work in Progress","text":"work in progress
This page will be deleted after all the relevant information is incorporated into the appropriate locations as part of the development process for Loop 3.
Now that Loop 3 has been released, this page may be updated, but leaving it alone for now.
This page discusses updated versions of Loop features as well as new capabilities provided with Loop 3.
Loop 3 Displays
One thing you may notice on some screens is the primary button, with associated information message, is always visible at the bottom of even small screens. You may need to scroll to see intermediate rows.
For example, if the default action on a bolus screen is to deliver the recommended bolus, that button is visible and active. The button remains fixed as other portions of the screen are scrolled up and down. When you make changes to selections, then the information displayed and the button label updates to reflect the action taken if you tap on the button.
There are other screens, like the Onboarding and Therapy Settings screens, where you should read all the provided information. Those screens require you to scroll to the bottom before being able to hit Continue
or Save
.
If insulin is taken from a different source and the user wants to let Loop know, there is a new method in Loop 3.
With Loop 2.2.x, the user manually entered the Insulin dose into the Apple Health app. Loop then imported that value.
With Loop 3, the \"old\" method still works, but there is a new method for entering this information. This method enables the user to indicate the type of insulin so that the appropriate model is used by Loop. An updated Glucose
prediction chart is displayed prior to saving the dose.
WARNING
If you are planning to enter non-pump insulin to cover carbs and you do NOT want Loop to automatically start increasing insulin based on the carb entry, enter the non-pump insulin first and then add the carbs.
To find out what Loop recommends, without actually dosing with Loop:
Cancel
Tap on either of the insulin charts (Active Insulin or Insulin Delivery) on the home screen to display the Insulin Delivery Screen
. This screen has 3 tabs.
Select the Non-Pump Insulin
tab to bring up the graphic shown below
Log Dose
screen is displayed showing the current Glucose
predictionBolus
row (blue dash-dot lines) to bring up a keyboardGlucose
prediction chart updates automatically based on the value entered in the Bolus rowDone
on the keyboard display, the entered value is displayed on the Bolus
row and the Log Dose
button changes from gray to blueLog Dose
to record or Cancel
to quitThe bolus following carbs (Meal Bolus
) and manual bolus (Bolus
) screens are updated from Loop 2.2.x version. There is still a predicted Glucose
chart that actively updates as the bolus value is updated and various buttons.
Blue Means Active
Bolus
row is blue to indicate if you tap on that, you can edit the valueWhen the Meal Bolus
screen is entered following a carb entry or edit action, the active button might be Save and Bolus
or, if no bolus was recommended, Save without Bolusing
. The Save
refers to saving the Carb entry or Carb edit that led to this screen in addition to saving the amount that might be bolused. It can also refer to saving a fingerstick value entered in the Meal Bolus screen.
In the graphic below, the user enters carbs and taps continue to display the Meal Bolus screen.
Save and Deliver
button saves the carbs and delivers the bolusSave without Bolusing
saves the carbsRecommended Bolus
and Bolus
rowsGlucose
prediction graph - these are accurate at the time this screen is entered (before carbs or bolus are saved)Glucose
prediction graph with three rows:Carb Entry
, the proposed carbs with the time to add the carbs and the absorption time displayed - to modify that information, tap on the < Carb Entry
button at upper leftRecommended Bolus
displays what Loop recommends for that proposed Carb Entry
Bolus
default display is what Loop recommends, but user can edit that valueIf a CGM entry arrives while in this screen, a Bolus Recommendation Updated modal message will be displayed and must be acknowledged.
"},{"location":"loop-3/features/#modify-bolus","title":"Modify Bolus","text":"This section is a continuation of the information presented in the Accept Recommendation portion of the Meal Bolus
section. In the graphic below, the user overrides the recommended bolus.
Glucose
prediction graph updates based off the Bolus
value, giving the user the opportunity to accept or change their proposed value before tapping Save and Deliver
Correction
rangeCorrection Range
is only offered as a manual feature and is limited to an amount predicted to maintain glucose above the Safety Threshold
Glucose
prediction is what happens if you Save and Deliver
and then no further adjustments are made to insulin delivery by LoopWhen the Bolus
screen is entered directly from the toolbar, the button choices are Enter Bolus
if none is recommended, Deliver
if a value is on the Bolus
row, or Cancel
using the button on the upper left. The user can also tap on the value on the Bolus
row to bring up a keyboard to modify that amount. When doing that, the value is automatically set to zero.
Other alert messages might be displayed if the pump or CGM is not active. Those are found on the Loop 3 Displays page.
The two graphics below are examples of manual bolus screens.
Enter Bolus
button at the bottom, it brings up a screen to enable you to type in an amount and then Deliver
it. 0
amount in the Bolus
row and perform the same action as the Enter Bolus
buttonCancel
button at the upper left.Deliver
that recommended dose is deliveredBolus
row, you can override the amountBolus
row is modified to 0 U with the first tap - at that point, you may enter a new value or tap Cancel
using the button at the upper left of the screenLoop 3 includes a feature for remote input of Carbohydrates and Bolus, enabling caregivers who are not physically present to better assist the individual who requires support in managing Loop.
Please read the documentation about this feature carefully to ensure proper configuration and use: * Remote Command Overview
WARNING
You will be using this feature at your own risk, like any other Loop code you build. It is very important you completely read and re-read the Remote Command Overview before getting started.
There are validation and troubleshooting steps for each section of the guide.
Please make sure not to skip sections as this makes it difficult to troubleshoot.
Be aware:
The Loop 3 app, building off work by Tidepool and DIY contributors, provides a major upgrade in user safety, user experience, and user interface with the same great Loop algorithm.
Here are some highlights:
Congratulations on Building Loop!
The first time you build Loop 3, the app takes you through the Onboarding process. Review this page before using your app.
Suggestion
Review these pages from the Intro tab of LoopDocs
Read the rest of the pages listed under All Loopers, below.
These pages have a lot of detailed Loop information.
And a lot of detailed information about Status and Commands for:
Medtronic Users
You must select Insulin Type on your pump settings screen after updating from Loop 2 to Loop 3 and completing the onboarding. Without an insulin type, closed loop will not work.
"},{"location":"loop-3/loop-3-overview/#safety","title":"Safety","text":"Please be informed so you can Loop safely.
Consult with your health care professional regarding your diabetes management.
Open Source
To bring up the Pump Settings display, tap on the pump icon in the Heads Up Display (HUD) or your connected pump in the Loop Settings screen.
"},{"location":"loop-3/medtronic/#medtronic-status-and-commands","title":"Medtronic Status and Commands","text":"Medtronic status and commands are found in the Pump Settings screen shown in the graphic below. The bottom section with Pump ID, Firware Version and Region is configured at the time the pump is connected to Loop. You cannot edit those lines.
"},{"location":"loop-3/medtronic/#suspend-delivery","title":"Suspend Delivery","text":"Tapping on the Suspend Delivery
row will suspend all insulin delivery: basals, temp basals, and boluses in progress. When you press Suspend Delivery
, the label changes to Suspending
while Loop is communicating with the pump. When the label changes to Resume Delivery
, all insulin delivery is stopped until the user resumes using the HUD Status Row, the Pump Settings screen or on the pump itself.
As long as the spinning icon is spinning, Loop is trying to execute the Suspend or Resume command. If it fails to complete, a modal alert will appear that says \"Error Suspending\" or \"Failed to Resume Insulin Delivery\" which you must acknowledge. You must then repeat the command to try again. Make sure your RileyLink device is powered on and close to the phone and pump.
When the phone is in portrait mode, so the HUD is visible:
You can still suspend and resume insulin on the pump itself. It may take until the next Loop cycle (typically less than 5 minutes), but Loop will detect that the pump is suspended or basal is resumed and the HUD Status Row will update.
If you request a manual bolus with Loop while the pump is suspended, Loop resumes basal delivery as well. No automated boluses are initiated while suspended, only manual ones.
"},{"location":"loop-3/medtronic/#insulin-type","title":"Insulin Type","text":"You select insulin type when connecting to a new Medtronic pump.
If you install Loop 3 over Loop 2 with the pump already configured, be sure to set the Insulin Type on the pump settings screen. If no insulin type is set, you will get red loops.
Use this row if you switch to a different type of insulin.
The type of battery used in the Medtronic pump affects how Loop interprets the battery level for the pump.
"},{"location":"loop-3/medtronic/#preferred-data-source","title":"Preferred Data Source","text":"Leave the Preferred Data Source set to on Event History.
"},{"location":"loop-3/medtronic/#use-mysentry","title":"Use MySentry","text":"The Use My Sentry
row only shows up on pumps that support it.
Using the MySentry feature on some Medtronic pumps when using an OrangeLink causes the batteries to die quickly. This option allows you to turn off MySentry within the Loop app.
"},{"location":"loop-3/medtronic/#devices","title":"Devices","text":"This allows access to the RileyLink screen for each connected RileyLink compatible device.
"},{"location":"loop-3/medtronic/#pump-battery-remaining","title":"Pump Battery Remaining","text":"Loop uses the Pump Battery Type to estimate Pump Battery Remaining. For information about the method, review MDT Pump Battery.
"},{"location":"loop-3/medtronic/#pump-time","title":"Pump Time","text":"Loop keeps the pump time up to date with the phone time automatically. As shown in the graphic in the next section, Loop allows differences in time zone. The user can decide when and if to modify the pump time zone, if different from the phone time zone. If the Pump Time shows as yellow, then the time zones do not match.
"},{"location":"loop-3/medtronic/#change-time-zone","title":"Change Time Zone","text":"During normal operation, Loop automatically keeps phone time and pump time aligned. In the case of time zone or daylight savings time changes, Loop allows the differences to persist until the user chooses to Change Time Zone
. Please review Time Zone for more details.
When the time zone for the pump and phone are not the same, you will notice a small clock symbol in the upper right of the pump status icon.
Navigate to the Pump Settings screen. Right below the Pump Battery Remaining and Pump Time rows, there is a new row Sync to Current Time
. When you tap that row, the time for the Medtronic pump is updated to the current Loop phone time.
If you want to switch to a different pump you must first delete this one:
Delete Pump
Delete Pump
againFor more information, follow this link: Modify Pump.
"},{"location":"loop-3/omnipod/","title":"Omnipod Pump","text":""},{"location":"loop-3/omnipod/#omnipod-and-omnipod-dash-pump","title":"Omnipod and Omnipod DASH Pump","text":"The information and user interface for Omnipod (Eros) and DASH pods is the same, except Omnipod DASH pods do not require a RileyLink compatible device. They communicate directly with the phone through Bluetooth.
"},{"location":"loop-3/omnipod/#pair-pod","title":"Pair Pod","text":"Max Fill is 200 Units
When you fill the Pod do not exceed 200 units.
If you overfill the pods, you may get a pod fault right after priming.
Pod Filling and Insertion
The Pod filling and insertion instructions are the same with the Loop app as they are for the PDM. These videos: Filling a Pod with Insulin and Inserting the Cannula, may be useful.
For DASH Pods:
For Eros Pods:
You'll be pairing a pod every 2 or 3 days (max pod life is 80 hours).
You'll see this screen every time you ask Loop to Pair New Pod
.
The Omnipod Common pairing protocol is the same for all pods. The difference is that Omnipod requires a RileyLink compatible device and Omnipod DASH does not. There are also slight differences in some of the text and graphics, e.g., Omnipod DASH uses a blue needle cap and Omnipod has a clear needle cap.
Graphic below shows the Pair Pod screen for Omnipod (left) and Omnipod DASH (right).
Loop walks you through each step of the filling, pairing, priming, attaching and insertion process.
It makes sure you are really ready to do the insertion.
Please watch the video of the Loop app screen when pairing a DASH pod to see the full process before pairing your first pod. In this video, once the pod starts priming, you may want to skip forward (it takes about a minute to prime).
Keep Gear Close
Continue
button on the phone screenInsert Cannula
Continue
button on the phone screenNew Insert Cannula Control
For version 3.3.0 and later, (which means the dev branch
right now), there is a new slider to control insertion of the cannula instead of a button to tap. It looks like the graphic below. You place your finger on the darker blue icon and, while keeping your finger in contact with the screen, drag all the way to the right. After the drag operation, as soon as you lift your finger off the phone, the cannula insertion command is sent to the pod.
The Screen that says Setup Complete allows you to change the Scheduled Reminder for this pod if you want a different reminder time (including none) from your usual setting.
The Pod Status screen is shown in the graphic below. The dashed green outline indicates the Device
portion that is found only for the Omnipod. All other features of the screen are common for Omnipod and Omnipod DASH.
If you want to make sure Loop can talk to your pod, click on the sound icon (highlighted by the red box) in the graphic above. If the icon is greyed out - that means Loop is having a communication issue reaching your pod. Follow the usual Troubleshoot: Pump is Not Responding steps to resolve this problem.
Other Uses
The next row changes the label depending on the situation. In all cases, the current basal rate is reported.
Label Description Scheduled Basal Pod is running the scheduled basal rate Insulin Delivery Pod is running an automated or manual temporary basal rate"},{"location":"loop-3/omnipod/#insulin-remaining","title":"Insulin Remaining","text":"Pods start reporting reservoir values when 50 U are left.
Value Meaning 50+ U Pod reservoir is greater than 50 U Value U Pod reservoir is estimated to be at least as great as the indicated value. 0 U Pod will attempt to deliver up to 4 U after it reports 0 U. This is not guaranteed. The pod senses when it is not successful delivering pulses and that can happen before 4 U have been delivered."},{"location":"loop-3/omnipod/#activity","title":"Activity","text":""},{"location":"loop-3/omnipod/#suspend-delivery","title":"Suspend Delivery","text":"You may want to consider using a Manual Temp Basal of 0 U/hr instead of suspend.
Tapping on Suspend Delivery
brings up a timed reminder screen. You can choose to be reminded (via a beep on the pod itself) with 4 choices (or you can cancel the request):
After you select the reminder time, Loop issues a command to the pod to halt all insulin delivery: basals, temp basals, and boluses in progress. The label on the Suspend Delivery
row changes to Suspending
while Loop is communicating with the pump. When the label changes to Resume Delivery
, all insulin delivery is stopped until the user resumes using the HUD Status Row or the Pod Status screen.
As long as the spinning icon is spinning, Loop is trying to execute the Suspend or Resume command. If it fails to complete, a modal alert will appear that says \"Error Suspending\" or \"Failed to Resume Insulin Delivery\" which you must acknowledge. You must then repeat the command to try again. For Omnipod, make sure your RileyLink device is powered on and close to the phone and pod.
When the phone is in portrait mode, so the HUD is visible:
If you request a manual bolus with Loop while a pod is suspended, Loop will send a notification that Bolus Failed with instructions that Pump is Suspended, Resume Delivery. In other words, you must resume delivery before you will be allowed to bolus with pods.
"},{"location":"loop-3/omnipod/#suspend-timer-reminder","title":"Suspend Timer Reminder","text":"At the end of the reminder time, an alert beep is issued by the pod and a modal alert will be provided on the Loop app. You must acknowledge the modal alert on the phone to silence future pod alerts.
Manually Resume Insulin Delivery
The halt of all insulin delivery continues until you manually resume. There is no automatic resumption of basal insulin from a suspend command.
If you select a Manual Temp Basal command of 0 U/hr instead of Suspend:
Tap on the Set Temporary Basal Rate
to select a Manual Temp Basal.
This brings up the Temporary Basal
screen shown on the left of the graphic below.
Set Temporary Basal
, Loop goes into Open Loop mode and the pod is commanded to that rate and duration. In other words, you can leave your phone behind and the selected basal rate continues for the selected basal duration. There will be no automated adjustments of delivery for the temp basal duration.
"},{"location":"loop-3/omnipod/#during-manual-temp-basal","title":"During Manual Temp Basal","text":"This Pod Only
The manual temp basal command from Loop tells the pod to initiate a temp basal for the designated rate and duration.
Cancel Manual Basal
Deactivating this pod and pairing a new one interrupts the temp basal.
If you still need that basal rate, you must initiate it on the new pod.
Once the manual temp basal command is sent to the pod, Loop changes to Open Loop mode and updates displays as shown in the graphic above
Insulin Delivery
Cancel Manual Basal
and reports the time remaining until the temp basal expiresOpen Loop
icon and the HUD Pump Status Icon indicates Manual Basal
So long as you were in Closed Loop before requesting the Temp Basal, Loop returns to Closed Loop automatically when the duration ends or you cancel the temporary basal.
Automatic Resumption of Scheduled Basal
The phone does not need to be in contact with the pod for insulin delivery to return to scheduled basal at the end of the selected duration. That duration is commanded along with the temporary rate. Once the pod accepts that command, and you'll get an error message if it does not, the pod will resume scheduled basal rate without further commanding if there is insulin in the reservoir and a pod fault does not occur.
For situations where you need a modification of your insulin needs that is not dependent on a particular pod, review the information on the Overrides page.
"},{"location":"loop-3/omnipod/#devices","title":"Devices","text":"For Omnipod, there is a Devices section used to access the RileyLink status and commands screen.
"},{"location":"loop-3/omnipod/#pod-details","title":"Pod Details","text":"The Pod Details table, shown in the graphic below, reports:
Time Drift
The pod will expire when it thinks it has been 80 hours. The pod clock may drift a few seconds with respect to phone time during the pod life. The Expiration time gets updated when the pod reports how long it thinks it has been since it was activated.
"},{"location":"loop-3/omnipod/#device-details","title":"Device Details","text":"Some additional details from the most recent pod status response message are displayed if you tap the Device Details row, as shown in the graphic below. Most people will not need to view this.
The graphic shows an example for Omnipod on the left, Omnipod DASH (TWI BOARD) in the middle and Omnipod DASH (NXP BLE) on the right. Do not worry about the different board styles (Device Name) for DASH. The developers did that for you. If you are asking for help from a mentor - they may request this information.
"},{"location":"loop-3/omnipod/#replace-pod","title":"Replace Pod","text":"When you tap on the Replace Pod
row, the Deactivate Pod
screen, shown below, is displayed.
Deactivate Pod
on this screen, insulin delivery stops for this pod and cannot be resumedWhen you tap on the Notifcation Settings
row, the graphic below is displayed. The notifications are a combination of beeps on the pod with associated modal alerts on the phone app that must be acknowledged to prevent future beeps.
When you tap on the Confidence Reminder
row, the graphic below is displayed. You can choose from three levels of audible responses that Loop requests from the pod:
Enabled
You selected insulin type when connecting to this pump.
Tap on this row if you switch to a different type of insulin.
Click on Time Zone to understand how Loop treats \"pump\" time for pods.
When the Pump time zone matches the phone time zone, the Pump Time is displayed with black font.
When the phone time zone and pump time zone do not match, there is a clock icon on the main screen in the Pump Status Icon of the HUD.
Sync to Current Time
row appearsSync to Current Time
row to choose whether to make Pump Time match Phone Time or not (bottom red rectangle in graphic below)What about other time changes? Suppose the iOS -> General -> Time & Date is modified to manually change the time, but the time zone is not adjusted. (Sometimes this is done to defeat limits on games. Do Not do this on a Looping phone. If you have an \"old\" glucose reading in the \"future\" - Loop will not predict correctly which may have dangerous consequences.) There will not be an obvious display in the HUD or Omnipod screen (which keys off time zone) but you will get regular warnings that phone does not have automatic time set.
Loop 3 will display this warning modal screen if it detects a problem with the Phone time. It leaves it up the user to decide what action should be taken. To make this warning stop, go to iOS -> General -> Time & Date and enable Set Automatically.
"},{"location":"loop-3/omnipod/#previous-pod-information","title":"Previous Pod Information","text":"When you tap on the Previous Pod Information
row, a graphic similar to those shown below is displayed. This provides summary information about the pod before the one currently in use.
If the previous pod had a fault and you choose to report it to Insulet, this screen reports the PDM reference code that Insulet uses in their tracking system.
Do Not Call Insulet about -049 (0x31) Faults
If you should happen to get a fault where the last 3 digits of the PDM ref code are \"-049\" (the Hex Designation is fault code 0x31), do not report this to Insulet and do not ask for a replacement. This means Loop did not ensure the pod was in the correct state to accept a command. In other words, it was a bug in the Loop code.
We believe the code has been updated to prevent these faults. There was a brief period during development in which at least one of these happened - this was fixed July 3, 2022. If this happens to you, report it on zulipchat for the developers, save a Loop Report and rebuild if you have an older version of the development code.
With Loop 3, do not leave the screen open and unlocked for long periods of time without first reading Is there an increase in pod failures on Loop?
"},{"location":"loop-3/omnipod/#pod-error-messages","title":"Pod Error Messages","text":"This section presents some of the error message screens you may see specific to pods.
"},{"location":"loop-3/omnipod/#pod-faults","title":"Pod Faults","text":"You are likely to hear a pod fault before Loop notices. If your phone is locked, Loop only checks status every 5 minutes for Omnipod or 3 minutes for Omnipod DASH.
Unlock your phone, open Loop, navigate to the Pod Status screen and tap on Deactivate Pod to stop the noise. The pod fault - even if it does not show up in the HUD or the Pod Status screen, will be picked up by the process of hitting Deactivate Pod. You can then view the Fault information in the Previous Pod Information screen.
"},{"location":"loop-3/onboarding/","title":"Onboarding","text":""},{"location":"loop-3/onboarding/#onboarding","title":"Onboarding","text":"As soon as your app builds on your phone, you are guided through the onboarding (set up) process. You will see information screens for each Therapy Setting and must acknowledge each screen. You can review those informational screens later by clicking the Therapy Settings screen after a pump has been added.
"},{"location":"loop-3/onboarding/#entering-and-editing-values","title":"Entering and Editing Values","text":"This section explains how to enter and edit values with Loop 3.
Confirm Setting
or Save
button is inactive, move the picker value to make the button active,First time connecting a glucose monitoring device to your phone's Apple Health app? If so, the units on the phone might not be in the units you want, i.e., mg/dL or mmol/L. Loop uses the units in Apple Health.
Each onboarding step is presented in order on this page. Please follow this document while entering values into your app for the first time.
Settings Help
Please stay in Open Loop until you verify that your settings (basal rates, insulin sensitivity, carb ratio, etc) are properly adjusted to work with the Loop algorithm. You may need time to evaluate and perhaps identify settings to adjust.
If you need help with your settings adjustment, you may find useful tips in the companion website, LoopTips at this link: LoopTips: Settings tab.
"},{"location":"loop-3/onboarding/#welcome-to-loop","title":"Welcome to Loop","text":"The first screen you will see is the Welcome to Loop screen shown in the graphic below. Tap on Let's Go
to continue.
Next, you need to give Loop permission to read and write to Apple Health. In the graphic below, from left to right, tap on the buttons highlighted with red boxes to configure permissions:
Share with Apple Heath
buttonTurn On All
button in the middleAllow
button at upper rightYou need to enable Health Permissions for Loop to work.
You can review the permissions screen later. FAQS: How Do I Modify Apple HealthKit Permissions.
"},{"location":"loop-3/onboarding/#usage-data-sharing","title":"Usage Data Sharing","text":"Language?
If the instructions on this screen are not your preferred language, make sure you built the released code.
Next, you will be asked your preference for Usage Data Sharing, with the default automatically set to Share Version Only
as shown in the graphic below:
If you choose to share usage data, it is collected anonymously. The choices are:
If you select Share Usage Data you may wonder types of information is available to the Loop Developers.
localization
(language translations) can be prioritizedThe Loop Developers are the only ones with access to this data.
"},{"location":"loop-3/onboarding/#connect-loop-to-nightscout","title":"Connect Loop to Nightscout","text":"The next screen, shown on the left of the graphic below, enables the user to both connect Loop to Nightscout and to download existing Loop settings from Nightscout.
Nightscout
Loop 3 with Nightscout Requires API_SECRET
If you have do not have a Nightscout site, or choose not to use it, select Setup Loop without Nightscout
and skip ahead to Therapy Settings (Onboarding)
If you have a Nightscout site, select Use Nightscout with Loop
to connect Loop to your site and download your profile (Therapy Settings) from Nightscout for review.
If you were using a Nightscout site with a prior version of Loop, you need to type it in again.
If you select Use Nightscout with Loop
:
The next onboarding screens take you through the therapy settings one at a time.
The therapy settings are the heart of how Loop makes predictions. If your settings are not close, the predictions will not be correct.
Warning - Outside Typical?
The Therapy Settings have \"guardrails\" to warn you if your settings are unusual.
Take the yellow (and red) indications with a grain of salt. You will get an extra modal screen that you must acknowledge. Simply confirm your choice and keep going.
A red limit cannot be exceeded without modifying the code itself. But values that show up as red can be saved - they are valid therapy selections.
mmol/L
People using mmol/L should avoid the red (the min or max end points) glucose values for their settings. They sometimes cause a crash.
The Guardrails for Settings are summarized on the Therapy Settings page.
"},{"location":"loop-3/onboarding/#glucose-safety-limit","title":"Glucose Safety Limit","text":"If Loop predicts that your glucose will go below the Glucose Safety Limit at any time in the next 3 hours and Loop is in Closed Loop, it will set a temporary basal rate of 0 U/hr in an attempt to prevent that future low.
If you ask Loop for a bolus recommendation, and loop predicts your glucose will go below the Glucose Safety Limit at any time in the next 3 hours, no bolus will be recommended.
The Glucose Safety Limit can never be higher than the lowest of these related settings: Correction Range and Pre-Meal Range.
"},{"location":"loop-3/onboarding/#correction-range","title":"Correction Range","text":"Loop uses the Correction Range as the goal when it recommends a bolus and makes automated adjustments to insulin dosing.
Correction Range vs Time in Range
For example, you may choose a correction range of 100-110 mg/dL (5.6-6.1 mmol/L) for Loop, but you may monitor your \"success\" or Time in Range using 70-180 mg/dL (3.9-10 mmol/L).
"},{"location":"loop-3/onboarding/#manual-vs-automated-dosing","title":"Manual vs Automated Dosing","text":"Loop estimates future glucose over the next 6 hours (DIA) and, when in closed loop, adjusts insulin dosing. Loop uses or recommends the smallest amount of insulin that will bring you to your target (Correction Range midpoint) over the whole forecast.
If you ask Loop for a manual Bolus recommendation while your current glucose is below the bottom of the correction range and above the glucose safety limit, Loop will recommend a value that should keep your glucose above the safety limit.
The Pre-Meal Range, which is optional, gives you a small amount of insulin before a meal to help control post-meal glucose spikes. The Pre-Meal icon is inactive if you choose not to enter a range.
Example
If your normal range is 100-110 mg/dL (5.6-6.1 mmol/L) and pre-meal range is 80-80 mg/d L (4.4 mmol/L), Loop will give you extra insulin to move you towards the lower range number before the meal. This early insulin brings you into the meal with a mini-prebolus. The pre-meal range, when activated by pressing on the pre-meal icon in the toolbar, will stay active for one hour, until carbs are entered, or until it is manually cancelled...whichever comes first.
"},{"location":"loop-3/onboarding/#carb-ratios","title":"Carb Ratios","text":"Your Carb Ratio is the number of grams of carbohydrates covered by one unit of insulin.
You must provide a Basal Rate schedule and the schedule must start at midnight. Loop does not provide the option for having more than one profile saved that you can switch between.
If you onboard basal rates before a pump is added, you are limited to increments of 0.05 U/hr for basal rates and 0.00 U/hr is not allowed. Enter values close to what you actually use because the values determine your maximum basal rate in the Delivery Limits.
Once a pump is added, the basal increments will match those on your pump. The onboarding basal rates will be saved to your added pump. Return to Therapy Settings to adjust the Basal rates to your pump increments.
"},{"location":"loop-3/onboarding/#medtronic-pump-users","title":"Medtronic Pump Users","text":"If you will be connecting a Medtronic pump after onboarding:
The maximum basal rate and maximum bolus settings are collectively referred to as Delivery Limits.
The Maximum Basal Rate the app allows you to choose will be limited based on the basal rate schedule you just entered as well as pump limits, so make sure you put in sensible values. (There is a back button if you need it.)
"},{"location":"loop-3/onboarding/#medtronic-pump-users_1","title":"Medtronic Pump Users","text":"If you will be connecting a Medtronic pump after onboarding:
Maximum Basal Rate will cap the maximum temporary basal rate that Loop issues to meet your correction range when you are in Closed Loop with a Dosing Strategy of Temp Basal Only.
For safety, new loopers should start with a max basal set 2-3 times their highest scheduled basal rate. If you choose 2 times your highest scheduled basal, you may get a message informing you this is \"lower than typical.\" Ignore this to put safety first as a new looper.
Experienced loopers typically set their maximum basal rate around 3-4 times their highest scheduled basal rate. Loop 3 app will not allow you to exceed 6.4 times your highest scheduled rate.
"},{"location":"loop-3/onboarding/#maximum-bolus","title":"Maximum Bolus","text":"Maximum Bolus is the highest bolus amount Loop can recommend at one time to cover carbs or bring down high glucose.
For safety, don't set a maximum bolus limit any higher than your typical large meal bolus. Many people like to set a value less than 10 U, for example, 9 or 9.9 U, to avoid accidentally typing in a bolus of 10 instead of 1.0 U.
This setting also limits how much automated dosing is allowed. Loop will not automatically increase the user's IOB above two times the Maximum Bolus. This is true with Dosing Strategy
of Temp Basal Only
or Automatic Bolus
.
Your Insulin Sensitivity Factor is the drop in glucose expected from one unit of insulin over the entire duration of insulin activity. It may be a different value than what you used as the Correction Factor with shots or manual pumping. Loop uses your ISF every 5 minutes when calculating predicted glucose levels.
Loop works best if you have tested and optimized your ISF settings for accuracy. Insulin sensitivities can change for many reasons including waiting too long to change your infusion set. Loop will not auto-detect changes in ISF.
Incorrectly set ISF is a common cause of roller coaster glucoses for new Loop users. You may need to raise (increase) your ISF value/number to help smooth a roller coaster glucose trend. You can read about that topic more over in LoopTips here.
"},{"location":"loop-3/onboarding/#therapy-settings-review","title":"Therapy Settings Review","text":"Once these are all entered, the Therapy Settings screen is shown for your review. You must scroll down to see all settings and reveal the Save Settings button. Only the top and bottom portions are shown, the other settings were not captured for this graphic.
"},{"location":"loop-3/onboarding/#notifications-and-bluetooth","title":"Notifications and Bluetooth","text":"Once you save settings, Loop asks to send notifications and use Bluetooth. You must allow both for Loop to work properly.
Notifications are necessary for safety reasons while Looping.
Bluetooth lets Loop get data from your CGM and talk to your Pump.
For new Loopers, it is now time to add a CGM and a pump. Follow these links for instructions.
Medtronic CGM
If you plan to use a Medtronic Enlite sensor for your CGM, you must first add that pump to Loop before the sensor will be shown as an option.
If you built Loop 3 over an existing app, your CGM and pump selections should have carried over.
"},{"location":"loop-3/onboarding/#experienced-loopers","title":"Experienced Loopers","text":"Insulin Type
Insulin Type is in Pump Settings (not therapy settings) and will NOT be imported.
After you finish onboarding, you must select Insulin Type on your pump settings screen. Without an insulin type, closed loop might not work or a different insulin type might be selected.
The first time you build Loop 3 on a device, you will need to go through the onboarding process too.
If you build Loop 3 over Loop 2.2.x, the onboarding remembers the settings, previously saved overrides and your current pod or pump information is maintained. (Yes, you can build Loop 3 and keep using the same pod.)
If you build Loop 3 onto a device without an existing Loop app and you have a Nightscout site, you can enter your Nightscout URL (remember to use https: with the \"s\") and API_SECRET and it will ask if you want to import your settings from your Nightscout profile. This includes all the overrides you have previously saved.
If you are building on a device that does not have an existing Loop app and you choose not to use Nightscout, then follow the new Looper Onboarding Steps.
You will be presented with an information screen describing the setting (with a continue button) followed by your current settings (if available), which you must confirm to keep - or can modify and then confirm to change. Depending on the device you are using, you may need to scroll down to see the Continue or Save buttons for each setting.
What is in my Nightscout Profile
To check what is in your Nightscout profile that Loop would use as part of onboarding, follow these instructions.
Note: you will get a json file - look that up using your favorite internet search method.
WARNING
The new onboarding forces you to check all your imported Therapy Settings (Onboarding Summary) but there may be other settings you need to check as well.
Temp Basal Only
, even if you were using Automatic Bolus
beforeHIGHLIGHTING THIS ONE - A LOT OF PEOPLE MISSED THIS:
If you used earlier versions of Loop, please be aware that absorption times have changed.
Loop 3 Carb Absorption Times
Loop uses the absorption time for the carbs, along with your glucose readings, ISF and CR to recommend insulin dosing and estimate over time the carbs absorbed and carbs expected. See Algorithm: Prediction for more details.
If you selected the candy icon for a complex meal, you told Loop to expect your glucose to rise rapidly. When that rapid rise does not materialize, you may find Loop predicts an unexpectedly low glucose because the algorithm assumes something must be affecting your glucose downward in a strong way.
If this happens to you, edit the carb entry to have a longer absorption time and Loop will recalculate the prediction.
"},{"location":"loop-3/onboarding/#carb-data-source","title":"Carb Data Source","text":"Loop 3 does not read non-Loop carbohydrate entries from Apple Health, as previous versions did. It still writes to Apple Health. Some experienced loopers want to modify the code to enable Loop to read carbohydrate records from Apple Health with the full understanding of how that works. The instructions for this code customization option, using a flag set in the LoopConfigOverride.xcconfig file, see the Customize: Build-Time Features section.
Users who build Loop 3 over Loop 2.2.x, may find a permission switch to give Loop permission to read carb data from health, but without making the customization mentioned above, changing permission does not change the behavior of Loop.
"},{"location":"loop-3/services/","title":"Optional: Services","text":"## Loop Services
Near the bottom of your Loop settings screen is a section called \"Services\".
Sevices are Optional
The services are added by tapping on the + sign and choosing the service from the list. Services are shown alphabetically. The most common services are Nightscout and Tidepool.
"},{"location":"loop-3/services/#nightscout","title":"Nightscout","text":"There is a whole section in LoopDocs about Nightscout. Please follow this link to the Using Nightscout with Loop section of LoopDocs. That also has the links you might need to the official Nightscout Documentation (different website).
If you have an existing Nightscout site, it's still a good idea to review that section, but here's the quick summary of how to add your Site URL and API_SECRET to have your Loop data transmitted to your Nightscout site. If you can\u2019t remember your API_SECRET, it can be found under Settings, Reveal Config Vars for Heroku sites (or Application Settings, Connection Strings for Azure sites).
The two most common errors in filling out this section are:
https://
in the site URL. If you use http://
(see how that doesn't have the \"s\" at the end?), you will get an error message about an App Transport Security policy.More Tips about Nightscout
With Loop 3.2.x and newer versions, data can be directly uploaded from Loop to Tidepool.
User Beware
Don't use the Loop Tidepool uploader yet unless you want to help the developers work through some known issues. The Tidepool Mobile app still works to upload some of your Loop data from Health.
Please refer to the LoopTips: Data: Tidepool page for more information about Tidepool. The Tidepool display browser is undergoing some updates; the information on these pages will be updated after changes happen.
The Tidepool Mobile app serves 2 purposes:
With the new Loop Service to upload to Tidepool, additional information that is not stored in Health can be made available to Tidepool. However, this is a work in progress.
At the current time:
When you add the Tidepool Service to Loop, be sure to disable Tidepool Mobile ability to read from Apple Health.
You can still use the note taking feature with Tidepool Mobile when Health is not connected, although you must have internet connectivity for this to work.
Tidepool Support is available to help troubleshoot issues or answer questions about using Tidepool. Contact them via email at support@tidepool.org.
"},{"location":"loop-3/services/#loggly","title":"Loggly","text":"Loggly is a free logging service. If you sign up for an account, you'll need to go under Source Setup and then Customer Tokens. Copy and paste your customer token into your Loop App settings for Loggly.
"},{"location":"loop-3/services/#amplitude","title":"Amplitude","text":"Amplitude is a remote event monitoring service and can be used to quickly identify errors and events with Loop. Amplitude stores the events and allows you to view those events as points in time. To retrieve the details of the events you will need to look at corresponding mLab data entries to get a complete picture of the issues. If you sign up for a free account with Amplitude, you will be given an API Key that you can enter here to have Loop integration setup.
"},{"location":"loop-3/services/#next-step-loop-displays","title":"Next Step: Loop Displays","text":"Great job, almost finished! Now that you have completed your services, let's move onto understanding your Loop Displays.
Loop displays is a valuable tool for understanding your Loop and a great page to review when troubleshooting.
"},{"location":"loop-3/settings/","title":"Settings","text":""},{"location":"loop-3/settings/#loop-settings-screen","title":"Loop Settings Screen","text":"The Settings screen, shown in the graphic below, is reached by tapping the gear icon in the Toolbar on the Main Loop Screen.
Each section and row on the Settings screen is described below.
"},{"location":"loop-3/settings/#closed-loop","title":"Closed Loop","text":"The user can select closed loop or open loop using this slider. When you first start Loop, we encourage you to leave this slider disabled and become familiar with the app using Open Loop mode.
As soon as Closed Loop is enabled, Loop will begin automatic adjustment of insulin dosing. Please ensure the settings you entered are appropriate for the Loop algorithm.
No automatic (closed loop) adjustment of insulin will occur and the slider will be disabled under the following conditions.
With every loop cycle - typically every 5 minutes - Loop updates the glucose prediction using
Based on this prediction, Loop calculates a modification to insulin dosing to bring the user into the desired correction range. This can be a reduction in basal to raise the glucose prediction or a recommended bolus, subject to Delivery Limits, to lower the prediction. The glucose prediction is shown in the Glucose Chart along with the measured glucose values.
If you find this confusing, read how to Think Like a Loop on the LoopTips website.
"},{"location":"loop-3/settings/#dosing-strategy","title":"Dosing Strategy","text":"This row gives you the ability to select Dosing Strategy. The Dosing Strategy only affects the method by which the recommended bolus - if any - is delivered. The current selection is noted underneath the Dosing Strategy label. The default (initial) value for this setting is Temp Basal Only. Tap on the arrow to the right to modify your selection.
Words in Graphic
Temp Basal Only: Loop will set temporary basal rates to increase and decrease insulin delivery.
Automatic Bolus: Loop will automatically bolus when insulin needs are above scheduled basal, and will use temporary basal rates when needed to reduce insulin delivery below scheduled basal.
Regardless of the Dosing Strategy selected, when glucose is below target or predicted to go below target, Loop decreases basal insulin using Temporary Basal.
Temp Basal Only: Subject to your Delivery Limits, Loop will deliver the Recommended Bolus over 30 minutes using positive temp basals (i.e., increase over your scheduled basal rate) to increase your IOB.
Automatic Bolus: Subject to your Delivery Limits, you receive 40% of the Recommended Bolus at every loop cycle.
"},{"location":"loop-3/settings/#automatic-bolus","title":"Automatic Bolus","text":"When you first start Loop, we encourage you to leave Dosing Strategy set to Temp Basal Only until you are sure your settings are dialed in.
The Automatic Bolus selection causes Loop to provide 40% of the recommended dose as a bolus at the beginning of each Loop cycle (when a CGM reading comes in). This is a faster method of getting the recommended insulin delivered. When Loop delivers extra insulin, the scheduled basal rate continues unchanged.
As with all Loop versions, you can manually bolus at any time by pressing the Bolus icon in the center of Loop's Main Screen. Any bolus recommendation that you see when you press the Bolus icon will be 100% of the Recommended Bolus.
"},{"location":"loop-3/settings/#configuration","title":"Configuration","text":"The Configuration section allows entry to the following screens:
"},{"location":"loop-3/settings/#therapy-settings","title":"Therapy Settings","text":"There's a LoopDocs page devoted to therapy settings. Click on the link to get to that page: Therapy Settings.
"},{"location":"loop-3/settings/#add-pump-for-therapy-settings","title":"Add Pump for Therapy Settings","text":"But I don't see Therapy Settings!
Therapy Settings is only accessible in the Settings screen when you have a pump connected to Loop.
If you add an Omnipod (requires RileyLink) or Omnipod DASH up to the Pair Pod
screen and then cancel, Loop will use the common Omnipod details to allow you to modify your Therapy Settings.
If you need to modify Therapy Settings before connecting to a Medtronic pump:
If you want to use Loop in parallel with your current method of dosing insulin.
iOS 15
If you are running an iOS 15 device, this screen is shown in German regardless of the language you choose for Loop. That is an accident that will be fixed by the next release. The English version is shown below.
You can review and modify your preference for Usage Data Sharing as shown in the graphic below:
If you change the check mark, it is immediately modified. Tap on Settings in upper left to return to the main Settings screen.
If you choose to share usage data, it is collected anonymously. The choices are:
The information about the pump section is detailed on several different pages. Follow the links below:
The information about the CGM is found on the Add or Modify CGM page.
"},{"location":"loop-3/settings/#services","title":"Services","text":"The Services section allows additions of other services such Nightscout, Tidepool, Loggly and Amplitude.
Please refer to the Optional: Service page.
"},{"location":"loop-3/settings/#support","title":"Support","text":"The Support section enables the user to provide output data (Loop Report and/or Critical Logs) about the app. This information can be very helpful to folks trying to assist with problem reports.
The graphic below shows the screen provided when you tap on the Support row at the bottom of the Settings screen.
"},{"location":"loop-3/settings/#issue-report","title":"Issue Report
","text":"Tap on the Issue Report
row, on the graphic above, to create a Loop Report text file with a lot of useful information for the mentors or developers if they need to assist you in solving a problem. This covers 84-hours (to enable a full pod history for users of Omnipod or Omnipod DASH). When you tap that row, you'll see a message that the file is loading. That message never goes away but the rest of the page fills in fairly quickly. After that happens, use the up arrow to see various options to save the report.
Issue vs Issue Report
Be aware:
Issue Report
is an action in Loop app to provide information you may need when you ask for help: refer to How to Find HelpIt's a good idea to use the Issue Report
button and save it along with a screenshot if you think you will ask for help. You can always discard these if you resolve the problem on your own.
Pro Tip
The Loop Reports can be saved in the Files section on your iPhone. I have a folder on my phone Files named Loop Reports.
You can upload them to zulipchat from your phone (new feature) using the paperclip in the zulipchat app. (Don't see a paperclip - update your app.)
"},{"location":"loop-3/settings/#submit-bug-report","title":"Submit Bug Report","text":"Tap on the Submit Bug Report
row to bring up one of the two views shown in the graphic below. The left view is if you do not have a github account (or the phone is not signed in to your account). The right view is if your github credentials are available.
In either case, the first action should be to add a term or phrase to the search box (red rectangle) to see if your issue has already been reported and to read the status if it has been reported. Please refer to the GitHub Issues section for more information.
Not for Build or Settings Help
Submit Bug Report should be used when you believe there is an error in the code.
The last row under Support creates a zip (compressed file) with detailed app information over a 7-day period. It is stored in a different format from the Loop Report and provides critical information to the developers when troubleshooting. Once the compressed file is created, you can save it and later share it with the developers if they request it. You can always discard these if you resolve the problem on your own.
Pro Tip
The Critical Logs zip file can be saved in the Files section on your iPhone. I have a folder on my phone Files named Critical Logs.
You can upload them to zulipchat from your phone (new feature) using the paperclip in the zulipchat app. (Don't see a paperclip - update your app.)
"},{"location":"loop-3/settings/#critical-log-format","title":"Critical Log Format","text":"The critical logs use a JSON (JavaScript Object Notation) format.
Each day (in user's local time) has the following files:
The JSON file for each day are zipped into one file for that day and then the zip files are again zipped into a single file that you can save. The current day (up to the current time) is combined with the previous day's data.
The time stamps within the JSON files use UTC.
"},{"location":"loop-3/settings/#app-profile","title":"App Profile","text":"The Profile Expiration is reported at the bottom of the Settings display along with the number of days remaining before Loop stops working.
The link for How to update (LoopDocs)
is provided for build with Mac.
In fine print, the exact date and time of the expiration is reported in your local time zone.
The Profile Expiration is different for GitHub Browser Build method. A feature request is in place (but not yet added to the code) to report the TestFlight expiration for that build method.
"},{"location":"loop-3/therapy-settings/","title":"Therapy Settings","text":""},{"location":"loop-3/therapy-settings/#loop-therapy-settings","title":"Loop Therapy Settings","text":"During Onboarding, all of your therapy settings were entered.
After onboarding, the Therapy Settings screen is reached by going through the Loop Settings screen after a pump has been added.
When building Loop 3 over Loop 2.2.x, the existing values from Loop 2.2.x are kept where possible and presented to the user as the \"default\" value when moving through each screen.
This page provides more details about each of your Therapy Settings.
"},{"location":"loop-3/therapy-settings/#authorization-required","title":"Authorization Required","text":"All the settings configured under Therapy Settings are protected by the same authorization method (FaceID, Fingerprint or Passcode) used to enable the app to issue a manual bolus.
"},{"location":"loop-3/therapy-settings/#details-for-therapy-settings","title":"Details for Therapy Settings","text":"Loop 3 has Guardrails for some Therapy Settings. These are grouped in the Guardrails for Settings section of this page.
New Loopers
New Loopers may prefer settings that show up outside the \"typical\" range.
For example, choosing a Correction Range that is higher than \"typical\" when starting to learn Loop is fine. Once you are comfortable with how the system works, the range can be adjusted if desired - entirely up to you in consulatation with your health care professional.
Therapy Settings are used for automated insulin delivery when Loop is in Closed-Loop mode.
Some screens displayed on this page were acquired during Onboarding.
Loop will deliver basal and recommend bolus insulin only if your glucose is predicted to be above the Glucose Safety Limit for the next three hours.
The graphic below shows the information screen presented during onboarding or when user taps the information icon, \u24d8.
The GIF below shows two screens for Glucose Safety Limit.
If you feel more comfortable with a higher limit, do not let the yellow font influence you. Once you've used Loop for a while, you can revisit this setting.
Note
The value you select for Glucose Safety Limit will dictate the lowest value on the glucose picker that is available for Correction Range and Pre-Meal Range. Those cannot be lower than the Glucose Safety Limit.
Guardrails for Glucose Safety Limit
"},{"location":"loop-3/therapy-settings/#correction-range","title":"Correction Range","text":"Your Correction Range is the glucose value (or range of values) that you want Loop to aim for in adjusting your basal insulin and helping you calculate your boluses.
The graphic below shows the information screen presented during onboarding or when user taps the information icon, \u24d8.
The GIF below shows four screens when first adding and selecting a correction range. The red box indicates where the user taps.
Do not let the yellow font discourage you if you want to have a \"higher than typical\" range to start with. Once you've used Loop for a while, you can revisit this setting.
Guardrails for Correction Range
"},{"location":"loop-3/therapy-settings/#manual-vs-automated-dosing","title":"Manual vs Automated Dosing","text":"Loop estimates future glucose over the next 6 hours (DIA) and, when in closed loop, adjusts insulin dosing. Loop uses or recommends the smallest amount of insulin that will bring you to your target (Correction Range midpoint) over the whole forecast.
If you ask Loop for a manual Bolus recommendation while your current glucose is below the bottom of the correction range and above the glucose safety limit, Loop will recommend a value that should keep your glucose above the safety limit.
Your Pre-Meal Range is used to temporarily lower your glucose target before a meal to impact post-meal glucose spikes.
The graphic below shows the information screen presented during onboarding or when user taps the information icon, \u24d8.
The GIF below shows three screens from various scenarios. The red box indicates where the user taps. If the user chooses to leave Pre-Meal not set, the Pre-Meal icon in the tool bar is disabled. Some users prefer this.
Note
Guardrails for Pre-Meal Range
"},{"location":"loop-3/therapy-settings/#carb-ratios","title":"Carb Ratios","text":"Your Carb Ratio is the number of grams of carbohydrates covered by one unit of insulin.
Guardrails for Carb Ratios
"},{"location":"loop-3/therapy-settings/#basal-rates","title":"Basal Rates","text":"Your Basal Rate of insulin is the number of units per hour that you want to use to cover your background insulin needs.
Guardrails for Basal Rates
"},{"location":"loop-3/therapy-settings/#delivery-limits","title":"Delivery Limits","text":"Delivery Limits are safety guardrails for your insulin delivery.
Save
button activeSave
Maximum Basal Rate is the maximum automatically adjusted basal rate that Loop is allowed to enact to help reach your correction range. Some users choose a value 2, 3, or 4 times their highest scheduled basal rate. Work with your healthcare provider to choose a value that is higher than your highest scheduled basal rate, but as conservative or aggressive as is comfortable.
If the Dosing Strategy is configured to Temp Basal Only, then the maximum basal rate can be used to limit how much extra insulin can be supplied automatically.
Guardrails for Maximum Basal Rate
"},{"location":"loop-3/therapy-settings/#maximum-bolus","title":"Maximum Bolus","text":"Maximum Bolus is the highest bolus amount that you will allow Loop to recommend at one time to cover carbs or bring down high glucose. The value the user selects for Maximum Bolus is also used to set a maximum level of IOB for automated dosing.
If you manually enter a value in the Bolus screen that is greater than the Maximum Bolus setting and press Deliver
, Loop will show a warning message and refuse to bolus that amount.
For safety, don't set a maximum bolus limit any higher than your typical large meal bolus. Many people like to set a value less than 10 U, for example, 9 or 9.9 U, to avoid accidentally typing in a bolus of 10 instead of 1.0 U.
If the Dosing Strategy is configured to Automatic Bolus, then the maximum bolus that is automatically supplied is 40% of the maximum bolus, but this can be applied at 5-minute intervals. Automatic dosing is limited to keep the user's IOB less than two times the Maximum Bolus setting.
Guardrails for Maximum Bolus
"},{"location":"loop-3/therapy-settings/#insulin-sensitivities","title":"Insulin Sensitivities","text":"Your Insulin Sensitivities refer to the drop in glucose expected from one unit of insulin over the full duration of the insulin action time. You may have also seen the term Correction Factor or Insulin Sensitivity Factor (ISF). These are all referring to the same setting.
Guardrails for Insulin Sensitivities
"},{"location":"loop-3/therapy-settings/#guardrails-for-settings","title":"Guardrails for Settings","text":"Loop has guardrails for Therapy Settings.
Experienced Loopers
The guardrails for each therapy setting used by Loop can be modified with Code Customization.
mmol/L
People using mmol/L should avoid the red (the min or max end points) glucose values for their settings. They sometimes cause a crash.
The font color in the value picker has the following meaning:
Mobile Device
Glucose Safety Limit Info
Top value available on the picker limited by lowest of:
Correction Range Info
Bottom value available on the picker limited by highest of:
Pre-Meal Range Info
Bottom value available on the picker limited by highest of:
The maximum bolus is limited by your pump, but it is a good idea to limit it to the maximum you use for a common \"big\" meal. This limits the bolus for a single manual dose.
This setting also limits how much automated dosing is allowed. Loop will not automatically increase the user's IOB above two times the Maximum Bolus. This is true with Dosing Strategy
of Temp Basal Only
or Automatic Bolus
.
Remember, CR goes in the denominator when calculating insulin dose for carbs. So the min - max values in the table below correspond to stronger - weaker values for CR.
Units limit min max limit g/U 2.0 4.0 28.0 150.0"},{"location":"loop-3/therapy-settings/#guardrails-for-insulin-sensitivities","title":"Guardrails for Insulin Sensitivities","text":"Remember, ISF goes in the denominator when calculating insulin dose for a correction. So the min - max values in the table below correspond to stronger - weaker values for ISF.
Units limit min max limit mg/dL/U 10 16 399 500 mmol/L/U 0.6 0.9 22.1 27.8"},{"location":"nightscout/loop-caregiver/","title":"Loop Caregiver","text":""},{"location":"nightscout/loop-caregiver/#the-loop-caregiver-app","title":"The Loop Caregiver App","text":"The Loop Caregiver app is under development to make remote commands easier to implement and monitor.
"},{"location":"nightscout/loop-caregiver/#minimum-requirements","title":"Minimum Requirements:","text":"Older Nightscout Versions
If you ignore this minimum version requirement - what happens:
master
Classic Liquorice
If you use Loop Caregiver, please join Loop Caregiver App Zulipchat stream.
As with all development code, monitor Zulipchat for announcements, report any problems you experience, be prepared to build frequently, and pay attention.
"},{"location":"nightscout/loop-caregiver/#build-the-loop-caregiver-app","title":"Build the Loop Caregiver App","text":"You can build the Loop Caregiver app using the Build with Browser method or the Build with Mac method.
"},{"location":"nightscout/loop-caregiver/#build-with-browser","title":"Build with Browser","text":"The Build with Browser method is documented on the Build Other Apps with Browser page.
"},{"location":"nightscout/loop-caregiver/#build-with-mac","title":"Build with Mac","text":"A build script is available to assist in building Loop Caregiver. This should be straightforward for anyone who has previously built \u00a0Loop 3\u00a0 using the script.
/bin/bash
Copy to Clipboard
when you hover the mouse over it). Once clicked, a confirmation message that says Copied to Clipboard
will appear on your screen. Copy and Paste to start the BuildLoopCaregiver script/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildLoopCaregiver.sh)\"\n
Paste
from the menu Edit => Paste
(i.e. click the Edit
menu at the top of the Mac screen then click Paste
).Read Carefully
The output you see in the Terminal may look very similar to when you build the Loop app from a script.
It is pulling down a clone from a different location (LoopKit/LoopCaregiver
). It uses some modules from Loop
. The target and scheme are automatically selected for Loop Caregiver
and if you follow directions for a paid Developer account, the signing is automatic.
Some limited directions for using the Loop Caregiver app are provided - please also read the Zulipchat stream to stay up-to-date with improvements - especially if you are using a development branch of \u00a0Loop.
"},{"location":"nightscout/loop-caregiver/#add-looper-to-the-loop-caregiver-app","title":"Add Looper to the Loop Caregiver App","text":"You must add a Looper to continue with the Loop Caregiver app as shown in the graphic below.
On the\u00a0Loop\u00a0phone:
Loop -> Settings -> Services -> Nightscout
One-Time-Password
row to see the QR code Pro-tip
Take a screenshot of the QR code and store it on your computer.
You can then add the QR code to Loop Caregiver without bothering your Looper.
On the Loop Caregiver phone:
Settings
API_SECRET
You can add additional more people under settings. (*Loop Caregiver * can monitor more than one Looper).
"},{"location":"nightscout/loop-caregiver/#main-screen-of-the-loop-caregiver-app","title":"Main Screen of the Loop Caregiver App","text":"The Timeline:
Show Prediction
for Timeline is turned off in the graphic below.You can also use the Loop Caregiver -> Settings
screen to modify:
mg/dL
or mmol/L
Show Prediction
is turned off in the graphic above)You issue override, carb, and bolus commands using a toolbar similar to the one seen on\u00a0Loop. In the example graphic above, the carb and bolus entries visible were issued remotely.
Carb and bolus commands each require authorization before they are accepted. The authorization (FaceID, Fingerprint, or passcode) matches that required to unlock the Loop Caregiver 's phone.
The use of Loop Caregiver makes remote commands much easier and more reliable.
Go back and review the details about Remote Commands before using the app.
"},{"location":"nightscout/loop-caregiver/#troubleshooting","title":"Troubleshooting","text":"Troubleshooting steps are found on the Remote Errors page.
"},{"location":"nightscout/new-user/","title":"New Nightscout","text":""},{"location":"nightscout/new-user/#why-nightscout","title":"Why Nightscout?","text":"Nightscout is not required, but is recommended for Loop
Please visit Nightscout: Documentation to read about Nightscout. There are several options, mentioned in that documentation, for setting up your Nightscout site.
Once your Nightscout site is operational and you've read the information about using your site, return to LoopDocs to follow the directions on the LoopDocs: Nightscout with Loop page.
Comments
Most of the free DIY methods provide sufficient storage for a single Loop user, but will require you to delete older data after a year or two of use. The one exception is the Google Cloud method which includes multiple GB of storage.
If there are multiple Loopers in your family and you want to stay in the \"free\" tier, each will need their own site to stay under the monthly usage limitations. That means an account for each user under different email addresses for each user.
\"Free\" sites might potentially stop being \"free\" in the future.
One of the Nightscout as a Service providers will not allow you to put in your own Apple Push Notification variables, you must use theirs. If you have no plans to use remote commands via Nightscout, this will not affect you. If you decide to use remote commands, you may need to switch to a different service or get Loop through that same provider for an extra monthly fee.
"},{"location":"nightscout/new-user/#configure-nightscout-to-use-with-loop","title":"Configure Nightscout to use with Loop","text":"There are a few Loop-specific variables you should configure to get the most out of your Nightscout site. Follow the instructions on the LoopDocs: Nightscout with Loop page.
"},{"location":"nightscout/new-user/#add-nightscout-to-loop","title":"Add Nightscout to Loop","text":"Once you finish setting up your new Nightscout site, don't forget to enter your website URL and API_SECRET into your Loop settings, LoopDocs: Services - Nightscout. This way Loop will have access to your Nightscout site to upload all the wonderful data.
"},{"location":"nightscout/new-user/#nightscout-troubleshooting","title":"Nightscout Troubleshooting","text":"If your Nightscout site is not showing CGM (and Loop, if you are Looping) data within about 10 minutes of finishing your setup, then please follow the steps on the Nightscout: Troubleshooting page.
"},{"location":"nightscout/ns-crossref/","title":"Nightscout Cross Ref","text":""},{"location":"nightscout/ns-crossref/#nightscout-documentation","title":"Nightscout Documentation","text":"A number of pages that used to be in LoopDocs have been moved to the Nightscout documentation. To prevent duplication and inconsistency, those pages have been removed from LoopDocs. A cross-reference to the Nightscout pages is provided below.
While the Loop app sends notifications locally on the Loop user's iPhone, parents and caregivers may want those messages on their phones, too. We can achieve this functionality through a combination of Nightscout, IFTTT, Google, and Pushover.
Loop Follow was created by Jon Fawcett who took ideas from multiple other apps to create a single app to assist in his caregiving role. It is popular with Loopers who like the display and notifications as well as Loop caregivers. It can work with just the Dexcom Share credentials and/or the Nightscout URL and allows for easy customization of alerts and alarms. Jon handed over maintenance of this app to the Loop and Learn team.
LoopDocs had a page specifically about the Pebble Watchface called SkyLoop Predict
, which is no longer being supported. The Nightscout Documentation provides information about many methods for displaying your Nightscout data on a variety of wearable devices.
Nightscout offers some fantastic data-crunching report tools.
Nightscout is an excellent tool for remotely viewing Loop actions. Nightscout can act as a stand-alone tool or be integrated with Loop. (Nightscout also integrates with other open-source hybrid closed loop systems such as OpenAPS, AndroidAPS and iAPS. LoopDocs focuses on Loop.)
When integrated with Loop, Nightscout provides monitoring of Loop activities such as viewing history of glucose, carbs, boluses, temp basals and overrides; troubleshooting Loop errors; and provides extensive reports for analyzing data trends and patterns. These reports assist when Loop Therapy Settings need to be adjusted.
For caregivers, Nightscout enables remote monitoring and even the ability to issue remote commands through Nightscout when both Loop and Nightscout are properly configured. There are several pages starting at LoopDocs: Remote Overview that provide documentation on this feature. If you are a caregiver, this summary of remote capabilities may encourage you to look into Nightscout.
Remote Commands
If you plan to use remote commanding with Nightscout, please read these links with additional information:
Nightscout is useful for many who use Loop. Adults who take care of themselves find the reports and analysis methods from Nightscout provide effective tools to monitor their settings and provide reports for their health care provider. It also stores Loop configurations so they can be reviewed. With Loop 3, the saved Nightscout profiles can be downloaded to a new Loop installation or a new phone for quick onboarding, should you ever need to start fresh.
Setting up a Nightscout site is described in a separate web site: Nightscout: Documentation.
There are Nightscout apps in your iPhone App Store that allow you to view the Nightscout site after you've configured it, or you can use a web browser to view the data. The app alone is not enough - you need to follow the steps to configure your own Nightscout site and obtain your specific Nightscout URL.
There used to be a lot of Nightscout information found only in LoopDocs, but that was transferred and subsequently updated in Nightscout: Documentation. The information that remains in LoopDocs about Nightscout is Loop specific. So you may be jumping back and forth between the two sets of documents.
This page provides a general discussion about the Nightscout display, as well as some Loop-specific display information. Over time, interactions between Loop and Nightscout were improved. The information on this page has been updated for Loop 3 and Nightscout version 14.2.6 (or later). Older versions may exhibit some differences in the display of Loop information on the Nightscout site.
"},{"location":"nightscout/overview/#loop-uploads-to-nightscout","title":"Loop Uploads to Nightscout","text":"The Nightscout display updates when the Loop phone is connected to the internet via WiFi or cellular service. When the uploads stop, the Loop pill becomes \"stale\" (cannot open it) after 15 minutes.
Pills are the little information boxes. They are Nightscout: Plugins that must be enabled with configuration variables and then the display for each pill can be turned on or off within your Nightscout site.
If upload to Nightscout is interrupted, Loop 3 stores up to 7 days of Nightscout information in a local buffer on the phone, and will attempt to upload later when access is restored. Once access is restored, a stale Loop Pill may require 15 minutes before it will open to display additional Loop information.
The Carb pill on the Nightscout site is populated by Loop when Loop is actively uploading to Nightscout - but it may lag the value displayed in the Loop pill by one loop cycle and it will display 0 COB within 5 to 10 minutes if the upload is interrupted. In other words, if the COB pill shows 0 unexpectedly and Loop pill is active, you can believe the value shown in the Loop pill.
"},{"location":"nightscout/overview/#loop-2-red-loop-warning","title":"Loop 2 Red Loop Warning","text":"With Loop 2.2.9 and earlier versions, when a Nightscout site is selected in Loop Services and is unable to upload messages to that site, Loop keeps trying to upload the buffer of stored messages. This could lead to sluggish behavior in Loop or even cause a \u00a0Red Loop. This can happen if the Nightscout site is not accessible (no WiFi or cellular coverage) or if the database is full and not accepting messages.
Step 1: Remove Nightscout URL from Loop Services
Step 2: Figure out why the Nightscout site is not accepting uploads from Loop and fix that problem.
Step 3: Add Nightscout URL to Loop Services
Note - the method used by Loop 3 is not subject to this same problem.
Do you want to know more? (Click to open)For those who want to know more:
There is a big architectural change between Loop 2 and Loop 3 for remote data services like Nightscout.
It used to be that Loop would keep trying to upload data to Nightscout. If a site could not be reached or would not accept data, that could cause large backlogs. Loop 2 could slow down by trying to keep uploading the backlog. The new system does not allow for this. Uploaders individually keep track of where they are in the upload stream via a lightweight \u201cquery handle\u201d, and if the data in Loop data store expires before upload, that data will be missing in Nightscout.
Loop 3 saves 7 days of information in the data store.
"},{"location":"nightscout/overview/#nightscout-dashboard","title":"Nightscout Dashboard","text":""},{"location":"nightscout/overview/#blood-glucose","title":"Blood Glucose","text":"Glucose readings from the CGM are shown in green, yellow, or red in the main Dashboard of Nightscout. (The graphic above was generated with Colors enabled in Nightscout; there are other display options.) You can adjust your high and low glucose alarm thresholds in Nightscout by modifying configuration variables. This is optional - defaults are provided if you do not set them. The alarm thresholds affect the color of the displayed CGM data points and, if enabled, determine when an audible and visible alarm sounds. The Nightscout alarm thresholds will not affect Loop performance. Loop only uses the glucose correction ranges in the Loop app settings.
The main dashboard (upper section) for Nightscout displays the time duration you have selected (in the example above, 12 hours). The bottom of the screen shows the last 48-hours of glucose trends. You can scan backward by dragging the bottom timeline to the left, if you want to review specific Loop actions or data in the last two days.
"},{"location":"nightscout/overview/#sage-cage-bage","title":"SAGE, CAGE, BAGE","text":"The SAGE, CAGE, and BAGE pills are for Sensor Age, Cannula Age, and (pump) Battery Age. These optional pills track the time since your CGM sensor, Pump site, and Pump battery were last changed. You can set up custom alerts to remind you when it is time to change the devices, or simply use the visuals to keep track of your particular timing for site/sensor changes. When these items do not auto-upload, you can use the Nightscout Careportal to input the changes.
Carbs are automatically uploaded to Nightscout by the Loop app. The amount of carbs on board (active carbs or COB) can be seen by clicking the Loop pill. The size of a white carb dot on the graph is proportional to the amount of carbs entered...bigger meals get bigger dots. Loop does not read carbs from Nightscout for use in looping calculations, it only uploads carbs to Nightscout that have been entered in the Loop app.
"},{"location":"nightscout/overview/#boluses","title":"Boluses","text":"Insulin boluses are automatically uploaded to Nightscout by the Loop app. The bolus is shown as a filled-in blue lower-half of the dot, and the specific amount of the bolus is also shown. There may be a separation between the bolus and the carb entry, especially if the user preboluses a meal.
The bolus is uploaded to Nightscout as soon as it starts and Insulin on board (active insulin or IOB) is updated in the Loop pill. Should the bolus be interrupted, the Nightscout information is updated when the Loop information updates (assuming internet access is active).
"},{"location":"nightscout/overview/#temp-basals","title":"Temp Basals","text":"Your current basal profile is automatically updated to Nightscout whenever it is changed by Loop. The dashed blue line represents the scheduled basal profile. The solid blue lines indicate the actual basal amounts set for a given time...so as Loop sets temp basals higher or lower than your scheduled basal rate. If the graph and Loop pill do not agree, you should believe the Loop pill.
"},{"location":"nightscout/overview/#predicted-glucose","title":"Predicted Glucose","text":"The purple line to the right of the glucose is Loop predicted glucose. Watching the behavior of that purple line can help you understand why Loop is making decisions regarding high or low temps. You can read more on that topic in the LoopDocs: Algorithm section of these docs. If you don't see the prediction (and all other Nightscout and Loop settings are configured), tap on the 3 dots to the right of the 24 to reveal the choice to display AR2 prediction or Loop prediction. Adjust the check boxes to show just the Loop prediction.
"},{"location":"nightscout/overview/#loop-pill","title":"Loop Pill","text":"The Loop pill is the little display box which, when hovered over or clicked, will provide additional information about recent Loop activities and status. Information included is the last time Loop ran, the temp basal set, IOB, and COB. Looking at the Loop pill is a quick method for assessing if your loop is currently active, as well.
Loop Pill status indicator symbols
X Error in Loop
\u03d5 Recommending basal or bolus, but not enacting (open loop or pump suspended)
\u2301 Enacted a new temp basal
\u21bb Loop is continuing with last temp basal, no change
\u26a0 Warning indicating Loop is either red or has failed to upload to Nightscout for a longer period of time.
Mouse over or touch the Loop pill to view a tooltip containing one or more of the latest status messages. The most up-to-date Nightscout also includes information in the Loop pill for the minimum and maximum predicted glucose, eventual and predicted glucose.
"},{"location":"nightscout/remote-commands/","title":"Remote Commands","text":""},{"location":"nightscout/remote-commands/#requirements","title":"Requirements","text":"All remote commands require the configuration steps from Remote Configuration.
Do I have to use Loop Caregiver ?
There are a number of methods for using remote commands.
Things everyone needs to know are covered on this page, so you should read it regardless of how you plan to issue remote commands.
If you decide on Loop Caregiver , review both this page and \u00a0Loop Caregiver page.
"},{"location":"nightscout/remote-commands/#qr-code","title":"QR Code","text":"On the\u00a0Loop\u00a0phone, Nightscout must be included under the Loop
-> Settings -> Services section. Navigate to Services and select Nightscout. Tap on the One-Time Password row to view the QR code.
When you need to configure your authentication method, you can either use a saved QR screenshot or scan the QR on the\u00a0Loop\u00a0phone.
Options:
While you are on the Settings -> Services -> NightScout screen, notice that the 6-digit number on the One-Time Password row updates every 30 seconds.
"},{"location":"nightscout/remote-commands/#set-up-an-authentication-app","title":"Set up an Authentication App","text":"You need to set up an authentication app to generate one-time-passwords for remote bolus and carbs.
One of the nice features of Loop Caregiver is that it handles the one-time password (OTP) requirements for you.
But even if you choose to use Loop Caregiver , you should configure an authentication app for cases where you don't have access to your Loop Caregiver phone.
There are several authentication apps that support one-time passwords.
"},{"location":"nightscout/remote-commands/#apple-keychain","title":"Apple Keychain","text":"If you are using an iPhone or a Mac to issue remote commands through a browser or Nightscout app, you can use the \u00a0Apple Keychain\u00a0 which has native support to store passwords and generate one-time passwords.
To set up your Nightscout credentials in \u00a0Apple Keychain:
On the Caregivers device (iPhone or Mac):
Tap the + Button up top to add a new Password
You will enter your Nightscout credentials
Verification Code
Autofill Passwords
and check Keychain
There are other Authentication apps available. Here are a few options that you can download from your phone\u2019s app store:
If I have multiple Nightscout sites because I support multiple people with T1D looping, do I need multiple APNs Keys? Answer: No. If you support multiple people, you can use the one APNs key in each of their Nightscout sites.
How can I tell if it worked? Answer: You should see your override pill in Nightscout, with the NEXT Loop\u00a0cycle, reflecting that the desired remote action took place. If you are near the\u00a0Loop\u00a0phone, you should see the new override within less than 30 seconds or so.
Don't forget to read Loopdocs: Overrides.
For remote overrides in particular:
Can I set a different override in Nighscout than I have programmed into\u00a0Loop\u00a0app? Answer: No. You will only be able to enact override presets already programmed into the Loop app.
If I didn't start the override in Nightscout (it was started in\u00a0Loop\u00a0itself), can I still use Nightscout to cancel it? Answer: Yes. You can cancel an override set in\u00a0Loop\u00a0with a Nightscout-set cancel \"temporary override\" command in the careportal.
Can I replace an override set in\u00a0Loop\u00a0with an override set in Nightscout? Answer: Yes.
Can I see on Nightscout when a temporary override has been set using the looper\u2019s phone? Answer: Yes. There will be a grey bar with the name of the override noted and the Loop pill will display the targets and duration. Remember, there is a KNOWN issue with the grey bars, so use the pill as your best guide.
Can a looper cancel a remote override? Answer: Yes. They can tap the heart icon in\u00a0Loop\u00a0so that it is no longer highlighted. This turns off the override, regardless of where it was initiated.
I set a remote override in Nightscout but the Looper tapped the heart symbol in the Loop app, so the override turned off. Will the override get reinstated the next time\u00a0Loop\u00a0completes with internet access? Answer: No. The APN is only sent once. You can set the remote override again if need be.
Can I schedule a remote override ahead of time using Nightscout? Answer: No. When you set a remote override in Nightscout, it starts immediately and lasts for the duration programmed for that override in the Loop app. You can only set an override in advance using the Loop app.
Remote Commands to deliver a bolus or add a carb entry require a \u00a0One Time Passcode\u00a0 (OTP).
Minimum Versions: Loop 3\u00a0 and \u00a0Nightscout 14.2.6
If your Nightscout version does not meet that minimum requirement, remote commands might be accepted but if they are, the time for the commands is always the current time. In other words, Carbs in the Past or Future might be accepted, but would be entered at the current time on the\u00a0loop\u00a0phone.
"},{"location":"nightscout/remote-commands/#warnings-on-remote-commands","title":"Warnings on Remote Commands","text":"Duplicate Delivery Risk
We want to highlight a very important risk before you get started.
For safety, always assume a previous remote carbs/bolus was delivered. For motivation think of the following example:
You can see the danger of sending duplicate bolus/carbs so be careful. If a remote bolus/carb entry doesn\u2019t show in Nightscout, use your own judgment on whether enough time has passed to try again.
"},{"location":"nightscout/remote-commands/#remote-bolus-then-remote-carb","title":"Remote Bolus, Then Remote Carb","text":"If sending both, choose Bolus then Carbs
If you plan to send a carb command remotely and later decide to issue a bolus command - STOP and consider.
There are 2 scenarios of concern that could lead to too much insulin:
Typically, sending a remote carb entry alone is sufficient for\u00a0Loop\u00a0to know about the carbs and begin to dose for them.
If you really want to both bolus for carbs and enter carbs, then do it in that order.
\u2757\ufe0f Remember - you should pause at least 60 seconds between remote commands or the One-Time-Password (OTP) will be rejected as having already been used.
"},{"location":"nightscout/remote-commands/#use-unique-times-for-remote-carbohydrate-entries","title":"Use Unique Times for Remote Carbohydrate Entries","text":"Use unique times for remote carbohydrate entries
Instead of adding a second remote carbohydrate entry at an identical time, add one minute to the second entry.
This ensures that Nightscout keeps both entries.
Any Caregiver entering remote carbohydrates needs to be aware of how Nightscout decides what carbohydrates treatments are unique. If two entries have the same hour:minute:second time, Nightscout keeps only one of the entries.
One example scenario:
Second example scenario:
The LoopCaregiver app was recently modified to use the seconds from when the new entry was created, instead of using hour:minute:00. This change makes it less likely that two entries with the same timestamp will collide. (One chance in 60.)
Any remote carbohydrate entry from the Nightscout careportal using the same hour:minute time, however, will be entered with 0 seconds.
For more information, see:
There are four ways you can trigger your commands remotely; \u00a0Loop Caregiver (link takes you to a new page), Nightscout Careportal, Shortcuts, and IFTTT.
"},{"location":"nightscout/remote-commands/#loop-caregiver","title":"Loop Caregiver","text":"Click the link above to read more about Loop Caregiver .
"},{"location":"nightscout/remote-commands/#nightscout-careportal","title":"Nightscout Careportal","text":"To use remote commands in the \u00a0Careportal, you must configure Nightscout site according to the directions here in \u00a0Loopdocs\u00a0 in addition to setting up the Remote Configuration.
Pay particular attention to these entries in the ENABLE
line: override
careportal
Loop
. The order of the words in the ENABLE
line is not important.
You'll also need to have your site authenticated so that your \u00a0Careportal\u00a0 is active to send remote overrides .
Once authenticated by entering your API_SECRET
, there is a plus sign () in the upper right corner of your site. That is your Careportal. Tap the Careportal plus sign () and then scroll down in the event type
menu to find Temporary Override
. Within there, you will find all your\u00a0Loop\u00a0override presets already loaded for you.
The Looper will see a banner notification that a remote command has been sent with details about that command and whether it succeeded (or not).
Canceling an override through Nightscout careportal is as simple as selecting the event type Temporary Override Cancel
and submitting.
Open your Nightscout site in a browser or app.
event type
dropdown menu to find Remote Carb Entry
or Remote Bolus Entry
Note that Loop will honor both the current OTP code and the one that just expired.
If the Looper is with you, you can see the notification on their phone. You can see the entry on the\u00a0Loop\u00a0carbohydrate or the insulin displays to see if it went through.
If the Looper is not with you, you should see the result in the Nightscout dashboard within 5 minutes.
"},{"location":"nightscout/remote-commands/#shortcuts","title":"Shortcuts","text":"If you want to make your life SUPER AMAZING, check out using the iPhone's Shortcuts app. The Shortcuts app is for making little automations (like mini apps) that can integrate parts of your life. In this case, we've written a couple of shortcuts for you that integrate\u00a0Loop\u00a0overrides with Nightscout.
Important Note
Before you click on the download file below...save yourself some trouble.
Click these links on your iPhone and you'll be prompted to download the premade shortcuts (assuming you open the links in Safari browser on iPhone):
Comprehensive\u00a0Loop\u00a0Shortcut includes Set Remote Override, Cancel Override, Loop Troubleshooting Tips, Quick Text options, Manual BG entry, Bookmarks to websites, etc.
And if you want to save one click to get to these one functions more directly: these shortcuts are simplified to offer only one function:
Set Remote Override only shortcut
Cancel Override\u00a0 only shortcut
A couple notes about these shortcuts:
You need to open those links in the Safari browser on your iPhone. A confirmation will show to initiate the download.
After the download finishes, tap the button marked AA
near your Safari address bar and tap Downloads
(downloads) to find and open the downloaded Shortcut.
Wait a bit, and the shortcut's inner guts will be there...scroll ALL the way down to the bottom to click the button to save the untrusted shortcut
URL
field\u00a0 of the\u00a0Loop\u00a0shortcut setup, make sure you don't include a \u00a0trailing /
, or the API calls to Heroku will error out.ok
message displayed. If there is an error, you'll see an error message. Most errors will be that you have an API_SECRET
wrong (make sure there isn't a space at the end of your API_SECRET
that you don't see) or you failed to do the steps to setup Nightscout and update your\u00a0Loop\u00a0app as described in steps 1-3 above.If you want to walk uphill both ways in the snow carrying bags of uneven groceries, you can also set overrides remotely by using If This, Then That (IFTTT) integration. By using IFTTT, you can have single button presses on your phone that will set an override, log a cannula change, log a sensor change and much more.
Page Summary
Apple Push Notifications service (APNs)
You can use the Nightscout site to remotely set and cancel override presets remotely in the Loop app.
With \u00a0Loop 3, you can also send remote commands to add carbs and command a bolus. Remote bolus/carb commands have a minimum requirement of \u00a0Nightscout 14.2.6. If your Looper's Nightscout version does not meet that minimum requirement, remote commands might be accepted, but the time for the commands is always the current time. In other words, Carbs in the Past or Future might be accepted, but would be entered at the current time on the\u00a0Loop\u00a0phone.
After you complete the configuration, read the entire Remote Commands page - pay attention to the warnings and caveats. Test this while your Looper is sitting next to you so you can watch their phone.
Remote Nightscout Interface Caveats
Loop remote carbs/bolus
row: subscription refers to a monthly feeThere are several options to pay for a turn-key Nightscout service.
The rest of this page assumes that you built your Loop app and you have full access to the configuration variables for your Nightscout site.
"},{"location":"nightscout/remote-config/#step-1-update-the-loopers-iphone-settings","title":"Step 1: Update the Looper's iPhone settings","text":"For remote commands to successfully deploy to a Looper's iPhone when the phone is locked, they must have Background App Refresh enabled.
iPhone -> Settings -> General -> Background App Refresh -> Loop
must be enabledConsequence if Looper's phone is not configured correctly:
Keep Notifications Turned on for Looper's Phone
Typically, the Looper's phone has Notifications enabled for \u00a0Loop. In fact, if they don't, a red warning bar is prominently displayed.
There may be times when you really need\u00a0Loop\u00a0to be quiet, so you can turn off Notifications. The remote commands still go through but the Looper does not see a notification that this happened.
Best practice is to keep\u00a0Loop\u00a0Notifications enabled.
"},{"location":"nightscout/remote-config/#step-2-apple-push-notifications","title":"Step 2: Apple Push Notifications","text":"The step is required for the Loop app to give permissions to your Nightscout site to remotely interact with it. To enable this, you need to create a key and grant it access to the \u00a0Apple Push Notification Service (APNS).
Reminder
This only works with the paid Apple Developer ID.
Keys
section under Apple Developer's Certificates, Identifiers & Profiles
and login with the Apple ID associated with your developer team that you used to build the Loop app.Keys
(located in the left-hand column). Create a new key
button OR the plus button () to add a new key. Apple Push Notifications service (APNs)
Nightscout
(you can name it however you want, just make sure you know what the key is for by the name you choose).Continue
button in the upper right of the screen. Register
button. Download
button. This step will download a file with a name that starts with AuthKey
and ends with .p8
. AuthKey
downloaded file in your downloads folder. Double-click to open it and you will be presented a message asking how you'd like to open it. The graphic and instructions below are for a Mac. Make sure your editor does not change any characters in your APN key; use a text-only editor like NotePad (PC) or TextEdit (Mac). Click on Choose Application...
and then select TextEdit
as your application to open it with.
When the file opens, it will look similar to the screenshot below. In a few minutes, after we do a few other steps first, we will need to highlight ALL OF THE CONTENTS of that file and copy it because we will be pasting it in Heroku or whichever Nightscout provider you are using. Yes, allllll of the contents. So, the easiest way is to:
You don't have to do it right now...just keep that window open in the background for now until we need it a little further down. Then we will copy all that text.
You'll need to make sure your Nightscout site version is version 13.0.1
or newer for remote overrides and version 14.2.6
or newer for access to all the remote command features.
What is my Nightscout Version Number?
To find your Nightscout version number:
\u2630
) the hamburger button (3 horizontal lines stacked on each other) at the upper right, near the authentication button.About
section after the Settings
section, (below the Save
button).This link should be used if you want to Nightscout: Update your Nightscout site.
Note for Google Cloud Users
The Nightscout with Google Cloud instructions include information about updating your site. Scroll down to the line (on that page) that says Update Nightscout
.
In order to use remote overrides, you must add a couple of new variables. If you don't know how to update your Nightscout configuration, review Nightscout: Setup Variables and then come back.
The instructions in this section show Heroku images. If you are using a different method, you should be able to \"translate\" the steps.
Go to the Settings
tab near the top of the screen on your Heroku app and then click on Reveal Config Vars
.
Scroll down the bottom of the Config Vars
lines until you find the last blank one. You are going to add three new rows of config vars for remote overrides as shown below:
LOOP_APNS_KEY
Enter the ENTIRE contents of the downloaded .p8
file including the BEGIN
and END
lines. Here's where you can use the Cmd+A and Cmd+C to highlight and copy all the text in that file so you can paste it into Heroku here for this new variable you are creating. LOOP_APNS_KEY_ID
String of characters on the .p8
download file immediately following the underscore (_
) and not including the file extension (.p8
), or you can get it from your saved key in your developer account as shown next step, too. This is a part of the downloaded filename located after the underscore (_
) and before the file extension (.p8
). LOOP_DEVELOPER_TEAM_ID
Get this value from the Loop app signing or in your \u00a0Apple Developer\u00a0 account's top right corner under your name LOOP_PUSH_SERVER_ENVIRONMENT
(optional) Set this to production
if you installed\u00a0Loop\u00a0remotely such as with TestFlight, Diawi, AppCenter, or an IPA. If you built directly to your phone in XCode with your phone plugged into to your computer, do not include this variable."},{"location":"nightscout/remote-config/#remote-build-config-var-requirement","title":"Remote Build Config Var Requirement","text":"That last row of the table above is needed if you are using a remote build option such as LoopDocs: GitHub Build Actions or downloaded an archived file via Loop and Learn: Remote Build with Diawi. If you later return to a direct Xcode build to your phone, you must remove that config var or remote commands will not work.
When executed properly, you should have something that looks like this for the three (or four) new variables that you added:
"},{"location":"nightscout/remote-config/#baddevicetoken","title":"BadDeviceToken","text":"When the Nightscout config var LOOP_PUSH_SERVER_ENVIRONMENT does not match the Loop app build method; the error message contains the phrase APNs delivery failed: BadDeviceToken
.
LOOP_PUSH_SERVER_ENVIRONMENT
set to production
LOOP_PUSH_SERVER_ENVIRONMENT
as one of your Nightscout config varsAPI Key vs APN Key
If you build with the Build with Browser, you may notice \u00a0the \u00a0Application Programming Interface (API)\u00a0 key\u00a0 has the same type of format as \u00a0the \u00a0Apple Push Notification (APN)\u00a0 key. The keys for both purposes are of type p8
, but should not be confused.
The Secrets for building with GitHub use the API Key.
The config vars for Nightscout use the APN Key.
LOOP_PUSH_SERVER_ENVIRONMENT
with a value of production
to your Nightscout site or the remote commands will not work.LOOP_PUSH_SERVER_ENVIRONMENT
entered - remove it if it is present.If remote overrides do not function, remote commands for delivering a bolus or adding a carb entry will not work either.
After you finish setting up your Nightscout site:
This section is for people who were using remote commands and they suddenly stopped working.
If you are using LoopCaregiver, try the remote command directly from Nightscout to see if they work there. If they are not working there as well, check out your account status first before attempting the fixes on the rest of this page.
Ensure your Nightscout version is at least version 14.2.6.
Verify that you performed all the Remote Configuration steps for the Nightscout site including sending an override from the\u00a0Loop\u00a0phone to Nightscout.
"},{"location":"nightscout/remote-errors/#baddevicetoken","title":"BadDeviceToken","text":"When the Nightscout config var LOOP_PUSH_SERVER_ENVIRONMENT does not match the\u00a0Loop\u00a0app build method; the error message contains the phrase APNs delivery failed: BadDeviceToken
.
LOOP_PUSH_SERVER_ENVIRONMENT
set to production
LOOP_PUSH_SERVER_ENVIRONMENT
as one of your Nightscout config varsIf you attempt to issue a command from Nightscout Careportal; after you hit submit and then OK, you will see the error message:
Error: APNs delivery failed: BadDeviceToken\n
If you attempt to issue a command using Loop Caregiver ; after you authenticate the command, you will see the error message listed below and shown in the screenshot.
HTTP Error\nStatus Code: 500\nbody: APNs delivery failed: BadDeviceToken\n
"},{"location":"nightscout/remote-errors/#loop-remote_overrides_disabled","title":"Loop REMOTE_OVERRIDES_DISABLED
","text":"You can build Loop with Build-Time Features as part of code customization.
If you added this Build-Time Flag: REMOTE_OVERRIDES_DISABLED
You will not see any errors, but nothing will happen when you issue any kind of remote command.
Solution: Remove REMOTE_OVERRIDES_DISABLED
from LoopConfigOverride.xcconfig
file and rebuild the\u00a0Loop\u00a0app.
The references to Caregiver below is the person sending the commands. There are specific Loop Caregiver app insructions that you modify for your authenticator. You must have the\u00a0Loop\u00a0phone with you to troubleshoot this problem.
Reload
Apple Push Notifications will often not make it to an app, either due to your settings or intentional limitations by Apple. This error can appear in various forms:
While\u00a0Loop\u00a0does not have control over Push Notification timely delivery, there are things that can be done to mitigate these issues. Note that rebuilding\u00a0Loop, Loop Caregiver or Nightscout is generally not going to help.
Check these settings on the Looper\u2019s device, not the Caregivers. Several of these are related to Apple suppressing notifications.
Some other things to try on the Looper\u2019s phone:
This is helpful information to share when requested by helpers. If you are not using Loop Caregiver, review the response seen on the Nightscout site.
Mention which troubleshooting steps you have completed so we know whether to ask about these again.
"},{"location":"nightscout/remote-errors/#other-errors","title":"Other Errors","text":"Once you've set up remote commands, you may encounter errors when trying to run them via Nightscout or iOS Shortcuts. Below are the most common and typical solutions.
Error: Loop notification failed: Could not find deviceToken in loopSettings
You might see this in either Nightscout or Shortcuts. The error is most commonly caused by\u00a0Loop\u00a0not pointing to the right Nightscout instance or you haven't yet run an override locally (with the\u00a0Loop app) before trying to run one remotely. Solution: Confirm the Loop app is pointing to the right Nightscout site (and there are no extra spaces or a slash (/
) at the end, and always run an override for a few seconds in the Loop app before you try to run one remotely.Error: cannot POST/api/v2/notifications/loop
You might see this in iOS Shortcuts. This means Nightscout is not updated correctly and you are running a version of Nightscout that doesn't yet support remote overrides. Solution: Follow the Remote Configuration documentation.Error: {\u201cstatus\u201d:401,\u201dmessage\u201d:\u201dUnauthorized\u201d,\u201ddescription\u201d:Invalid\\\\/Missing\u201d}
You might see this in iOS Shortcuts. This is caused by having an incorrect API_SECRET
in the shortcut. Solution: Double check the API_SECRET
is correct and that there are no spaces at the end.Error: APNs delivery failed: InvalidProviderToken
You might see this in either Nightscout or Shortcuts. This is caused because your LOOP_APNS_KEY_ID
and LOOP_DEVELOPER_TEAM_ID
are swapped in Heroku. Solution: Double check what's listed in your Apple Developer Account and compare it to the config variables in Heroku. Your Team_ID
is next to your name in the top right corner. The other code is your Key_ID
. Get the IDs in the correct location in Heroku to resolve the error.With\u00a0Loop\u00a03, a caregiver can provide remote commands to assist in diabetes care, including modifying overrides, issuing remote bolus commands and adding remote carb entries. With\u00a0Loop\u00a02, only overrides can be turned on or off remotely.
Remote commands to the\u00a0Loop\u00a0phone go through their Nightscout site. For security, any command to deliver a bolus or add a carb entry requires a one-time-password (OTP) to be used with each remote command. These codes are unique to your combined\u00a0Loop\u00a0and Nightscout configuration. An authentication app needs to be installed on the device sending the remote boluses/carbs. The Loop Caregiver app can be used. It handles authentication requirements and offers a\u00a0Loop\u00a0-like user interface.
"},{"location":"nightscout/remote-overview/#remote-commanding-requirements","title":"Remote Commanding Requirements:","text":"What about Older Versions?
Caregivers for those using older versions of Loop can modify Overrides
remotely but cannot send remote bolus or carb commands.
If your Nightscout site is an older version, you should limit your remote commands to Overrides
, even with \u00a0Loop 3.
Loop Caregiver
There is a new companion app, \u00a0Loop Caregiver that makes remote commands and reviewing the status of your looper much easier.
"},{"location":"nightscout/remote-overview/#how-does-this-work","title":"How does this work?","text":"Loop\u00a0and Nightscout work using \u00a0Apple Push Notifications\u00a0 (APN).
Nightscout as a service
or Hosted Nightscout
will assist you, if needed, in getting your APN information added to your Nightscout variablesLoop remote carbs/bolus
row: subscription refers to a monthly feeUse unique times for remote carbohydrate entries
Instead of adding a second remote carbohydrate entry at an identical time, add one minute to the second entry.
This ensures that Nightscout keeps both entries.
For more information, see:
There are several steps to follow to set this up. Each page is linked below:
"},{"location":"nightscout/remote-overview/#set-up-remote-for-nightscout","title":"Set Up Remote for Nightscout","text":""},{"location":"nightscout/remote-overview/#using-remote-commands","title":"Using Remote Commands","text":""},{"location":"nightscout/remote-overview/#remote-errors","title":"Remote Errors","text":""},{"location":"nightscout/remote-overview/#loop-caregiver-app","title":"Loop Caregiver App","text":""},{"location":"nightscout/troubleshoot/","title":"Nightscout Troubleshooting","text":""},{"location":"nightscout/troubleshoot/#setup-troubleshooting","title":"Setup Troubleshooting","text":"If you have just tried to set up your Nightscout site and have problems with seeing all your data, please check out the Nightscout: Troubleshooting page.
"},{"location":"nightscout/troubleshoot/#dexcom-data-not-showing","title":"Dexcom data not showing","text":"If you use a Dexcom and get your CGM data into Nightscout using Dexcom Share (bridge in Nightscout) and everything is working but the Dexcom data stops showing, please review Nightscout: Dexcom bridge Troubleshooting.
As part of that troubleshooting, you may need to remove the Nightscout service credentials from Loop. You may need to remove Dexcom credentials from all third-party apps that get data from Dexcom Share. Be sure to add them back after the CGM data to Nightscout is restored.
You do not need to use Share or bridge with Nightscout. You can choose to have Loop update your CGM readings to Nightscout directly. There's a check box in the Loop CGM setting screen to select this. You must select that check box every time you update your transmitter for Dexcom G5 or G6.
"},{"location":"nightscout/troubleshoot/#loop-data-not-showing","title":"Loop data not showing","text":"If your BG data is showing, but Loop data is not (like Loop pill is empty and carbs and boluses are not showing), please delete your Nightscout account in Loop settings area. Enter the information in Loop again. Make sure to use https://
to start the site URL. Make sure there is no trailing slash at the end of the URL. Enter your API_SECRET correctly. Make sure you have loop
on the ENABLE line in Heroku settings.
Many people may already have an existing Nightscout site setup from before adding Loop to their management strategies. In order to make the most of your Looping setup, you will need to modify your existing Nightscout site a bit specifically for Loop. The process is pretty easy and should not take long.
The graphics on this page are from a Heroku implementation for DIY Nightscout. When you read the Nightscout documents, you'll notice there are a lot more options than just Heroku. When Heroku announced that the \"free\" tier for Heroku would be disabled in November 2022, the #WeAreNotWaiting community developed a lot of options - both free DIY, nominal cost DIY and there were already several companies that provide Nightscout as a service. If your site is not with Heroku, you need to translate how to adjust the configuration variables.
"},{"location":"nightscout/update-user/#variables-for-loopers","title":"Variables for Loopers","text":"Once you have created a Nightscout site, there are some Nightscout Config Vars specific to Loop.
First the Config Vars need to be added to the Nightscout site.
For each instance of viewing the Nightscout site (i.e., on broswer or phone app), you can individually select which of those configured items are displayed. This is on a per-view basis. However, Config Vars like the SHOW_PLUGINS
line allow you to preconfigure what will be shown by default.
These instructions are for people using Heroku, because that is the most common choice. If your Nightscout site is not on Heroku, this page provides a guide for the Config Vars used by Loop.
Login to your Heroku account, select the Settings
tab near the top of the screen on your Heroku app.
Click on Reveal Config Vars
. Scroll down the bottom of the Config Vars lines until you find the last blank one. You are going to add several additional lines of config vars for Loop use; the DEVICESTATUS_ADVANCED and ENABLE lines are required, the others just make Nightscout more useful when Looping.
Omnipod Users can skip the Config Vars that begin with PUMP_
. Those are useful for Medtronic users.
Click on Open App
in the top right corner of your Heroku site.
Once you are viewing an instance of your Nightscout site (browser or app), you can adjust what this instance of the display will show.
Click on the \"hamburger\" menu - those three horizontal lines in the upper right corner of the main NS display.
Different sets of documentation call the three horizontal lines in the upper right of the Nightscout display different things such as:
The graphic below shows some of the check boxes you can select. Make sure your basal render is selected to either default or icicle (personal preference for how the temp basals show as blue lines in NS site), adjust alarms (on or off), check the boxes that you\u2019d like display as pills in the SHOW PLUGINS section (usually all of them), and then click save. (You are saving your display preferences, not modifying anything in the NS database.)
Note - Nightscout has been updated since this figure was generated.
"},{"location":"nightscout/update-user/#authenticate-site","title":"Authenticate Site","text":"If the current display of your NS site has been not authenticated, you will not be able to access certain portions of Nightscout such as the careportal, administration tools and remote overrides. There are two ways to authenticate.
Use API_SECRET to access all features of Nightscout
Use Tokens to generate a URL that opens with predefined role(s)
The use of tokens is documented at this link to the security page in the Nightscout documentation.
You can authenticate with your API_SECRET using either of these methods:
Click on the hamburger menu and scroll all the way to the bottom, click on authenticate and add your API_SECRET
Click on the Lock symbol on upper right on main display (requires careportal plugin to be enabled) and add your API_SECRET
An authenticated site, with careportal plugin enabled, will show a + at upper right of the main display instead of a lock symbol. Tapping on the + gives you access to the careportal.
"},{"location":"nightscout/update-user/#nightscout-version-update","title":"Nightscout Version Update","text":"If you are new to Loop and haven\u2019t updated your Nightscout site for a while, check to see if there's an available update. Visit Nightscout: Update Instructions for directions on updating.
"},{"location":"nightscout/update-user/#more-variables-for-loopers","title":"More Variables for Loopers","text":"The list of Variables for Loopers above can be expanded if you want your site to automatically open with specific values and alarm settings.
This Loop and Learn: Nightscout Variables page, created for folks using the Google Cloud method to create a Nightscout site, has a convenient, expanded list.
"},{"location":"operation/overview/","title":"Loop 2 Set Up Overview","text":"This section of LoopDocs will be maintained during the transition to Loop 3. These pages are specific to Loop 2.2.x and some forks based off that older version.
Be aware that older versions and forks will probably not be updated as the Apple environment changes.
With Loop 2.2.x, you must manually step through every Loop setting and fill out the appropriate values. If you miss some, you may get errors in the app. If this happens to you, review every setting carefully.
You need to work through the steps listed in the headings under this page one by one. Please follow along with each page's information to make sure that you don't miss any valuable information about your Loop's settings and function.
You can work through each page completely and click on the link at the bottom of the page to proceed to the next page. Or you can use the back button on your browser to return to this page and click on the link for the page of interest.
"},{"location":"operation/overview/#permissions","title":"Permissions","text":"Make sure that Loop has permission to send you notifications. For example, you will want to know if Loop has stopped working for more than 20 minutes.
Make sure Loop has permission to access Bluetooth devices. You'll need that for your CGM and to connect a pump to Loop.
"},{"location":"operation/overview/#loop-2-health-permissions","title":"Loop 2 Health Permissions","text":"Follow the instructions on the Loop 2 Health Permission page. Note that the Carbohydrate read permission should be turned off after enabling all.
"},{"location":"operation/overview/#loop-2-add-pump","title":"Loop 2 Add Pump","text":"Select and configure your insulin pump. There are separate pages for setting up a Medtronic (MDT) pump or an Omnipod Eros pump (aka \"pods\"). Click on one of the pages to go straight to that page's guide.
Loop 2 Add Medtronic Pump
Loop 2 Add Omnipod Pump
"},{"location":"operation/overview/#loop-2-add-cgm","title":"Loop 2 Add CGM","text":"Follow direction on the Loop 2 Add CGM page. If you are wondering which CGMs are supported natively by Loop, check Compatible CGM.
"},{"location":"operation/overview/#loop-2-configurations","title":"Loop 2 Configurations","text":"Configure Loop's settings. Within this section, you will be entering many settings that you are already familiar with such as basal rates, carb ratios, and insulin sensitivity factor (aka correction factor). There are also several new terms that you may be unfamiliar with like insulin model selection, suspend threshold, and override ranges. Make sure to refer to the Loop 2 Configurations while entering values - DO NOT GUESS.
"},{"location":"operation/overview/#loop-2-services-optional","title":"Loop 2 Services (Optional)","text":"You are not required to use services although many Loopers use Nightscout. If you do not yet have Nightscout configured and want to add it later, just return to the Services page when you are ready. Note that Loop 3 and Loop 2 use the same documentation page for Services. Services can be added at any time.
"},{"location":"operation/overview/#loop-2-displays","title":"Loop 2 Displays","text":"After you are done entering your settings, you should familiarize yourself with the information displays. The Loop 2 Displays page will help you recognize and begin to understand what all the icons, graphs, and data mean.
It is a good idea to remain in Open Loop while becoming familiar with the app.
"},{"location":"operation/overview/#loop-2-pump-settings-screen","title":"Loop 2 Pump Settings Screen","text":"The pump settings screens for Loop 3 were updated. The older interface used by Loop 2 is documented at Loop 2 Pump Settings
"},{"location":"operation/overview/#rileylink-screen","title":"RileyLink Screen","text":"The documentation for Loop 3 and Loop 2 is the same for the RileyLink screen. This screen is only available after configuring a pump that uses a RileyLink Compatible Device.
After a pump that uses a RileyLink is connected to the app, tap on a RileyLink name in the pump settings screen to bring up the displays and commands found on the RileyLink Menu screen.
"},{"location":"operation/algorithm/bolus/","title":"Bolus Recommendations","text":""},{"location":"operation/algorithm/bolus/#loop-manual-bolus","title":"Loop Manual Bolus","text":"Loop will recommend bolus insulin corrections when the eventual blood glucose is greater than the correction target and the active insulin plus any active 30-minute temporary basal will not be sufficient to cover the predicted excursion above correction target.
These recommendations are not proactively sent to the Loop user through any notification or banner alert; the recommendation is only viewable when the user clicks on the bolus tool. Note that Loop never issues a bolus command automatically while using the default Temp Basal Dosing Strategy; all boluses are initiated by the user unless the Automatic Bolus dosing strategy is enabled. With automatic bolus enabled, each automatic bolus is limited to 40% of the recommended amount or the maximum bolus setting, whichever is smaller.
The bolus dose calculation is identical to the dose equation given in the basal recommendations section, with the exception that:
For recently saved carbohydrates where the projected carbohydrate absorption will outlast the insulin activity duration (e.g., very slow-digesting meals like pizza or pasta), Loop\u2019s algorithm will inherently decrease the initial meal bolus \u2014 to prevent hypoglycemia events that often occur after these meals \u2014 by only recommending enough bolus to prevent minimum predicted glucose from going below the suspend threshold. As described above, the Loop algorithm computes the recommended bolus such that predicted glucose will not dip below the suspend threshold. This may result in future blood glucose levels predicted above correction range, but will prevent a hypoglycemia event shortly after the meal (as it sometimes occurs for people giving a \"pizza bolus\" in traditional pump therapy). Loop will then later make corrections by issuing a command to temporarily Increase Basal Rate or provide an automatic bolus. In effect, this algorithm behavior mimics traditional pump therapy of \u201cextended\u201d or \u201cdual wave\u201d bolusing, but with the benefit of added information about actual carbohydrate absorption effects as time goes by.
Finally, Loop checks that the result of the calculations is below the maximum single bolus the Loop user specified in their settings. If the calculated bolus is less than the maximum single bolus setting, then the recommended bolus will be displayed in Loop\u2019s bolus tool.
Bolusing safety feature
If the current blood glucose, or any predicted blood glucose, falls below the suspend threshold, Loop will not return a recommended bolus. When the minimum blood glucose rises above the suspend threshold, the bolus tool will provide a recommended bolus.
"},{"location":"operation/algorithm/bolus/#algorithm-section-menu","title":"Algorithm Section Menu","text":"Loop\u2019s algorithm for adjusting insulin delivery is oriented around making a blood glucose prediction. Every five minutes, triggered by new blood glucose data, it generates a new prediction. Both bolus recommendations and temporary basal rate adjustments are set based on this prediction.
"},{"location":"operation/algorithm/overview/#algorithm-terminology","title":"Algorithm Terminology","text":"This graph and legend illustrates terms commonly used in discussing Loop's algorithm, and shows them in the context of historical and forecasted blood glucose in style similar to the status screen of Loop.
Insulin activity duration The insulin activity duration is the duration of the insulin activity curve, and describes the point at which the delivered insulin dose no longer affects blood glucose. The insulin activity duration is 6 hours for Loop's rapid-acting and ultra-rapid insulin models. Correction range The correction range is the blood glucose range Loop uses to determine corrective actions (e.g., between 90 and 120 mg/dL in the figure). NOTE: Loop\u2019s correction range is a user setting and should not be confused with the target range, typically 70-180 mg/dL, used for the purpose of calculating the percent time in range. Correction minimum The lower or minimum value of the user\u2019s correction range, which is 90 mg/dL in the figure. Correction maximum The upper or maximum value of the user\u2019s correction range, which is 120 mg/dL in the figure. Correction target The correction target is the average value of the correction range. In the overview figure, this is 105 mg/dL given that the correction minimum is 90 mg/dL and the correction maximum is 120 mg/dL. Predicted blood glucose Loop makes a prediction of blood glucose values out for a length of time equal to your insulin action duration. The predicted blood glucose is the basis for how Loop makes its insulin delivery recommendations and actions. Eventual blood glucose The last value of the predicted glucose curve, in other words the very last blood glucose predicted at the end of your insulin action duration. In the figure above, this is 85 mg/dL. Minimum predicted blood glucose The lowest blood glucose value at any point in time within the prediction. In the figure above, this is 77 mg/dL. Delta The delta is the difference between the eventual blood glucose and the correction target. In the overview figure, the eventual blood glucose is 85 mg/dL and the correction target is 105 mg/dL, which means that the delta is -20 mg/dL. Suspend Threshold The suspend threshold is a safety feature of the Loop algorithm. If any predicted blood glucose is below this threshold, the Loop algorithm will issue a temporary basal rate of 0 CGM data Blood glucose readings made by a continuous glucose monitor. Insulin sensitivity factor A configuration value that provides an estimate of how much blood glucose will drop given a unit of insulin. Active insulin Active insulin, often referred to as Insulin-on-Board (IOB), is the remaining amount of insulin activity from boluses and temporary basal rates relative to a user\u2019s scheduled basal rates. More specifically, it is the total amount of insulin activity due to all bolus and basal insulin delivered within the last N hours, where N is determined by the insulin activity duration. The amount of \u201cactive\u201d insulin depends upon the insulin activity curve, and also accounts for the insulin withheld via basal suspensions. As such, it is possible that the active insulin can be negative. Negative active insulin will result in an increase in predicted blood glucose. The active insulin displayed in Loop's main display does not reflect the currently enacted temporary basal rate, as that basal rate may be canceled or modified before completion over the next 30 minutes. In others words, Loop doesn't count chickens before the eggs hatch...insulin delivery must be confirmed before being added to the active insulin reporting."},{"location":"operation/algorithm/overview/#algorithm-section-menu","title":"Algorithm Section Menu","text":"Loop uses an algorithm to maintain blood glucose in a correction range by predicting the contributions from four individual effects (insulin, carbohydrates, retrospective correction, and blood glucose momentum) at any time t to recommend temporary basal rate corrections and boluses.
\\[ BG[t] = Insulin[t] + Carb[t] + RetrospectiveCorrection[t] + Momentum[t] \\]Note that the Momemtum term does not just add to the other effects as implied in the simple formular above; it is blended with the other terms as described in more detail in the Momemtum section below).
You can see the individual contributions of these effects by tapping on the predicted blood glucose chart on Loop's status screen. Loop updates this blood glucose prediction every five minutes when a new CGM value has been received and the pump's status has been updated.
Just a note, this whole section is fairly technical. While perhaps not the most interesting topic for many readers, if you are seeking the detailed view of the Loop algorithm this discussion is quite useful. If you want a more surface understanding, the overview and temporary basal recommendations sections alone are probably sufficient.
"},{"location":"operation/algorithm/prediction/#overview","title":"Overview","text":"Before we delve into each of the four individual effects, a general overview figure may be a helpful start. There are four effects summed together to produce Loop's final predicted blood glucose curve. Each individual effect, along with their combined effect, is illustrated in the figure below. Insulin, from boluses and temporary basals, will have a decreasing effect on the prediction. Carbohydrates will have an increasing effect on the prediction. Blood glucose momentum effect can have a positive or negative effect, depending on how blood glucose is trending in the most recent CGM values. As shown in the example below, blood glucose is trending slightly upwards at the time of the prediction. Therefore, the blood glucose momentum effect\u2019s contribution is pulling up the overall prediction from the other three effects for a short time. Retrospective correction is lowering the prediction, indicating that the recent rise in blood glucose was not as large as had been predicted by Loop in the recent past.
The sections below provide detailed information on each of the four contributions.
"},{"location":"operation/algorithm/prediction/#insulin-effect","title":"Insulin Effect","text":"Most traditional pump users and caregivers are already familiar with the concept of an insulin activity curve, where the insulin\u2019s effect is time-dependent. Insulin takes a little while to affect blood glucose. The insulin effect typically peaks around one hour after giving insulin and then gradually decays.
Loop 2.x provides users with two different classes of insulin models (i.e., an exponential model and the Walsh model). All of the exponential models have an insulin activity duration of 6 hours, whereas the insulin activity duration is customizable for the Walsh model. The rapid-acting and Fiasp insulin activity curves are modeled as exponential curves that match the shape of the insulin activity curves from insulin labeling, and as observed in both adults and children.
Loop 3 drops the Walsh model and, by default, does not include the concept of child versus adult for \"rapid\" acting insulin, i.e., Humalog, Novalog and Apidra. Loop 3 adds the concept of non-pump insulin to account for injections or inhaled insulin. The Afrezza model is added as a non-pump insulin. The Insulin Type is selected in the Pump Settings screen. All insulin types are modeled by selecting parameters in the exponential model. See also Exponential Insulin Curve on the Code Customization page.
"},{"location":"operation/algorithm/prediction/#insulin-effect-remaining","title":"Insulin Effect Remaining","text":"The amount of insulin effect remaining, or percent of remaining active insulin after an insulin bolus is delivered, is modeled mathematically in Loop with an exponential decay curve.
If a user\u2019s insulin sensitivity factor (ISF) is 50 mg/dL per 1 unit of insulin and the user gives 2 units of insulin, then the user\u2019s blood glucose would be expected to drop 100 mg/dL within the 6 hours following the insulin delivery. This insulin effect can be visualized in several different ways: the expected active insulin, expected drop in blood glucose every 5 minutes after delivery, and the expected cumulative drop in blood glucose. The figures below use the Rapid Acting - Adult insulin model in Loop.
"},{"location":"operation/algorithm/prediction/#active-insulin","title":"Active Insulin","text":"This figure shows that 2 units of insulin are given initially, and the corresponding active insulin (i.e., insulin on board IOB) decays according to the curve below.
The active insulin at any time is the product of original insulin delivered and the percent of insulin activity remaining. Knowing the expected active insulin over the next 6 hours, and the insulin sensitivity factor (50 mg/dL, in this case), Loop can calculate the expected drop in blood glucose from that dose of insulin as shown in the figure below.
NOTE: ISF is also a function of time, which means if the user\u2019s scheduled ISF changes during the insulin activity time, it will change the expected drop in blood glucose due to the insulin effect.
"},{"location":"operation/algorithm/prediction/#expected-change-in-blood-glucose","title":"Expected Change in Blood Glucose","text":"Lastly, taking the first derivative (i.e., the rate of change) of the cumulative drop in the blood glucose curve yields the expected change in blood glucose over the insulin activity duration. For each dose of insulin given, Loop calculates the expected discrete drop in blood glucose at each 5-minute period for the insulin activity duration, as shown below.
"},{"location":"operation/algorithm/prediction/#insulin-effect-on-blood-glucose","title":"Insulin Effect on Blood Glucose","text":"For this example, assuming a user\u2019s blood glucose was 205 mg/dL at the time of insulin delivery, Loop would predict a drop in blood glucose due to the two units delivered at 12 pm as shown in the figure below.
"},{"location":"operation/algorithm/prediction/#scheduled-basal-rates","title":"Scheduled Basal Rates","text":"In traditional basal/bolus pump therapy, basal rates are set to accommodate the user's endogenous glucose production (EGP) that causes blood glucose to rise. If a user's basal settings were exactly right in traditional pump therapy, the user would have perfectly flat blood glucose all day, all other factors being equal.
In reality, people with type 1 diabetes, and their caregivers, know that basal settings are never exactly right. Every day is a little different, and a myriad of factors that affect blood glucose (e.g., including stress, hormones, sleep, etc.) may affect insulin needs. Some people have different basal profiles to accommodate these variations. Some people regularly tune and adjust their basal rates, and/or do so at their endocrinology clinic visits.
Since the Loop algorithm assumes that the user-set basal rates are correct, it calculates the effect of insulin relative to scheduled basal rates. If basal rates are not entirely correct, Loop can compensate a bit through the retrospective correction and blood glucose momentum effects, discussed later in this page.
The insulin delivery chart below displays a bar-graph history of the temporary basal rates enacted by Loop. The display is relative to the scheduled basal rates entered in the Loop settings. A rate displayed in this chart as +0 would indicate that no temporary basal rate was set and that the basal rate being delivered was the scheduled basal rate. Positive values indicate a temporary basal rate was set above the scheduled basal rate (i.e., more insulin delivered), and negative values indicate that a temporary basal rate was set below the scheduled basal rate (i.e., less insulin delivered).
For example, if the user\u2019s scheduled basal rate is 1 U/hr, and Loop gives a temporary basal rate of 3 U/hr, then it will calculate the expected drop in blood glucose due to +2 U/hr of insulin.
Similarly if Loop sets a temporary basal rate of 0 U/hr for 1 hour, then the insulin effect will also be relative to the current scheduled basal rate of 1 U/hr, and Loop would predict the user\u2019s blood glucose to increase by the amount of change from -1 U/hr of insulin. If the user\u2019s ISF is 50 mg/dL, then Loop would predict blood glucose to rise 50 mg/dL over the insulin activity duration (6 hours).
Here is a real-world example where Loop is setting many temporary basal rates over the course of the day. The light orange bars are the temporary basal rates delivered and the solid orange line is the active insulin at any given time during the day.
"},{"location":"operation/algorithm/prediction/#total-insulin-effect-combining-boluses-and-temporary-basal-rates","title":"Total Insulin Effect (combining boluses and temporary basal rates)","text":"Loop will combine or stack the active insulin of all the discrete (individual) boluses and temporary basal rates over the past insulin activity duration (6 hours), to predict the active insulin for the next 6 hours. As demonstrated above, using the predicted active insulin Loop can predict the blood glucose drop over the next 6 hours.
Lastly, the combined effect of bolus and basal insulin are visually represented for the user by Loop\u2019s insulin charts:
The insulin effect can be expressed mathematically:
\\[ \\Delta BG_{I}[t] = ISF[t] \\times IA[t] \\]where BG is the expected change in blood glucose with the units (mg/dL/5min), ISF is the insulin sensitivity factor (mg/dL/U) at time t, and IA is the insulin activity (U/5min) at time t. Insulin activity can also be thought of as a velocity or rate of change in blood glucose due to insulin. The insulin activity accounts for the EGP and any active insulin from basals and boluses.
"},{"location":"operation/algorithm/prediction/#carbohydrate-effect","title":"Carbohydrate Effect","text":"Carbohydrates will raise blood glucose, but the speed and degree to which they impact blood glucose are dependent on the type of carbohydrates. High glycemic index (GI) carbohydrates will raise blood glucose quickly over a shorter time, whereas low GI foods will raise blood glucose more slowly over a longer period. Foods like candy, juice, and fruits tend to be high GI foods, while pizza, burritos, and quesadillas are usually lower GI foods. Digestion issues like gastroparesis may also contribute to variations in carbohydrate absorption.
Because carbohydrate absorption can be quite variable, Loop has a model that dynamically adjusts the expected remaining time of carbohydrate absorption. To start with, Loop allows the user to input a rough guess of how long they think the food or drink will take to absorb. The user\u2019s guess is used as a middle of the road estimate, and Loop\u2019s algorithm will shorten or lengthen it based on observed blood glucose change.
For all carbohydrate entries, Loop assumes carbohydrates will not start absorbing for 10 minutes, so there is a 10-minute period of no absorption that is modeled prior to the absorption modeled in the next sections.
"},{"location":"operation/algorithm/prediction/#linear-carbohydrate-absorption","title":"Linear Carbohydrate Absorption","text":"Loop takes a conservative view of how fast the remaining carbohydrates will absorb. Because it is safer to under-deliver insulin for long-duration meals, Loop starts out at a minimum rate of absorption based on extending the entered carbohydrate duration by 50%. Said another way, the minimum carbohydrate absorption rate is the total number of grams of carbohydrates over 150% of the entered duration.
Using this initial minimum absorption rate, the remaining carbohydrates are modeled to absorb linearly. For example, if the user enters a 72g carbohydrate meal, and selects an estimated absorption time of 4 hours, then Loop will forecast a 12g/hr absorption rate for the next 6 hours. This rate can be termed the minimum absorption rate, which can be represented mathematically as:
\\[ MAR[t] = \\frac{CA[t]}{1.5 \\times d} \\]where MAR is the minimum absorption rate (g/hr), CA is the number of carbohydrates (g) and d is the expected duration (hr) it will take the carbohydrates to absorb.
"},{"location":"operation/algorithm/prediction/#dynamic-carbohydrate-absorption","title":"Dynamic Carbohydrate Absorption","text":"The linear model above is modulated by an additional calculation that uses recently observed blood glucose data to estimate how fast carbohydrates have been absorbing. The expected change in blood glucose due to insulin effects alone is compared to the actual observed changes in blood glucose. This difference is termed the insulin counteraction effect (ICE):
\\[ ICE[t] = OA[t] + IA[t] \\]where, ICE (mg/dL/5 min) is the insulin counteraction effect, OA is the observed activity (mg/dL/5min) or observed change in blood glucose at time t, and IA is the insulin activity (mg/dL/5min).
Insulin counteraction effects are caused by more than just carbohydrates, and can include exercise, sensitivity changes, or incorrectly configured insulin delivery settings (e.g., basal rate, ISF, etc.). However, since the effect of carbohydrates is often dominant (after insulin), Loop can still make useful ongoing adjustments to its carbohydrate model by assuming that the increase in blood glucose is mainly carbohydrate absorption in the period following recorded meal entries.
The insulin counteraction effect is converted into an estimated carbohydrate absorption amount by using the current carbohydrate-to-insulin ratio and the insulin sensitivity factor at the time of the recorded meal entry.
\\[ AC[t] = ICE[t] \\times \\frac{CIR[t]}{ISF[t]} \\]where AC is the number of carbohydrates absorbed (g/5min), ICE is the insulin counteraction effect, CIR is the carbohydrate-to-insulin ratio (g/U), and ISF is the insulin sensitivity factor (mg/dL/U) at time t.
If multiple meal entries are active (i.e., still absorbing), the estimated absorption is split between each carbohydrate entry in proportion to each carbohydrate entry\u2019s minimum absorption rate. For example, if 72g carbohydrates with an expected absorption time of 4 hours was consumed at 12 pm, and another 72g of carbohydrates with an expected absorption time of 2 hours was consumed at 3 pm, then the minimum absorption rate (see MAR equation above) would be 12 g/hr and 6 g/hr respectively, or 1 g/5min and 0.5 g/5min.
\\[ MAR[t = 12pm] = \\frac{ 72g }{ 1.5 \\times 4hr } = 12 \\frac{ g }{ hr } = 1 \\frac{ g }{ 5min } \\] \\[ MAR[t = 3pm] = \\frac{ 72g }{ 1.5 \\times 2hr } = 24 \\frac{ g }{ hr } = 2 \\frac{ g }{ 5min } \\]Examining just the simple linear carbohydrate effect of these two meals:
If we further expand this example, by assuming the following at 4pm:
then the estimated amount of carbohydrates absorbed at 4pm would be 3g:
\\[ AC[t = 4pm] = 15 \\frac{mg/dL}{5min} \\times \\frac{10 \\frac{g}{U}}{50 \\frac{mg/dL}{U}} = 3 \\frac{g}{5min} \\]Those 3g of carbohydrates would then be split amongst the meals proportional to their minimum absorption rates:
\\[ \\text{Proportion to Meal1} = \\frac{MAR_{meal1}}{MAR_{meal1} + MAR_{meal2}} = \\frac{12}{12+24}=\\frac{1}{3} = 33.3\\% \\] \\[ \\text{Proportion to Meal2} = \\frac{MAR_{meal2}}{MAR_{meal1} + MAR_{meal2}} = \\frac{24}{12+24}=\\frac{2}{3} = 66.6\\% \\]resulting in 1g of absorption being attributed to Meal 1 and 2g attributed to Meal 2.
"},{"location":"operation/algorithm/prediction/#minimum-carbohydrate-absorption-rate","title":"Minimum Carbohydrate Absorption Rate","text":"If the estimated carbohydrate absorption of a meal entry is less than what would have been absorbed using the minimum absorption rate, then the minimum absorption rate is used instead. This is to ensure that meal entries expire in a reasonable amount of time.
"},{"location":"operation/algorithm/prediction/#modeling-remaining-active-carbohydrates","title":"Modeling Remaining Active Carbohydrates","text":"After the estimated absorbed carbohydrates have been subtracted from each meal entry, the remaining carbohydrates (for each entry) are then forecasted to decay or absorb using the minimum absorption rate. Loop uses this forecast to estimate the effect (active carbohydrates, or carbohydrate activity) of the remaining carbohydrates. The carbohydrate effect can be expressed mathematically using the terms described above:
\\[ \\Delta BG_{C}[t] = MAR[t] \\times \\frac{ISF[t]}{CIR[t]} \\]"},{"location":"operation/algorithm/prediction/#retrospective-correction-effect","title":"Retrospective Correction Effect","text":"The retrospective correction effect allows the Loop algorithm to account for effects that are not modeled with the insulin and carbohydrate effects, by comparing historical predictions to the actual blood glucose.
In addition to the modeled effects of insulin and carbohydrates, there are many other factors that affect blood glucose (e.g., exercise, stress, hormones, etc.). Many of these effects are active for a period of time. By observing its own forecast error, Loop can estimate the magnitude of these effects and, by assuming that they will continue for some short period of time, incorporate them into the forecast to improve forecast accuracy.
To do this, Loop calculates a retrospective forecast with a start time of 30 minutes in the past, ending at the current time. Loop compares the retrospective forecast to the actual observed change in blood glucose, and the difference is used to determine a blood glucose velocity or rate of difference:
\\[ BG_{vel}=\\frac{1}{6} \\times \\left(BG[0] - RF[0]\\right) \\]where BGvel is a velocity term (mg/dL per 5min) that represents the average blood glucose difference between the retrospective forecast (RF) and the actual blood glucose (BG) over the last 30 minutes. This term is applied to the current forecast from the insulin and carb effects with a linear decay over the next hour. For example, the first forecast point (t=5) is 100% of this velocity, the forecast point one-half hour from now is adjusted by approximately 50% of the velocity, and points from one hour or more in the future are not affected by this term.
The retrospective correction effect can be expressed mathematically:
\\[ \\Delta BG_{RC}[t] = BG_{vel} \\times \\left(1-\\frac{t-5}{55}\\right) \\]where BG is the predicted change in blood glucose with the units (mg/dL/5min) at time t over the time range of 5 to 60 minutes, and the other term gives the percentage of BGvel that is applied to this effect.
The retrospective correction effect can be illustrated with an example: if the BGvel over the past 30 minutes was -10 mg/dL per 5min, then the retrospective correction effect over the next 60 minutes would be as follows:
Minutes relative to now (t=0) Percent of \\(BG_{vel}\\) Applied to RC Effect \\(\\Delta BG_{RC}[t]\\) 5 100% -10 10 91% -9.1 15 82% -8.2 20 73% -7.3 25 64% -6.4 30 55% -5.5 35 45% -4.5 40 36% -3.6 45 27% -2.7 50 18% -1.8 55 9% -0.9 60 0% 0The example below that shows the retrospective correction effect when the BGvel over the past 30 minutes was -3 mg/dL/5min.
"},{"location":"operation/algorithm/prediction/#blood-glucose-momentum-effect","title":"Blood Glucose Momentum Effect","text":"The blood glucose momentum effect incorporates a prediction component based on the assumption that recent blood glucose trends tend to persist for a short period of time. In other words, the best predictor of the future is the recent past.
The blood glucose momentum portion of the algorithm gives weight or importance to recent blood glucose to improve the near-future forecast. Loop calculates the slope of the last 3 continuous CGM readings (i.e., the last 15 minutes) using linear regression. Using multiple points helps filter out noise in the CGM data while still responding fast to changing situations. That momentum slope (Mslope) is the approximate or average rate of change over the last 15 minutes, though it is normalized to 5 minutes so that the units are (mg/dL/5min).
The momentum slope is then blended into the next 20 minutes of predicted blood glucose from the other effects (i.e., insulin, carbohydrates, and retrospective correction effects). This, in essence, makes the next 20 minutes of blood glucose prediction more sensitive to recent blood glucose trends. The blending of the recent trend slope into the next 20 minutes is weighted so that the first prediction point (5 minutes into the future) is highly influenced by the slope, and the influence of the slope gradually decays over the 20 minute time period. The momentum effect can be expressed mathematically as:
\\[ \\Delta BG_{M}[t] = M_{slope} \\times \\left( 1 - \\frac{t-5}{15} \\right) \\]NOTE: The term \\(\\left(\\frac{t-5}{15}\\right)\\) is also applied to the combined insulin, carbohydrates, and retrospective correction effects to get the delta blood glucose prediction.
The momentum effect can be illustrated with an example: if the last 3 blood glucose readings were 100, 103, and 106 mg/dL, then the slope would be 3 mg/dL per 5 minutes (0.6 mg/dL per minute). The amount of that recent trend or slope applied to the next 20 minutes of predictions (i.e., the next 4 predictions from the other effects) is roughly 100% (3 mg/dL per 5 min) at 5 minutes, 66% (2 mg/dL per 5 min) at 10 minutes, 33% (1 mg/dL per 5 min) at 15 minutes, and 0% (0 mg/dL per 5 min) at 20 minutes.
Also, if the combined effect from the insulin, carbohydrates, and retrospective correction is assumed to be a constant 6 mg/dL/5min over the next 20 minutes, then the expected overall effect and the predicted blood glucose can be calculated as follows.
Minutes relative to now (t=0) Percent of Slope Applied to Momentum Effect Momentum Effect (3mg/dL/5min) Percent of Other Effects Applied Overall Effect Other Effects (Insulin, Carbohydrate, and Retrospective Correction) Overall Effect (mg/dL/5min) Predicted BG (mg/dL) 5 100% 3 0 6 3 109 10 66.6% 2 33.3%< 6 4 113 15 33.3% 1 66.6% 6 5 118 20 0% 0 100% 6 6 124This example is illustrated in the figure below.
It is also worth noting that Loop will not calculate blood glucose momentum in instances where CGM data is not continuous (i.e., must have at least three continuous CGM readings to draw the best-fit straight line trend). It also will not calculate blood glucose momentum when the last three CGM readings contain any calibration points, as those may not be representative of true blood glucose momentum trends.
"},{"location":"operation/algorithm/prediction/#predicting-glucose","title":"Predicting Glucose","text":"As described in the momentum effect section, the momentum effect is blended with the insulin, carbohydrate, and retrospective correction effects to predict the change in blood glucose:
\\[ \\Delta BG[t] = \\Delta BG_{M}[t] + \\left(\\Delta BG_{I}[t] + \\Delta BG_{C}[t]+ \\Delta BG_{RC}[t] \\right) \\times min\\left(\\frac{t-5}{15}, 1\\right) \\]Lastly, the forecast or predicted blood glucose BG at time t is the current blood glucose BG plus the sum of all blood glucose effects BG over the time interval [t5, t]:
\\[ \\widehat{BG}[t] = BG[t_{o}] + \\sum_{i=5}^{t} \\Delta BG[t_{o+i}] \\]Each individual effect along with the combined effects are illustrated in the figure below. As shown, blood glucose is trending slightly upwards at the time of the prediction. Therefore, the blood glucose momentum effect\u2019s contribution is pulling up the overall prediction from the other three effects for a short time. Retrospective correction is lowering the current prediction, indicating that the recent rise in blood glucose was not as great as had been predicted in the recent past.
"},{"location":"operation/algorithm/prediction/#algorithm-section-menu","title":"Algorithm Section Menu","text":"The Loop algorithm takes one of four actions depending upon the eventual blood glucose, predicted glucose, target range and glucose safety threshold when Closed Loop operation is enabled.
The recommended insulin dose (positive or negative) is calculated first, then the Temp Basal or Automatic Bolus to be enacted is modified based on the recommended dose, dosing strategy, maximum Temp Basal and maximum Bolus settings. The automated dosing (increase or decrease) is updated with every CGM value - typically every 5 minutes.
Dosing Strategy: Temp Basal Only
All temporary basal rate commands are issued for 30 minutes, however they may be updated (re-issued) every 5 minutes. Said another way, Loop may enact a new temporary basal rate every 5 minutes. But, if communication with the pump is lost, the last issued temporary basal rate will last for at most 30 minutes before the pump reverts to the user\u2019s scheduled basal rates.
Dosing Strategy: Automatic Bolus
If the Looper has selected Automatic Bolus Dosing Strategy and an increase in insulin dose is recommended, then the Four Actions discussion below applies to the automatic bolus decision.
"},{"location":"operation/algorithm/temp-basal/#no-automatic-dosing","title":"No Automatic Dosing","text":"If glucose is entirely below the correction range but above glucose safety level, no automatic increase in insulin delivery will be enacted. The Looper can tap on the manual bolus tool and get a recommendation, but no automatic bolus or high temp basal will be issued automatically until the glucose level is higher than the minimum value of the correction range.
The Pre-Meal button or a named override can be configured with a correction range lower than the scheduled correction to assist in getting insulin delivered automatically after meals.
"},{"location":"operation/algorithm/temp-basal/#four-possible-actions","title":"Four Possible Actions","text":"Loop implements one of four possible temporary basal actions: decrease, increase, suspend, or resume a scheduled basal rate.
Automatic Bolus
If you are using an Automatic-Bolus Dosing Strategy in closed Loop mode and Loop predicts you need an increase in insulin; this increase is provided as a percentage of the recommended bolus instead of an increased temporary basal. The default percentage is 40%.
"},{"location":"operation/algorithm/temp-basal/#decrease-basal-rate","title":"Decrease Basal Rate","text":"If the eventual blood glucose is less than the correction range and all of the predicted glucose values are above the suspend threshold, then Loop will issue a temporary basal rate that is lower than the current scheduled basal rate to bring the eventual blood glucose up to the correction target.
"},{"location":"operation/algorithm/temp-basal/#increase-basal-rate","title":"Increase Basal Rate","text":"If the eventual blood glucose is greater than the correction range and all of the predicted glucose values are both above the suspend threshold and equal to or above the correction range, then Loop will issue a temporary basal rate that is higher than the current basal rate to bring the eventual blood glucose down to the correction target.
"},{"location":"operation/algorithm/temp-basal/#suspend-basal-rate","title":"Suspend Basal Rate","text":"If the minimum predicted blood glucose goes below the suspend threshold, then Loop will issue a temporary basal rate of zero units per hour, regardless of the eventual blood glucose.
"},{"location":"operation/algorithm/temp-basal/#resume-basal-rate","title":"Resume Basal Rate","text":"There are three situations where the Loop algorithm will resume the current scheduled basal rate.
If the eventual blood glucose is within the correction range, and all of the predicted glucose values are above the suspend threshold, then Loop will resume the current scheduled basal rate.
If the eventual blood glucose is above the correction range, and the predicted glucose values have a temporary excursion below the correction range but still above the suspend threshold, then Loop will resume the current scheduled basal rate.
If the Loop algorithm does not have ALL of the data it needs to make a prediction, it will let the remaining temporary basal rate run its duration (maximum of 30 minutes), and then the basal rate will default back to the current scheduled basal rate, thus returning to the same therapy pattern that they would receive using a traditional insulin pump.
"},{"location":"operation/algorithm/temp-basal/#determining-the-temporary-basal-rate","title":"Determining the Temporary Basal Rate","text":"To determine the corrective temporary basal rate to implement, Loop calculates a \u201cdose\u201d in the same way doses are calculated in both open-loop and traditional insulin pump therapy. It's also the same math many people on multiple-daily injection therapy use. The benefit of Loop (and all other close-loop algorithms) is that it does this math every 5 minutes, and is far less prone to error than humans doing the math. Loop also does its math based on predicting into the future, which traditional pumps and humans, do not always have the time or inclination to do.
The amount of insulin needed, or dose, is calculated using the desired reduction in blood glucose and the user\u2019s ISF. For the Loop algorithm, the desired reduction in blood glucose is the delta between the eventual blood glucose and the correction target:
\\[ \\mathit{dose} = \\frac{\\mathit{BG_{eventual}} - \\mathit{BG_{target}}}{\\mathit{ISF}} \\]Loop Dose Calculation
A major difference between traditional pump therapy and how the Loop calculates dose is that in pump therapy the current blood glucose is used to estimate the dose, whereas in the Loop algorithm the eventual and minimum blood glucose predictions are also used in determining dosing decisions.
Loop then converts the dose into a basal rate using the Loop\u2019s temporary basal rate duration of 30 minutes:
\\[ \\mathit{BR_correction} = \\frac{\\mathit{dose}}{30 \\mathrm{min}} = \\frac{\\mathit{dose}}{\\frac{1}{2} \\mathrm{hr}} = \\frac{2 \\times \\mathit{dose}}{\\mathrm{hr}} \\]where \\(\\mathit{BR_correction}\\) is the basal rate ( \\(\\mathrm{\\frac{U}{hr}}\\) ), which is the amount of insulin needed over the next 30 minutes to bring the eventual blood glucose to the correction target. The basal rate, however, is the amount of basal rate needed beyond the user\u2019s scheduled basal rate. As such, the required basal rate can be determined by:
\\[ \\mathit{BR_required} = \\mathit{BR_scheduled} + \\mathit{BR_correction} \\]Finally, Loop compares the \\(BR_{required}\\) with the user-specified maximum temporary basal rate \\(BR_{max}\\) setting to determine the temporary basal to issue:
\\[ \\mathit{BR_temp} = \\max(\\min( \\mathit{BR_required}, \\mathit{BR_max} ), 0) \\]After running the temporary basal calculation described above, Loop checks whether there is already an appropriate basal running with at least 10 minutes remaining. If so, Loop will not reissue the temporary basal. However, if the recommended temporary basal differs from the currently running temporary basal \u2014 or the current scheduled basal if no temporary is running \u2014 then Loop will replace the current basal rate with the recommended temporary basal rate.
As mentioned at the beginning of this section, the process of determining whether a temporary basal should be issued is repeated every 5 minutes.
"},{"location":"operation/algorithm/temp-basal/#temporary-basal-rate-calculation-example","title":"Temporary Basal Rate Calculation Example","text":"To illustrate how the Loop calculates the temporary basal rate to issue, consider the calculation for the following scenario:
First, calculate the dose:
\\[ dose = \\frac{\\mathit{BG_eventual} - \\mathit{BG_target}}{\\mathit{ISF}} = \\frac{200 \\mathrm{\\frac{mg}{dL}} - 100 \\mathrm{\\frac{mg}{dL}}}{50 \\mathrm{\\frac{\\frac{mg}{dL}}{U}}} = 2 \\mathrm{U} \\]Then, convert the dose into a basal rate to be issued for the next 30 minutes:
\\[ \\mathit{BR_correction} = \\frac{2 \\times \\mathit{dose}}{\\mathrm{hr}} = \\frac{2 \\times 2 \\mathrm{U}}{\\mathrm{hr}} = 4 \\mathrm{\\frac{U}{hr}} \\]Next, calculate the required basal rate:
\\[ \\mathit{BR_required} = \\mathit{BR_scheduled} + \\mathit{BR_correction} = 1 \\mathrm{\\frac{U}{hr}} + 4 \\mathrm{\\frac{U}{hr}} = 5 \\mathrm{\\frac{U}{hr}} \\]Lastly, compare the required basal rate to the maximum temporary basal rate, and find that Loop will enact a temporary basal rate of \\(5 \\mathrm{\\frac{U}{hr}}\\) for 30 minutes since this temporary basal rate is below the maximum temporary basal rate of \\(6 \\mathrm{\\frac{U}{hr}}\\), which was set by the user in Loop app settings.
\\[ \\mathit{BR_{temp}} = \\max(\\min( \\mathit{BR_{required}}, \\mathit{BR_max}), 0) = \\max(\\min( 5 \\mathrm{\\frac{U}{hr}}, 6 \\mathrm{\\frac{U}{hr}} ), 0) = 5 \\mathrm{\\frac{U}{hr}}\\]"},{"location":"operation/algorithm/temp-basal/#more-examples","title":"More Examples","text":"Consider the following values as fixed values for our calculation:
The table below shows the \\(\\mathit{BR_temp}\\) for different \\(\\mathit{BG_eventual}\\). \\(\\mathit{BR_temp}\\) should never turn negative and should never be greater than \\(\\mathit{BR_max}\\).
\\(\\mathit{BG_eventual}\\) \\(\\mathrm{(\\frac{mg}{dL}})\\) \\(\\mathit{dose}\\) \\(\\mathrm{(U)}\\) \\(\\mathit{BR_correction}\\) \\(\\mathrm{(\\frac{U}{hr}})\\) \\(\\mathit{BR_required}\\) \\(\\mathrm{(\\frac{U}{hr}})\\) \\(\\mathit{BR_temp}\\) \\(\\mathrm{(\\frac{U}{hr})}\\) 300 4.0 8.0 9.0 6.0 200 2.0 4.0 5.0 5.0 100 0.0 0.0 1.0 1.0 90 -0.2 -0.4 0.6 0.6 75 -0.5 -1.0 0.0 0.0 50 -1.0 -2.0 -1.0 0.0"},{"location":"operation/algorithm/temp-basal/#algorithm-section-menu","title":"Algorithm Section Menu","text":"One common confusion point for new Loop users is how to interpret their pump's battery levels and whether they need to change their pump batteries based on which pieces of information.
"},{"location":"operation/features/battery/#discharge-curves","title":"Discharge Curves","text":"There are generally two different types of AAA batteries that we use in these Medtronic pumps; alkaline or lithium.
To understand pump battery levels, you first need to know a little about battery discharge curves. It's not a hard concept...basically how a battery dies over time as it is used or sits in a drawer. More technically said, a battery discharge curve is the measure of volts that a battery puts out over time. Batteries start at a higher voltage output and slowly that voltage output degrades over time (or use) until the battery no longer provides enough \"ummph\" to keep the electronic gadget going. BUT, alkaline batteries and lithium batteries have different discharge curves due to the chemistry inside them, and the curves can be slightly different depending on the environment (temperature) and battery manufacturer.
Alkaline batteries have a relatively steady voltage drop over time, as shown below. Notice the shape of the curve has a significant amount of time in the 1.3 to 1.2 volts range, and a relatively smooth decline to about 1.2 volts.
Lithium batteries have a much steadier voltage output over time, as shown below. Notice how the shape of the curve is relatively flat for a large portion of the battery life before suddenly off around 1.3 volts.
What does the above information mean in terms of Looping? A lithium battery at 1.3v is going to have a much quicker time to death than an alkaline battery sitting at 1.3v. You might only get a couple of hours of looping left when a lithium battery is at 1.3v, but an alkaline battery at 1.3v might go for several more days. So when we talk about setting alarm levels in either system, your battery type is an important consideration.
"},{"location":"operation/features/battery/#medtronic-pump-battery-level-indicator","title":"Medtronic Pump Battery Level Indicator","text":"If you read Medtronic's literature, it will tell you to use Energizer alkaline batteries in their pumps. Why would that be? Hint: the answer doesn't mean that Duracell batteries are inherently worse than Energizer or that lithium batteries won't work in Medtronic pumps.
The answer is all about the accuracy of their little pump battery level indicator on their pump's screen. Medtronic calibrated their pump battery level indicator to:
In other words, Medtronic ran experiments to see exactly how long an Energizer alkaline battery will last in normal pump use and made their own discharge curve. They programmed their pump battery level indicator to change from 4 bars to 3 bars to 2 bars to 1 bar based on that particular discharge curve.
However, Loop users are slightly more demanding on the pump's battery/voltage than simply delivering insulin. We are also asking for the pump to perform radio communications, in addition to delivering insulin. Those radio communications need a slightly higher voltage than the typical \"normal\" pump use. So while a non-Looper might be ok running their pump until a voltage of about 1.12 for insulin delivery, radio communications might stop at a voltage output of about 1.17. If you experiment with your Looping pump, you'll find Loop will turn red from failed pump comms before the pump actually fails at insulin delivery. This difference between \"failure\" voltages needs to be considered when determining how much useful battery life is left for a pump battery.
In summary, that little pump battery indicator on the Medtronic pump screen is ONLY useful if you are:
Loop users should not rely on their Medtronic pump screen's pump battery indicator, and instead use the Loop's pump battery level indicator.
"},{"location":"operation/features/battery/#loops-pump-battery-level-indicator","title":"Loop's Pump Battery Level Indicator","text":"Keeping the information about battery discharge curves in mind, Loop developers tested various battery brands and types to develop discharge curves for Loop users. These discharge curves form the basis of the pump battery level indicator found in the top right of the Loop's main display screen and the pump battery notifications provided by the Loop app. The pump battery level indicator will also report in %.
Based on the battery type selected and the pump model being used, the Loop's pump battery level notifications are designed to give the user about 8 hours of notice before pump communications are likely to fail. The Loop user should have some additional time after pump comms fail before actual insulin delivery would stop.
"},{"location":"operation/features/battery/#nightscout-pump-battery-display","title":"Nightscout Pump Battery Display","text":"The Nightscout information regarding pump battery levels will depend on pump model being used.
Read Pump Status
command.The Nightscout alarms are based on the Heroku settings that you have input specifically. If you don't specifically set them, Nightscout will use the default settings for pump battery alerts as shown below:
Nightscout pump battery levels, if you leave things at default installation, will not trigger alarms. If however you add a setting of PUMP_ENABLE_ALERTS
to true
, you will receive pump battery notifications according to the levels shown in the parenthesis above. For example, your x23 pump is reporting its levels in percent, therefore you'd receive a yellow warning alarm at 30% and an urgent red alarm at 20%. Your x22 pump however is reporting its levels at voltage readings, therefore you'd receive a warning yellow alarm at 1.35v and an urgent red alarm at 1.30v.
Are the default NS alarm levels going to work for you? The answer depends on what type of battery level you are using, what model pump you are using, and how much advance notification you want to receive before needing to change a pump battery. There is a bit of personal preference and experimentation to finding what works for you.
For x22 or x15 pump users, the NS alert settings that may need to be adjusted are the ones based on voltage.
Generally speaking, for a x22 or x15 pump using alkaline batteries, the default NS alarm levels will be too early to be useful and lead you to change out your battery too frequently. Alkaline batteries can go to low 1.2s or high 1.1s before Looping starts to have communication problems. How much lower than the default voltage 1.35/1.30 alarm levels you want to go will depend on how far in advance you want to be warned about an upcoming battery change.
If however, you are using a x22 or x15 pump with lithium batteries, the default 1.35v/1.30v alarm levels may be completely appropriate. Remember how the lithium battery curves at the start of this discussion died off quickly around 1.3v? You won't get hardly any heads-up notice for a lithium battery if you set the alarm below 1.3v.
For x23 or x54 pump users, the NS alert settings that may need to be adjusted are the ones based on percentage settings.
Alkaline and lithium batteries should have automatically had their percentage-remaining based on the correct battery type in your Loop settings. So, generally speaking the default NS alert levels don't generally need adjusting. However, if you are using lithium batteries, the drop off between 75% to 25% can be quite dramatic and not be easy to anticipate (especially if the drop happens overnight).
As an alternative method of tracking pump battery changes, you could use the insulin age (IAGE) plug-in to anticipate your pump battery changes as well. For example, after tracking pump battery life on my 723 using energizer batteries lithium batteries for the last several months, I know that we get about 15 days plus a handful of hours. The amount of hours more beyond 15 days varies depending on how much we've interacted with the pump buttons directly, whether we've looped the full 15-days solid, and if the pump has been in extreme weather (cold weather can sap pump battery life). By tracking the pump battery changes with NS's careportal \"insulin cartridge change\", I can see in advance if we are nearing an overnight on a 15 day battery and decide to change batteries before overnight to prevent any middle-of-night battery issues.
This page was updated with information for Loop 3.
"},{"location":"operation/features/bolus/#loop-2-and-3-differences","title":"Loop 2 and 3 Differences","text":"Most of the information is the same for Loop 2.2.x and Loop 3.
Loop 2 and 3 differences:
Maximum Bolus
amountThe Meal Bolus screen is entered following a carb entry or edit action, the active button might be Save and Bolus or, if no bolus was recommended, Save without Bolusing.
The Save refers to saving the Carb entry or Carb edit that led to this screen in addition to saving the amount that might be bolused. It can also refer to saving a fingerstick value entered in the Meal Bolus screen (Loop 3 only).
You can review the carb information at the Meal Entry link.
Carbs are Saved in Meal Bolus Screen
Carbs are saved when the Save and Bolus
or Save without Bolusing
button is tapped in Meal Bolus Screen. When the button is tapped, carbs are saved even if the bolus does not go through to the pump.
If you see a Bolus Issue
notification (Bolus in progress, etc) after saving a carb entry, check the state of Loop carb entries.
Do not just add the carbs again.
"},{"location":"operation/features/bolus/#accept-recommendation","title":"Accept Recommendation","text":"The graphic below shows the Meal Bolus screen after the user entered carbs and tapped continue:
If a CGM entry arrives while in this screen, a Bolus Recommendation Updated modal message will be displayed and must be acknowledged.
"},{"location":"operation/features/bolus/#modify-bolus","title":"Modify Bolus","text":"This section is a continuation of the information presented in the Accept Recommendation section above. In the graphic below, the user overrides the recommended bolus.
To start a bolus entry, tap on the double orange triangles (circled below) in the toolbar at the bottom of the Loop status screen.
The Loop app will open to the Bolus screen. This looks similar to the Meal Bolus screen without the Carb Entry row. Loop considers the Glucose Safety Limit and Predicted Glucose when determining the recommended bolus.
In the graphic below, the current glucose is under the Correction Range. Loop allows you to dip below the correction range but its recommended bolus will be limited by the glucose prediction and the Glucose Safety Limit. Check back once your glucose starts to rise and there will probably be a bigger recommendation.
This screen behaves differently for Loop 2.2.x and Loop 3. The graphics and instructions on this page are for Loop 3 version. Click on the Loop 2.2.x link above to view the Loop 2 version.
When the Bolus screen is entered directly from the toolbar, the button choices are Enter Bolus if none is recommended, Deliver if a value is on the Bolus row or Cancel using the button on the upper left. The user can also tap on the value on the Bolus row to bring up a keyboard to modify that amount. When doing that, the value is automatically set to zero.
The two graphics below are examples of manual bolus screens.
Loop updates the glucose prediction every time a new glucose reading is detected, typically every 5 minutes. If Loop predicts your glucose will be above the high end of your Correction Range at the end of the Duration of Insulin Activity (DIA) and the predicted glucose is above the Glucose Safety Threshold, it will provide a Recommended Bolus. Loop will not give an alert when a bolus is being recommended, the bolus entry tool must be clicked to check for one. The Loop pill in Nightscout will display when Loop is recommending a bolus.
If your Dosing Strategy is set to Temp Basal (default)
If your Dosing Strategy is set to Automatic Bolus
Lock Phone During Bolus
Once the bolus has started, you should lock your phone to avoid inadvertently cancelling a bolus.
When the phone is in portrait mode, a bolus status line will appear below the Heads Up Display when Loop has a bolus in progress. The \"starting bolus\" indicator is shown in the left screenshot above - this is when Loop is communicating with the RileyLink. Once the message has been sent to the RilyLink, even if a response from the pump did not make it back to Loop, the bolused xx of yy with the circle display begins, as shown in the right screenshot above. If you change your mind, just click on the bolus status line while the bolus is in progress to cancel your bolus, as shown in the screenshot below. (Newer versions of Loop explicitly state: Tap to Stop on this line.) The amount bolused shown in this display is based on time. Loop reconciles the bolus amount with messages received from the pump once the bolus completes.
If you see a 'pump is suspended notice' in the bolus status line after cancelling your bolus, just tap on it to resume pump operations.
"},{"location":"operation/features/bolus/#bolus-failure-notifications","title":"Bolus Failure Notifications","text":"On occasion, you will receive a notification that a bolus may have failed. If your Dosing Strategy is set to Automatic Bolus, this can happen when an automatic bolus is in progress. In some of these cases, the bolus was delivered. On a Medtronic pump, you should check the pump screen to verify the bolus status before attempting to redeliver a failed bolus. Omnipod users can hear the clicks if the room is quiet enough.
If you get an uncertain delivery message, you may still see the \"bolused xx of yy\" display continue for as long as it would have taken to actually deliver the bolus. This display is driven by a timer and logic on the phone. (Loop is not asking the pump repeatedly - \"are you done yet?\"). You may want to interrupt an uncertain bolus if it is large, evaluate status and then resume with a fresh bolus. Loop should update the status the next time it contacts the pump. It can determine whether that bolus actually went through or not and will update the screen. Look at the Event History screen (accessed by tapping the Active Insulin or Insulin Delivery plots). Turn your phone to landscape orientation and you should see either \"Certain\" or \"Uncertain\" at the end of each Bolus record. (If you tap on the specific record, even more detail is displayed.)
If an \"uncertain\" delivery is not resolved:
If that does not resolve the issue, please tap on Loop Settings, Issue Report and email it to yourself. Then post on Facebook or Zulipchat, explain what happened and say you have an Issue Report. Someone should reach out to you.
There are other alert messages that might be displayed if the pump or CGM is not active. Those are found on the Loop 3 Displays page.
"},{"location":"operation/features/bolus/#loop-2-bolus-screen","title":"Loop 2 Bolus Screen","text":"Loop 2.2.x shows the recommended bolus but the bolus row is initially set to 0
This page was updated with information for Loop 3.
"},{"location":"operation/features/carbs/#loop-3-updates","title":"Loop 3 Updates:","text":"To start a new meal entry, tap on the green plate icon (circled below) in the toolbar at the bottom of the Loop status screen. Your Loop app will open to the Add Carb Entry screen.
Loop assumes carbs saved will be absorbed and Loop will adjust recommended insulin, and, when Closed Loop is enabled, Loop will adjust automated dosing based on those carbs.
Beginner's Tip
The steps and graphics in this section are for users of Loop 3. To view the version used by Loop 2.2.x, click on this link.
Tap the meal entry icon on the toolbar to open the Add Carb Entry screen:
The carbs are not saved until the Meal Bolus screen is completed.
Carbs are Saved in Meal Bolus Screen
Carbs are saved when the Save and Bolus
or Save without Bolusing
button is tapped in Meal Bolus Screen. When the button is tapped, carbs are saved even if the bolus does not go through to the pump.
If you see a Bolus Issue
notification (Bolus in progress, etc) after saving a carb entry, check the state of Loop carb entries.
Do not just add the carbs again.
By tapping on the Active Carbohydrates chart on the main Loop display, previously entered carbs can be edited, refer to Edit Meals.
"},{"location":"operation/features/carbs/#meal-entry-row-by-row","title":"Meal Entry Row by Row","text":"Do you want to know more? This section discusses each row in turn.
"},{"location":"operation/features/carbs/#amount-consumed","title":"Amount Consumed","text":"When entering the Add Carb Entry screen, the number keypad is deployed and when you start typing, that value is entered into the Amount Consumed row.
Tapping on any other row dismisses the number keypad. It can be restored by tapping on the Amount Consumed row.
Some value must be entered into the Amount Consumed row to continue.
Many Loopers increase the carbohydrate amount to cover the expected effect of protein and fat in their meal entry. For simplicity, the rest of this page only refers to carbs because all the figures show carbs or carbohydrates in the menus. You should consider the whole meal, including fat and protein, especially if you eat lower carb.
Loopers who consume mostly carbs in a given meal, might do better entering just the carbs.
"},{"location":"operation/features/carbs/#time","title":"Time","text":"Modifying the Time for a new meal entry from the default value of \"now\" is optional.
The 15 minute increments, which are also available on the watch interface, can be handy if the Looper chooses to prebolus.
Reasons to modify the time when entering a meal:
Limits for time entry of when meal was consumed:
Food Type entries are optional.
The information about the next row: Absorption Time is also important when discussing Food Type entries.
Pro Tip
Loop 3 Absorption Times
If you switched to Loop 3 from Loop 2.2.x, please be aware that absorption times for the Lollipop, Taco, Pizza icons have been updated.
Beware using Lollipop for Complex meals
If you select the Lollipop icon for a large complex meal with Loop 3, you tell Loop to expect glucose to rise rapidly (30 min absorption). When that rapid rise does not materialize, Loop may predict an unexpectedly low glucose because the algorithm assumes something must be affecting glucose downward in a strong way.
If this happens to you, edit the carb entry to have a longer absorption time and Loop will recalculate the prediction.
\ud83c\udf6d (Fast) is for simple foods often used for low treatments. Some Loopers use it for coffee.
"},{"location":"operation/features/carbs/#absorption-time","title":"Absorption Time","text":"Modifying the Absorption Time from the default value of 3 hours is optional.
Loop uses the absorption time for the carbs, along with your glucose readings, ISF and CR to recommend insulin dosing and to estimate over time the carbs absorbed and carbs expected. See Algorithm: Prediction for more details.
Loop assumes a specific model for how those carbs will be absorbed that is spread out over an interval that is 150% of the selected time. This allows for variations in actual absorption. More information about this model is found in the prediction link above.
Many meals can be entered with the medium (3 hour) default absorption time. Learn by experimenting and modify going forward. Evaluate the CR setting, as well as the entries for Amount Consumed and Absorption Time for adjusting meal entries. The amount of up-front insulin recommended is typically similar up through 3 hours absorption and then begins to decrease as absorption time is increased.
Experiment for yourself - how much does Loop recommend compared to a straight Carbs/CR value? Try this at different times; especially when glucose is nominal and flat compared to low and dropping or high and rising.
Carbs are not saved in the Add Carb Entry screen until the Continue button is pressed and the user saves those carbs in the Meal Bolus screen, follow the link for details.
"},{"location":"operation/features/carbs/#large-meal-warning","title":"Large Meal Warning","text":"If the Amount Consumed
row exceeds 99 grams when the Continue button is tapped, the user is provided with a modal alert from which they can proceed to the Meal Bolus screen, or return to edit Amount Consumed
if that was not the intended amount.
If you have an override active with insulin sensitivity value set to anything other than 100%, a warning message appears at the top of the Add Carb Entry screen.
"},{"location":"operation/features/carbs/#automatic-bolus","title":"Automatic Bolus","text":"Loopers who are using the Automatic Bolus Dosing Strategy should still prebolus and/or bolus for meals. The amount of Recommended
insulin that will appear in the Meal Bolus screen will be the full amount of the bolus Loop recommends (not the 40% partial bolus delivered automatically). As discussed above, you can accept this recommendation or enter a different amount, however, and this is very important, if your Dosing Strategy is set to Automatic Bolus, by entering less than the recommended amount and tapping Deliver
or tapping Save Without Bolusing
, you are telling Loop to deliver the remaining recommended insulin in the future using 40% of the recommended bolus at each successive Loop interval.
Carb Entry Leads to Insulin Delivery
Note that this same automatic delivery of insulin in response to entered carbs occurs when Dosing Strategy is set to Temp Basal, but the delivery via temporary basal rates is slower, providing more time for an error to be noticed. By the same token, the Automatic Bolus Dosing Strategy responds more quickly to increases in blood glucose, helping to minimize food spikes.
"},{"location":"operation/features/carbs/#edit-meals","title":"Edit Meals","text":"Adjusting a meal entry can be a particularly useful tool when:
From the main Loop screen, tap on the Active Carbohydrates chart to view the Carbohydrates screen (see graphic below).
To adjust an entry, simply tap on it (do not tap the Edit
button at the top of the screen). You can change the time, modify carb amounts, or adjust absorption times (even mid-meal). To delete an entry, you first tap Edit
and tap on the red circle to the left of the entry that you would like to delete. It is a little counterintuitive, but the Edit
button lets you delete, but not edit an entry.
For more information on some of the details reported on this screen, review Dynamic Carb Absorption
"},{"location":"operation/features/carbs/#review-carb-absorption","title":"Review Carb Absorption","text":"New Loopers, and even experienced Loopers with an unfamiliar meal or activity, should review how Loop reports absorption for the carbs you entered for a meal. If you have perfect dosing for your meal (the mythical flat line), then the carb absorption will match the model perfectly. But sometimes, there might be COB on the Active Carbohydrates Chart Loop 3 / Loop 2 that doesn't reflect your current situation, and you might need to make an adjustment. Note that while Loop is pretty forgiving on exact values and absorption time, you need to learn what works for you. Some common things to consider are listed below.
You can Edit previously saved carbs so Loop has a better idea of how to adjust predicted glucose moving forward. This can head off a low or a high.
"},{"location":"operation/features/carbs/#check-cob-before-adding-more","title":"Check COB Before Adding More","text":"Loop works better when informed that carbs are coming, but if you have a lot of left-over carbs from an earlier entry - wait before adding more carbs for that next snack. If Loop thinks more carbs are expected, it will dose extra insulin to accommodate. Maybe set a timer and check back in half-an-hour or an hour to see if you really need to add more carbs.
Dosing at a Party
Example - at a party where Looper is eating small amounts at a time, get some carbs entered to get some insulin up front, but pay attention when clicking add carbs (especially when using the watch and accepting recommended dosing).
"},{"location":"operation/features/carbs/#avoid-double-meal-entries","title":"Avoid Double Meal Entries","text":"Be Aware
If you have accidentally made duplicate entries for the same meal, click on the Active Carbohydrates chart in the main Loop screen and tap Edit
to delete the redundant entries. Deleting the meal entry will not impact the insulin that has already been delivered, but it will alert Loop to adjust your BG projection for purposes of calculating future insulin delivery.
Loop observes the blood glucose impact of the meal within the 150% absorption time window. Loop calculates how many carbs have been absorbed (regardless of how many you entered) based on your BG pattern and your settings.
You can watch the progression of Loop's observations of your meal by tapping on the Active Carbohydrates chart at the bottom of Loop's main screen and watching the insulin counteraction effects (ICE) on the Carbohydrates screen. An example of the screen is on the left side of the figure below. An explanation of the dual lines for each entry and the color coding scheme is explained below the figure. Click on the ICE link for more details and an in-real-life example.
The information available on the Carbohydrates screen disappears for any meals older than 12 hours, so if you're looking for details as to how a particular meal absorbed, you may need to screenshot or otherwise capture this information within that window. Previous entries can be modified or deleted through this screen.
"},{"location":"operation/features/carbs/#medtronic-warning","title":"Medtronic Warning","text":"With Loop 3, a caregiver can add remote carbs and perform remote bolus through Nightscout, but that requires set-up between the caregiver and Loopers phone and use of the Remote Carb and Remote Bolus entries in the Careportal.
If you enter carbs (not remote carbs) into the Careportal, they are not read by Loop and will not be reflected in COB.
This is relevant for Loop 2.2.x versions. Loop 3 does not read carbs from Apple Health unless you modified the code.
Please see Loop 2 Permissions.
"},{"location":"operation/features/carbs/#carb-absorption-model","title":"Carb Absorption Model","text":"For more information about the way Loop models the effects of carbs, insulin, etc., see the algorithm page.
"},{"location":"operation/features/carbs/#loop-2-fast-meal-entry","title":"Loop 2 - Fast Meal Entry","text":"This section is for users of Loop 2.2.x.
Tap meal entry icon on toolbar
The carbs are not saved until the Meal Bolus screen is completed.
By tapping on the Active Carbohydrates chart on the main Loop display, previously entered carbs can be edited, refer to Edit Meals.
"},{"location":"operation/features/ice/","title":"Meal Review","text":"When on Loop main screen, tapping on the \"Active Carbohydrates\" graph will open up the \"Carbohydrates\" details page that tracks your carb entries for the last 12 hours and how they are absorbed. It can be helpful to review your meals when monitoring settings, troubleshooting past meal entries, and planning future meal entries.
"},{"location":"operation/features/ice/#insulin-counteraction-effects","title":"Insulin Counteraction Effects","text":"What are Insulin Counteraction Effects (ICE for short)?
Consider the possible effects that counteract insulin (in other words, make glucose levels go up):
As we all know, this list can be long; but on \"normal\" days, food is the primary reason glucose levels go up. By \"normal\", we mean basal rates and settings are close to correct, illness is not an issue, and the site is good. We depend on the Loop dynamic carb absorption and other prediction effects to keep glucose in our desired range.
When you have carbs on board, Loop always\u00a0assigns ICE to carbs, not just on a normal day. This is how Loop looks at it. Keep in mind that in situations where you have other positive ICE, like insulin resistance, and carbs on board, Loop will attribute all the positive ICE to carbs until all the entered carbs are considered absorbed. At that point, ICE will start driving RC upward.
Insulin Counteraction Effect (ICE) as explained in Dynamic Carbohydrate Aborption is one very important part of carb absorption as well as a foundational part of Loop Predictions.
"},{"location":"operation/features/ice/#glucose-change-display","title":"Glucose Change Display","text":"The graph at the top of your \"Carbohydrates\" details page shows the effect Loop expects carbs to have on your glucose (gray bars) compared to the actual effect, or ICE. The units on the graph are mg/dL/5-min or mmol/L/5-min
\ud83d\udfe9: As a meal is tracked by Loop, you'll see green bars of observed carb absorption (including ICE).
How Loop thinks about carbs
ICE is just one important component of how Loop thinks about carbs. The other parts are the user-entered data (amount of carbs, and absorption speed).
Sometimes Loop falls back to a default absorption model when ICE is less than the minimum absorption rate.
In the graphic below, early in the meal timeline, the green bars are below the grey bars. Loop uses the minimum absorption instead of estimating absorption from glucose change. For example, if a pre-bolus was \"perfect\" leading to a constant glucose after a meal, the ideal grey bars will be used by Loop throughout.
When not to Use Glucose Change Display to Understand Meal Absorption?
If you know that other non-carb effects are affecting your insulin sensitivity significantly (sickness, exercise, etc), all the info about carb absorption should be considered skewed, and not be used for trying to understand meal absorption.
"},{"location":"operation/features/ice/#practical-use","title":"Practical use","text":"Some practical use of the ICE screen is provided in the Meal Entries: Review Carb Absorption section.
Many ways to successfully use Loop
You should choose what works for you.
The rest of this page was written by Katie DiSimone before the non-linear carb model was added to Loop in 2019. You may also want to review her blog post from 2017: Loop: Dynamic Carb Absorption.
A lot of the information is still relevant although some of the Loop carb modeling and prediction details have been updated over the years.
Let's take a look at an example day using the screenshot below.
When you make a food entry originally, Loop will save your entry as you've made it. On the line below your original entry, Loop will also start tracking your food entry assuming a 1.5 times longer carb absorption time. This helps Loop track carbs that may actually be absorbing longer than you expected (part of that whole dynamic carb absorption modeling). Loop will be updating that value of \"observed\" carb absorption time as well as absorbed carbs as your meal goes on.
So how can we use this information to make our Looping experience better? The answer is probably best illustrated using a real-world example. Chinese food...in fact, this Chinese dish. General Tso's chicken. As you can see in the recipe, loads of fast carbs with ingredients like hoisin sauce, brown sugar, and cornstarch. But also slower carbs like chicken. Rice can be a difficult one because, for us, it acts fast but also seems to have a long tail.
It was a busy day and I really didn't want to count carbs. Ok, even on the slow days I don't want to count carbs. I just eyeballed the bowl of food and guessed. As I entered the food in originally, I was still trying to come up with a good guess on the ratio of fast:slow carbs but kid was in a hurry to eat. My initial guess around 3:30 pm was 70g of carbs at 5 hours absorption (note: it gets edited to 80g in a little bit), we bolused for that and she started to eat. About 10 minutes later, I decided to add 10g of fast-acting carbs at 1-hour absorption to help with the sauce's speedy carbs.
Watching what was going on a little later...glucose levels were rising at a decent clip and I had a feeling I really didn't cover things super well...so I edited the original 70g entry, adding 10g and making it 80g instead. (That's why there is a 2U bolus around 4:20 pm.) And of course, around 5:40 pm there was a little bit of nibbling on the leftovers as we put them into the fridge. We gave 10g for that. Glucose levels climbed a bit more, not surprising given how we were underestimating fast carbs at this point...but still not so bad at 180 peak glucose. (Anna gave 2 units of correction at the peak because there was dessert coming later that night and she wanted to be ready for it without too much pre-bolus.)
So, how can I use the \"Glucose Change\" graph to make this meal better? I can look at the observed carb information and the observed carb entry Loop has recorded to adjust my insulin bolusing the next time we eat this meal.
For example, the biggest weakness I had in this (and suspected it even as I did the initial bolus) was that I underestimated the sauce's fast carbs. I can see this in the observed carb absorption graph having the early green peaks after the meal, and in the way that the observed carb distribution was more like 7:2 vs my original guess of 8:1 (slow:fast carbs). Overall, it appears that I guess on overall carb content pretty closely (90g vs. 89g observed). Next time we have General Tso's chicken, I will likely bolus it as 70g at 5 hours and 20g at 2 hours.
Check Carbohydrates Page
Remember to check your Carbohydrates page at the end of a meal's absorption. By checking in on the meal's observed behaviors, you'll have a good starting point to fine-tuning any new or unknown carb breakdown.
Note
Remember this conversation is assuming you have basals fairly well set and are not sick. If other factors could be significantly causing your glucose levels to swing that Loop doesn't know about (bad sites, illness, or basal rates that need to be adjusted), they may be attributed in part to ICE when they really aren't food-related. In those cases, address the underlying cause and then use the Carbohydrates page when you've come back to \"normal\".
"},{"location":"operation/features/notifications/","title":"Loop Notifications","text":""},{"location":"operation/features/notifications/#loop-notifications","title":"Loop Notifications","text":"Loop provides discrete notifications on the iPhone and Watch which will appear on the (locked) screen and vibrate, depending on your notification settings of Loop.
"},{"location":"operation/features/notifications/#loop-alert-unable-to-reach-pump","title":"Loop Alert - Unable to Reach Pump","text":"With Loop 3, there is a new modal alert that halts all Loop activity until pump communication can be restored.
When you tap on the Learn More button, another screen appears. The only option allowed on the second screen is to give up and discard the pump (or pod) or continue to wait - tap the Back button. The second screen is there if you need to tell Loop you will not be able to restore communication and it should treat the last attempt to send a command as uncertain. Loop will then allow you to add a new pod or new Medtronic pump or switch to a different insulin delivery device.
Only do this if bringing your phone and pump into close proximity, waiting a few minutes and then trying the Reset Loop-to-Pump Communications suggestions are not successful.
Why Stop all Activity?
When communication is interrupted at a critical moment in the communication cycle, Loop cannot provide a reliable calculation for IOB. When that happens a warning screen similar to the graphic above appears on your device. You cannot do anything but wait for Loop to restore communications or give up on that device.
"},{"location":"operation/features/notifications/#loop-app-expiration-notification","title":"Loop App Expiration Notification","text":"Profile expiration notification was added with Loop 2.2.5.
More Info
button of the notification to go directly to the LoopDocs Updating page.The expiration notification pattern is the same as for the Paid Loop App. You may want to add an Expiration Notification Customization to modify the first appearance and frequency of the notification.
"},{"location":"operation/features/notifications/#loop-app-expiration-date","title":"Loop App Expiration Date","text":""},{"location":"operation/features/notifications/#for-loop-32x-and-newer-versions","title":"For Loop 3.2.x and newer versions","text":"The expiration date is found in the App Profile section at the bottom of the Loop Settings screen.
"},{"location":"operation/features/notifications/#for-loop-225-through-loop-30","title":"For Loop 2.2.5 through Loop 3.0","text":"If you want to see the expiration date at any time:
The expiration date is near the top of the report (to the right of profileExpiration
). If you don't see that, time to rebuild to get that feature. Once you've viewed the expiration date, tap Settings to back out of the Issue Report display. The time uses UTC, so adjust to your time zone if you procrastinated until the last minute.
Most pod beep alarms are disabled for a more discrete use of pods than is available with the PDM. Only the following audible acknowledgments or alarms are used. Some can be configured in Omnipod: Notification Settings:
You can customize the way notifications of Loop are behaving in the Settings App of the iPhone:
Loop 3 Notifications Settings:
Mark Loop 3 notifications as time-sensitive and ask for immediate delivery:
Immediate Delivery
so that notifications are delivered right awayTimeSensistive Notifications
checkbox Notification Delivery
You will see the Notification Delivery
section only if you previously toggled on Settings / Notifications / Scheduled Summary
in order to receive a summary of notifications at a certain time of the day. If this is not what you want, simply ignore it.
Announce Notifications
The Announce Notifications
section is displayed only if you previously turned on the toggle Settings / Notifications / Announce Notifications
. Use it if you want Siri to read Loop's notifications out loud on CarPlay, and AirPods...
Make sure Loop notifications are allowed in your Focus mode. Edit the focus mode to:
Loop
to the list of apps with allowed notificationsTime Sensitive Notifications
toggle buttonIf you want to take a break from using Loop but want to keep the app on your phone, you'll want to disable Loop Notifications while you are not using Loop. Otherwise, the Loop Failure messages will drive you crazy.
When you are ready to resume using Loop, the main screen will remind you to turn those notifications back on.
Another time you might want to disable notifications is if you are testing with a simulated pump. When the app is closed or phone is locked, the simulated pump is inactive and you would get the Loop Failure notifications.
"},{"location":"operation/features/notifications/#loop-failure","title":"Loop Failure","text":"At 20, 40, 60, and 120 minutes, there is a Loop Failure notification. This mostly happens when the connection is lost for a longer period of time between the CGM or the Rileylink and Loop.
"},{"location":"operation/features/notifications/#bolus-failure","title":"Bolus Failure","text":"If Loop detects that a bolus was not able to be delivered, it will provide a notification. Bolus failures are usually due to stale pump data. Try fetching recent history from the RileyLink menu to update pump data. Loop will also notify of partial bolus deliveries.
"},{"location":"operation/features/notifications/#low-reservoir","title":"Low Reservoir","text":"Medtronic At 20% and 10% remaining reservoir volume, there is a Low Reservoir notification.
Omnipod Select your desired notification level for low reservoir Omnipod: Notification Settings
"},{"location":"operation/features/notifications/#empty-reservoir","title":"Empty Reservoir","text":"Omnipod After the reservoir reports 0 U, the pod attempts to deliver insulin when requested.
Loop will notify when battery levels have approximately 8-10 hours of battery life remaining.
"},{"location":"operation/features/notifications/#remote-notifications","title":"Remote Notifications","text":"Loop does not have a remote notification to other devices. If you are a remotely monitoring parent, you will want to read here about setting up pushover alerts using your Nightscout site if you want proactive notifications of looping related information.
"},{"location":"operation/features/notifications/#loop-follow","title":"Loop Follow","text":"Many people use additional apps to assist in following a loved one or to support a loved one who needs help waking up to alarms. One of the more popular options is Loop Follow, written by a parent of a Looper. There are several features to assist in remote monitoring with a variety of options for the source of data.
For more information, please read the Loop Follow documentation. You can build Loop Follow using the same Build Select Script you used to build the Loop app or using the GitHub Browser Build Method.
"},{"location":"operation/features/overrides/","title":"Overrides","text":""},{"location":"operation/features/overrides/#new-loopers-please-read","title":"New Loopers - Please Read","text":"Please do not use this feature until you understand it.
Many new Loopers interpret Loop Overrides as a one-for-one replacement for manual pump options where a temporary basal was applied for a particular activity. Although Loop Overrides can help in a situation where you previously used a temporary basal rate, overrides are more powerful.
Changing Overall Insulin Needs is NOT like Manual Pump Temp Basal Change
Loop Overrides are not the same as adjusting temporary basal on a manual pump. The easiest way to restrict basal rates with an automated system is to raise your correction target temporarily. In some cases, you may need to also adjust insulin needs, but begin just by changing that target.
When you modify insulin needs, you are affecting basal rates, carb ratios, and insulin sensitivity factors (ISF) for the duration of the override.
A common mistake is to think selecting an override with 10% Overall Insulin Needs is like selecting 10% basal rate with a manual pump. With Loop, that selection modifies all your normal settings by a factor of 10!
"},{"location":"operation/features/overrides/#manual-temp-basal","title":"Manual Temp Basal","text":"Sometimes you need to set a manual temp basal and you need it to keep working whether you are near your gear. There's a function for that with Loop 3.
Overrides let Loop know selected settings are modified for the duration of the override. The override can change either the correction range or the overall insulin needs or both. When you set an override on insulin needs, the override adjusts basal schedule, ISF, and CR together. Examples where this can be helpful include hormone cycles, steroid medications, and/or exercise.
Override presets are (1) optional and (2) can be configured within Loop's workout icon (the little blue heart icon in the Loop toolbar). Once override presets are created, they can be turned on/off by using the workout icon as well.
"},{"location":"operation/features/overrides/#features-of-an-override","title":"Features of an Override","text":"Overrides allow you to specify:
The override only works when your Loop gear is with you. For example, if Loop sets a zero temporary basal rate based on an override and then you leave your gear behind; at the end of half an hour, your pump will resume scheduled insulin delivery.
The target range replaces the correction range target for the duration of the override.
The overall insulin needs is applied to your basal rates, insulin sensitivities and carb ratios for the duration of the override.
For an override to be accepted:
When an override is scheduled to start in the future, it can have an effect earlier than you might think. The closed loop automated insulin increase or restriction at each cycle is calculated to map your predicted glucose to the desired target range over the duration of insulin action (6 hours). If the future override has a higher target, that higher target is factored into the Loop calculations.
Example:
Overrides will work while you are Looping. Sounds obvious, right? But, the thing to remember is that the adjustments (multipliers) that overrides make are not saved back to your Medtronic pump or Omnipod. They only exist in the Loop app.
If you walk away from iPhone and/or RileyLink...
If you stop Looping (i.e., walk away from your gear or your glucose reading is stale), your existing temp basal will complete the remainder of whatever is left of its original 30 minutes and you will return to scheduled basal rates in your Therapy Settings. Your adjusted needs as set-up in any override will not continue if your Loop is not running properly. So you cannot set a 50% override and then hop in the ocean for a 2-mile swim without your iPhone and RileyLink and expect decreased basals of 50%. Just be aware that in situations where you need prolonged lower basals while away from Looping gear, you will need to edit your scheduled basals or use a Manual Temp Basal setting.
"},{"location":"operation/features/overrides/#avoid-extreme-insulin-needs-setting","title":"Avoid Extreme Insulin Needs Setting","text":"There have been users who select a 10% overall insulin need. This is NOT the same as choosing a 10% temporary basal with the PDM. This changes your basal rates, ISF and CR by a factor of 10!
Scenario for 10% Insulin Need
Instead of selecting 10%, raise your correction range with a moderate needs adjustment. Loop tends to suspend insulin delivery via temp basals with the next CGM reading.
With Loop 3, there is now a warning message in the meal entry screen when an override is active with an overall insulin needs value other than 100%. The user can decide whether to proceed with the meal entry with the override active.
If you feel the need to immediately halt insulin delivery, consider a Manual Temp Basal or suspend command to the pump. If you choose to suspend, be sure to pay attention to the reminder to resume insulin delivery later.
Extreme Athletes
There are athletes who do need those extreme overall insulin need changes and know how to use them appropriately. This typically involves extreme or prolonged exercise.
"},{"location":"operation/features/overrides/#create-an-override-preset","title":"Create an Override Preset","text":"To create an override preset, tap on the workout icon. Then click the + sign in the upper right corner to start a new preset entry.
You must select an emoji, name the preset and modify either the overall insulin needs or target range or both to save your new preset
When you've made your selections, save the preset using the \"Save\" button in the upper right corner.
"},{"location":"operation/features/overrides/#select-1-insulin-needs","title":"Select 1% Insulin Needs","text":"Available with Loop 3.
The selectable Overall Insulin Needs values are not limited by the default picker values of 10%.
To enact your override preset, tap on the workout icon toolbar and select an override from your list of saved presets, create a new one or use the custom override for one-time use.
The heart will be highlighted in a blue square while active and the HUD Status Row will indicate the active override name. The Glucose Chart will show a darker blue bar indicating the active target range and duration.
"},{"location":"operation/features/overrides/#schedule-an-override","title":"Schedule an Override","text":"You can set up a future start time when selecting a saved override by tapping on the calendar icon to the right of the override. Adjust the \"Start time\" row. Tap the \"Enable\" button in the top right corner.
A Future Override can be very helpful, for example, to set an exercise override the night before your workout. You'll wake up with less insulin on board and at your desired exercise targets.
"},{"location":"operation/features/overrides/#deactivating-an-override","title":"Deactivating an Override","text":"Tap the heart icon to turn off your override at any time. This happens without confirmation, so be sure to lock your phone when you have an override running to avoid accidentally turning it off.
Override presets with a finite duration will automatically deactivate when the duration is over.
"},{"location":"operation/features/overrides/#apple-watch","title":"Apple Watch","text":"Saved overrides can be turned on and off by tapping on the blue heart icon on your watch.
"},{"location":"operation/features/overrides/#editing-an-active-override","title":"Editing an Active Override","text":"Tap on the active override in the HUD Status Row with the phone in portrait orientation. This brings up a screen to edit the override currently running.
This only affects this override during the current period. It is not saved to that named override. For example, you can extend the duration or modify the needs value or target value based on a temporary situation.
Higher Priority Messages
If the HUD Status Row is displaying a higher priority message, you must wait for that message to complete before you'll be able to edit an active override. If you want to edit an active override, you can choose to cancel an active bolus and edit the override immediately. The edited override will then be in effect for the next Loop cycle or manual recommendation.
HUD Status Row messages with higher priority:
You can also use your Nightscout site to activate/deactivate your Loop's override presets. To accomplish this, you will need to do some legwork as outlined on this page for how to set up Remote Overrides in Nightscout and you will need to be using a paid Apple developer account. Remote overrides require Apple Push Notifications service, and that is only available on paid accounts.
"},{"location":"operation/features/premeal/","title":"Pre-Meal Target","text":""},{"location":"operation/features/premeal/#pre-meal-range","title":"Pre-Meal Range","text":"The Loop toolbar's second icon from the left is a small clock with a knife and fork on the sides. This is the pre-meal tool. The tool will be colored grey until you define a glucose range in Loop settings. Once a pre-meal range is available in Loop Settings, the icon will be colored green and available for use. The background coloring of the Pre-Meal Range icon will turn green when active and there will be a dark blue line on the glucose chart indicating the pre-meal range.
The pre-meal range can be used as an easy way to get a small amount of insulin delivered before a meal in order to help control post-meal blood glucose spikes. It's not designed to replace a traditional pre-bolus, but rather as a more gentle way to build up some pre-meal insulin activity.
If your normal target is 100-110 mg/dL and pre-meal range is 80-80 mg/dL, for example, Loop will give you an extra push to get you to the lower target number before the meal. This early insulin brings you into the meal with a mini-prebolus. The pre-meal range, when activated by pressing on the icon, will stay active for one hour, until carbs are entered, or until it is manually canceled... whichever comes first. Setting an override will also cancel pre-meal range.
Loop will adjust any insulin bolus as needed based on the extra insulin provided during this pre-meal time.
Other Uses
Some people prefer to use this as an easy way to raise the correction range for an hour.
"},{"location":"operation/features/premeal/#how-to-adjust-pre-meal-range","title":"How to Adjust Pre-Meal Range","text":"Loop 3:
Loop 2.2.x:
The intent of the pre-meal icon on the toolbar is to provide an eating-soon mode in Loop. Do not set pre-meal limits to any hypoglycemic ranges that may require treatment.
To mitigate the impact of unintentional pre-meal activation:
Custom Pre-Meal Overrides
Some loopers set up a custom override to use instead of the pre-meal icon. This allows enabling the override remotely with Nightscout, permits specifying a custom duration, and will keep the override enabled after carbs are announced.
"},{"location":"operation/features/watch/","title":"Apple Watch","text":""},{"location":"operation/features/watch/#loop-with-apple-watch","title":"Loop with Apple Watch","text":"The Loop user can directly enter carbs and boluses and turn on or off premeal or override settings from the watch, without needing to pull their iPhone out. There are some caveats when iPhone is not within Bluetooth range - the action requested by the watch will not be enacted until iPhone reconnects.
There are two screens in the Loop watch app, shown in the bottom half of the graphic above. By swiping left or right, the other screen is displayed. The eventual (predicted) glucose feature, shown on both screens in the graphic can be turned off as a feature in Loop 3, but requires the user to rebuild. It is on by default.
The screen on the left side of the graphic shows Loop status, current glucose, trend arrow and eventual glucose with icons to enable carb entry, bolus entry, pre-meal and override selection. If necessary, use the crown (or swipe up and down) to see the full display.
"},{"location":"operation/features/watch/#watch-carb-bolus-overview","title":"Watch Carb / Bolus Overview","text":"After tapping on the carb or bolus icons, you can adjust the entries using the crown to dial in more/less. See Meal Entry on Watch for more details.
If you swipe the Apple Watch Loop screen from right-to-left, a second screen, as displayed on the right side of the graphic above, is available. This second screen displays a graph of recent glucose and predicted glucose data. The display can be scrolled with a finger swipe or turn of the crown to display Active Insulin, Active Carbs, Net Basal Rate (with respect to scheduled rate) and in some cases Reservoir Units. (A recently changed pod may show the reservoir level from the prior pod - just ignore that. It goes away within 24 hours.)
The windows for history and prediction available on the watch can be modified to suit your preference. The windows can be modified from 2 hours to 12 hours.
The selection for the window remains as selected until you change it.
"},{"location":"operation/features/watch/#loop-complication","title":"Loop Complication","text":"A loop complication exists to show glucose on the watch face but the update rate is limited by Apple. If you have a Loop complication installed in the watch face, you can simply tap the complication to open the Loop watch app.
In some positions and with some watch faces, the complication includes a graph.
To prevent an accidental bolus from your Watch app, don't let your kids hold your watch. Just kidding, we've added an even better solution. After requesting a bolus or accepting a meal entry recommended bolus, the watch face displays a graphic like the one below. As you spin the digital crown, the two triangles will begin to merge. Once they merge, the bolus is confirmed through a little haptic and a white checkmark will appear on the watch screen.
"},{"location":"operation/features/watch/#bolus-cancel-or-spin-fail","title":"Bolus Cancel or Spin Fail","text":"At this point if you hit cancel, or fail to merge the two triangles, the bolus will not be delivered. You will feel a haptic and may hear a notification when Loop stops waiting. The watch display restores to the nominal screen.
"},{"location":"operation/features/watch/#meal-entry-on-watch","title":"Meal Entry on Watch","text":"Tap on the Meal entry icon on the watch to view the watch carb entry screen as show in the graphic below.
The watch carb entry screen allows you to choose the amount and absorption time, using the standard icons, and adjust the time the carbs were or are planned to be consumed.
After tapping the Continue button on the carb screen, the meal bolus screen is displayed - carbs are only saved after selecting Save or Save & Bolus on the meal bolus screen.
"},{"location":"operation/features/watch/#carb-entry-no-bolus","title":"Carb Entry, No Bolus","text":"If you enter carbs from the watch and no bolus is recommended or selected, you will see a screen like the graphic below where the Save button is offered. You can choose to Save the carbs, or cancel the entry.
If you choose to modify the zero bolus recommendation, the display changes to the option shown in the graphic in the following section.
If your phone is in communication with your watch, then when you hit the Save button, the carbs will be immediately saved to your phone record as well as your watch.
If your phone is not in range of your watch, then when they are brought into communication later, the carbs will appear on the phone.
"},{"location":"operation/features/watch/#carb-entry-with-bolus","title":"Carb Entry, With Bolus","text":"If you enter carbs from the watch and a bolus is recommended or selected, you will see a screen like the graphic below where the Save & Bolus button is offered.
You may choose to leave that bolus at the recommended level, tap on the + or - buttons to add or subtract 0.5 U per tap or use the digital crown to adjust the value. Should the value go to zero, then the Save button appears as shown in the graphic in the previous section; but remember, Loop will begin adjusting automatic insulin delivery based on those newly entered carbs, even if you choose not to bolus.
If your phone is in communication with your watch
If your phone is not in range of your watch
You can review the recent carb entries on the Apple Watch. Simply swipe left to see the blood glucose graph screen on the watch. Scroll down with your finger or the digital crown to the Active Carbs row beneath the graph, and tap that row. You can see the list of recent carb entries.
If you enter carbs on your watch while not connected to the phone, they will appear on this display and, when the phone reconnects, will be transferred to the phone.
Be Cautious - Avoid Double Entry
If the phone and watch are not connected, someone could add entries to the phone manually or via remote commanding and the watch will not know about them. So be careful and check the phone carb record when the phone and watch reconnect. This is especially important if more than one caregiver is involved.
"},{"location":"operation/features/watch/#eventual-glucose-on-watch","title":"Eventual Glucose on Watch","text":"One feature on the Watch app that can be turned on and off with Loop 3 is the eventual glucose display on the watch. That display is shown on the graphic above with current glucose on left, trend arrow beside it and eventual (from prediction) glucose on the right.
If this is a feature you want turned off, please follow the directions on the Code Customization page (found under the Version tab): Build Time Features.
"},{"location":"operation/features/watch/#adding-a-watch-to-existing-loop","title":"Adding a Watch to Existing Loop","text":"If you add an Apple Watch after building Loop using Xcode on a computer, you will need to pair your watch to your iPhone and then rebuild Loop to enable the Loop watch app to show up as an available watch app.
If you use the new, Loop 3 only, Build Loop using GitHub Actions process that enables building without needing a Mac, the watch app should work so long as you have the watch paired to your phone when you install from TestFlight.
"},{"location":"operation/features/watch/#watch-hardware-and-os-requirements","title":"Watch Hardware and OS Requirements","text":"Loop 2.2.9 and FreeAPS is currently supported with all released versions of the Apple Watch and Apple watchOS 4.1 and newer.
Loop 3 requires newer versions of the watch and requires watchOS 8 as a minimum.
The compatibility list below is copied from Apple. Note that some version of iOS require specific versions of watchOS. That level of detail is not captured here. Please review LoopDocs: Wikipedia Chart for Apple Versions.
"},{"location":"operation/features/watch/#watchos-8-compatibility","title":"watchOS 8 Compatibility:","text":"watchOS 8 requires iPhone 6s or later with iOS 15 or later and one of the following Apple Watch models:
watchOS 9 requires iPhone 8 or later with iOS 16 or later and one of the following Apple Watch models:
Loop 3 uses the new-style widget is in process. There are a lot of updates with widgets. With the advent of iOS 16, you can add widgets that show up on the lock screen without need to swipe to view. There is work in progress on this - please be patient.
"},{"location":"operation/features/widget/#old-style-loop-widget","title":"Old-Style Loop Widget","text":"Loop 2.2.x and FreeAPS both include an old-style widget.
With older versions of iOS, the widget is available in the Today view of your iPhone. Swipe right on your iPhone home screen and your widgets will be available. The Loop widget may be at the bottom of your widget list. Scroll down to the bottom of the screen and press the edit
button. That opens an \"Add Widgets\" screen. If you hold and drag the three horizontal lines on the Loop widget row, you can drag it up to the order you'd like it to appear on your widget list.
With newer version of iOS, the old-style widgets cannot be moved to the top of the screen. The example graphic below shows the new-style Dexcom G6 widget above the old-style Loop 3 widget.
New to Loop or never added a widget before
Experienced Looper who already had a widget should not need to modify anything to see it.
"},{"location":"operation/loop/close-loop/","title":"Closed Loop","text":""},{"location":"operation/loop/close-loop/#closed-loop","title":"Closed-Loop","text":"After you learn what you need from open-loop, this page provides suggestions to smooth the transition to closed loop.
"},{"location":"operation/loop/close-loop/#timing","title":"Timing","text":"Consider transitioning in steps. Some loopers start closed-loop when there are fewer distractions, possibly on weekends. It can be easier to transition at a time that does not involve food, possibly overnight.
"},{"location":"operation/loop/close-loop/#maximum-basal-rate","title":"Maximum Basal Rate","text":"When starting closed-loop, it is important to be conservative. Start with the \"Temp Basal Only\" dosing strategy and limit the maximum basal rate. If your Meal Entries or Therapy Settings (basal rates, CR, ISF) are incorrect, this approach limits the risk of getting too much insulin. Typically, experienced loopers set their max closed-loop basal rate at no more than 3-4 times their average basal rate. Wait until you are comfortable with the slower corrections in \"Temp Basal Only\" before transitioning to \"Automatic Bolus\".
Temp Basal Only vs Automatic Bolus
Both Dosing Strategy methods update the prediction with each CGM or glucose reading, typically every 5 minutes, and use the updated prediction to generate a recommended bolus or recommended dosing restriction.
If your basal, ISF, or carb ratios are not correct, Loop may give you more insulin than you need to reach the correction you selected. Setting the correction range slightly higher at first helps prevent unexpected low glucose as you adjust your settings.
"},{"location":"operation/loop/close-loop/#watch-the-iob","title":"Watch the IOB","text":"Watch whether Loop accumulates positive or negative IOB while holding your glucose steady when no food is present. If you consistently have positive or negative IOB, review whether to adjust your basal rate or ISF.
Expert Tip
In the absence of food, glucose trends should flatten out when positive or negative IOB trends to zero.
The ISF is also important, but basal should be evaluated first.
"},{"location":"operation/loop/close-loop/#meals","title":"Meals","text":"Start with meals that you know well. If Loop suggests less or more insulin than expected as a bolus before the meal - consider why this may be true.
This is definitely an area where YDMV (your diabetes may vary), so don't expect or accept that what works for others will work for you. Test, observe, and adjust as needed.
"},{"location":"operation/loop/close-loop/#automated-dosing","title":"Automated Dosing","text":"Loop calculates a predicted glucose curve based on your programmed settings for carb ratio (CR) and insulin sensitivity factor (ISF), using your glucose, insulin and carb history.
Two scenarios are given below to help illustrate the closed-loop automatic actions of Loop. A more typical scenario is to enter carbs and then use Loop's recommendation for an appropriate bolus.
If you enter a bolus without entering carbs, the prediction will be for your glucose to go low. (The Loop model calculates a negative number for recommended bolus.) For this case, Loop issues a Temp Basal to prevent the low, typically 0.0 U/hr but always less than your scheduled basal rate.
COB and IOB
COB
is the carbohydrates (g) that Loop expects to be absorbedIOB
is the current active insulin (above or below the scheduled basal rate)If you enter carbs and select Save without bolusing
, you have COB without associated IOB. In that case, Loop predicts your glucose will start rising and updates the recommended bolus, which includes consideration of your Glucose Safety Limit
, Correction Range
and Maximum Bolus
. If that recommended bolus is positive, Loop might deliver some part of that bolus automatically - the exact percentage and timing of that delivery depends on your Dosing Strategy
. At each loop cycle (new glucose reading), Loop updates the prediction and calculates a new recommended bolus. When you enter carbs without bolusing, Loop may start delivering some insulin, but if your glucose doesn't start rising as Loop expects, it revises the recommended bolus with each new glucose value.
Automatic dosing only happens when Closed Loop
is enabled in the settings screen.
The Loop app generates a glucose prediction over the next 6 hours (the duration of insulin action), which is why the predicted glucose plot is included on the bolus screen. The Loop app considers glucose prediction with respect to your scheduled Correction Range
over the full DIA, weighting closer predictions more than later predictions, when calculating Recommended Bolus.
It is actually easier to answer when Loop will not automatically increase insulin delivery.
In the situations listed below, the prediction at the end of the DIA can be significantly higher than your Correction Range
but no automatic increase in insulin delivery will occur:
Glucose Safety Limit
, Temp Basal
is immediately set to 0.0 U/hr and recommended bolus is set 0 UCorrection Range
, there is no automatic increase over scheduled basalCorrection Range
, there is no automatic increase over scheduled basalMaximum Bolus
setting, there is no automatic increase over scheduled basalEven in cases where Loop does not automatically increase insulin delivery, the recommended bolus might be positive, which you see if you tap on the bolus icon manually.
"},{"location":"operation/loop/looptips/","title":"Loop Tips","text":""},{"location":"operation/loop/looptips/#loop-tips","title":"Loop Tips","text":"These docs are a great resource for the technical aspects of building your Loop app. However, they don't really cover in detail a lot of the frequently asked questions about USING Loop.
Things such as:
All of those usability questions and more are addressed over in the companion site called LoopTips.
Please head over to Looptips in order to read some really helpful tips to make your Looping easier.
"},{"location":"operation/loop/open-loop/","title":"Open Loop","text":""},{"location":"operation/loop/open-loop/#open-loop-introduction","title":"Open Loop
Introduction","text":"Open Loop
is the best place to start with Loop.
Closed Loop
disabled.The Loop app is built around the concept of Closed Loop
performance.
If you use a Medtronic pump and want to use a feature not found in the Loop app, simply disable Closed Loop
and control delivery with your Medtronic Controller.
If you use an Omnipod pump, keep reading:
There may be a feature, like extended bolus, that you used with an Omnipod Personal Device Manager (PDM) that is not in the Loop app.
Please refer to Extended Bolus.
Practice with Simulators (Click to learn more)You can build the Loop app without connecting it to any hardware.
Pay attention to the prediction in the Glucose Chart. Practice with the user interface while you manually control your insulin delivery. Compare the recommended insulin after entering carbs for a familiar meal. Be sure you understand the predictions and recommendations before you enable Closed Loop
. You may need to adjust settings or learn more about how the app works. The Loop app tries to keep predicted glucose in the Correction Range and, more importantly, above your Glucose Safety Limit.
There's a lot to learn and understand. New loopers may need to adjust the following Therapy Settings, typically in this order:
Using an algorithm that updates glucose predictions and adjusts insulin delivery every 5 minutes requires accurate settings. Entering carbs and absorption time is a new skill that takes time to master.
"},{"location":"operation/loop/open-loop/#eventual-glucose","title":"Eventual Glucose","text":"Watch the eventual glucose, current glucose and prediction curve in the Glucose Chart to understand recommendations for insulin delivery adjustment. The Loop app is looking at current glucose, glucose momentum, carbs on board, insulin on board, and retrospective trends to predict an eventual glucose. Its current decisions are based on actual, predicted and eventual glucose. Predictions for the first three hours of insulin duration of activity are given more emphasis than later predictions when deciding how much insulin should be recommended or withheld from basal.
If there is a dip in the predicted glucose below the Glucose Safety Limit, the Loop app will not recommend insulin even if the eventual glucose is above your Correction Range.
Closed Loop
mode, the Loop app automatically decreases insulin delivery using a temp basal of 0 U/hr until the predicted glucose exceeds the Glucose Safety LimitClosed Loop
mode, the Loop app automatically increases insulin delivery only after predicted glucose is above the bottom of the Correction RangeIf the Loop predictions don't match your experience, your settings may need to be adjusted.
If you want to issue a manual temp basal, this is done on the pump for Medtronic or using the Manual Temp Basal feature for Omnipod.
"},{"location":"operation/loop/open-loop/#testing","title":"Testing","text":"Open Loop
mode shows you glucose trends without the influence of temporary basal or automatic bolus. This is particularly helpful if you haven't used Medtronic sites/pumps or Omnipod before. You may find that your basal rates and carb ratios can change significantly coming from other brands of pumps or from multiple daily injections (MDI).
The suggestions below work for most people. You need to adjust for your own situation.
Take the time to establish a good basal profile while in Open Loop
mode using the pump you plan to use for the Loop app. When using an algorithm, your basal rates needs to be neutral; in other words your glucose, in the absence of food and exercise, should be stable. (When you do basal testing, you should aim to stay at a glucose that is steady within 35 mg/dL (2 mmol/L).)
If you previously ran a high basal rate during the day to cover meals, you may need to adjust your CR (to a smaller value) after your basal rate is adjusted to be neutral.
Test your insulin sensitivity factor (ISF) during Open Loop
after your basal rates are established. The Loop app uses your ISF every 5 minutes to update predictions, so it's worth testing before turning on automated insulin dosing with Closed Loop
mode. You may need a different, probably higher value, than what you used as a correction factor with manual pumping or MDI.
The algorithm uses the ratio of ISF/CR as part of the prediction while meals are being absorbed. That ratio is approximately how much a single gram of carbohydrate raises your glucose. Experiment by taking a small fast-acting \"low treatment\" when stable with no other food or exercise.
Assume ISF is 75 mg/dL and CR is 15 g/U. When a 4 g glucose tablet is consumed, you expect to see a sharp rise in glucose by about 20 mg/dL over the next half hour to an hour. (Your ISF/CR ratio times the grams eaten should be within a factor of two of how much rise you see in glucose.)
"},{"location":"operation/loop/open-loop/#meal-entry","title":"Meal Entry","text":"Loop recommends increased insulin dosing as soon as you save carbs.
Meal Entry is an important concept - there's a whole page devoted to it later in the docs - but here's a quick summary. You tap on the plate icon in the Toolbar before you meal to show the Add Carb Entry screen.
Loop uses carb absorption as a component to every meal entry. Most people are successful with the default absorption time of 3 hours. Remember the Loop app updates the prediction every 5 minutes and will adjust if you get the amount or absorption time wrong, as long as you are close.
The Active Carbohydrate chart displays how the app thinks your meal is being aborbed. This is affected by your basal rates, ISF and CR. If it looks wrong, examine your settings.
Depending on the type of food you eat, you may increase the carb entry to include some protein or fat.
"},{"location":"operation/loop/open-loop/#manual-or-correction-bolus","title":"Manual (or Correction) Bolus","text":"At any time, you can enter a bolus using the Bolus (double orange triangles) icon in the Toolbar. The Loop app offers a recommendation if the glucose prediction supports one. Review the Eventual Glucose section above to understand when the app will recommend a bolus. The Loop recommendation can be modified by editing the Bolus amount.
If you tap on the Bolus button (on the Toolbar), does the app recommend more insulin?
Ask if this is the same decision you would make. This effort will help smooth the transition to Closed Loop
.
If you use a RileyLink, determine how far the link can be from your phone and pump, and plan where to carry the link. DASH Omnipod users do not need the RileyLink but should determine how far their phone can be from the pod without communication problems.
Learn to troubleshoot Red Loops and the cause of potential loop issues. You'll be less frustrated starting on closed loop if you know how to address these issues.
Familiarize yourself with the Bolus Failure Notifications.
"},{"location":"operation/loop/open-loop/#caregiver-training","title":"Caregiver training","text":"Caregivers for Loopers should learn how to use the Loop app. School staff or your child need to know how to handle a site change or CGM failure at school. Consider preparing an individualized quick info sheet for your child.
Learn to observe the Nightscout site while your child is with you and you can look at their phone. This will help you help your child if they have problems when they are not with you.
For more reading, there's a whole set of pages on using Nightscout with the Loop app and setting up a secure method for you to provide bolus or carb entries via remote commands.
"},{"location":"operation/loop/open-loop/#apple-health-in-open-loop","title":"Apple Health inOpen Loop
","text":"If you are using the Apple Health app to examine insulin given while in Open Loop
, basal delivery is not recorded in the Health app promptly. You can force an update from the Loop app to Health by suspending and then resuming the pump. If you do this, keep watching the app to make sure delivery did resume.
A menu item to set an extended bolus is not a feature provided by the Loop app at this time. You can make your own extended bolus using the Manual Temp Basal
feature with Omnipod.
During the time the Manual Temp Basal
command is running, the Loop app will make no automated changes to dosing even if the Closed Loop
slider is selected as enabled.
This section was added at user request. Once you switch to Closed Loop
mode, you should not need this. But before you are ready for that step, you may want to use a tested method for a known meal.
Consider a desired total bolus \\((BolusTotal)\\) given over an extended time with a prompt amount \\((PromptAmount)\\) now and the balance \\((Balance)\\) delivered over the next \\((H)\\) hours with a current scheduled basal rate \\((BR)\\).
First the equations to calculate the desired rate \\((MTB)\\) to enter into the Manual Temp Basal
menu and then an example.
Manual Temp Basal
to value of \\(MTB\\) units/hour for \\(H\\) hoursThe order is important. Sending the Manual Temp Basal
request to the pod is a single command and then the Loop app is available for the next command to be entered. The Loop app (and pod) will not respond to any pod commands until the bolus finishes delivering; this takes about 40 seconds per unit requested.
For this example:
You have your choice of rounding \\(MTB\\) up or down to the nearest \\(0.05 U/hr\\). For this example, the quantity of \\((2/1.5)=1.333\\) was rounded up to \\(1.35 U/hr\\).
Why isn't there a menu item? (Click to see more)Each item provided by the Loop app needs a volunteer to decide it is important and develop a method to provide that item. If a volunteer steps up to do this work, there is a long process of discussion and code review before such a modification is considered for the development branch.
Most Loopers go to Closed Loop
quickly and this feature is not an option at this time.
Now we need to add a CGM source so that Loop has glucose data. From the Loop settings screen, select Add CGM
.
The standard selections are:
If you added a compatible Medtronic pump earlier in the setup process, then you will also see an option for the compatible Medtronic sensor that works with that same pump. If you are using a compatible MDT sensor, select that option and the CGM data will be uploaded to Loop when pump status is updated.
"},{"location":"operation/loop-settings/cgm/#about-dexcom-share-credentials","title":"About Dexcom Share credentials","text":"You do NOT need your Share account info listed in Loop settings if you are using a G4, G5, or G6 system. The transmitter ID is sufficient. In fact, the recommendation is that you leave your Share account empty so that you don't accidentally become internet-dependent for CGM data when you forget to update your transmitter ID when you start a new transmitter. Just leave the Share credentials blank.
If you need to use Dexcom Share
If the dexcom is on another phone and you choose to use Share (not advised), here is some information.
For all selections, the Dexcom Share credentials (in other words, account login) is the same as what you used to log in to the active Dexcom app on your iPhone. Dexcom Share account is not always the same login info as your Dexcom Clarity account. For G4 users, the Share account is found in the account tab on the app. For G5/G6 users, unfortunately, there is no information in the app displaying what your account name is. The information is entered when you first log in to the app and then is never displayed again, nor visible under any information screens. If you have forgotten your G5/G6 account info, you can delete the Dexcom app and redownload it to try logging in again. This will not cause a restart of any sensor sessions in progress.
If you do not enter your Share credentials correctly, you will get an error when Loop tries to access your Share account to backfill CGM data. That error message will look like below. If you see that message, delete your Share account from Loop settings and try again...or just leave it out and depend on your transmitter ID.
"},{"location":"operation/loop-settings/cgm/#dexcom-g5-g6-one","title":"Dexcom G5, G6, ONE","text":"The Dexcom G5 and G6 options only require the addition of the active transmitter ID, and the matching Dexcom app to be running on the Loop iPhone. Use the G6 options if you are using a Dexcom ONE CGM.
When you change transmitters, you will need to select the Delete CGM
button at the very bottom of the CGM info page in Loop. Then you will select your Dexcom system again and add the new transmitter ID. You cannot just tap on your old transmitter ID to update it.
If you don't update your transmitter ID when you change active transmitters, your Loop will not get CGM data from the Dexcom app.
If you did add Share credential, Loop will get data from your Dexcom Share server and will not work without cell or wifi connection. When Loop is using data from Dexcom Share servers, a small cloud will appear above the glucose reading in Loop and should tip you off that maybe you forgot to update your transmitter ID.
"},{"location":"operation/loop-settings/cgm/#dexcom-g4","title":"Dexcom G4","text":"Dexcom G4 users will need the Dexcom G4 Share2 app active on their iPhone and paired to their Dexcom G4 Share receiver.
"},{"location":"operation/loop-settings/cgm/#dexcom-share","title":"Dexcom Share","text":"The Dexcom Share selection is primarily for people who wish to test Loop function without a local CGM source and who are not running the Dexcom app on their Loop iPhone. This selection will require login access to a Dexcom Share account with live data and active internet connection in order to work.
Dexcom Share is not available for Dexcom ONE CGM.
"},{"location":"operation/loop-settings/cgm/#libre-and-other-cgm","title":"Libre and Other CGM","text":"Loop 2 does not natively support Libre CGM.
If you switch to Loop 3, there are additional CGM options:
If you choose to build Loop-dev, Libre support has been added.
If you can upload your CGM to Nightscout, Loop 3 offers the option to use Nightscout as a CGM source.
You can choose to download the Loop with patches option when building with the script.
Now that you have added your CGM source, we need to complete the configuration and settings in your Loop. Please head over to the Loop 2 Configuration page for guidance with this important part of Loop's setup.
"},{"location":"operation/loop-settings/configurations/","title":"Loop 2 Configuration","text":""},{"location":"operation/loop-settings/configurations/#configuration","title":"Configuration","text":"This page will cover two general parts of the Loop app settings for Loop 2.2.x versions. The sections documented are circled in red in the screenshot below. The headings will match the flow of the screen, top to bottom.
The first circled section covers closed/open loop status and how to issue a Loop Report.
The second circled section is the configuration section. This section contains a lot of really important settings that control how your Loop will calculate your predicted glucose curve. Given the importance of your predicted glucose curve to Loop's actions, please make sure you read over this page carefully to know how to navigate the selections and entries.
The user can select closed loop or open loop using this slider. When you first start Loop, we encourage you to leave this slider disabled and become familiar with the app using Open Loop mode.
As soon as Closed Loop is enabled, Loop will begin automatic adjustment of insulin dosing. Please ensure the settings you entered are appropriate for the Loop algorithm.
"},{"location":"operation/loop-settings/configurations/#open-loop-mode","title":"Open Loop Mode","text":"When the Closed Loop switch is in the (Off) position, Loop WILL NOT modify insulin dosing automatically.
"},{"location":"operation/loop-settings/configurations/#closed-loop-mode","title":"Closed Loop Mode","text":"When the Closed Loop switch is in the (On) position, Loop WILL automatically modify insulin dosing on the configured insulin pump. This is known as closed loop. Typically, Loop will show the recommended temp basal or automatic bolus just above the blood glucose graph prior to automatically enacting it. It may take a few seconds for Loop to connect to the pump to enact the modified dose.
"},{"location":"operation/loop-settings/configurations/#issue-report","title":"Issue Report
","text":"If you run into problems or errors with your Loop, a Loop Report, generated by tapping on the Issue Report
row can be used to help identify where the problem is occurring. The Loop Report can be sent to yourself via text or email. You can then post it on Zulipchat to ask for help.
Frequently, if you seek help with a technical problem, a Loop Report will provide insight for the developers and troubleshooters. Please email yourself a Loop Report anytime you are questioning Loop actions or displays. Acquiring a screenshot of the phone is also useful. You can use the report and graphics later to ask for help or discard them if you figure it out on your own.
"},{"location":"operation/loop-settings/configurations/#select-glucose-units","title":"Select Glucose Units","text":"Before you continue further, a word about glucose units
Entries into the configuration section will be available in mg/dL or mmol/L automatically, based upon how your blood glucose values are received. By default they are set to mg/dL, however once CGM values arrive in mmol/L these Loop settings can be entered in mmol/L. If you are planning to use mmol/L, be sure to wait to set your entries until after you have started to receive CGM values in Loop. If you do these in the wrong order, then your charts and entries may have incorrect units.
"},{"location":"operation/loop-settings/configurations/#correction-range","title":"Correction Range","text":"The correction range is your blood glucose range that you would like Loop to correct to. Correction range is not necessarily the same target blood glucose range that you have discussed with your endocrinologist; generally the doctor's range may be much wider. For example, you may keep a correction target of 100-110 for Loop to aim to, but use a desired glucose target range of 80-180 when discussing things with your endo about \"time in range\".
Click the + in the upper right corner to add correction glucose range(s). You can have multiple ranges based on time of day, but the first setting of the day needs to begin at midnight.
Correction ranges can be a single number, such as 100-100 mg/dL, or a range such as 100-120 mg/dL. Generally speaking, if you choose to use a range, keeping the range between about 10-30 mg/dL between the lowest and highest value is a good starting place.
"},{"location":"operation/loop-settings/configurations/#pre-meal-range","title":"Pre-Meal Range","text":"Below the Correction Range entry is a section called \"Overrides\" with a Pre-Meal setting. While active, the pre-meal targets will replace the usual correction range for Loop's temp basal recommendations. If a pre-meal range is not entered in this section, the icon will remain grey and unusable on the main screen's toolbar.
The pre-meal override target can be used as an easy way to get a small amount of insulin delivered before a meal in order to help control post-meal blood glucose spikes.
If your normal target is 100-110 mg/dL and pre-meal target is 80-80 mg/dL, for example, Loop will give you an extra push to get you to the lower target number before the meal. This early insulin brings you into the meal with a mini-prebolus. The pre-meal target, when activated by pressing on the icon, will stay active for one hour, until carbs are entered, or until it is manually cancelled...whichever comes first.
Loop will adjust any insulin bolus as needed based on the extra insulin provided during this pre-meal time.
"},{"location":"operation/loop-settings/configurations/#suspend-threshold","title":"Suspend Threshold","text":"The suspend threshold must be set up for successful configuration of Loop. Your Loop will not turn green without setting this value. This value affects both bolus and basal recommendations by Loop.
"},{"location":"operation/loop-settings/configurations/#bolus","title":"Bolus","text":"Reasonable settings for suspend threshold will depend on user preference, but recommended not set lower than 65 mg/dL.
"},{"location":"operation/loop-settings/configurations/#basal-rates","title":"Basal Rates","text":"Note: You cannot enter basal rates until you first add a pump in Loop settings. Your basal rates will be initially populated when you walk through the Add Pump
part of the setup at the beginning of this setup guide.
Only one basal schedule may be set in each Loop app. The basal increments are available according to the increments of the particular pump/pod you are using. Not all pumps provide the same increments for basal deliveries. Basal schedule must start at midnight and cannot contain rates of 0 U/hr.
To edit a line in your basal schedule, tap the line and adjust the time and/or amount. To remove a line, select Edit in the top right and delete it. If tapping the line doesn't work, try closing and re-opening the app. When finished editing, click on the Save to Pump...
or Sync With Pod
button, depending on which pump you are using.
If you make any basal edits and use the Cancel
button to go back to the menu without successfully saving/syncing to pump/pod, the changes you made will not be saved. Loop makes saving/syncing to pump a mandatory step to successfully editing basal rates. If you get an error message while trying to save/sync the edited basal rates, please retry until successful.
The maximum basal rate and maximum bolus settings are collectively referred to as Delivery Limits. This section will have been initially populated when you finished the Add Pump
part of the setup previously. For safety, similar to basal schedule, you must keep these values the same on both the Loop app and within the pump/pod settings. If you edit these settings in Loop app, always use the Save to Pump...
or Sync With Pod
button, depending on which pump you are using.
Maximum basal rate will cap the maximum temporary basal rate that the Loop is allowed to enact to meet your correction range. Typically, Loop users set their maximum basal rate around 3-4 times their highest scheduled basal rate. When you are first beginning to use Loop, it is wise to start conservative (low) in setting your maximum basal rate. If your settings are incorrect in other areas (basal rates, insulin sensitivity, carb ratio, etc), you may need time to identify where settings need to be adjusted. This process is easier if Loop is given less latitude to set high basal rates. Gradually increase your maximum basal rate as your comfort and confidence in Loop increases. If you need help with your settings adjustment, head over to LoopTips for some initial settings help
"},{"location":"operation/loop-settings/configurations/#maximum-bolus","title":"Maximum Bolus","text":"Enter your desired single bolus maximum here. For safety, don't set a maximum bolus limit any higher than your typical large meal bolus.
"},{"location":"operation/loop-settings/configurations/#insulin-model","title":"Insulin Model","text":"There are four insulin models to choose from with Loop 2.x; Walsh, Rapid-Acting Adults, Rapid-Acting Children, and Fiasp. If you want to read the nitty-gritty discussion that went into the development of the Rapid-Acting and Fiasp curves (collectively called \"exponential insulin models\"), you can see that in GitHub here.
Loop 3 Insulin Type
Loop 3 drops the Walsh model and, by default, does not include the concept of child versus adult for \"rapid\" acting insulin, i.e., Humalog, Novalog and Apidra.
We highly recommend selecting one of the exponential insulin models for Loop 2.2.x (in other words, not the Walsh model).
A common new Loop user error is to select Walsh model in order to easily shorten their insulin duration (DIA) to one like they used prior to Looping. This almost invariably leads to insulin stacking. If you would like to read more about why the duration of insulin action is important in Loop vs how you've traditionally used it, please click here to read a blog post about the subject. In summary, choosing Walsh curve just to shorten your DIA will lead to insulin stacking and less than desired bolusing recommendations.
You can click on each model and see what each model's insulin activity curve looks like, active one selected in blue.
The differences between the three exponential models (two Rapid-Acting and Fiasp) models has to do with the timing of the peak insulin activity timing. Not surprising, since Fiasp is marketed as the \"faster acting\" insulin. Currently all the exponential models are defaulted to an insulin duration of 6 hours, but the peak activity of the curves differs:
This configuration setting gives you the ability to select the Dosing Strategy. (If you do not see this setting, then you are running Loop v2.2.4 or older.) If you tap on that Dosing Strategy, it reveals a selection screen, shown in the graphic below, with some explanation. Note that this Dosing Strategy feature was available for more than a year in the automatic-bolus branch. Users who have been using the automatic-bolus feature should update as soon as possible to get the other improvements recently added, Loop Releases.
The Automatic Bolus selection causes Loop to provide 40% of the recommended dose as a bolus at the beginning of each Loop cycle (when a CGM reading comes in). This is a faster method of getting the recommended insulin delivered. When Loop delivers extra insulin, the scheduled basal rate continues unchanged.
Both Temp Basal Only and Automatic Bolus strategies restrict basal rates to reduce the amount of insulin delivered when appropriate.
"},{"location":"operation/loop-settings/configurations/#temp-basal-only","title":"Temp Basal Only","text":"You can manually bolus at any time by pressing the Bolus icon in the center of Loop\u2019s Main Screen.
"},{"location":"operation/loop-settings/configurations/#automatic-bolus","title":"Automatic Bolus","text":"When you are first starting Loop, we encourage you to leave automatic boluses disabled until you are sure your settings are dialed in. To enable automatic boluses, click on Settings \u2013 Dosing Strategy \u2013 Automatic Bolus. This Automatic Bolus checkbox turns-off positive temporary basal so that:
As with all Loop versions, you can manually bolus at any time by pressing the Bolus icon in the center of Loop's Main Screen. Any bolus recommendation that you see when you press the Bolus icon will be 100% of the Recommended Bolus.
"},{"location":"operation/loop-settings/configurations/#carb-ratios","title":"Carb Ratios","text":"Click the + in the upper right to add carb ratios for various times of day. Loop works best if you have tested and optimized your carb ratio settings for accuracy.
Beware of other apps writing carbs to Health app
If you are using a third-party app (such as Spike or MyFitness) that can write carbohydrates to the phone's Health app, you will need to double-check permissions to make sure Loop doesn't read those carb entries. Confirm Loop permissions in Health to only write
and not read
carbs. See see Loop Permissions.
Insulin Sensitivity Factor (ISF) is the same term as Correction Factor used in some clinics and endocrinology offices. ISF represents the drop in blood glucose levels expected from one unit of insulin. Click the + in the upper right to add insulin sensitivities for various times of day. Loop works best if you have tested and optimized your ISF settings for accuracy. Insulin sensitivities can change for many reasons including waiting too long to change your infusion set. Loop will not auto-detect changes in ISF.
Incorrectly set ISF is the most common cause of roller coaster glucose for new Loop users. You will need to raise (increase) your ISF value/number to help smooth a roller coaster glucose trend. You can read about that topic more over in LoopTips here.
"},{"location":"operation/loop-settings/configurations/#loop-2-services-optional","title":"Loop 2 Services (Optional)","text":"You are not required to use services, although many Loopers use Nightscout. If you do not yet have Nightscout configured and want to add it later, just return to this page when you are ready. This can be added at any time. The same is true for the other services. For more details, click on Loop 2 Services.
"},{"location":"operation/loop-settings/configurations/#next-step-loop-2-displays","title":"Next Step: Loop 2 Displays","text":"Proceed to the Loop 2 Displays page. Understanding the Loop displays can be a valuable tool to understanding your Loop's actions, and also for troubleshooting, if you are having issues.
"},{"location":"operation/loop-settings/displays/","title":"Loop 2 Displays","text":""},{"location":"operation/loop-settings/displays/#loop-displays","title":"Loop Displays","text":"This section of the docs describes the Loop displays available and what information they offer. Information about Loop's actions (or inactions) can often be found simply by looking at the visuals presented in the app. (Page last updated for Loop v2.2.4.) For Loop 3, refer to Loop 3 Displays.
"},{"location":"operation/loop-settings/displays/#status-screen","title":"Status Screen","text":"The Status Screen is the main root navigation screen in Loop. It is broken up into 3 main display areas; Heads Up Display (HUD), Charts, and Toolbar. The HUD is the top area of the screen. This shows the status of the last time loop ran, current BG Reading, current temp basal, and current pump information. The next area is the charting area. This includes, glucose trend and prediction, Active Insulin, Insulin Delivery, and Carbohydrates. The final display area is the toolbar which has buttons for Carbs, Pre-Meal, Bolus, Overrides, and Settings.
"},{"location":"operation/loop-settings/displays/#heads-up-display","title":"Heads Up Display","text":"The Heads Up Display (HUD) is a very useful quick reference guide to your Loop's status. Every 5 minutes, Loop updates CGM and pump/pod data. Loop timestamps the HUD data with the last data point that came in. If a timestamp goes older than 5 minutes old, that is a valuable indicator to where your Loop is failing to get the needed information. The HUD's first three icons, from left to right, are the same no matter whether you are using a Medtronic pump or Omnipod; status of the last time loop ran, current BG Reading, and current relative temp basal. The last two icons will change depending on what type of pump you are using.
Medtronic users: The last two icons are the most recent (1) pump/reservoir status and (2) pump percentage battery remaining. Details below
Omnipod users: The last two icons are the most recent (1) pod status and (2) hours of pod use. Details below
"},{"location":"operation/loop-settings/displays/#loop-status","title":"Loop Status","text":"The Loop Status is the colored circle in the upper left corner of the main Loop display. There are four colors that are typically displayed.
A grey circle indicates the Loop is warming up and hasn\u2019t yet completed its initial loop. When the Loop is first activated, it may take about 15-20 minutes to complete the first Loop, and the grey circle will be displayed. It needs CGM data to be gathered, so be patient. When it finally completes its first loop, the circle will turn green. If you can't get your grey loop to turn green, please see the Yellow and Red Loop troubleshooting page for tips. A green circle indicates the Loop has been successfully completed within the last 5 minutes. The time since the loop last completed will be displayed under the circle. A yellow circle indicates the Loop has not completed in the last 5-15 minutes. It is not unusual to have a few instances of yellow circles throughout a day of looping. They can be caused by temporarily getting too far away from RileyLink or iPhone (more than about 3-10 feet depending on conditions), CGM failing to read or being in ???, radio frequency \u201cnoise\u201d interference, and such. Generally, most yellow circles will self-resolve without needing any special troubleshooting. A red circle indicates the Loop has not completed in over 15 minutes. This is not a typical state, and you should troubleshoot why Loop is not completing. Please review the Yellow and Red Loop troubleshooting page for tips on how to get your green Loop back. Clicking on the red circle will also pop-up the last error message to help guide your troubleshooting. When the circle is notched and not complete, that means the Loop is operating in \u201copen-loop\u201d mode. When the \u201cclosed-loop\u201d setting is turned on, the loop status will show a completed circle.Fun Fact
The loop status icon will pulse slightly when Loop is communicating with the pump. The pulsing will stop when the communication has completed (green loop) or given up (yellow or red loop).
"},{"location":"operation/loop-settings/displays/#glucose","title":"Glucose","text":"The current BG reading from the CGM will display, including trending arrow and time the reading was taken. If the BG is being read straight from the G5/G6 transmitter or G4 receiver, no special symbols will appear. If the BG is being read from the Dexcom Share Servers, a small cloud icon will be in the corner of the BG reading. Internet access is required to run in this mode. When you first start Loop, there may be a small yellow alert next to the BG. This should go away within a short period of time (around 5 minutes or less). If the yellow alert remains, something may be wrong with fetching BG data. You can try restarting the Loop app (double tap home button, up-swipe on the app to close it) to see if BG data will resume. Special note for Dexcom G5/G6 users>, a yellow alert will appear when calibration is needed. The alert will clear once the calibration is given, but typically Loop will work IF the yellow alert is only for a needed G5/G6 calibration."},{"location":"operation/loop-settings/displays/#temp-basal","title":"Temp Basal","text":"The temp basal will display the enacted temp basal change relative to the scheduled basal. So if the scheduled basal was 1.0 units per hour and Loop has set a temp basal of 0.2 units per hour, the temp basal icon will display -0.8 U, as shown in the graphic to the left."},{"location":"operation/loop-settings/displays/#reservoir-medtronic-users","title":"Reservoir (Medtronic Users)","text":"The reservoir icon will remain grey and plain until insulin volume decreases. At 25% reservoir volume remaining, the reservoir icon will turn yellow. At 10% reservoir volume remaining, the reservoir icon will turn red. The remaining units will be displayed when it gets to these lower thresholds."},{"location":"operation/loop-settings/displays/#battery-medtronic-users","title":"Battery (Medtronic Users)","text":"For x54 pumps, the battery icon will show 100/75/50/25% increments just as the pump does. As the battery level decreases, the icon will turn from grey to yellow to red. For x22, x23 pumps, the battery icon will read discrete % values. The warning colors/levels on Loop's battery indicator work in conjunction with the type of battery selected. If you change battery types, please make sure to update your battery selection in the Loop app settings. The pump's on-screen battery indicator is not a good indicator of remaining battery life for the purposes of looping. Loop's pump communications will fail from low battery levels sooner than the insulin delivery will fail. The Loop's battery level warnings are designed to give you approximately 8 hours of notice before the pump battery will need changing."},{"location":"operation/loop-settings/displays/#reservoir-omnipod-users","title":"Reservoir (Omnipod Users)","text":"The pod icon will remain grey and plain until insulin volume decreases. At 50 units or less insulin remaining, the reservoir icon will turn yellow. At 20 units or less remaining, the reservoir icon will turn red. The remaining units will be displayed when it gets to these lower thresholds. When the reading is 0 units, there may be up to 4 units of insulin available but don't count on it. If the pod senses insulin can no longer be delivered, the pod will have a sustained audible alarm (the scream). Tapping Replace Pod in Loop->Pod->Settings should silence the alarm."},{"location":"operation/loop-settings/displays/#pod-age-omnipod-users","title":"Pod Age (Omnipod Users)","text":"The pod's age, typically a 3-day lifespan, is represented by three equal segments of the pod age icon. As the pod ages, the segments are converted to a darker grey color. At 54 hours old, the pod age icon will turn yellow. At 72 hours old, the pod age icon will turn red, the pod will begin the periodic warning beep, and the pod age icon will show a \"replace pod\" message in the HUD. When you reach 80 hours of pod use, the pod will have a sustained audible alarm (the scream) and stops all insulin delivery. Tapping Replace Pod in Loop->Pod->Settings should silence the alarm."},{"location":"operation/loop-settings/displays/#charts","title":"Charts","text":"There are several charts that help you navigate your Loop actions. Clicking on each of the charts will also open up additional information.
"},{"location":"operation/loop-settings/displays/#glucose-chart","title":"Glucose Chart","text":"The glucose chart displays BG values in your preferred units. (If not, quit and restart Loop app on your phone.) The vertical scale of the chart is calculated on the fly by Loop to be as useful as possible while including the highest and lowest readings in the chart.
The horizontal axis is set to go forward from the current time until your DIA (insulin duration) forward (so you can see what Loop thinks BG will be eventually). It then goes back in time as far as it can, based upon the width in pixels of your screen. Note, if you turn your device to landscape mode you will have more screen real estate and thus will be able to see further back in time.
The BG correction range is shown as a blue bar on the glucose chart. Single-value range BG range (such as 100-100 mg/dL), will have a narrower blue range. When a temporary override range is enabled, a darker blue bar where the overrides are set will be displayed, as well as the normal correction range in lighter blue.
If you have a crazy negative prediction - it is likely that you set an override with a tiny Overall Insulin Needs setting. Don't do that again. Best approach: Do not panic - this is a prediction only; not reality. Open the loop until the prediction settles down. In future, do not choose a tiny Overall Insulin Needs setting to force less insulin, simply increase the correction range in your override - Loop will reduce your basal rate at the next cycle (within 5 minutes).
The eventual BG displayed on the right side of the chart does NOT take into account a recently enacted temp basal. In other words, if you are above BG range and Loop just enacted a high temp basal to help, the eventual BG does not reflect the expected lowering of BGs that would result from that recently enacted temp basal. Loop waits until the insulin has actually been delivered before it \"uses\" the insulin in its calculations for BG impacts. If you suspended your pump or had a \"no delivery\" alarm shortly after the temp basal was started, you would want that accurately reflected in the insulin on board and associated eventual BG.
If you tap on the Glucose Chart itself, it will open the Predicted Glucose chart described below.
"},{"location":"operation/loop-settings/displays/#predicted-glucose-chart","title":"Predicted Glucose Chart","text":"The predicted glucose view is a great way to gain insight into the various components\u2019 importance in Loop\u2019s prediction of eventual BG.
The graph at the top of this view will match your Glucose Chart. Below this chart you will see a very detailed explanation of all of the variables that Loop takes into account in predicting your future BG value. Each of those effects (including Carbohydrates, Insulin, Glucose Momentum and Retrospective Correction) includes details of the calculation used. You can tap on any of the entries to turn them off and on for visualization. The resulting changes can be viewed by the changes in the dashed lines.
Note - these elements are not turned on and off in the Loop predictions. They just modify the graph so you can view the relative effects.
"},{"location":"operation/loop-settings/displays/#active-insulin-chart","title":"Active Insulin Chart","text":"The Active Insulin chart displays the total insulin contribution from both temp basals and boluses. Active IOB can be either positive and negative IOB. Negative IOB results from the suspension of normally scheduled basals. The active insulin displayed in the upper right corner of the chart does NOT include insulin contributions from a recently enacted temp basal or bolus until the (for Medtronic) pump\u2019s reservoir volume is read and confirms a drop in reservoir volume (confirming the insulin has actually been delivered). The opposite is true for Omnipods. If a message is sent from Loop, it assumes the pod got the message and enacted it - even if the acknowledgement is not received. Later, when communication is restored, if a command was not enacted by the pod, the Event History is updated.
Medtronic Only: So long as you have Event History as the Preferred Data Source in Loop settings, primed insulin deliveries (e.g., cannula fills or manual primes) will not be counted towards IOB.
"},{"location":"operation/loop-settings/displays/#insulin-delivery-chart","title":"Insulin Delivery Chart","text":"The Insulin Delivery chart displays a history of the temp basals enacted by Loop. The display is relative to the scheduled basal rates entered in the Loop settings. So, a rate displayed in this chart as +0 units
would indicate no temp basal was set, and Loop defaulted to the scheduled basal rate. Individual boluses are indicated by an orange triangle on the chart (shown in the graphic above, near the left-most time). The total insulin delivered since midnight, including all basals and boluses AND (Medtronic Only) priming insulin, is given in the upper right corner of the graph.
Please be patient for a bolus delivery to appear. There is a lag time from when you press the \u201cdeliver\u201d bolus button to when the orange triangle is drawn sometimes. The insulin has to be delivered and then the (Medtronic Only) pump reservoir needs to be read to confirm delivery, before the triangle will appear and IOB will be added. Occasionally, the bolus may be temporarily rendered (drawn) as a very high temp basal rate vs. a (triangle) discrete bolus event. This does NOT mean that the Loop actually enacted a high temp basal rate...only that the bolus is being drawn on the chart in the equivalent of a high temp basal rate.
"},{"location":"operation/loop-settings/displays/#reservoir-and-event-history","title":"Reservoir and Event History","text":"Clicking on either the Active Insulin or Insulin Delivery charts will open your Insulin Delivery history. The top of the screen will display the current IOB and the total insulin delivered for the day since midnight (or since the time the loop became active if you started Loop after midnight). There are two viewing options; Reservoir or Event History.
Reservoir: Omnipod users should not worry about the reservoir display. Pods do not report or track insulin remaining until their reservoirs get below 50 units remaining. If your pod has more insulin than that - you'll see the reservoir history from the previous pod - ignore that. Medtronic users will have reservoir history displayed in 5-minute increments, unless Loop has been having communication issues.
Event History: Event history is a detailed accounting of all pump/pod actions. Both Medtronic and Omnipod users will have a detailed record of event history. If you tap on an event, you get more detail. Turn your phone to landscape to improve readability.
The Carbohydrate chart displays the carbs used by Loop to predict BG changes. The active COB is displayed in the upper right corner of the chart. Clicking on the chart will open the Carb Entries history and you can edit/delete any previous entries through that screen. Please read the Carb Entry page for more information about editing carb entries.
For more information about the Insulin Counteraction Effects information found in the Carb History, please see here.
"},{"location":"operation/loop-settings/displays/#tool-bar","title":"Tool Bar","text":"The toolbar is where your inputs to the Loop behavior take place. The individual components of the toolbar are, left to right:
Carb entry tool- click on this tool to enter carbs into the Loop app. Loop will not read carb entries from a Medtronic pump or Nightscout, so you must use the carb entry tool in Loop app in order to have carbs accounted for by the Loop. Detailed info regarding how to enter, save, and edit carb entries can be found in the Carb Entry page.
Pre-meal range - click this tool to set the Pre-Meal temporary override range. (If you have not configured a pre-meal range under Loop Settings, this icon will be inactive - some people prefer this to avoid accidently tapping it.) This range will remain in effect (1) for 60 minutes, (2) until a carb entry is saved, or (3) until the range is toggled off manually or by tapping on the override icon, whichever comes first. The background coloring of the Pre-Meal range will turn green when active and there will be a dark blue line on the BG chart indicating where the override range is enabled.
Bolus tool - click on this tool to bring up the bolus tool. Normally, this screen will automatically open on its own and function as a bolus wizard when a meal is saved on the carb entry tool screen. But you can click on this icon anytime to manually bolus. During rapidly rising BGs, where Loop doesn't have an adequate temp basal rate to cover the pace at which BGs are rising, you may try clicking on the bolus tool to see if Loop is recommending a correction bolus to help control the BG spike. Or if you want to trade bolus now for basal later (super bolus), you can enter a bolus greater than Loop recommends - Loop will set zero Temp Basal next cycle. For more information about the Bolus tool features and use, see the Bolus page.
Overrides - click this tool to set an Override.
Loop Settings - click on this tool to make changes to any of your Loop settings.
The pump attached to Loop has a screen to display status and command options. For Loop 2, these are documented in Loop 2 Pump Settings.
"},{"location":"operation/loop-settings/mdt-pump/","title":"Loop 2 Add Medtronic","text":""},{"location":"operation/loop-settings/mdt-pump/#medtronic-pump-users","title":"Medtronic Pump Users","text":"Your Loop app will have a lot of blank spots until you input some basic settings. The beginning step is to add a pump to your Loop app. If you are using an Medtronic pump, you can follow along for the rest of this page. If you are using an Omnipod pump, please head over to Loop 2 Add Omnipod instead.
"},{"location":"operation/loop-settings/mdt-pump/#prepare-medtronic-pump","title":"Prepare Medtronic Pump","text":"Before you begin the rest of the setup process, there are several steps on your Medtronic pump that you will need to complete prior to moving on with Loop setup. DO NOT SKIP THESE STEPS OR YOUR LOOP WILL NOT WORK.
Temp Basal Type
to Insulin Rate (U/hr)
. Do NOT use percentage. Your Loop will not run unless your temp basal type is set to units/hour.ON
and enter any random ID (010101 will work - avoid using all zeros). This setting is found in the pump's Utilities menu (for x23 continue to Connect Devices, Remotes) and turn ON
the Remote Options.Let\u2019s start by clicking on the Loop Settings button in the tool bar at the bottom of your Loop app. It looks like a little sprocket. On the settings screen that opens, click on Add Pump
and select the Medtronic pump option that appears.
New RileyLink compatible devices won't have a name listed next to their slider at first. The name will only be displayed after connecting the device to Loop for the first time. So, if all you see in the device list is a little toggle and no \"RileyLink\" name...go ahead and switch that toggle. The default device name will appear after that toggle is green.
You can later personalize the default device name once it is connected to Loop.
Continue with these steps to connect your Medtronic pump to Loop.
CM
instead of CA
for the region code. Just select CA
in the dropdown menu.Continue
button to finish the addition of your pump. For x23 and x54 Medtronic pump users only
For x23 and x54 Medtronic pump users, there is a packet of information special to those pumps called MySentry messages. If you have never setup this part of the pump previously, you may see a screen, called \"Pump Broadcasts\", at this point in the setup process.Follow the directions on the screen. They will require you to take some manual steps on your pump to \"pair\" it with your Loop app.Basically, you will need to go to your pump's main menu, scroll down to Utilities, then Connect Devices, then Other Devices, turn that setting On, and then select Find Device. Once you do that, click on theContinue
button in Loop app and the pairing will take place. This will allow those MySentry packets of information to flow to Loop app.This step does not apply for x22 or x15 pump users, since those pumps do not have MySentry capabilities. Now that your pump is paired with Loop, you will be finishing these steps:
Event History must be selected for Nightscout to display temp basals, carbs, and boluses from Loop. Event History must also be selected in order for prime events to be detected and NOT contribute to IOB during site changes. Please just leave the Preferred Data Source on Event History.
"},{"location":"operation/loop-settings/mdt-pump/#change-time-zone","title":"Change Time Zone","text":"Loop automatically prompts you to set your pump time using the Loop app as part of initial Loop setup. There will be other times you need to change the time - traveling or daylight savings time start and end. It is important that you use Loop to change time on your pump; do not adjust time on your pump directly once it is attached to Loop.
If you are traveling through time zones, Loop continues to work - just be aware that your basal rate and other configuration settings will be in the original time zone. To change time zones, please follow the Change Time Zone instructions.
Always use the Loop -> Pump -> Change Time command to change pump time. Do not use the Medtronic pump menus to change your pump's time when Looping.
"},{"location":"operation/loop-settings/mdt-pump/#next-step-add-cgm","title":"Next Step: Add CGM","text":"Congrats! You've added your Medtronic pump to your Loop app. Now, click on the settings button in the upper left corner to take you back to Loop's settings menu. Your next step is to Loop 2 Add CGM to your Loop app. After all, without CGM data, your Loop won't loop.
"},{"location":"operation/loop-settings/omnipod-pump/","title":"Loop 2 Add Omnipod","text":""},{"location":"operation/loop-settings/omnipod-pump/#omnipod-users","title":"Omnipod Users","text":"Your Loop app will have a lot of blank spots until you input some basic settings. The beginning step is to add a pump to your Loop app. If you are using an Omnipod pump, you can follow along for the rest of this page. If you are using a Medtronic pump, please head over to Loop 2 Add Medtronic Pump page instead.
"},{"location":"operation/loop-settings/omnipod-pump/#select-pump-type","title":"Select Pump Type","text":"Let\u2019s start by clicking on the Loop Settings button in the toolbar at the bottom of your Loop app. It looks like a little gear. On the settings screen that opens, click on Add Pump
and select the Omnipod option.
New RileyLink compatible devices won't have a name listed next to their slider at first. The name will only be displayed after connecting the device to Loop for the first time. So, if all you see in the device list is a little toggle and no \"RileyLink\" name...go ahead and switch that toggle. The default device name will appear after that toggle is green.
You can later personalize the default device name once it is connected to Loop.
A list of all RileyLink compatible devices in the nearby area will display in the RileyLink Setup screen. Select your RileyLink by sliding the toggle to display green and then press the blue Continue
button at the bottom of the screen. If your RileyLink does not appear, make sure it is charged and turned on: slide the recessed switch toward the case's keyring.
The next screen will offer two areas where you will need to enter information:
Delivery Limits: Tapping on Delivery Limits presents a screen where you enter your Maximum Basal Rate and your Maximum Bolus.
Basal Rates: Enter your scheduled basal rates, beginning at midnight. Consistent with Omnipod use, the scheduled basal rates have a maximum of 24 entries, no 0 u/hr entries are allowed, and the rate increments are 0.05 u/hr.
Back
button at the upper left.Sync to Pod
instead of Back
to save your basal rates - you only see Back
when no pod is paired.Edit
on upper right and then use standard Apple gestures (for your phone iOS) to delete or move rows.When you finish entering these values, press the blue Continue
button on the bottom of the Pod Settings screen to continue with the next steps of Pod setup.
Max Fill is 200 Units
When you fill the Pod do not exceed 200 units.
If you overfill the pods, you may get a pod fault right after priming.
Pod Filling and Insertion
The Pod filling and insertion instructions are the same with the Loop app as they are for the PDM. These videos: Filling a Pod with Insulin and Inserting the Cannula, may be useful. You will use your phone and RileyLink compatible device instead of the PDM. Be sure to keep the phone and RileyLink close during pairing and insertion because the Pod uses a low-power mode during these activities.
Pair
buttonContinue
button when the blue checkmark confirms priming is completecancel
in the upper right corner of the screen and try a new Pod. (Report this issue to Insulet; it is a Pod problem.)Insert Cannula
button.Finish the setup using the default expiration reminder time (2 hours before a full 3-days of usage). You can modify that expiration reminder at any time, see Expiration Reminder. The notification will come from Loop; your Pod will not beep at this time. Setup is complete and your Pod is ready for use when you press the Continue
button.
Range
Now that the priming and insertion steps are complete, the Pod is in normal power mode, so the range between the Pod and RileyLink compatible device is increased.
"},{"location":"operation/loop-settings/omnipod-pump/#pod-settings","title":"Pod Settings","text":"After the Pod setup is complete, you will be on the Pod Settings screen. The information on this screen is described in Omnipod Pump Commands.
"},{"location":"operation/loop-settings/omnipod-pump/#next-step-add-cgm","title":"Next Step: Add CGM","text":"Congrats! You've added your Pod to your Loop app. Now, click on the Done
button in the upper right corner of your Pump Settings screen to take you back to Loop Settings. Your next step is to Loop 2 Add CGM to your Loop app. After all, without CGM data, your Loop app won't loop.
To bring up the Pod/Pump Settings display, tap on the reservoir icon in the Heads Up Display or the image of the pump in the Loop settings screen.
Omnipod Eros vs DASH
With the addition of DASH pods with Loop 3, you will notice all reference to Eros pods continue to say Omnipod in both the documentation and the code.
Documentation and screens in the app indicate DASH explicitly.
"},{"location":"operation/loop-settings/pump-commands/#change-time-zone","title":"Change Time Zone","text":"The schedules for the basal rates, correction ranges, insulin sensitivity factors and carb ratios stay at the pump time even if the user and their phone change time zones or when daylight savings time occurs. To bring the pump into the same time zone as the phone, use this command in Loop. (Medtronic users - do NOT adjust time on your pump - always go through Loop.)
Select the Pod/Pump Settings display, scroll down to the Change Time Zone line, example shown in the graphic below. You can leave the time zone offset unchanged or touch it to change to the current time zone. Note that the 24 hour configuration pattern for basal rates, insulin sensitivity factor, carb ratio and correction range are aligned with the time zone shown on this line.
Once the Change Time Zone command is tapped, Loop no longer shifts the 24 hour configuration pattern to the old time zone. Some behavior depends on whether the pump is an Omnipod or Medtronic.
"},{"location":"operation/loop-settings/pump-commands/#omnipod-commands","title":"Omnipod Commands","text":"To bring up the Pod Settings display, tap on the Pod Age icon on the Heads Up Display or the image of the Omnipod in the Loop settings display to reach the Pod Settings display.
This screen provides important information about your Pod and allows you to issue some commands to the Pod through Loop. There were some recent modifications made to the layout and underlying information for some of the rows.
Enable/Disable Confirmation Beeps: moved up to the Configuration section; beeps for all manual pod operations; uses a more efficient implementation
Suspend/Resume: Pod will beep every 5 minutes when suspended; the beeps can be silenced by tapping on the Alarms line
The first section has the (72 hour) Pod expiration date/time and how long the Pod has been active. These are determined when the Pod is activated by injecting insulin into the reservoir and uses pod active time.
"},{"location":"operation/loop-settings/pump-commands/#bolus-delivery","title":"Bolus Delivery","text":"This line reports the % progress of any ongoing bolus. This line reports None
unless a bolus is actively being delivered when you enter Pod Settings. This line may not update until you tap on the refresh symbol to the right of the Pod image, or exit and re-enter the Pod Settings screen.
This line reports
This line displays Alerts or Alarms; tapping on it, or on the accompanying banner displayed in the HUD, acknowledges the alert
Pods do not report the volume of insulin remaining in the reservoir until there are less than 50 units remaining. So, typically you will see \"50+ U\" in this line for quite a while with a new Pod.
"},{"location":"operation/loop-settings/pump-commands/#insulin-delivered","title":"Insulin Delivered","text":"This line is the basal and bolus insulin delivered by the Pod since the cannula was inserted. It is obtained by taking the reported Pod insulin delivery and subtracting the amount used to prime the Pod and fill the cannula upon insertion (about 3\u00a0U).
"},{"location":"operation/loop-settings/pump-commands/#pod-commands","title":"Pod Commands","text":"This section contains commands the typical user will use.
"},{"location":"operation/loop-settings/pump-commands/#suspend-delivery","title":"Suspend Delivery","text":"This command will suspend all insulin delivery; basals, temp basals, and boluses in progress. When you press suspend delivery, all insulin delivery stops indefinitely and the display changes to say Resume Delivery
. (If the display does not update, tap the refresh screen icon at the top of the screen to the right of the Pod image.)
A banner notice will appear on the Loop's main screen when phone is in portrait mode when insulin delivery is suspended. Unless you are running v2.2.4 or earlier, a pod beep is initiated with a frequency of every 5 minutes. This can be silenced by acknowledging the alarm.
You will need to press Tap to Resume
in the banner or the Resume Delivery
button in the Pod Settings to resume your scheduled basal rate and let Loop get back to action. If a bolus delivery was interrupted by the Suspend Pod command, it will not be resumed.
When you resume delivery, the 24 hour Pod basal rate schedule is sent to the Pod. Be sure the Phone, RileyLink and Pod stay close until the message exchange is complete.
"},{"location":"operation/loop-settings/pump-commands/#enable-confirmation-beeps","title":"Enable Confirmation Beeps","text":"This turns confirmation beeps on for the Pod. The Pod beeps when you enable this, but is silent when you disable it.
With the Expiration Reminder you can set a convenient time to get a notification to replace your Pod. Loop sets the default to 70 hours, i.e., two hours before the full 3 days that Insulet guarantees. The allowed range of values is between 1 hour and 24 hours prior to the Pod expiration at 72 hours of Pod life. If you select a date/time outside this range, Loop will modify your selection to the closest allowed value.
As with the PDM, Loop allows the Pod to continue operating after expiration until it reaches the maximum allowed 80 hours of life, at which time, the Pod shuts down and alarms. Loop detects this message the next time it tries to communicate with the Pod. In the event your Pod runs out of insulin before that time, then you will get a \"Pod empty\" notification.
The glitch in setting the Expiration Reminder in v2.2.4 is now fixed.
Loop v2.2.4 has a \"glitch\" in setting the Expiration Reminder. Tap on the line (can't change time), scroll the entire display up or down until the line no longer is visible and then scroll it back. The Expiration Reminder display should now look like the graphic below. The expiration reminder time can now be selected.
"},{"location":"operation/loop-settings/pump-commands/#change-time-zone_1","title":"Change Time Zone","text":"Use the Change Time Zone
command to align your configuration settings with the current time zone. Note that this updates your basal schedule on your Pod. If you start a new Pod session without modifying the time zone here, the original time zone will be used for the new Pod. Please wait until you see Succeeded
appear on the page to ensure the command has successfully been received by the Pod.
Make sure the phone, RileyLink compatible device and Pod are kept in close proximity until this command has completed. The time zone is updated by Loop issuing the 24-hour basal rate schedule to the Pod based on the current time.
"},{"location":"operation/loop-settings/pump-commands/#replace-pod","title":"Replace Pod","text":"This command deactivates a Pod prior to replacing it. Once you tap Replace Pod
, another screen appears for you to confirm that you mean it.
This allows access to the RileyLink screen for each connected RileyLink compatible device.
"},{"location":"operation/loop-settings/pump-commands/#pod-diagnostics","title":"Pod Diagnostics","text":"This section is labeled Diagnostics, but many Pod users make use of this section.
"},{"location":"operation/loop-settings/pump-commands/#read-pod-status","title":"Read Pod Status","text":"This command requests the status of the Pod and reports some of the returned information.
The line labeled Pulses
reports the total number of pulses of insulin delivered by that Pod since activation (adding insulin to the reservoir). To convert this to units of insulin, multiply by 0.05 units/pulse. If you compare this report (for your Pod) to the Insulin Delivered
line in Pod settings, for your Pod at the same time, the difference is the insulin used to prime the Pod and fill the cannula at insertion.
The line label RSSI
reports the Received Signal Strength Indicator (RSSI) between the RileyLink compatible device and the Pod. The RSSI is a positive number with a larger number indicating a stronger signal strength detected by the Pod.
This command requests the Pod emit a beep pattern. If you hear it, you know the commands are getting to the Pod. A message appears on your screen to indicate Loop got or did not get an acknowledgment from the Pod.
"},{"location":"operation/loop-settings/pump-commands/#read-pulse-log","title":"Read Pulse Log","text":"This command reads the pulse log (diagnostic), displays it on the screen and saves the result in the log file. It takes some time, so keep your gear close until command completes. This can be extracted by sending the pulse log to yourself using the send-to icon at the top right of the screen. It is also included in the Issue Report. If you are having communication issues, you can provide this report to an expert who may be able to provide assistance. Post for help in either zulipchat or a Facebook group to request assistance and you'll get information about how to get that log file submitted.
"},{"location":"operation/loop-settings/pump-commands/#test-command","title":"Test Command","text":"This verifies communication with the Pod. Loop reports success or failure. Use Get Pod Status if you want to see the some of the information returned from the Pod.
"},{"location":"operation/loop-settings/pump-commands/#pod-details","title":"Pod Details","text":"This section provides some Pod identifying information. The Lot number and TID number are the tiny number stamped on the Pod that Insulet might ask you to report if you happen to call in this Pod for an appropriate failure.
"},{"location":"operation/loop-settings/pump-commands/#medtronic-commands","title":"Medtronic Commands","text":"Medtronic commands are found in the Pump Settings screen shown in the graphic below. The top section is configured at the time the pump is connected to Loop and can only be modified by deleting the pump and adding a pump. This screen is the same as for earlier versions with the addition of the Use MySentry
row.
This command will suspend all insulin delivery; basals, temp basals, and boluses in progress. When you press suspend delivery, all insulin delivery stops indefinitely and the display changes to say Resume Delivery
.
A banner notice will appear on the Loop's main screen when phone is in portrait mode when insulin delivery is suspended.
You will need to press Tap to Resume
in the banner or the Resume Delivery
button in Pump Settings to resume your scheduled basal rate and let Loop get back to action. If a bolus delivery was interrupted by the Suspend Pod command, it will not be resumed.
During normal operation, Loop automatically keeps phone time and pump time aligned. In the case of time-zone or daylight savings time changes, Loop allows the differences to persist until the user chooses to Change Time Zone
and accounts for time zones when performing insulin delivery accounting.
The type of battery used in the Medtronic pump affects how Loop interprets the battery level for the pump.
"},{"location":"operation/loop-settings/pump-commands/#preferred-data-source","title":"Preferred Data Source","text":"Leave the Preferred Data Source set to on Event History for proper functioning of Loop.
Event History must be selected for Nightscout to display temp basals, carbs, and boluses from Loop. Event History must also be selected in order for prime events to be detected and NOT contribute to IOB during site changes. Please just leave the Preferred Data Source on Event History.
"},{"location":"operation/loop-settings/pump-commands/#use-mysentry","title":"Use MySentry","text":"This is a new option. If you don't see this row, consider updating your Loop app. Using the MySentry feature on some Medtronic pumps when using an OrangeLink causes the batteries to die quickly. This option allows you to turn off MySentry within the Loop app.
"},{"location":"operation/loop-settings/pump-commands/#devices_1","title":"Devices","text":"This allows access to the RileyLink screen for each connected RileyLink compatible device.
"},{"location":"operation/loop-settings/rileylink/","title":"RileyLink Display","text":""},{"location":"operation/loop-settings/rileylink/#rileylink","title":"RileyLink","text":"The RileyLink (or compatible device) screen is accessed by clicking on the image of your connected pump in Loop settings or the pump icon in the Heads Up Display to bring up the associated pump screen. From that screen, scroll down to the section labeled DEVICES
to view the list of connected RileyLink compatible device(s) and tap on the name with a green slider that you want to display. An example is shown in the graphic below.
If there is a problem communicating with that RileyLink compatible device, tapping on the line will show out-of-date or missing information. Go to Troubleshoot: Red Loop: Reset Loop-to-Pump Communications for suggestions.
With Loop 3
Tapping on a name with a green slider takes you to the RileyLink Status and Commands screen for that device.
The name at the top center is whatever you named your RileyLink compatible device. The RileyLink screen is the same regardless of the pump you are using.
Patch Required for Loop 2.2.x
Some devices have features not available with other devices. With Loop 2.2.6 some features were added to the OrangeLink, but there is a mismatch of reported hardware for some versions of OrangeLink firmware which prevents the Find Device row from showing up for OL Pro. The EmaLink extra features did not make it into the Loop v2.2.6 release.
The lines under the Device section provide information on the device. The two most important lines are the Connection Status and Signal Strength.
The Connections Status should say connected
if the device is connected to the iPhone's Bluetooth. If the status says connecting
or disconnected
then you should toggle the iPhone's BT and/or power cycle the device to help reconnect.
The Signal Strength is the strength of the Bluetooth signal between the iPhone and the device. It is not the signal strength of the radio communications with the pump/pod.
The phone to device Signal Strenth is reported as a negative number so a -50\u00a0dB signal is stronger than -80\u00a0dB. As you move the device and iPhone closer/farther apart, you will be able to see the signal strength change. In a pinch, this can be used to help locate a lost device in the house or at the park after dark.
As soon as you connect the RileyLink compatible device initially - it is strongly encouraged that you rename it from the default name for that device, e.g., RileyLink or OrangeLink or EmaLink.
Once you display the RileyLink Status and Commands screen:
Near the bottom of your Loop settings screen is a section called \"Services\".
Sevices are Optional
For Loop 2.2.x, the services listed in the graphic below can be added by clicking on the Tap to set
arrow.
Click for Loop 3 Services
There is a whole section in LoopDocs about Nightscout. Please follow this link to the Using Nightscout with Loop section of LoopDocs. That also has the links you might need to the official Nightscout Documentation (different website).
If you have an existing Nightscout site, it's still a good idea to review that section, but here's a quick summary of how to add your Site URL and API_SECRET to have your Loop data transmitted to your Nightscout site. If you can\u2019t remember your API_SECRET, it can be found under Settings, Reveal Config Vars for Heroku sites (or Application Settings, Connection Strings for Azure sites).
The two most common errors in filling out this section are:
https://
in the site URL. If you use http://
(see how that doesn't have the \"s\" at the end?), you will get an error message about an App Transport Security policy.More Tips about Nightscout
Loggly is a free logging service. If you sign up for an account, you'll need to go under Source Setup and then Customer Tokens. Copy and paste your customer token into your Loop App settings for Loggly.
"},{"location":"operation/loop-settings/services-v2/#amplitude","title":"Amplitude","text":"Amplitude is a remote event monitoring service and can be used to quickly identify errors and events with Loop. Amplitude stores the events and allows you to view those events as points in time. To retrieve the details of the events you will need to look at corresponding mLab data entries to get a complete picture of the issues. If you sign up for a free account with Amplitude, you will be given an API Key that you can enter here to have Loop integration setup.
"},{"location":"operation/loop-settings/services-v2/#next-step-loop-displays","title":"Next Step: Loop Displays","text":"Great job, almost finished! Now that you have completed your services, let's move onto understanding your Loop Displays.
Loop 2.2.x - click on this link for Displays
Loop 3 - click on this link for Displays.
Loop displays is a valuable tool for understanding your Loop and a great page to review when troubleshooting.
"},{"location":"troubleshooting/loop-crashing/","title":"Loop App Crashes","text":""},{"location":"troubleshooting/loop-crashing/#loop-crashes-upon-opening","title":"Loop Crashes Upon Opening","text":"If your Loop app crashes immediately upon opening, you have a problem that needs to be fixed. What do I mean by \"crashes\"? Your Loop app immediately turns to a white (light mode) or black (dark mode) screen and then shuts itself down, landing you back at your iPhone's main screen. No amount of tapping will let you keep your Loop app open.
The most likely reason is Your Loop App Expired. But there can be other reasons.
Your Loop app has an expiration date. The expiration date will depend on the build method and may also depend on the type of developer account that signed the app.
With the current version, 3.2.3, you unfortunately do not get prior warning that the app is about to expire, although you can look in the TestFlight app and it will tell you. An in-app warning will be added to the next release.
Please follow these steps to ensure you can build the app again. How to Update or Rebuild
"},{"location":"troubleshooting/loop-crashing/#mac-using-a-paid-account-1-year","title":"Mac using a Paid account (1 year)","text":"When your app expires after a year, you need to follow the steps on the Build Updating page. Your phone will probably have a new iOS that may require an updated version of Xcode that may require an updated Mac operating system. All this is explained in the link above. Give yourself time before expiration to prepare yourself.
To make it easy to build when you have to, practice building every 3 to 6 months. This makes the process much lower stress. Also, each time you build, when you follow the link above, you give yourself another full year before rebuilding is required. Please review the Updating FAQS.
"},{"location":"troubleshooting/loop-crashing/#mac-using-personal-team-7-day","title":"Mac using Personal Team (7 day)","text":"When your app expires, you simply need to open Xcode, reopen the project: File->Open Recent, plug your phone back into the computer and select it in Xcode and press the play button on your project again. This will rebuild. If you want to change to a paid signing team before rebuilding, please make sure to double-check which signing team is selected before building again.
"},{"location":"troubleshooting/loop-crashing/#switching-from-free-to-paid","title":"Switching From Free to Paid","text":"If you started with a free account and switched to a paid account:
Many people accidentally build with their old free account
(Personal Team)
listed after your name in the signing teamRemember that switching from free to paid changes the developer name incorporated into your Loop App
If you experience a crash for any other reason, please gather all the information you can about what was happening before the crash and report it to your favorite Loop Social Media help site - you will need to get some personalized help. Please - choose one site for your post and wait for someone to get back to you. While you are waiting, search on any of the sites and, if on Facebook, read all the announcements.
"},{"location":"troubleshooting/loop-crashing/#save-and-submit-your-crash-logs","title":"Save and Submit your Crash Logs","text":"If you have continuous crashes, please save the crash logs so the developers can look at it. If you can, log into Zulipchat and post it directly.
DateTime
.ips for crash reportsPod faults are typically noticed by hearing a high-pitched continuous tone coming from the pod.
Loop will pick up the fault the next time it exchanges messages with the pod:
Once Loop detects the fault, you will get a Critical Pod Error modal message on the screen that you must acknowlege along with a Pod Error
indicator shown in the HUD:
Normal High-Pitched Tone
There are 2 cases in which you hear the high-pitched continuous tone that are not Faults.
Empty Reservoir
, Pod icon displays No Insulin
Pod Expired
, Pod icon displays Pod Expired
The first action people want to take is to make that noise stop.
Replace Pod
row and deactivate the podReplace Pod
row is highlighted in red in the graphic belowPrevious Pod Information
row, highlighted in dashed-blue in the graphic belowFaults should be reported to Insulet. They may not give you a replacement, but it is important they be informed so they can determine if certain lots are having more failures than others. This helps them improve the quality of the pods.
Lot number
(Eros found on the screen, DASH is different)Sequence number
(also on the pod in tiny print)Active time
(how long you wore the pod)Ref code
- for the example above, the Ref code is: 19-00805-00551-064Extra Information
The extra information, e.g., Fault Event Code 0x40: Encoder count too high
, is only useful for the curious or the developers. Do not report that to Insulet.
The 0x40
is the hex version of the -064
decimal value found at the end of the Ref code.
The sole exception to reporting to Insulet is if you get a fault ending in 049
in the Ref code or with the notation Fault Event Code 0x31: Incorrect pod state for command
. That particular fault is only seen if there is a mistake in Loop. This happened rarely in earlier versions but should be fixed by the time version 3.4.0 is released. If you do get an 0x31 (049) fault - report that to the Loop developers and include a Loop Report (Loop, Settings, Support, Issue Report).
The currently known pod faults are listed here on the openomni wiki page: Pod Fault codes
"},{"location":"troubleshooting/omnipod-faults/#ways-to-reduce-likelihood-of-a-fault","title":"Ways to Reduce Likelihood of a Fault","text":"The Loop app will put a higher battery load on a pod than the PDM due to its regular and repeated communications. A pod with lower battery level appears to be more likely to fault for conditions like static electricity and occlusions/pump issues the Loop app is not directly causing, like decimal fault codes 052, 061, 064 and 066. Pods always perform safety checks and if a potential problem is found, the pod will end itself by screaming and halt all insulin delivery.
DASH pods have additional Fault Codes associated with the pod Bluetooth communications. The 0xCB
, -203
decimal, seems to be pretty common. These should be reported to Insulet for their records.
None of the ways listed here are guaranteed to prevent a screaming pod, but they could be worth considering.
Help Insulet Improve their Quality Control
Insulet is aware that pods are used by the DIY community. You can be honest about your use and might receive replacement pods. If your pod fails early, it is worth informing Insulet for their troubleshooting records even if you do not get a replacement.
You can always call Insulet tech support if a pod has a clear failure on the pod, such as:
If the pod fails during use with Loop, a replacement might still be possible. The software which communicates with the pod isn't developed or supported by Insulet. Generally speaking, asking for replacement for failed pods on the third day of pod life is a bit of a reach for the DIY community. We acknowledge that Looping may be a contributor in certain faults, especially by the third day.
"},{"location":"troubleshooting/overview/","title":"Troubleshooting Overview","text":"After you have been using Loop for a while, there's a potential that you will run across a behavior or issue that you wonder if it is normal or intended. When that happens, there are a few things that we'd recommend doing to resolve the issue.
"},{"location":"troubleshooting/overview/#use-automatic-time-on-loop-phone","title":"Use Automatic Time on Loop Phone","text":"If you have modified the Loop time (not changed time zone, but turned off automatic time and manually changed the time), please read: Loop Phone Must be on Automatic Time.
"},{"location":"troubleshooting/overview/#gather-information","title":"Gather information","text":""},{"location":"troubleshooting/overview/#screenshots","title":"Screenshots","text":"Take a screenshot of your Loop main display screen, or other screens such as the display when you touch a red loop icon that may help you or troubleshooters better understand your issue. A lot of times a picture is worth a thousand words. Being able to see recent Loop basal adjustments, predicted BG curve and carb entries really help fill in the full story of the current Loop status. If you didn't manage to get a screenshot when the issue was happening, you can also go to Nightscout and scroll back over the previous 48 hours to obtain much of the same information. Try to capture a Nightscout screen from the time period in question.
"},{"location":"troubleshooting/overview/#check-the-docs","title":"Check the Docs","text":"Loop docs are updated regularly. If you built your Loop app awhile ago, chances are good that more information has been updated and changed since you last read them. Please use the search tool - if there's an error message - search for it. Scan the topics in the Troubleshoot
tab of LoopDocs and look for a page that may be applicable. The FAQs pages are definitely worth reviewing too.
Issue Report
","text":"Use the Issue Report
Loop 3 / Loop 2 command under Loop Settings to generate a Loop Report. This has a lot of detailed information that may help you or a mentor understand your problem.
The Loop Report (a text file) contains important information about actions and status that can be very useful for troubleshooters...particularly with unexplained behaviors. The upper right corner of the Loop Report includes a button so that you can email the Loop Report to yourself (or others).
"},{"location":"troubleshooting/overview/#check-resources","title":"Check Resources","text":""},{"location":"troubleshooting/overview/#github-issues","title":"GitHub Issues","text":"Check the current list of GitHub Loop Issues for known issues. Many times other users have noticed the same issue previously and opened an Issue so that more information can be added to help develop a solution. If you see the same issue has already been reported, please add it to the open issue instead of creating a new one.
There is a nice search feature on GitHub issues - type a keyword into the box next to Filters: where it says \"is:issue is:open\" in the graphic and the display will show just those open issues that contain the keyword in the title.
"},{"location":"troubleshooting/overview/#zulipchat-and-facebook","title":"Zulipchat and Facebook","text":"Search in Zulipchat, Looped Facebook Group or LoopandLearn Facebook Group. Quite possibly someone else has already posted about the same issue and perhaps a resolution has already been provided.
"},{"location":"troubleshooting/overview/#ask-for-help","title":"Ask for Help","text":"If you can't find any information in LoopDocs, GitHub Issues, Zulipchat, or Facebook...PLEASE post and ask for help. GitHub Issues list is an EXCELLENT place to post issues of unexpected Loop behavior (that you believe are errant or need improvement). However, if you are just seeking clarifications on Loop, but don't necessarily expect that there's a problem with the underlying code, then Facebook and Zulipchat are a better place. For example, Zulipchat and Facebook are great for asking about bolus strategies or exercise target use...those aren't really code issues.
When you post, provide a description along with any screenshots of the issue you are having and include the version of Loop you are running and the iOS on your device. (Tap on Loop-Settings and look at the top of the screen to get the Loop version number). You don't necessarily have to tag any particular person, the community is fairly active in replying to messages.
Post in only one place - the same volunteers monitor various sites.
"},{"location":"troubleshooting/pod-pairing/","title":"Pod Pairing Failures","text":""},{"location":"troubleshooting/pod-pairing/#pod-not-found","title":"Pod Not Found","text":"Have you seen an error message during the pairing process for a new pod? The most common message is No pods found
, as shown below. Make sure no other active pods are anywhere near the phone. Reposition the pod and the phone and if using one, the RileyLink, and then try again.
The instructions in the graphic say fill with U-100 insulin. That is the strength of your insulin, 100 U per mL of solution. The Insulet directions say to inject between 85 and 200 U of insulin. In other words, between 0.85 and 2.0 mL of fluid.
There have been a large number of fixes and improvements to reduce various pairing problems and to automatically recover from them when they do occur.
Update regularly to take advantage of improvements
Make sure you stay on top of Loop updates to take advantage of these code improvements. It is strongly recommended to update to a modern stable version (i.e., the current Loop release).
"},{"location":"troubleshooting/pod-pairing/#the-app-crashed-after-pairing-started-and-before-cannula-insertion","title":"The app crashed after pairing started and before cannula insertion","text":"Sometimes the app will crash while the pod is priming. This is rare but can happen.
When the pod is paired to a new device, the pod is using low-power mode. That's one reason why placement is important. And you can only have one pod that is not yet paired in the room. Try to get your new pod working before giving up and trying a new one.
Sometimes it is the pod, so if you do need to try a new one, move the one that did not pair far away from your phone.
Move Logically
Let's walk through the pod pairing/replacement process from the very beginning to make sure that we have all the important steps clearly identified even before you attempt to press that Pair button.
"},{"location":"troubleshooting/pod-pairing/#step-0-check-your-loop-version","title":"Step 0: Check your Loop version","text":"You can check which version of Loop you are running by pressing the gear icon (\u2699\ufe0f) in the bottom right-hand corner of the Loop home screen and then looking at the line under the header.
Upgrade Loop if version prior to v3.2.x
If you are running a version of Loop prior to v3.2.x, it is recommended to update to the current Loop release.
"},{"location":"troubleshooting/pod-pairing/#step-1-verify-the-rileylink-eros-pods-only","title":"Step 1: Verify the RileyLink (Eros Pods Only)","text":"For DASH pods, skip ahead to Deactivate old Pod.
For Eros pods, let's make sure everything is ok as far as the RileyLink goes:
Make sure old pod was deactivated. If you cannot communicate with the old pod in order to deactivate it, try the steps in Reset Loop to Pump Communications.
If you were not able to deactivate the old pod, you need to Discard the old pod. After several failures to deactivate, Loop offers to Discard the pod. This just tells Loop that the pod is no longer connected to the app.
You must still get that pod (that would not deactivate) away from your vicinity. Put it in a microwave or throw it over the fence into the neighbor's backyard (kidding, obviously...but outside trashcan is a good idea).
Eros Pods Only: If you had issues deactivating your pod, review Step 1.
"},{"location":"troubleshooting/pod-pairing/#step-3-start-new-pairing-process","title":"Step 3: Start new pairing process","text":"You've deactivated your old pod successfully...great! As the first part of pairing a new pod, Loop will prompt you to fill the new pod with insulin. Once a new pod is powered-up by the insertion of at least 85 units of insulin, the pod will emit reminder beeps every 5 or 10 minutes until the entire pod pairing process has completed. This pairing process must be completed within 60 minutes of beeps starting, or the pod will give up and never pair. These activation reminder beeps do not actually indicate that any pod communication is being attempted, just that the activation has not yet been completed and your 60 minute timer is counting down.
Max Pod fill is 200 U
If you put more than 200 U in a pod, you will probably get a pod fault during priming.
Hopefully, your pod pairing continues uneventfully at this point. You'll press the Pair
button and the pod pairs, primes, and the cannula insertion is successful. BUT, if not...you'll want to keep reading Steps 4-5 to find out how to recover.
One beeping pod at a time, please
It is very important to not have two pods giving reminder beeps at the same time as this can cause even more confusion for you and for Loop. Continue to work with a single pod at a time, retrying the Pair
attempts multiple times if needed as described in Step 4.
If you cannot get the pairing to complete with the single beeping pod (after trying the procedures described below a few times with multiple Pair
attempts during each try), then you should completely abandon that pod before attempting to use another pod. \"Completely abandon\" means move that failed-to-pair-no-matter-what-you-tried pod far, far away from you or put it in a not-turned-on-but-door-is-closed microwave. You do not want that beeping-but-not-pairing pod to be able to plague your next pod's communications with Loop during the fresh pairing process.
Pod pairing failed?
Ok, so you've pressed that Pair button and received an error message like shown at the top of the web page? It's time to start the stepwise process of seeing if we can get it to recover successfully.
"},{"location":"troubleshooting/pod-pairing/#dash","title":"DASH","text":"The DASH pod can be left in the tray and placed right next to the phone. If the first attempt to pair shows the \"No pods found\" message, place the tray on top of the phone or move the pod a little further away from the phone, then try again.
If you see the Pairing exception message as shown in the graphic below, you need to toggle Bluetooth on the phone:
Still not working, reboot the phone and try again.
If none of those steps work, it may be the pod. But try everything one more time before giving up.
"},{"location":"troubleshooting/pod-pairing/#eros-with-rileylink","title":"Eros with RileyLink","text":"The placement of the pod and the RileyLink relative to each other is a critical variable because the pod operates in a low-power radio mode during pairing which can lead to a number of potential faulty and half-paired pod situations, particularly with earlier versions of Loop.
How close should they be? Most people assume \"the closer the better\", but it has been measured that if the RileyLink and pod are too close together, the RileyLink may not be able to pick up the pairing response. The current recommendation is for the RileyLink to be placed a few inches to the side of the pod being paired.
If Pair fails, move a bit and RETRY
When you have a pod that continues to appear non-responsive after several retried Pair attempts, it may be possible to recover by forcing Loop to start the pairing process from the beginning.
This section is for Eros pods
To start we will have to press the Cancel button in the upper right corner of the pairing screen. Depending on which state the pod is stuck at in the pairing process...you'll see one of two screens after you select the Cancel button. Follow the directions (Step 5A vs Step 5B) for whichever screen corresponds to what you see after pressing Cancel.
Switch from Omnipod Pumps
\": You press Cancel
and Loop will send you back to the Pod Settings screen to do the \"Switch from Omnipod Pumps
\" methodCancel
and Loop will display a screen giving the option to \"Deactivate
\"If you press the Cancel
button and see a screen like below, you're going to select Switch from Omnipod Pumps in red. While this appears to confirm that you want to stop using the Omnipod, we will be adding pods back soon. Don't worry.
Don't fret. None of your Loop settings including the basal schedule and delivery limits, will be lost deleting the Omnipod pump. Select Delete Omnipod
to proceed which will take you back to the Loop home screen. From here, select the gear icon at the bottom right to go to the Loop \u2699\ufe0f Settings
page. Then select Add Pump
in blue and then select Omnipod
from the Add Pump
list displayed.
Verify that the green LED on the RileyLink goes on and off as you touch the switch for RileyLink you are using indicating a successful Bluetooth connection between the RileyLink and your iPhone. Leave the RileyLink enabled with its green LED and slider turned on, and then touch the Continue button on the bottom. The Pod Settings screen should have the previous Basal Rates and Delivery Limits in effect from your previous run which can be verified at this time. Once ready, select Continue
at the bottom of the screen.
Finally, you will be back to the Pod Pairing
screen.
Instead of filling a new pod with insulin, attempt to pair again using the original pod which was previously filled but unable to complete the pairing process successfully. That pod should still be occasionally giving reminder beeps. Place the RileyLink a few inches to the side of the pod and press the Pair
button at the bottom of the screen and hopefully, Loop will be able to successfully pair this time after starting from a fresh slate. If this pairing attempt is still unsuccessful, remember to still exhaust repositioning and Step 4 options before giving up on that pod. If it really won't pair after all that...then mark that loser pod with a Sharpie-drawn sad face and follow the directions in Step 3's colored box so that you don't end up with multiple beeping pods around accidentally.
If you press the Cancel button and see an option for \"Deactivate pod
\", we're going to do a little differently than Step 5A.
You might lose your pod by attempting this procedure
This is a point of no return for certain pod pairing situations and it is possible that the pod will be lost by attempting this procedure depending on the pod state. Some will recover fine, others may not. Since you can't know in advance if you might lose the pod, it is important to have already exhausted other possibilities described above in Steps 1-4 to try pairing. Specifically, (1) attempting to pair several times using varied relative positions of the RileyLink and pod (2) trying the pairing again but in a different room/location that might have less wireless interference, and (3) verifying your RileyLink is connected and functioning correctly.
For this next part, we want to make sure that the pod doesn't accidentally receive the deactivation command we are about to use. We want Loop to do the command...we just really don't want the pod to hear it. There are two ways we can keep the pod from hearing it, either (1) prevent the RileyLink from hearing Loop's command (and thus the command cannot reach the pod) or (2) prevent the pod from hearing the command from RileyLink. To accomplish our keep-the-pod-ignorant goal, you can try either option like so:
Ok. Have the pod nice and ignorant? Good. Now press the \"Deactivate Pod
\" button. It will take a few attempts, and you will see some failure messages about how the deactivation failed (of course it did...we hid the pod!) Eventually, you'll be given a \"Continue
\" button that you'll want to use.
Press the \"Continue
\" button. The instructions start with \"fill a new pod with insulin
\"...BUT DO NOT! Instead, bring that beeping pod back to the hearing range. Turn that RileyLink back on if you turned it off. Once you get the RileyLink on and the pod back in range, you'll just press the Pair button and hopefully you'll find success with the process. If this pairing attempt is still unsuccessful, remember to still exhaust repositioning and Step 4 options before giving up on that pod. If it really won't pair after all that...then mark that loser pod with a Sharpie-drawn sad face and follow the directions in Step 3's colored box so that you don't end up with multiple beeping pods around accidentally.
To help fix pairing bugs, some improvements have also been made in our ability to save the communications between the pods and Loop app during the pairing process. So, please help us leverage these new improvements and better squash bugs.
If you run into any pairing problems, which required Step 5A or Step 5B to be able to pair, or you had a pod that had to be abandoned, it would be helpful to generate an \"Issue Report\" after you finally get a pod paired (whether it was the original pod or if a different pod) and then post the resulting \"Loop Report\" on Zulipchat here with a short explanation of what happened.
"},{"location":"troubleshooting/pod-pairing/#what-about-other-pod-start-up-failures","title":"What about other pod start-up failures?","text":"If you have a pod that has already started the priming operation and then has problems either finishing the priming operation or the cannula insertion, review the app crashed after pairing started and before cannula insertion to see if you can save the pod.
If a pod begins to alarm (has a fault) during priming or cannula insertion, the pod is no good and it should be deactivated and disposed of properly.
"},{"location":"troubleshooting/pod-pairing/#what-about-that-insulin","title":"What about that insulin?","text":"If you have the misfortune of losing a pod during pairing, you can opt to not waste the insulin in that pod. Simply use the same syringe and same fill port on the pod to suck the insulin OUT of the loser pod.
If you do that, good practice is to make sure that you get that loser pod far away from the process as you go forward. Mark a big \"X\" on the failed pod and put it in a microwave, or very far away from you, so that it can't interfere with subsequent pod pairing attempts.
"},{"location":"troubleshooting/pump-errors/","title":"MDT Pump Errors","text":""},{"location":"troubleshooting/pump-errors/#medtronic-pump-errors","title":"Medtronic Pump Errors","text":"The Medtronic pumps are used and typically not under warranty. Use this section at your own risk. However, that said, some of the most common pump errors are repairable, or not actually a real problem.
"},{"location":"troubleshooting/pump-errors/#a21-error","title":"A21 error","text":"This error message is common when a pump has been stored for some time without a battery. Most pumps will show an A21 error when you first purchase them on the used market. Not a big deal. Press the down arrow (it also has the symbol of a light bulb on it) and the pump screen message will scroll down to let you know how to clear that error message (press ESC then ACT). If the message is coming up on a pump that hasn't been in storage, pull the battery out and replace it with a fresh, new battery. Chances are your battery or battery cap is old. Look for signs of dirt or rust in the battery cap, give it a little cleaning.
Display Tip
When the pump screen has a little black/white bar on the right side, that is a scroll bar. Use the arrow keys on the right of the pump screen to scroll and see the additional information.
"},{"location":"troubleshooting/pump-errors/#batt-out-limit","title":"Batt Out Limit","text":"This error message \"battery out of limits\" has to do with the internal pump battery, not the AAA battery you replace. The internal battery cannot be replaced, and unfortunately also has a finite lifespan. The error message is more of an annoyance than a true problem. You can try to change the AAA battery faster. But, the worst-case scenario is that you'll have to re-enter the time and date when you get this message more often. (Don't forget to use RileyLink to set the time after you get this message.)
"},{"location":"troubleshooting/pump-errors/#button-error","title":"Button Error","text":"The Button Error message usually happens from water, moisture, or dust getting under the pump's button pad and causing button(s) to fail. The fix luckily is quite straight-forward and takes less than 30 minutes. Check out the fix here for a YouTube video or here for photo gallery. There is also a detailed page in the OpenAPS docs.
The solution involves simply prying up the button pad's sticker face to expose the layers beneath.
You can see some evidence of crud/rust on the underside of this button pad which caused the button error.
After you finish your fix, another excellent idea is to make sure you add a length of clear packing tape across the front face of the pump to prevent errant water or dirt from having easy access to the button pad seams.
"},{"location":"troubleshooting/pump-errors/#crackmissing-piece-repairs","title":"Crack/Missing Piece Repairs","text":"Another common issue on these Medtronic pumps are cracks and/or missing bits of plastic near the battery cap or reservoir sleeve. You can repair these fairly easily. For filling small cracks, Testor's plastic cement or Gorilla epoxy are good choices.
For more extensive repairs to replace missing chunks of plastic, Gorilla epoxy or Sugru are excellent choices.
You can use teflon thread tape on the battery cap to make sure the epoxy or Sugru don't stick to the battery cap, but still recreate the threads. The first photos are of a Sugru repair and second set of photos are Gorilla epoxy repair.
"},{"location":"troubleshooting/pump-errors/#motor-error","title":"Motor error","text":"Often a motor error is the result of a poorly seated reservoir or tubing cap. If you get a motor error, the first thing you should do is detach from your infusion site. Remove and reseat the reservoir, prime again, and see if the motor error resolves. If it does not, try replacing the tubing cap on the reservoir (new tubing). If that does not resolve the motor error, also replace the entire reservoir.
"},{"location":"troubleshooting/pump-errors/#a33-error","title":"A33 error","text":"Safety warning
If you get this error, DO NOT push on the bulged-out end cap. Always detach your tubing from your infusion set before addressing this error message. If you push on the end cap in an attempt to get it back flush, you may deliver a dangerous amount of insulin mistakenly.
This error is a bit more involved to repair. The problem is that there is a loose drive support cap. Most of the time this error message will appear during a priming event as the end cap of the drive will slip, releasing the ability of the reservoir plunger to get pressure to deliver insulin. The pump senses the lack of pressure and delivers the A33 error.
The solution is to UNHOOK from your site. See the warning above. Remove the reservoir and put your finger inside the reservoir sleeve. Push on the drive so that the end cap is pushed out the most possible. This will give you the most surface area possible to place the super glue GEL that you will use. (don't use regular super glue...it must be gel.) Remove the sticker that covers the end cap, and save it for later because you can reattach it when the repair is completed.
With the end cap pushed out, take some glue gel with the toothpick and apply it on the outside of the popped-out cap. Be generous cause you can do this only once. Once you are done take a napkin and press hard the cap toward the pump so it can go back inside and keep it pressed for a few seconds. Then remove all the small parts of the napkin that has glued to the pump. Leave the pump to dry for about 10-15 minutes.
Now to test whether the pump was glued well. You have already waited about 10-15 minutes so put your finger back in and press hard the plunger. If you glued it well, the end cap will not move. If the cap goes out again, you have to glue it one more time. If all looks well, put some glue back on top of the pump cap and reattach the sticker that was removed to start.
"},{"location":"troubleshooting/pump-errors/#a32-and-e22-error-loop","title":"A32 and E22 error loop","text":"From what we know, this set of error codes seems like a pump killer. A call to Medtronic support gave this less-than-hopeful information:
A32 - failure of flash memory E22 - software re-installation is necessary
We don't have any reports of a good fix for these error codes. When seen, usually the E22 error comes up and as soon as it is cleared, the A32 error comes up. And the loop continues with a pump restart.
"},{"location":"troubleshooting/red-loop/","title":"Red Loop","text":""},{"location":"troubleshooting/red-loop/#red-loop-overview","title":"Red Loop Overview","text":"This page provides help if your Loop icon is red and Loop is not working or only working sometimes.
With Loop 3 - clicking on the Loop icon on the main screen tells you the last time Loop completed, but you need to look at the Pump Status Icon and the Glucose Status Icon for more information. For example, when Glucose is stale (more than 15 minutes old), the Glucose icon shows \"- - -\". For example, when the Pump is having a communication issue, you will see a No Signal icon.
With Loop 2.2.x - clicking on the Loop icon on the main screen provides an error message. If you understand it, great...that should help you fix the problem. If not, grab a screenshot so you can ask for help from a mentor.
Omnipod Users
Do not pull a pod when there is a red loop.
There are a few times when it is the pod - but try all the steps on this page first.
Medtronic Users
You must select Insulin Type on your pump settings screen after updating from Loop 2 to Loop 3 and completing the onboarding. Without an insulin type, closed loop will not work.
A Red Loop icon means that Loop has not completed a cycle for 15-minutes or more and this is normally because of a communication break-down with one of the systems listed below.
"},{"location":"troubleshooting/red-loop/#typical-causes-for-red-loop","title":"Typical Causes for Red Loop","text":"Some of the reasons listed below cause Loop to go Red and stay Red until you fix it. Others will cause intermittent Red Loops that come and go.
We think this was fixed with Loop 3. If you are running Loop 2.2.x or FreeAPS:
Be Careful with Phone Reboots with Loop 2 or FreeAPS
If you are using an Omnipod, then before rebooting the phone, make sure it is absolutely necessary - try all other methods first. Be prepared to check that the pod is still communicating with Loop following the reboot. If this rare event happens to you, please report it, save and post a Loop Report and be prepared to put on a new pod and possibly re-enter your CGM information.
This could happen to someone using a Medtronic pump, but the consequence is less of a concern because the pump information is not modified as frequently as for Omnipod users.
"},{"location":"troubleshooting/red-loop/#reset-loop-to-pump-communications","title":"Reset Loop-to-Pump Communications","text":"If the indication is one of these (or something similar), it can probably be fixed by resetting the Loop-to-Pump communication. For DASH, this is Bluetooth only. For Eros or Medtronic, it is a combination of Bluetooth and the RileyLink compatible device.
Unable to Reach Pump
modal screen is visibleDo these steps until one of them fixes the issue:
Eros or Medtronic: Turn your RileyLink off/on at its physical power switch located on the side of the RileyLink.
This should restore a green Loop within 5 minutes. If you're impatient and are using pods, you can tap on Play Beeps. With Medtronic, you can attempt to suspend/resume the pump. If this is successful, you've established communication again.
Last thing to try is:
"},{"location":"troubleshooting/red-loop/#power-cycle-your-phone","title":"Power cycle your phone.","text":"If this was not successful, check out the Pump is Not Responding section.
"},{"location":"troubleshooting/red-loop/#cgm-values-are-not-being-collected-by-loop","title":"CGM Values Are Not Being Collected by Loop","text":""},{"location":"troubleshooting/red-loop/#new-transmitter","title":"New Transmitter","text":"If you recently changed a transmitter, you need to also update your Loop settings to reflect the new transmitter ID. Go to the CGM section of Loop settings and Delete CGM
(it's a button on the bottom of that page). Then use the Add CGM
in Loop settings to include the new transmitter ID.
If you fail to update your Transmitter ID in Loop and you also left Share Credentials in Loop (not recommended), you will see messages such as: Failed to decode SGV
when the Share server cannot be reached. That's your notice to update the Transmitter ID (or if you think you already did - check for typos in data entry).
Finally, we see a lot of errors reported because people have problems with their Share server information in Loop app. Please delete your Share account information from within Loop settings. In other words, the credentials portion of the Share account info, as shown in the screenshot below, should say Tap to Set
and not have your account info. It is unnecessary to have this portion filled out as local, non-internet spying of a transmitter is the preferred CGM source anyways. In fact, by leaving this information out, it will help you remember to change your transmitter ID when you change transmitters because CGM data won't appear in Loop. By not including Share account in Loop, you will prevent yourself from accidentally becoming internet dependent.
Leaving this in for historical interest only. It illustrates the need to keep Loop up-to-date. Who knows what the next hardware change will be. Enough time has passed that everyone's Loop code should be newer.
In July 2019, we started to see a new style of Dexcom G6 transmitters on the market. These new transmitters required a rework of some of the Loop's code to continue to \"spy\" on the transmitter. Without that update, your Loop can not get CGM data unless it is pulling from Share servers (which is not a recommended mode of operation). So, download fresh code for your Loop app if you have a new transmitter type and haven't downloaded since July 2019.
"},{"location":"troubleshooting/red-loop/#apple-health","title":"Apple Health","text":"Make sure both the Loop app and the Dexcom app have permission to write to Apple Health by checking the Apple Health Permissions
In the early days of iOS 14, there were problems with the Apple HealthKit. The consequence is that some people's database was corrupted. If you tap on the Heart Icon on your phone to go to Apple Health and display data and it is very slow to respond - or never responds, you probably need to get rid of a corrupted database and start fresh. Be sure to go Open Loop if this is needed. Please get help from your favorite Loop Social Media group or from Apple support in this case.
"},{"location":"troubleshooting/red-loop/#background-app-refresh","title":"Background App Refresh","text":"If you have not enabled background app refresh on your phone, then Loop is likely to stop communicating as soon as the phone is locked.
For iOS 15, there is a new feature described by Dexcom
If you added your Nightscout URL to Loop and are uploading information to Nightscout, make sure the communication is working properly. For short-term interruptions, Loop will store information to upload to Nightscout later. But if too much information builds up, Loop can slow down and in some cases have a Red Loop.
If you opted for the free DIY Nightscout, you will need to clean your database once or twice a year. Follow the Nightscout Database cleanup steps. Make sure you are periodically checking your database size (and that the dbsize keyword is in your ENABLE list and cleaning it.
"},{"location":"troubleshooting/red-loop/#phone-storage-is-full","title":"Phone Storage is Full","text":"This was reported by a user in November 2021. His phone storage was almost full and the reported error messages for Loop was:
Sqlite Error: A Sqlite Error Occurred: (13) Database or Disk is Full
The error message from Dexcom was not as helpful. If you see this, check your phone storage:
The Dexcom G6 app has stopped working. Please delete the app from your device and redownload it from the App Store
Solution: clear up space on your phone.
"},{"location":"troubleshooting/red-loop/#other-reasons-for-red-loop","title":"Other Reasons for Red Loop","text":""},{"location":"troubleshooting/red-loop/#pump-is-not-responding","title":"Pump is Not Responding","text":"The first step is to make sure the phone and if needed, the RileyLink compatible device, is not so far away from the pump or pod that they cannot communicate. Assuming you've addressed this, then you can move on to other steps.
Omnipod Loopers:
If the pod is screaming, it should still be able to communicate with Loop, but sometimes you need to restore communication so you can deactivate the pod and quiet it. Follow the steps below, just do it with the added \"noise\".
The Reset Loop-to-Pump Communications steps almost always fix the issue. It is possible that the pod really had stopped communicating, but try everything else before burning another pod.
Medtronic Loopers: If the pump is not responding with \"decoding\" errors or various other messages about pump responses. Try the following:
Change Time
command in the pump menu to update the pump's clock. If you've accidentally changed the pump's time in the pump itself or if the pump time has drifted, this will get the Loop app and pump time back in sync.Here's some things to check if you have frequent red loops:
Try deleting your Nightscout account from Loop settings and see if your Loop stops having red loops. If it does, then you'll need to assess what's going wrong in your Nightscout site and fix it. Most of the time, your database is getting too big and cleanup is required.
Is your RileyLink battery plugged in all the way on the board? One Looper recently posted that her RileyLink battery connection needed to be reseated after several years of service.
Has your RL been fully charged? Try charging your RL for an hour or two, make sure the red light comes on while charging. Try a new charger or cable.
Oddly, some people have found that turning off Siri integrations for Loop and Dexcom apps in your iPhone settings has helped. This may be coincidental, but if you're still having trouble, you might want to try it.
Check for sources of wireless interference. If you have a certain environment that seems to have more drops than others, it is likely that there is a source of wireless communication interfering with your Loop. Lots of Medtronic Loopers in a room together will often interfere with each other and get \"cross-talk\" red loop error messages. If it is a bedroom at night causing problems, try moving other wireless devices such as routers or baby monitors farther away from where you and your RileyLink compatible device.
In some cases, you may need to clean out Apple Health, or even reset your phone to factory defaults and reload all your personal information and then rebuild the Loop app. Before you do this, you may want to Post for Help (next section).
Before you post on Looped group for help with a red loop, please make sure you've reset the RileyLink / Phone.
Before you post for help, please also check your Nightscout status including database size. This step is often overlooked and yet solves a lot of problems.
When posting for help, include two screenshots of Loop's main screen; one with the red loop's error message and the other just the plain Loop main screen. Include a detailed description of what you have tried doing from the troubleshooting list above. For example, state if you've double checked the transmitter ID, deleted the Share account info from Loop settings so that we can rule out some of the causes of CGM issues.
"},{"location":"troubleshooting/red-loop/#what-else","title":"What Else?","text":"There are a few other things to consider:
How can you tell if your RileyLink has a problem? The answer is mostly within the LED lights that display on the board. Some information is listed below, but also review the FAQs at getrileylink.org.
If you have a different RileyLink compatible device, please check the appropriate site for troubleshooting help.
Red light: comes on during charging and will turn off/on periodically, while still plugged in, after charge is complete.
Green light: Indicates an active BT connection with the phone. You want the green light to stay on all the time on the RileyLink. If the green light is not on, then make sure your iPhone's bluetooth is still switched on.
Blue light: The blue light will flash off/on periodically when the RileyLink and pump are actively communicating...it should NOT be always on. If your blue light is stuck on, that is an indication of a problem on the board. Try looking for signs of damage or debris that may be causing a short on the board. Clean the board with rubbing alcohol (unplug the battery first). If you still can't get the blue light off, then contact GetRileyLink for help or check out RileyLink Compatible Devices for replacement options.
"},{"location":"troubleshooting/red-loop/#battery-has-failed","title":"Battery has Failed","text":"Both RileyLink and EmaLink use LiPo batteries. If they stop holding charge for as long as they used to, or if they swell (often first noticed as bowing of the case), stop using the battery and replace it as soon as possible.
OrangeLink uses regular batteries, so just change them out.
"},{"location":"troubleshooting/red-loop/#orangelink-firmware","title":"OrangeLink Firmware","text":"One version of the OrangeLine firmware did not communicate well with Loop (or Android APS).
If you have FW 2.6 on your OrangeLink or OrangeLink Pro, please upgrade to FW 3.2 as soon as possible.
"},{"location":"version/build-dev/","title":"Build Dev","text":""},{"location":"version/build-dev/#building-development-code","title":"Building Development Code","text":"No matter the method used to build Loop-dev: GitHub actions or git commands, you are testing development code. Please read this link now before continuing.
dev branch
There are several methods to build Loop-dev. First review the general information on this page then choose the link for the method of your choice:
"},{"location":"version/build-dev/#update-frequently","title":"Update Frequently","text":"While Loop-dev is under active development, you should monitor zulipchat and update frequently. Sometimes the dev
branch is quiet for a month or more and other times it gets updated daily. Please pay attention.
Checking for updates every week is a good idea. Also - subscribe to all the streams on Loop Zulipchat to make sure you don't miss critical information.
"},{"location":"version/build-dev/#loop-dev-version","title":"Loop-dev Version","text":"The version of code that shows up under the Loop Settings screen does not change when the dev branch
is modified.
If you need help with your app, the mentors need more information. Please issue a Loop Report when asking for help. Refer to Support for how to issue a Loop Report. If you want to keep track yourself, refer to Identify Loop-dev Version
Loop
Version NumberingThe version of code that shows up under the Loop Settings screen will remain fixed until Loop-dev is released. In order to identify which version of dev you have on your phone, you need the commit.
The commit is identified by a 7-digit alphanumeric code. That code was also appended to the folder name of the downloaded code under Downloads/BuildLoop as shown in the graphic above. You can use finder to view the folder name after the script completes. It also appears in the Loop Report, refer to Support for instructions on issuing a Loop Report. After you issue the Loop Report, look at the workspaceGitRevision number near the beginning of the report.
"},{"location":"version/build-dev/#build-loop-dev","title":"BuildLoop
dev
","text":"Build-time features are not available with Loop 2.2.x.
With Loop 3, some features are enabled or disabled by default but can be modified by adding a \"flag\" in the LoopConfigOverride.xcconfig file.
If you use Build with Browser, these build-time features can be added to your copy of the LoopConfigOverride.xcconfig file. Use the pencil icon in that file on your copy of LoopWorkspace and then commit the change.
If you use the Build with Mac Method, this is the same file used to automatically sign all your targets. You can edit the version in your LoopWorkspace folder (it shows up as the top item in the Xcode folder view) - or - if you use the build script, you can edit the copy found in ~/Downloads/BuildLoop after the first time you use the script. For that second case, the \"flags\" you add in ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig are applied to all downloads created with the script.
These flags are always upper case with underscore separating words for clarity, for example MY_EXAMPLE_FLAG
. If you have more than one flag, they are separated by a space. Do not enter a line break between selections; in other words, do not hit return or enter. Xcode will automatically word-wrap the line for clarity. All values need to be on a single line.
New Instructions
The instructions are more robust than earlier instructions that had you editing a line instead of adding new ones.
Copy the text below, add it to the end of your LoopConfigOverride.xcconfig file and then insert the desired flags in place of MY_EXAMPLE_FLAG
. If you want more than one flag, separate them by a space.
// Add Build-Time features to compilation conditions\nSWIFT_ACTIVE_COMPILATION_CONDITIONS = $(SWIFT_ACTIVE_COMPILATION_CONDITIONS) MY_EXAMPLE_FLAG\n
Code Before Modification
// Put your team id here for signing\n//LOOP_DEVELOPMENT_TEAM = UY678SP37Q\n
The example below is for someone who is using a Free Developer ID - which does not support Siri.
Code After Modification
// Put your team id here for signing\n//LOOP_DEVELOPMENT_TEAM = UY678SP37Q\n\n// Add Build-Time features to compilation conditions\nSWIFT_ACTIVE_COMPILATION_CONDITIONS = $(SWIFT_ACTIVE_COMPILATION_CONDITIONS) SIRI_DISABLED\n
List of some flags and what they do:
FLAG PURPOSE SIRI_DISABLED Required to build Loop from Xcode with a free developer account ADULT_CHILD_INSULIN_MODEL_SELECTION_ENABLED The choice for Child Model is enabled in Therapy Settings. Please read Enable Child Model. REMOTE_OVERRIDES_DISABLED Remote commands: override, carbs or boluses will not be accepted even if all the Remote Command requirements are configuredIf you do configure this and later try to set up remote commands, they will not work and there is no error message. Remote Errors: Loop REMOTE_OVERRIDES_DISABLED OBSERVE_HEALTH_KIT_CARB_SAMPLES_FROM_OTHER_APPS_ENABLED Turns on ability for Loop to read third party carb entries. You must also make sure Health permissions allow Loop to read carbs from Health. Be vigilant if you select this; added carbs lead to added insulin dosing when closed loop is enabled SHOW_EVENTUAL_BLOOD_GLUCOSE_ON_WATCH_DISABLED The Apple Watch screens show current glucose, trend arrow and eventual glucose by default. This flag disables the display of eventual glucose on the watch if you find the display distracting. PREDICTED_GLUCOSE_CHART_CLAMP_ENABLED Chart Clamp ALLOW_ALGORITHM_EXPERIMENTS dev branch onlyThis is enabled by default to show Algorithm Experiments below the Therapy Settings row. This enables the user to separately enable or disable Glucose Based Partial Application and Integral Retrospective Correction"},{"location":"version/build-time-flag/#chart-clamp","title":"Chart Clamp","text":"What the heck is a chart clamp? It means the range displayed will not be smaller than the clamp but it can be bigger.
Loop automatically scales the glucose charts based on the history shown. Some people don't like to see the vertical axis changing, so they turn on the \"clamp\".
When the PREDICTED_GLUCOSE_CHART_CLAMP_ENABLED
build time flag is added:
glucoseChartDefaultDisplayBoundClamped
When you do not add that build time flag:
glucoseChartDefaultDisplayBound
If glucose within the display history is outside of the bound, the graph range expands to include that glucose level. This prevents glucose readings from being \"hidden\".
You can customize chart display settings if you want. The original lines of code are shown below. You will need to read the rest of this page to figure out how to modify these to meet what you prefer. If you can't figure this out - reach out for help.
// MARK - Display settings\n\n static let minimumChartWidthPerHour: CGFloat = 50\n\n static let statusChartMinimumHistoryDisplay: TimeInterval = .hours(1)\n\n static let glucoseChartDefaultDisplayBound =\n HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 100)...HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 175)\n\n static let glucoseChartDefaultDisplayRangeWide =\n HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 60)...HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 200)\n\n static let glucoseChartDefaultDisplayBoundClamped =\n HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 80)...HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 240)\n
"},{"location":"version/build-time-flag/#enable-child-model","title":"Enable Child Model","text":"Loop 3, by default, does not include the concept of child versus adult for rapid-acting insulin, i.e., Humalog, Novalog and Apidra.
For new Loopers, please build the code before you make any changes. Start with Open Loop and familiarize yourself with the interface. Later, you can make the customization(s) you desire and build again. The second build will be much easier than your first build.
These customizations require you modify the Loop app code and then build the app after making these customizations. This page supports version 3 and greater for the Loop app.
"},{"location":"version/code-custom-edits/#customization-options","title":"Customization Options","text":"Read about the customizations on this page before applying them.
You take responsibility
You are responsible when you decide to use customizations.
Be sure to report what changes you made if you need to ask for assistance with your app.
Some customizations are the same for everyone and have been prepared for easy use. Refer to the build method that you use for information about applying these prepared changes - the same set is available for both build methods.
Other customizations require that you create your own personalized version.
LoopConfigOverride.xcconfig
file.The instructions on this page identify the module, Key_Phrase
or file and line numbers required to locate the code you need to modify.
Why do I have to jump between pages?
Line numbers may change
Every effort will be made to update the line numbers as the code is updated, but there may be times where the screenshots and line numbers differ from the current version of Loop code.
You may notice some customizations list line numbers for different branches
If you cannot identify a line that looks exactly like the example - do not guess - go to your favorite social media group and ask for help
Sometimes there is a bigger change than just line numbers. The git software is really good about finding the \"right\" code that is just at a different line number. When you see the notation Stable: Changed on date
, that means you must select the correct version when making your personal customization depending on which version you are modifying.
This page is broken into two halves:
Custom Edits Required:
Custom Edits Optional:
For each customization, you will be given landmarks to find the correct location in the code. You can choose to search using the Key_Phrase
or navigate to the file in the folder structure and look for the line number.
use the copy button at right, paste into search\nThe copy button for this exampe is just for practice\nDo not paste the result anywhere\n
To search using the Key_Phrase
(see graphic above for an example):
Key_Phrase
; click on it to copy the phrase into your paste bufferStability Information Added
If a customization needs to be modified to work with the dev
branch, that will be noted. This means a change that is more than a line number. Instead it is a change that requires a new customization.
For those using the Browser Build method for main
branch, this means you will need to use Create branch
if needed to create a special branch to prepare a new version of this customization. If you already created a personal customization earlier (before the date noted), you can keep using that customization with main
.
For your convenience, see Not Stable List.
Each customization provides the Module, Folder and File bullet below the key phrase.
The customizations below show the original line of code that you will be changing.
There may be a figure illustrating the change.
Below the figure, the original, and in some cases, the modified code will be displayed as text.
This list indicates personalized customization that differ between main
and dev
Loop\u2019s default carb absorption times are based on the high, medium, and low glycemic index absorption curves presented in Think Like A Pancreas by Gary Scheiner. In prior versions of the Loop app, for example version 2.2.x, the lollipop (fast) icon was set for 2 hours, taco (medium) icon for 3 hours, and pizza (slow) icon for 4 hours. This is modified for Loop 3
to 30 minutes, 3 hours and 5 hours respectively. Some people prefer different values.
The developers did this because they expect fast to only be used for rapid-acting low treatments. The medium and fast values are for moderate and higher-fat or large meals.
Key_PhrasedefaultCarbAbsorptionTimes: CarbStore.DefaultAbsorptionTimes\n
For example, if you wanted to change fast
to be slightly longer, the edit would be as follows:
_Code Before Modification
public static let defaultCarbAbsorptionTimes: CarbStore.DefaultAbsorptionTimes = (fast: .minutes(30), medium: .hours(3), slow: .hours(5))\n
_Code After Modification
public static let defaultCarbAbsorptionTimes: CarbStore.DefaultAbsorptionTimes = (fast: .hours(1.5), medium: .hours(3), slow: .hours(5))\n
Note that if you change fast
from 30 minutes to 1.5 hours, you must also change the indication before the parentheses.
With version 3.2.0, a new safety feature was added. This limits automatic dosing so IOB is no more than two times the \\(\\mathit{maximumBolus}\\) set in your Delivery Limits. (The term automatic dosing refers to insulin the app automatically delivers above your scheduled basal rate.) Manual Bolus, where you initiate the bolus yourself, is not subject to this limit. Please read How do Delivery Limits Affect Automatic Dosing? for detailed information on how this safety feature works.
The default value (\\(\\mathit{2*maximumBolus}\\)) used for this feature is good for the majority of people who use the app. However, there are some individuals who might need to limit the size of any single bolus independent from the maximum IOB they want to set for their app. This is particularly true for those who find large boluses give rise to tunneling and the insulin leaks out along the cannula.
Key_PhraseautomaticDosingIOBLimit = maxBolus\n
The following example is for someone who limits a single bolus to 5 U but frequently needs to achieve an IOB of 15 U for meals. They want that level of IOB to be reached with automatic bolusing. In that case, they may want to modify the factor used to calculate \\(\\mathit{automaticDosingIOBLimit}\\).
Original Code:
let automaticDosingIOBLimit = maxBolus! * 2.0\n
Modified Code Example:
let automaticDosingIOBLimit = maxBolus! * 3.0\n
Because the automatic bolus amount is also limited by the partial application factor, it still takes a few cycles to reach the higher IOB of \\(\\mathit{3*maximumBolus}\\); but they can get there without manual intervention.
"},{"location":"version/code-custom-edits/#adjust-percent-bolus-for-automatic-bolus","title":"Adjust Percent Bolus for Automatic Bolus","text":"If you are mostly happy with the Dosing Strategy of Automatic Bolus but wish it delivered more or less insulin during every Loop interval, then this customization is for you.
This customization changes the percent of the recommended bolus used for automatic delivery. The method for calculating that recommendation is not changed by this modification. The default value is 40% (0.4). It is recommended you take small changes of 0.1 at a time. Once you modify it once and try it out for a while, it\u2019s easy to go back and change it again.
Change just the number and double check that the value is less than 1.
Key_Phraselet bolusPartialApplicationFactor\n
Code Before Modification
static let bolusPartialApplicationFactor = 0.4\n
Code After Modification to 50% of recommended insulin
static let bolusPartialApplicationFactor = 0.5\n
Do not exceed 1.0
This number should never be bigger than 1 (you\u2019d be getting more than Loop recommends). If you think you need more than 1, consider your settings and meal entries.
"},{"location":"version/code-custom-edits/#pods-add-extra-insulin-on-insertion","title":"Pods: Add Extra Insulin on Insertion","text":"The default value is 0.0 U of extra insulin. If you use this customization, start with a small number and work your way up. If you are coming from manual podding and routinely gave yourself an extra bolus with your PDM at pod change time, you may not need nearly as much with Loop - be conservative.
Note that Loop does not include the amount of insulin in the prime or insertion steps in your IOB. The pod reports every pulse that it delivers to Loop. If you look in the Pod Settings insulin delivered row, that is the total delivered by the pod minus the (prime plus insertion) amounts. The only way to know that you successfully made this change is to count the clicks. Normal insertion is 0.5 U (0.5 U / 0.05 U per click = 10 clicks). So if you add 0.35 U to the \"extra\" value, you should get 0.35 / 0.05 = 7 extra clicks. In other words, 17 total clicks after you press insert.
This code change is found in one location for Eros Pods (called Omnipod throughout the app) and DASH Pods (called Omnipod Dash throughout the app). I tend to change both files, but if you're only using one kind of pod, that is really not necessary.
Key_Phraselet cannulaInsertionUnitsExtra\n
Code Before Modification
public static let cannulaInsertionUnitsExtra = 0.0 // edit to add a fixed additional amount of insulin during cannula insertion\n
Code After Modification to add 0.35 U
public static let cannulaInsertionUnitsExtra = 0.35 // edit to add a fixed additional amount of insulin during cannula insertion\n
"},{"location":"version/code-custom-edits/#modify-the-guardrails","title":"Modify the Guardrails","text":"The Therapy Setting Guardrails are for Loop 3 only.
"},{"location":"version/code-custom-edits/#glucose-guardrails","title":"Glucose Guardrails","text":"If you build Loop 3 over a version of Loop 2.2.x or FreeAPS where the Correction Range is lower than the default value of 87 mg/dL (4.8 mmol/L), your app requires you to satisfy the new guardrail before you can save that Therapy Setting when you onboard.
Key_PhraseGuardrail(absoluteBounds:\n
Code Before Modification
static let suspendThreshold = Guardrail(absoluteBounds: 67...110, recommendedBounds: 74...80, unit: .milligramsPerDeciliter, startingSuggestion: 80)\n
and
static let correctionRange = Guardrail(absoluteBounds: 87...180, recommendedBounds: 100...115, unit: .milligramsPerDeciliter, startingSuggestion: 100)\n
Modify the absoluteBounds to change the allowed ranges or the recommendedBounds to change the color of the numbers on the picker wheel.
Loop automatically converts from mg/dL to mmol/L. So you must enter values reasonable for mg/dL (18 times higher than for mmol/L).
"},{"location":"version/code-custom-edits/#version-after-update","title":"Version after Update","text":"This update, merged into dev
on 2024 Feb 19 was part of a larger fix to a problem when glucose units were mmol/L. The user could not select two values (min and max) that were the same and equal to the reported absolute range. This was a rounding problem going between mmol/L and mg/dL that has now been resolved. Part of the resolution was to modify the mg/dL absolute ranges to preserve the previously reported mmol/L absolute ranges.
Code Before Modification
static let suspendThreshold = Guardrail(absoluteBounds: (66.1)...(110.9), recommendedBounds: (73.1)...(80.9), unit: .milligramsPerDeciliter, startingSuggestion: 80)\n
and
static let correctionRange = Guardrail(absoluteBounds: (86.1)...(180.5), recommendedBounds: (99.1)...(115.9), unit: .milligramsPerDeciliter, startingSuggestion: 100)\n
Modify the absoluteBounds to change the allowed ranges or the recommendedBounds to change the color of the numbers on the picker wheel.
Loop automatically converts from mg/dL to mmol/L. So you must enter values reasonable for mg/dL (18 times higher than for mmol/L).
"},{"location":"version/code-custom-edits/#modify-guardrails-for-insulin-sensitivity-factor-isf","title":"Modify Guardrails for Insulin Sensitivity Factor (ISF)","text":"Similar to the instructions for glucose guardrails above, but use this Key_Phrase
and modify the absoluteBounds row, next line.
static let insulinSensitivity = Guardrail(\n
Similar to the instructions for glucose guardrails above, but use this Key_Phrase
and modify the absoluteBounds row, next line.
static let carbRatio = Guardrail(\n
Loop 3 limits to 1 hours the amount of time in the future that carbs can be entered.
The customization varies depending on whether you are building dev
or main
.
The main
branch:
The dev
branch:
The changes required for this customization have changed several time for dev
. The code provided in Version after Update is for the latest dev
code, as of 2023 Aug 20.
cell.datePicker.maximumDate = date.addingTimeInterval\n
Default shown below (for maximum and minimum):
Code Before Modification
cell.datePicker.maximumDate = date.addingTimeInterval(.hours(1))\ncell.datePicker.minimumDate = date.addingTimeInterval(.hours(-12))\n
Change the maximumDate to the number of hours in the future you desire. Remember that Loop may increase insulin dosing for future carbs - make sure that they actually arrive.
The minimumDate is how far back in the past you can modify time. The default is 12 hours in the past.
"},{"location":"version/code-custom-edits/#version-after-update_1","title":"Version after Update","text":"Key_Phrasestatic let maxCarbEntryFutureTime\n
Default shown below:
Code Before Modification
static let maxCarbEntryFutureTime = TimeInterval(hours: 1)\n
Change the maxCarbEntryFutureTime to the number of hours in the future you desire. Remember that Loop may increase insulin dosing for future carbs - make sure that they actually arrive.
"},{"location":"version/code-custom-edits/#adjust-the-watch-crown-sensitivity","title":"Adjust the Watch Crown Sensitivity","text":"The rate of change of the carb and bolus entry pickers when using the digital crown can be altered as can the rotation required to confirm a bolus on the watch. If you are running an older series watch - you may want to make these customizations. When I switched from Series 3 to Series 7 watch - it was amazing. I got a graph on the main watch screen I didn't even know existed and the bolus acceptance was a breeze!
These are new instructions and the user should take care - and please report back if you have problems.
First - try it with no customization. Then make small changes.
This key phrase will indicate three different files in the same folder as shown in the graphic below - you can adjust each in turn as you desire. When you click on the line, the quantity you change is a few lines below where you find the Key_Phrase
, except for the CarbAndDateInput file.
.digitalCrownRotation\n
scalingRotationBy
is 4rotationsPerIncrement
is 1/24rotationsPerIncrement
is 1/24An expiration notification feature has been added to Loop. You get a notification when you open the Loop app to alert you that the expiration is approaching.
If you prefer a different notification time and frequency, there are two lines you can modify:
expirationAlertWindow: TimeInterval\n
Key_Phrase minimumTimeBetweenAlerts: TimeInterval\n
Default code for line 16:
static let expirationAlertWindow: TimeInterval = .days(20)\n
Example modifications to First Notification:
.days(20)
to .days(30)
.days(20)
to .hours(12)
Default code for line 28:
let minimumTimeBetweenAlerts: TimeInterval = timeUntilExpiration > .hours(24) ? .days(2) : .hours(1)\n
Modify Frequency of Repeated Notifications (Three Values):
> .hours(24) ? .days(2) : .hours(1)
> Time_A ? Frequency_A : Frequency_B
, means:You can enter Time or Frequency as .days(value)
, .hours(value)
or .minutes(value)
.
Free App Users:
An example change that a Free Loop App user (who has to build once a week) might choose is:
> .hours(4) ? .days(10) : .hours(2)\n
Combined with an .hours(12)
on line 16, they would get notified at 12 hours, 4 hours and 2 hours before expiration on the day of expiration and only when the app is opened. Since you'll be building once a week, you can play around with these values until you are happy."},{"location":"version/code-custom-edits/#enable-child-model","title":"Enable Child Model","text":"Please see the Build-Time Flag page for this customization.
"},{"location":"version/code-custom-edits/#insulin-model-customization","title":"Insulin Model Customization","text":"Each exponential model has 3 parameters that can be adjusted:
Please read the nitty-gritty discussion that went into the development of the \"exponential insulin models\" in this Comment.
If you wish to customize these values, please make sure you know what you are doing. This is not a modification recommended for Loop novices.
Key_PhraseMARK: - Model generation\n
This Loop 3 table of default values is provided for convenience. The times are all in minutes.
Model DIA Peak Delay rapidActingAdult 360 75 10 rapidActingChild 360 65 10 fiasp 360 55 10 lyumjev 360 55 10 afrezza 300 29 10"},{"location":"version/code-custom-edits/#loop-logo","title":"Loop Logo","text":"Mac Instructions
This can be done with Build with Browser but the instructions might need to be adjusted for that case.
If you want an app logo other than the default green circle for your Loop app, you can easily customize this. To make it easy to generate the correct sizes of icons, you can use a site like appicon.build or appicon.co and just drag and drop your source image. The source image needs to be 1024 pixels x 1024 pixels. The site will email you a zip file or automatically download a set of files. Highlight and copy the contents of the Appicon.appiconset that you are sent, including the Contents.json file
You may see a yellow warning that there are \u201cunassigned children\u201d depending on the images the app icon generator tool produced. The unassigned children alert will not prevent your app from building, it\u2019s simply because there are more sizes of images than Loop app uses. You can just leave the unassigned children alone (wow...how often do you get to say that phrase?).
And now you'll be the proud new owner of a custom Loop icon.
"},{"location":"version/code-custom-edits/#custom-edits-optional","title":"Custom Edits Optional","text":""},{"location":"version/code-custom-edits/#disable-authentication-for-bolusing","title":"Disable Authentication for Bolusing","text":"Depending on your iPhone Settings and model, you may have Face ID or Touch ID enabled. Those security features will also be used to authenticate bolus delivery in Loop. You can choose to disable authentication (i.e., not require Face ID, Touch ID, or passcode for bolusing) through the following code customization.
Safety Measure
If you disable this, you are removing an important safety feature.
In addition to authenticating every manual bolus, this helps to protect against sleep bolusing and pocket bolusing.
For Loop 3, this controls the authorization requirement to modify Therapy Settings as well as to confirm bolus delivery.
Key_PhrasecanEvaluatePolicy(.deviceOwnerAuthentication\n
Code Before Modification
if context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) {\n
Code After Modification
if false && context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) {\n
"},{"location":"version/code-custom-edits/#modify-override-insulin-needs-picker","title":"Modify Override Insulin Needs Picker","text":"Some people want finer settings on the override insulin needs picker (5% instead of 10%) and may want to limit the overall range for overrides \u2013 especially for children.
1% Settings Available without Customization
With the advent of Loop 3, the Override Insulin Needs values are not limited by the default picker values of 10%.
Any override more than a factor of 2 from 100% can cause Loop predictions to be wrong \u2013 especially if a carb count is entered. (An override is NOT the same as a manual temp basal - it changes insulin sensitivity factor and carb ratio in addition to the basal rate needed for zero change in IOB for the duration of the override.)
A Sensitivity of 0% is NOT Valid
Do not set the lower level of the sensitivity range to be 0%.
If you configure to allow that and someone chooses it, they will be telling Loop to divide by zero in some of the calculations. They will see NaN (not a number) in Loop predictions until that override is removed and will continue to see that for the full duration of insulin action (6 hours).
This example customization changes the lower bound for sensitivity to 50% (factor of 2 smaller than 100%) and provides 5% steps. This is the same as the prepared customization offered by the Loop and Learn team.
Key_Phraselet allScaleFactorPercentages\n
Code Before Modification
private let allScaleFactorPercentages = Array(stride(from: 10, through: 200, by: 10))\n
Code After Modification to 50% to 200% by steps of 5%
private let allScaleFactorPercentages = Array(stride(from: 50, through: 200, by: 5))\n
"},{"location":"version/code-custom-edits/#modify-maximum-and-warning-carb-entry","title":"Modify Maximum and Warning Carb Entry","text":"Version 3.x of the Loop app has both a maxCarbEntryQuantity
and a warningCarbEntryQuantity
, found adjacent to each other in the code. The warning value is the level at which you are asked if you really meant to enter that amount:
let maxCarbEntryQuantity =\n
Code Before Modification
static let maxCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 250) // cannot exceed this value\n\nstatic let warningCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 99) // user is warned above this value\n
"},{"location":"version/code-custom-edits/#low_carb_limit","title":"\"low_carb_limit\"
","text":"This first example might be used by a parent for a child with very small carb entries. It is provided as one of the prepared customizations supplied by the Loop and Learn Customization as \"low_carb_limit
\".
Code After Modification to enable the warning at lower levels and limit maximum
static let maxCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 99) // cannot exceed this value\n\nstatic let warningCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 49) // user is warned above this value\n
"},{"location":"version/code-custom-edits/#high_carb_limit","title":"\"high_carb_limit\"
","text":"This second example might be used by a person who routinely enters large meals and does not want to be warned with every meal. It is provided as one of the prepared customizations supplied by the Loop and Learn Customization as \"high_carb_limit
\".
Code After Modification to warn if entry is between 201 and 300g
static let maxCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 300) // cannot exceed this value\n\nstatic let warningCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 200) // user is warned above this value\n
"},{"location":"version/development/","title":"Loop Development","text":""},{"location":"version/development/#overview","title":"Overview","text":"The early history of the Loop app was touched on in the introductory LoopDocs Overview: Development History section.
The Loop Releases page lists releases since version 2.0 in reverse chronological order.
The next version of the Loop app is developed using branch(es), independent of the released Loop version, which is found in the main
branch. The dev
branch is used by the developers to push out changes for users to test. You should only test a development branch if you are willing to be both an active participant with the developers to monitor announcements and provide feedback and to build frequently to obtain the latest feature or bug-fix that is being tested. If you are willing to help out - this is the way the next release of Loop is improved.
If you choose to use dev
, you accept that this code is not released.
Please read this entire page before using any version of Loop other than the released code.
"},{"location":"version/development/#updates-in-dev","title":"Updates in dev","text":"This section is an early look at what has been added to dev
since Loop 3.2.x\u00a0and will probably be in the next release. After the release, some of the content and graphics in this section will move to the Releases page or the appropriate documentation section.
Libre
Sensors","text":"LibreTransmitter support was merged into the dev
branch in July 2023.
If you are using the GitHub / Browser Build method, please review:
The simulators for the Pump and CGM, for the dev
branch show a new format when first selected. The initial view is a demonstration screen showing a typical CGM or Pump display. In order to view behind the scenes, modify settings, and delete the simulator, you must press and hold (long-press) on the top of the display. Anywhere in the top third works for the long-press, but I like to touch the card as shown in the pump example below. If you've counted to 10 and the display has not updated yet, then return to the main screen, go back to the simulator screen, and try again.
Two algorithm experiments have been added to dev
. These are \u00a0Glucose Based Partial Application\u00a0 and \u00a0Integral Retrospective Correction. They can be viewed on the Loop Settings screen just below Therapy Settings and Usage Data Sharing as shown in the graphic below:
GBPA
):","text":"Automatic Bolus
(AB) is selected for Dosing Strategy
When AB
is selected and GBPA
is enabled, the percentage of the recommended dose delivered per cycle of \u00a0Loop\u00a0 ranges from 20% to 80% based on glucose level and user-selected correction range. (Without GBPA
enabled, AB
uses a fixed 40% percentage regardless of glucose level.)
Partial Application
= 20% when glucose is at or below the users correction range lower value (including overrides) plus 10 mg/dL (0.6 mmol/L)Partial Application
increases linearly from 20% to 80% up to a glucose level of 200 mg/dL (11.1 mmol/L)Partial Application
is 80% when the glucose level is above 200 mg/dL (11.1 mmol/L)GBPA
","text":"Loop makes a prediction and recommends an insulin dose based on your settings and your glucose, insulin and carb history. The selected Dosing Strategy
(Automatic Bolus
with or without GBPA
or Temp Basal Only
) only changes how quickly that recommended dose is delivered.
This example assumes Loop recommends 1 U (at time 0) and future glucose values match Loop's prediction for each successive 5-minute update. In other words, over half an hour, Loop provides about 1 U of insulin above that delivered by the scheduled basal rate.
The tables below show Automatic Bolus
patterns, using a pump minimum bolus increment of 0.05 U, for several application factors. When using GBPA
, the application factor can vary with glucose, but that is ignored for this simplified example.
The first table shows the bolus delivered each Loop cycle for several application factors. Higher application factors start with higher boluses, but go to zero (indicated by a dash) more quickly.
Incremental Dose for several application factors when initial recommendation is 1 U
Minutes 20% 40% 60% 80% 0 0.20 0.40 0.60 0.80 5 0.15 0.25 0.25 0.15 10 0.15 0.15 0.10 0.05 15 0.10 0.10 0.05 - 20 0.10 0.05 - - 25 0.05 - - - 30 0.05 - - -The second table shows the cumulative delivery. A dash shows recommended dose was delivered. Remember, this is a simplified example.
Cumulative Dose for several application factors when initial recommendation is 1 U
Minutes 20% 40% 60% 80% 0 0.20 0.40 0.60 0.80 5 0.35 0.65 0.85 0.95 10 0.50 0.80 0.95 1.00 15 0.60 0.90 1.00 - 20 0.70 0.95 - - 25 0.75 0.95 - - 30 0.80 0.95 - -The 20% and 40% application factor columns did not reach 1 U in 30 minutes because the requested dose is smaller than this pump will deliver. The 60% application factor only reached 1 U because tiny doses down to 0.03 U were rounded up to 0.05 U.
The Temp Basal Only
Dosing Strategy
provides about 17% of the recommended bolus each 5-minute interval. The minimum GBPA
application factor of 20% was selected to be similar to that rate for lower glucose values. Initially, an application factor of 20% delivers insulin more quickly than Temp Basal Only
, but by the end of 30 minutes, the basal program inside the pump keeps track of how much is delivered to reach the rate requested, achieving the full 1 U (for this example).
IRC
):","text":"forks
but not included into dev
until recentlyIRC
with Glucose Momentum
: Loop PR 2028Dosing Strategies
: Temp Basal
or Automatic Bolus
Referring to the Algorithm: Prediction
page:
IRC
is disabled (default), the equation used to predict glucose continues to be:IRC
is enabled that equation changes to:Note that the Momentum\u200b term does not just add to the other effects; it is actually more complicated (and also more challenging to describe in simple math terms).
The Retrospective Correction
section of the Predicted Glucose Chart is updated when IRC
is enabled, as shown in the graphic below. The Integral effect
, inside the lower blue rectangle, is the difference between the IRC
and RC
calculations.
The IRC
term is described in this (updated) comment including plots and equations. Some of the information in that comment is repeated below: Important points about IRC
.
If you want to look at the code, the version (as of 14-Aug-2023) is found in LoopKit/LoopKit
:
RetrospectiveCorrection
code: StandardRetrospectiveCorrection.swift
IntegralRetrospectiveCorrection
code: IntegralRetrospectiveCorrection.swift
IRC
","text":"Known risk factors compared to standard Loop:
IRC
turned on, Loop will likely increase insulin corrections in response to persistent discrepancies between observed and predicted glucose motion, which may increase the risks of hypoglycemiaIRC
may also lead to increased oscillations (\"roller-coaster\") in glucose responsesISF
setting value tends to mitigate these risks but it is impossible to offer any guarantees for anything around T1DCompared to standard RC
, IRC
is more likely to improve glucose control in the following scenarios:
In some scenarios IRC
does not differ from standard Loop RC
Please do not expect immediate or very substantial improvements in blood glucose control. A one-time success after turning IRC
on does not really mean that IRC
\"works\" - this could just as well be a temporal coincidence. Some ways to decide if IRC
could be safe and effective for you include:
Loop
; at the wake-up time blood glucose should, in general, be closer to the correction range.This feature allows you to save Favorite Foods.
A new row on the\u00a0Loop\u00a0app Settings screen, see graphic below, provides access to create and edit your \u00a0Favorite Foods.
In the example meal entry shown below:
At this point the meal can be saved by tapping the Continue button, or the user can modify the time (typical) or any other of the carb entry rows before tapping Continue.
"},{"location":"version/development/#testflight-expiration-warning","title":"TestFlight Expiration Warning","text":"The\u00a0Loop\u00a0app has been updated to detect whether the build was uploaded through TestFlight, which implies a 90-day limit until the app expires.
The usual\u00a0Loop\u00a0expiration notification system alerts the user when within 20 days of expiration. In addition to that modal alert, the user can examine the bottom of the Settings screen at any time to see the expected expiration date and time.
"},{"location":"version/development/#github-browser-build-updates","title":"GitHub Browser Build\u00a0 Updates","text":"The dev
branch has several updates merged that make it easier to find errors in configuration and that make the \u00a0GitHub Browser Build\u00a0 automatic.
Note that the automatic build feature is opt-out. In other words, unless you take specific steps, the \u00a0GitHub Browser Build\u00a0 for\u00a0Loop\u00a0will:
It is suggested that all users of the released code (main branch), maintain this automatic schedule so they are never without a valid and up-to-date\u00a0Loop\u00a0in their TestFlight app.
For users of the dev
branch, it is not uncommon to disable the automatic update portion so they can choose when to update their development version, but should probably keep the monthly build portion of the process.
In addition to the easier to read error messages found with these updates, these additional simplifications include:
repo, workflow
permission, a prominent message is displayed with each Action completedThese sections are still useful for version 3.3.0 dev
users:
dev
branchFixed with PR 16: Fix parsing of age field of message
The code that feeds Loop data to remote services like Tidepool and Nightscout have been improved to be more robust.
"},{"location":"version/development/#what-are-git-branches","title":"What are Git Branches?","text":"There is a lot of discussion about branches with Loop but the concept is simple. Basically, they are all slightly different versions of Loop...kind of like different edits of the same book.
To really understand what branches are, we should probably explain a little more about the software and how development works. You can watch a 30-minute long, classic Katie DiSimone video explanation about branches created when Loop Version 2.0 was newly released. Keep in mind while watching the video that master
was the old name for the main
branch. The information in this video is still generally useful with the last half focused on automatic-bolus - the automatic-bolus dosing strategy has now been incorporated into Loop main
branch. Loop has moved on to using only one stable branch (main
), with dev
suggested for developers/testers.
Loop
GitHub Information","text":"Loop developers own an account in GitHub called LoopKit. Within that account, the developers have several repositories
that support Loop in particular. A repository\u200b is like a book...let's think of it like a cookbook for now. Within the LoopKit
account, there are repositories
for Loop\u200b itself, LoopDocs, and various other supporting \"frameworks\" that are helper \u200brepositories\u200b for Loop to build correctly. For example, Loop's \u200brepository\u200b has a lot of info about the app itself; the outward-facing things that you interact with. How information is put to you and taken in from you...that's in Loop repository
code. But, there's more than just a user interface for Loop. Loop has to do a lot of complex work like Bluetooth communications, algorithm math, pump communications, etc. The Loop app has help from frameworks to do those other parts. CGMBLEkit
\u00a0 for some of the transmitter parts of Loop, RileyLink_ios
for the pump managers (talking to the pumps and decoding their information), LoopKit
for the algorithm about carbs and insulin curves, etc.
When you build Loop, in the background, Loop pulls those other frameworks (7 in total) into the build process using Carthage
. Carthage
\u00a0 is like a personal shopper. You give it a shopping list (the cart file in Loop code is that shopping list) and it goes and fetches that for you during the build process. Sometimes your computer has an old shopping list...and that can cause build errors. Hence the carthage update
fix in the Build Errors page...that command updates the shopping list to get the right versions of those frameworks.
Anyways...so now you know about the general structure of Loop and LoopKit in GitHub. Now we can discuss Loop itself a little deeper.
So let's imagine Loop as a cookbook. The developers are the authors/chefs of the recipes (code) in the cookbook. The authors spend countless hours testing new recipes, taste testing, and documenting improvements. They send the drafts to the editor, who makes suggestions and eventually, the cookbook is finalized. There are no grammar issues, and no typos, the photos are beautiful and the recipes are yummy. They publish the book and you see a gorgeous final product on the shelves. That is called a release\u200b, and it is the main
branch. This book has been well-tested and is super stable. Every time you cook with those recipes, you know exactly what you're getting and lots of people have had a chance before you to make sure that it all tastes good. The main
branch is stable and tested.
But then...the chefs/developers go on a trip. They are inspired by new cuisine and want to add new recipes to the old cookbook. (Things like Omnipod\u200b support and the overrides are new \"recipes\" that were developed since the last main
release, for example.) But, the process of developing a recipe is arduous. There was a lot of trial and error involved. Lots of tweaking ingredients (code). The editors try out the new recipes and offer feedback (similar to the Issues List on GitHub). While the recipes are being developed, they have a version of the old cookbook that gets marked up...edited in pencil a lot. Scribbles and notes in the side. Revisions happen frequently because that's what testing new recipes is all about. These marked-up versions of the cookbook are called the dev
branch. Short for \"development\" branch. Like the name sounds...this is where new developments are happening, new recipes, and tweaks.
After much testing and tweaking, eventually, the recipes get the flavors right (bugs in code are squashed) and enough people have provided feedback and careful observations of results...that the book goes to the publishing house for the next printing. The cookbook is republished with an updated edition number and new recipes are highlighted. When this happens in Loop, Loop's main
branch is updated with the new features coming from dev
(aka, the dev
branch is merged into the main
branch). When that happens, the main
branch gets another release
version. At this point, dev
and main
are identical. They remain so until the development team for Loop\u00a0 starts working on the next batch of improvements, which could be in the next hour or even days later, but then the cycle starts again. The developers will start editing the code again and dropping those edits in the dev
branch for further development.
dev
branch?","text":"The dev
branch, currently v3.3.0, is where the next version of Loop is being developed and tested.
If you choose to build Loop using a dev
branch, you need to be aware that the dev
branch may update code frequently and unannounced in the traditional sense that most users in the Looped group or Instagram would see. Developers are not helped by people being in a dev
branch if those users mistakenly think of it as a stable main
branch with lots of detailed docs to go with it. People should only use a dev
branch build if they EDUCATE themselves on the expectations and how to properly manage dev
information and updates. People using the dev
branch should also have regular access to a computer to be able to rebuild quickly if a new bug/fix is identified.
If you choose to use a dev
build, you can stay abreast of developments in a number of ways...but they will all require you to do some legwork and keep yourself informed. This is not a situation where you should expect a fancy Loopdocs page updated regularly with current \"dev
updates\"...that's just not the way the dev
branch works (at least normally).
Use Zulipchat forums for Loop. This forum has several streams of conversations (streams
) depending on interest. I highly recommend following all the streams so you do not miss conversations. You can select by stream and by topic within a stream to focus on a given conversation.
Zulip Chat Streams
You can also go directly to the git commit history for each of the branches if you'd like.
Loop
main
branch: git commit historyLoop
dev
branch: git commit historyIf you click on the commit, you can see exactly what changes to the code were made. It's an interesting learning experience. In red is the old code, and in green is the updated code. The line numbers and file names of the edited code are also there to help.
I don't expect many of you would understand exactly what the edits mean, or how the new code might function. However, I bring up the topic of git commit history so that you can use that to realize just how often the dev
branch is updated. Go ahead and look at the number and frequency of commits in that branch. That's why no one would want to maintain a documentation list of the changes in the dev
branch. It's just too much of a moving target.
Loop Repository
and Issues List
","text":"Open the Loop repository
and subscribe to the Issues
.
You can choose to watch the repository
so that you get emails when new Issues
are reported. This is a good way to find out if other people are reporting odd behavior that you are wondering about. If you use dev
and wonder about something you are seeing in Loop, you can check Issues
list to see if others are noticing the same. If so, you can help by capturing information and reporting it. Not super helpful to just say \"Yeah, me too...\" but better if you can attach screenshots, Issue Reports
from Loop settings, and a thorough description of the problem you are seeing. Be a part of the solution by thoughtfully providing information to help debug.
Looped
group","text":"Keep watching The Looped Group
on Facebook. Major concerns/issues are brought up there...so it doesn't hurt to scroll through and see what's going on there.
Another useful thing if you'll be on dev
branches undergoing a lot of active change...know how Loop works and where to look for additional information about what you are seeing. For example, if you see an IOB value that looks odd, you should know to look at the insulin deliveries stored in the Health app.
Know how to generate an Issue Report
when you see a problem so you can provide that if asked. An Issue Report
is a log file generated by the Loop app that has a lot of information the developers can parse to figure out what Loop was doing when you were having a problem.
Loop Settings -> Issue Report
Loop Settings -> Support -> Issue Report
Do not confuse this with reporting an issue with Loop. That is done by logging into GitHub and going to the Issue
page to report a new issue. You can read about existing issues without logging in, but to report a new one, you must log in to GitHub.
This 6-minute long, classic Katie DiSimone video shows how to capture debugging logs. If you are testing a new branch, this is a valuable skill to assist developers in identifying problems. In addition to showing you how to generate and save the debug text information, the video explains how to create a gist
with the debug information using your GitHub account and file an official Issue on the Loop GitHub repository
. This may be required in some cases. But start by chatting directly on Zulipchat with the developer. What you are experiencing may already be known. If the developers need you to open a new Issue
, they will say so on Zulipchat.
Repositories
and Code","text":"If you're a developer looking for direct links to the code and documentation in GitHub:
Loop
LoopDocs
For more information on how to contribute code to the Loop project, please review:
If you want to contribute code improvements, please join Loop Zulipchat and be sure to subscribe to all the channels. Meet the developers and testers who make this app, and learn about what is coming next.
"},{"location":"version/loopworkspace/","title":"LoopWorkspace","text":""},{"location":"version/loopworkspace/#loop-workspace","title":"Loop Workspace","text":"This page is for the advanced user. It is a short introduction for folks interested in testing code before it is released, or contributing to that code.
If you wandered over here meaning to build the latest Loop release, the rest of this page might be interesting but you should not follow any of the steps. Head back over to Build Loop App when you are ready to build the app.
LoopWorkspace is now used for all Loop Builds
The typical user who wants to build Loop does not need to know the level of detail on the rest of this page.
"},{"location":"version/loopworkspace/#new-way-to-sign","title":"New Way to Sign","text":"One of the recent changes to LoopWorkspace is the addition of the file: LoopConfigOverride.xcconfig
to the LoopWorkspace folder. The contents of this file are shown in the graphic below.
There are several ways to use this to sign the targets automatically.
//
) from the beginning of the line and replace the indicated TeamID (UY678SP37Q) with your own Team IDLoopConfigOverride.xcconfig
exists up two levels from the current LoopWorkspace folder, it will be includedLoopConfigOverride.xcconfig
in the ~/Downloads/ManualClones folder (from any LoopWorkspace folder) and edit that version with your TeamIDLoopConfigOverride.xcconfig
in the ~/Downloads/BuildLoop folder the first time the script is run, guides the user into adding their TeamID and then, in subsequent downloads, uses that previously created fileYour Apple Developer ID is the 10-character Team ID found on the Membership page after logging into your account at: https://developer.apple.com/account/#!/membership.
"},{"location":"version/loopworkspace/#what-is-git","title":"What is git?","text":"Git is a system of \"distributed version control\" that allows remotely (as in not located in the same place) collaborating people to work on one project and still track their changes to the same place. For example, if I sent 5 people one document to proof-read at the same time...it is quite possible that the edits I will get back from those 5 people would conflict with each other. Bob may have entirely deleted a sentence while Mary would have added words to that sentence. Git lets these remotely collaborating people deal with \"resolving conflict\" between versions more easily and merging suggestions (pull requests) into a coordinated space.
So, in using git, we can do things with \"git commands\". Like \"Hey git...make me an exact copy of that guy's work over there.\" or \"Hey git, I'd like to compare my version of this page with Joe's version of the same page.\" Or using my old cookbook analogy...\"Hey git, I'd like to start a new cookbook called Italian Desserts.\"
But yes, git commands take awhile to properly use. And they are not plain English-friendly.
"},{"location":"version/loopworkspace/#what-is-loopworkspace","title":"What is LoopWorkspace?","text":"There is more information in Loop Development that is not repeated here.
The important fact for this discussion on LoopWorkspace is that Loop developers own an account in GitHub called LoopKit
. Within that account, the developers have several repositories
that support Loop in particular. A repository
is like a book...let's think of it like a cookbook for now. Within the LoopKit
account, there are repositories for Loop itself, LoopDocs, and various other supporting \"frameworks\" that are helper repositories for Loop to build correctly. For example, Loop's repo has a lot of info about the app itself; and the outward-facing things that you interact with. How information is put to you and taken in from you...that's in Loop repository
code. But, there's more than just a user interface for Loop. Loop has to do a lot of complex work like Bluetooth communications, algorithm math, pump communications, etc. The Loop app has help from frameworks to do those other parts. CGMBLEkit
for some of the transmitter parts of Loop, RileyLink_ios
for the pump managers (talking to the pumps and decoding their information), LoopKit for the algorithm about carbs and insulin curves, etc.
When you build Loop from LoopWorkspace
, each of those repositories is downloaded to your computer. This is slower than the old zip-download as far as downloading Loop - but it is much faster when you build Loop because all the files are already on your computer.
LoopWorkspace
uses submodules to define how the frameworks are coordinated for building. The graphic below shows the dev branch at a particular point in time. The precise version, or commit, of each submodule is defined by 7-character hexadecimal codes (look up SHA-1) with the repository for each submodule defined in a text file called .gitmodules
.
git
and other operating system commands will be provided later to assist youThe commit identifier for each submodule is important because that repository can be modified after things are set up and working with Loop. When you download the code from that repository you want the exact version that was tested.
git branch
for a given submodule(HEAD detached at #)
#
is the commit
identifier for the submoduleThe commit
for the LoopKit
submodule is highlighted by the red rectangle in the graphic below. Advanced users testing the dev branch (or other branches or forks) need to know how to tell if their current download is up-to-date.
To get that LoopWorkspace
code to your computer, first open a terminal. Make sure your current path name does not have any embedded spaces. If it does, you will get errors on your build.
If you don't know how to open a terminal and navigate to a directory, reconsider whether you are ready for this page.
You need to use a git clone
command LIKE THIS (but not exactly the same...you're going to edit the branch-name
part in there):
git clone --branch=branch-name --recurse-submodules https://github.com/LoopKit/LoopWorkspace
Now...look carefully and notice two things...that command (1) is getting the version of LoopWorkspace
found in the LoopKit
repository and (2) selects the branch you want to start working with when the clone is done.
So, you will need to edit that branch-name
before using the command so that you are getting started with the branch you want. If you want to clone from a different fork
, the LoopKit
will be replaced with the name of the GitHub site for the fork
. For example, to test the dev
branch (which is under development and has some cool new architecture and features), you would copy/paste:
git clone --branch=dev --recurse-submodules https://github.com/LoopKit/LoopWorkspace\n
"},{"location":"version/loopworkspace/#start-xcode-using-command-line","title":"Start Xcode using command line","text":"If you want to start the build from the command line, enter the following 2 lines into the terminal.
cd LoopWorkspace\nxed .\n
Remember the warning - if you build the dev
branch on your phone from Loop main
, it should work fine. Going backward, please delete the app from your phone and enter all your settings again to return to main
.
The cloned version of the LoopWorkspace
will go into the current directory in the Terminal app when you execute the command. Terminal app opens in your User account home directory by default when you first open it. Unless you changed to a different directory, check your home directory for the LoopWorkspace
folder.
How can you find your home directory?
Terminal
, if you use cd
that will take you there automatically.Finder
, Shift+Cmd+H will open your home folder.There are a lot of cloned things in this home directory that involve Loop. You may have fewer...but be aware, you can always delete and reclone if you are in doubt or confused. You can also set up a special directory to hold the cloned code - just make sure there are no embedded spaces in the full path name.
For this graphic, the cloned LoopWorkspace
is in the home directory.
Loop to LoopWorkspace
in dev
Note that the directory Loop.xcworkspace
has been renamed to LoopWorkspace.xcworkspace
in the dev
branch. This change makes LoopWorkspace
the default target to simplify the build process.
The words will be updated with the next release. It may take more time for the figures to be updated.
Finder
and navigate to the location that has LoopWorkspace
LoopWorkspace
folderLoopWorkspace.xcworkspace
folder - this automatically opens the Workspace in Xcode
LoopConfigOverride.xcconfig
file that now appears in the top of the folder list (not shown in this graphic)dev
branchLoopWorkspace
","text":"When it's time to update the copy of LoopWorkspace
on your computer - you have choices. You can use the method below or redo the whole cloning process.
Be sure your terminal is in the correct location using Open a Terminal in LoopWorkspace
Folder
git branch\n
dev
, then issue this git command (suitably modified for the desired branch) git checkout dev\n
git fetch\ngit pull --recurse\n
If you are testing the LoopKit dev branch, you need to be on zulipchat and subscribe to at least the #development and #github streams. (It's a good idea to subscribe to all the streams.) When you see repository updates similar to the graphic below, there may also be an announcement in the #development channel that LoopWorkspace is updated and ready to test. If not you can check the commits in LoopWorkspace and see if they've been updated. It's a good idea to wait 24 hours. My procedure is to build dev to my backup phone and then put it on my \"real\" phone. Otherwise, wait for someone else to do it and give the all-clear in zulipchat.
"},{"location":"version/loopworkspace/#updating-loop-to-a-specific-loopworkspace-commit","title":"Updating Loop to a Specific LoopWorkspace commit","text":"Sometimes, you know a feature you want was added at a specific commit number; however, you know there are other changes later than that commit which you do not want to test. There is a solution.
Be sure your terminal is in the correct location using Open a Terminal in LoopWorkspace Folder. First you have to bring down all the latest dev commits. Then you will back up to the one you want.
git branch\n
dev
, then issue this git command (suitably modified for the desired branch) git checkout dev\n
git fetch\ngit pull --recurse\n
Now you want to \"backup\" to the desired commit:
git checkout <desired commit here>\n
git submodule update\n
Assuming there were no errors, see Local Modifications Conflict, in the process above, you can now build that commit.
Sometimes there is a change to the Workspace scheme in Xcode that interferes with building following an update to your local clone. In those cases, these steps typically work. Try the first one, and if that doesn't work, try the first two, etc. Only after trying all three should you post asking for help on zulipchat.
This command deletes derived data stored across all workspaces and projects by Xcode on your computer. If you have multiple clones locally, it deletes derived data from all of them. The derived data will be regenerated next time you build with Xcode using that clone.
Copy and paste this command into a terminal window.
Copy and Paste to Delete Derived Datarm -rf ~/Library/Developer/Xcode/DerivedData\n
"},{"location":"version/loopworkspace/#compare-your-local-clone-to-loopworkspace","title":"Compare your local clone to LoopWorkspace","text":"In an ideal world, LoopWorkspace has the most recent compatible submodule identifiers revised at the same time the submodules are updated. You will notice the commit identifiers for the updated submodules are different from the ones you have locally.
You can check your current submodules with the git submodule status
command in the LoopWorkspace folder of your terminal:
What are those super-long numbers? Those are the actual SHA-1 (remember - look it up) for the commits. But the first 7 characters are sufficient to uniquely identify the commit you need for the repository and branch identified in .gitmodules
. So compare the first 7 characters to the LoopKit / LoopWorkspace number and you know whether you need to update or not.
To determine the commit for a single submodule on your computer, use the following commands in the LoopWorkspace folder:
cd <submodule-name>; git branch; cd ..\n
The response will be similar to this exchange:
cd rileylink_ios; git branch; cd ..\n
* (HEAD detached at 2541c1c)\n dev\n
The asterick indicates the branch that is currently checked out (active).
The phrase * (HEAD detached at #)
allows you to compare your local version with the commit identifier on github.
What happens if you update (git pull --recurse
) and there are no changes at the LoopWorkspace repository? There will be no change to your current clone on your computer.
Fetching submodule submodule-name
for each submodule-nameAlready up to date.
What happens if you update (git pull --recurse
) and there are changes at the LoopWorkspace repository? The changes will be brought down to your clone on your computer.
You'll need to build Loop again to get these changes incorporated in the app on your phone.
Fetching submodule submodule-name
for each submodule-nameSubmodule path submodule-name: checked out
new SHA-1It has happened that you notice changes in one or more repository (in the #github stream) followed by an announcement in the #development stream that changes have been committed and please test. But you get the response shown in the LoopWorkspace Unchanged scenario. You can make a comment in zulipchat, saying please update LoopWorkspace and then wait, or you can download the appropriate commit. If you are a new tester - you probably want to wait.
If you want to go on and test, you can update to the correct commit without waiting for LoopWorkspace to get updated.
First, in zulipchat, in the #github stream of the commit, click on the word pushed
and that will take you to the commit. For example, clicking on pushed in zulipchat from the graphic shown above, goes to this website:
https://github.com/ps2/rileylink_ios/compare/8ff4bca2bc5f...2541c1c899a9
This indicates the final commit of that push for rileylink_ios is identified as 2541c1c
.
At this point, the commands to get that commit locally on your computer are as follows, starting from the LoopWorkspace folder:
cd rileylink_ios; git fetch; git checkout 2541c1c; cd ..
If you got an error message the # you requested did not match any file(s) known to git
, you either typed it incorrectly or you forgot the git fetch
command. The fetch command brings down information from github to your computer but doesn't make changes to what you have checked out.
If you have modified anything in a submodule folder on your computer, it might be in conflict with the latest commit.
If you get a message such as this:
error: Your local changes to the following files would be overwritten by checkout:\n Loop/Models/LoopConstants.swift\n Please commit your changes or stash them before you switch branches.\n Aborting\n
The easiest fix is to type commands similar to the following, where you modify Loop to be whichever folder(s) had the conflict. If more than one folder had a conflict, then issue the stash for each folder. The submodule update command will continue to show errors until you stash all local changes that interfere with the new code:
cd Loop; git stash; cd ..\n git submodule update\n
After stashing and updating with no errors, you can try to restore your changes:
cd Loop; git stash pop; cd ..\n
If you see errors indicating you cannot use pop
, that means you need to manually add your customizations back.
You will need to repeat this for each submodule that has a conflict. Use the lines above (for Loop submodule) as a template to resolve conflict(s) other submodule(s).
"},{"location":"version/loopworkspace/#checking-out-different-branches-within-a-loopworkspace","title":"Checking out different branches within a LoopWorkspace","text":"More advanced users...I'm not going to explain this in quite so much detail, but yes, you can individually change the branches in a LoopWorkspace.
There are 2 main ways to do this.
If you're already familiar with git, the easiest way is to cd
into the appropriate repository (like cd rileylink_ios
) and checkout
the desired branch.
If you're not as familiar with git, if you edit your .gitmodules directory in LoopWorkspace, you can specify other repos to use (and add a line to specify branches, too). Then if you do a git submodule sync
the workspace will sync to new submodules. Then git submodule update --init --recursive --remote
will update all the submodules to the right branches and get HEADs detached correctly, etc. Note that the HEADs will be detached at the top of the branch (most recent commit) based off of .gitmodules
.
This tutorial is pretty nice.
Git Tutorial
When I first started using git, my adult son answered all my questions very politely and then started sending me links to this tutorial instead.
There's a section called Main
that goes over commands in your local copy (clone) of the code. There's a section called Remote
that goes over fetching, pulling, and pushing to remote copies.
For Open Source Software, you might fetch and pull from the LoopKit repositories, but you will only push to your fork.
git remote add <name> <your-fork-repo>
and git push --set-upstream <name> <branch>
to your vocabulary.Average Loopers can skip this whole section...it's for Developers mostly
This whole section about non-LoopKit workspace clones is something almost every Looper can totally skip over. I'm only writing up this section for people who are interested in dabbling in code collaborations/customizations that they would want to maintain separately from LoopKit proper.
Scenario: You have a friend named DeveloperBob who has his own version of LoopWorkspace that he's customized. DeveloperBob wants you to look at his code customizations and collaborate with him. You need to change the \"git clone\" command to get DeveloperBob's version, not LoopKit's version. And, you'd want to make sure you specify the branch that the new feature is on, too. DeveloperBob should usually include the branch name when he posts/shares. So, the command line might be edited to something like:
git clone --branch=new-features --recurse-submodules https://github.com/DeveloperBob/LoopWorkspace
So...if you are trying to grab someone's LoopWorkspace to use it, you'll need to make sure you get the command correct if they don't specify it for you. You can't clone multiple \"LoopWorkspaces\" into the exact same home directory (because they will have the same name), so you may want to create a subdirectory to put them in. Like you could make a folder called \"DeveloperBob\" and then move into that directory in Terminal before you clone DeveloperBob's LoopWorkspace.
How would you do that? Simple cd && mkdir DeveloperBob
would make the new folder in your home directory. And then cd DeveloperBob
would move your Terminal app to be working inside the new DeveloperBob folder. So if you wanted to clone DeveloperBob's LoopWorkspace, that would be a good way to keep track of where the code came from.
If you ever get in doubt and can't remember where your code was cloned from, you can cd LoopWorkspace
to get into the directory and then use git remote -v
to tell you where it came from.
So you've got a great idea for a new feature, made those changes to your LoopWorkspace, and want to get them into GitHub. Awesome!
To understand how to do this, we'll need to understand a bit more about how git keeps track of changes. In git, developers can have different \"branches\" (see What are Git Branches? on the Loop Development page for more details about what a branch is). There are two different types of branches: remote and local. If you were to fork Loop on GitHub, then the branches that you can see on GitHub are \"remote\" branches - they're hosted on the GitHub server. On the other hand, you can also create \"local\" branches that are stored directly on your computer by \"checking out\" the remote branch. You'll need to \"commit\" your changes to the local branch, and then \"push\" those changes to the remote branch in order to be able to see them in GitHub. There are specific commands that you can type into the command line to do all of these actions, but I'm not going to go into detail because there are different ways and everyone has their own preference.
It's a little easier to think about this with an analogy. Let's say you're working at a company that's creating a cookbook. There's a centralized, production-ready version of the cookbook on their website that all the employees can view. Think of the website version of this cookbook as being like the remote branch. You're assigned to change the pancake recipe in the cookbook. Since the company doesn't want employees to make changes directly to the version of the cookbook that the customers see, you need to make a copy of it on your computer so you can make your changes to the pancake recipe. When you make the personal copy on your computer, it's like \"checking out\" the remote branch. Your copy is like the local branch - you can make whatever changes you want without having to worry about customers accidentally seeing them. When you make an important change to the recipe (like adding a photo or changing the ingredients), you might want to make a note in the edit history so that you can go back to that version of the recipe in case you accidentally make unintended changes - those notes you make would be \"commits\". Once you're happy with the recipe, you'll add it back into the production version of the cookbook on the website, which is similar to what you're doing when you \"push\" your changes.
Where do the submodules fit in? Each submodule is actually a branch, so when you make changes to multiple submodules, you'll need to commit those changes to their respective branches. Let's say you've made changes to Loop and LoopKit. You'll need to go into Loop and commit and push the changes, then go into LoopKit and commit and push the changes.
There are a few different ways to keep track of all these different branches. Some people like using the command line (which is what you're using when you do commands like git clone
) because it's very customizable and has the largest variety of commands. Others like to use graphical Git editors, which make it easier to see changes and be able to do a variety of common actions (like cloning, committing, and pushing) with the push of a button. Everyone has their own preferences, but some methods that Loop contributors have used in the past include the command line, Gitkraken, and SourceTree.
The Version tab of LoopDocs contains information about releases (versions), code customization and development.
Map to this section:
The new features added with each Loop release (starting with Loop version 2.0) are provided for reference.
"},{"location":"version/releases/#loop-3-compatibility","title":"Loop 3 Compatibility","text":"Be aware that Loop 3 is forward compatible:
Loop 3 is NOT backwards compatible.\u00a0Once you build Loop 3 or later on your phone, you cannot return to Loop 2.2.x or FreeAPS without some additional work.
The current released version for the Loop app is 3.2.3. The dates and contents for releases are summarized below in reverse chronological order (so newest release information comes first).
"},{"location":"version/releases/#what-version-do-i-have","title":"What Version Do I Have?","text":"Tap on the Settings icon at the toolbar of the Loop app and look at the version information at upper left. This graphic was generated with an older version.
"},{"location":"version/releases/#is-the-released-version-newer","title":"Is the Released Version Newer?","text":"Release information is always found on the GitHub LoopKit/Loop\u00a0release page.
Additional information including links is found here, but be aware that updates to\u00a0LoopDocs\u00a0may take some time after a new release comes out.
"},{"location":"version/releases/#loop-version-numbering","title":"Loop
Version Numbering","text":"With the release of Loop 3
, there is a new pattern for identifying the releases as distinct from the development work.
Each release uses 3 numbers: Major.Minor.Patch
Loop 2.2.9
to Loop 3.0.0
To prevent confusion between versions used for development and versions used for release (main
branch
), the Minor values are even for released code. The Minor value for the development branch
(dev
) is incremented as part of the release process and is always odd.
For example:
Loop 3.0.0
was the first released version of Loop 3
Loop 3.1.0
was the development version before Loop 3.2.0
was releasedLoop 3.2.0
was the next released versionLoop 3.2.1, 3.2.2 and 3.2.3
are patches to Loop 3.2.0
without changes to the features of Loop 3.2.x
Loop 3.3.0
is the current development versionLoop v3.2.3 was released on September 19, 2023.
This patch release was required for those who build using the Mac method.
Loop v3.2.2 was released on April 24, 2023.
This is a patch release to fix archiving with Xcode 14.3.
"},{"location":"version/releases/#loop-v321","title":"Loop v3.2.1","text":"Loop v3.2.1 was released on March 20, 2023.
This is a patch release primarily dealing with localization updates.
Loop v3.2.0 was released on March 17, 2023.
There are some important bug fixes and new features, so please rebuild to this version as soon as possible.
Pete's announcment:
Loop 3.2 Is released! This contains some very important bug fixes for everyone. If you are running latest dev, you do not need to update, but everyone else running older 3.x versions of Loop should consider upgrading as soon as you can.
https://github.com/LoopKit/Loop/releases/tag/v3.2.0
Bug Fixes (Please update ASAP):
Updates and new Features:
After several years of development and a lot of testing, Loop 3 is here!
Loop v3.0.0 was released on January 14, 2023.
Link to release notes for Loop 3.0
Use Script not Zip
If you follow that link above, there is an Assets
section with a zip link
Branch Name Change
The branch name associated with the latest Loop release is main
.
repositories
on GitHub will be named main
instead of master
starting October 1, 2020repositories
to use mainThe storage of data with Loop 3 is not backward compatible. In other words, if you attempt to build Loop 2.2.x (or FreeAPS) on a phone which has been upgraded to Loop 3, you will not be able to run that app. You can successfully build the app, which will overwrite Loop 3 on the phone, but the app will crash and you will not be able to Loop.
At this point, you can restore your Loop 3 build on your phone and continue using Loop 3 or you delete all apps on your phone with a shared app group. This list includes Loop, FreeAPS, FreeAPS X, xDrip4iOS, Glucose-Direct, and the g5 Transmitter Reset app.
If you tried to delete \"all\" the apps and still have something causing an issue; you can follow the directions to Review Provisioning Profiles and then delete the profiles for all the apps by using the - sign.
You do not need to delete Loop Follow, so if you use Loop Follow - do not delete that provisioning profile.
"},{"location":"version/releases/#loop-2-version-history","title":"Loop 2 Version History","text":""},{"location":"version/releases/#loop-v229","title":"Loop v2.2.9","text":"This release updates Loop to handle Dexcom Share server changes for how glucose trend is parsed. Dexcom used to provide integers that mapped to the meaning for the arrows. They changed that to strings, like \"Flat\" or \"FortyFiveUp\".
Loop v2.2.9 was released on April 4, 2022.
"},{"location":"version/releases/#loop-v228","title":"Loop v2.2.8","text":"This is a hotfix (no features were modified in the Loop app) to enable the app to be built with Xcode 13.3.
Loop v2.2.8 was released on March 16, 2022.
"},{"location":"version/releases/#loop-v227","title":"Loop v2.2.7","text":"This is a fix (no features were modified in the Loop app) to enable the app to be distributed via TestFlight.
Loop v2.2.7 was released on Jan 11, 2022.
"},{"location":"version/releases/#loop-v226","title":"Loop v2.2.6","text":"Several users reported issues with IOB accounting in Loop v2.2.5, where IOB was being under-reported, which could cause Loop to continue recommending increases in insulin delivery. A fix was made and provided as Loop v2.2.6.
This is a serious issue, so updating to this release is strongly recommended for anyone currently running v2.2.5. If you tap on Loop Settings and look at the top, and see LOOP V2.2.5, then rebuild ASAP. The time window when you would have built v2.2.5 is from Aug 22 through Sep 6, 2021.
The issue appears to be the result of a failure to write to Apple HealthKit, which may occur if the Health app on your phone is having problems, or if you have turned off Loop's ability to write Insulin data to HealthKit. The fix involves reverting a change made in v2.2.5. This change was an attempt to reduce overlaps of Reservoir and Pump Event reconciliation which intermittently over estimate insulin delivery. Instead, that issue will be fixed in the next major release of Loop.
Thanks to all who helped with reporting, digging, and testing this quickly. It's great to have such a strong community of people eager to help.
Loop v2.2.6 was released on September 6, 2021.
"},{"location":"version/releases/#loop-v225","title":"Loop v2.2.5","text":"This is an interim release as we prepare for the major changes currently in development. If you are running an older version of Loop, such as v2.2.4 (master or automatic-bolus branch) or an older version, it is recommended that you update to v2.2.6 to get all these new features. A summary of modifications with respect to Loop v2.2.4 is listed below.
Loop v2.2.5 was released on August 22, 2021.
"},{"location":"version/releases/#new-features","title":"New Features:","text":"Automatic Bolus (Experimental) Dosing Strategy
Provisioning Profile Expiration Notifications:
RileyLink Compatible Devices:
Omnipod Features:
Omnipod Code Fixes:
(REMOVED) Insulin Accounting:
Dexcom Non-US Share:
For community support, please use one of the Loop Social Media help sites.
"},{"location":"version/releases/#loop-v224","title":"Loop v2.2.4","text":"Released October 3, 2020 with \"fixes\" introduced without renumbering the version number. Last change was on January 19, 2021.
Released September 25, 2020
Warning - Rebuild ASAP for Pods
Released August 9, 2020
Released April 17, 2020
Released December 31, 2019.
For Reference Only
Enough time has passed that this version should no longer be on anyone's phones (the one-year expiration time should take care of that).
There is a lot more detail provided in the Loop v2.0 section because it constituted a significant change to parts of Loop from prior releases. This section and the Omnipod-Testing branch sections are left here for historical interest.
"},{"location":"version/releases/#what-was-new-in-loop-v20","title":"What was new in Loop v2.0?","text":"This is a highlights reel comparing Loop v2.0 to v1.9.6.
"},{"location":"version/releases/#uploading-of-bgs-to-nightscout","title":"Uploading of BGs to Nightscout","text":"Loop v2.0 has an option to upload your BG data to Nightscout directly. It is a new slider under the CGM configuration section for Dexcom users. After you add your CGM transmitter ID, go back into the CGM info and you'll see a new slider called \"Upload Readings.\" Technically, Loop's dev branch had that feature for a hot minute before Loop v2.0 was released...but for almost everyone this will be a brand new feature they haven't had before. This feature can help if/when Dexcom's Share servers ever go through another large outage like we had before. If that happens, you can turn on the \"Upload Readings\" switch and your CGM data will now be in Nightscout even without Share servers working properly. Good practice would be to temporarily disable your Share bridge in Nightscout while Loop is responsible for CGM uploading so that you don't get duplicate data. You can disable Share bridge by logging into your Heroku account, going to the Settings tab, clicking on \"reveal config vars\" and then deleting the word \"bridge\" from the ENABLE line.
"},{"location":"version/releases/#a-fix-for-settings-loss","title":"A fix for settings loss","text":"iOS 13 brought about a quirky little bug where you could suddenly lose settings in Loop. But, it wasn't just limited to Loop, sometimes people lost Dexcom app settings too. The issue is most common when the phone goes through a power cycle, but it has happened at other times, too. There's a fix for that new bug in Loop now...so that's a good reason to update. (If you encounter that bug before you have a chance to update your Loop app, simply restart the Loop app and your settings should reappear.)
"},{"location":"version/releases/#confirmation-beeps-expanded","title":"Confirmation beeps expanded","text":"Confirmation beeps have been expanded based on user feedback...we heard parents and school nurses really appreciate hearing a beep for not just boluses, but also for suspend/resume commands and editing basal schedule (so you are sure it saved properly). So, confirmation beeps are now for boluses, suspend/resume, and basal schedule edit saves.
"},{"location":"version/releases/#read-pod-status-added","title":"Read Pod Status added","text":"There's a new command in the RileyLink menu for \"Read Pod Status\" that is analogous to the existing command for Medtronic users. You can query your Pod for its current status info using that command.
"},{"location":"version/releases/#nightscout-profile-uploading-introduced","title":"Nightscout profile uploading introduced","text":"Loop will upload your basal schedule, ISFs, carb ratios, and override presets from Loop settings to your Nightscout profile. If you ever lose your phone and need to setup Loop brand new...your settings will be easy to find in Nightscout now.
"},{"location":"version/releases/#non-linear-carb-model-introduced-as-default","title":"Non-linear carb model introduced as default","text":"All branches (master and dev) now use a \"non-linear\" carb model, so let's give some info about the change.
Previously, the carb model Loop used had a linear absorption predicted with dynamic carbs adjustments. What this means is that food absorption was modeled as a flat, even effect (like the straight grey graph that you'll see in the Insulin Counteraction Effects chart after you added a carb entry. But looking at large groups of meals' datasets (and supported by personal, anecdotal experiences), food really has a bit more of a non-linear absorption. Meaning, we usually see more of a food impact up-front than the old carb model in Loop predicted.
What did that mismatch mean for us if the model predicts a linear absorption, but the meal actually behaves differently?
With a non-linear absorption model, the carb absorption will more closely match observed blood glucose impacts we've seen after meals. And when the model is more closely matching actual experience, that means the predicted blood glucose curves will do a better job at providing more upfront bolus and not having the tendency to have overly conservative temp basals soon after a meal.
"},{"location":"version/releases/#overrides-introduced","title":"Overrides Introduced","text":"Loop v2.0 marks the first time Loop master branch has overrides included. Additionally, this release moves overrides setup from the configurations area of Loop settings to the workout icon in the Loop toolbar. There has also been bug squashing in dev branch for overrides over the recent past, so updating is a good idea even if you already have overrides on your current build. Want to learn more about overrides? Read about them here.
"},{"location":"version/releases/#retrospective-correction-always-on","title":"Retrospective Correction always on","text":"Retrospective correction used to be an optional toggle in the algorithm. It is now on by default all the time. It is an important part of the algorithm (helps Loop look at how good/bad its recent prediction curve has been vs reality), and leaving it on made sense anyways.
"},{"location":"version/releases/#omnipod-support-in-released-code","title":"Omnipod support in Released Code","text":"Yes, most of you are already using Omnipod with your Loop...but this is the first time that Loop master branch supports Omnipod users. Please update if you have been using Omnipod-testing branch especially...it's time to get all the bug fixes that we've done in Loop.
"},{"location":"version/simulator/","title":"Simulator Build","text":""},{"location":"version/simulator/#simulator-build","title":"Simulator Build","text":"There are 2 main types of simulators users may want to build. Each of these require less up-front acquisition of hardware and may be desirable as a first step towards becoming a Looper.
Please, review all the Intro and Build pages, even if you will not complete them yet.
"},{"location":"version/simulator/#simulator-using-browser-build","title":"Simulator using Browser Build:","text":"Follow the normal instructions to build with browser, install the app on a compatible phone and explore the app using the Pump Simulator, CGM Simulator or both.
"},{"location":"version/simulator/#simulator-using-build-with-mac","title":"Simulator using Build with Mac:","text":"This simulator requires access to a Mac or virtual computer, see Compatible Computer
Add Apple ID
sectionYou don't need to do anything special when you build the app using the Build with Browser instructions. Install the app on your phone from TestFlight. Then select the CGM and/or Pump simulator desired. You must have a paid developer account.
"},{"location":"version/simulator/#build-to-a-compatible-phone-using-mac-build","title":"Build to a Compatible Phone using Mac Build","text":"When building to a real phone using a Mac, you must have access to a Compatible Computer and a Compatible Phone.
Add Apple ID
step and follow the normal build directionsAdd Apple ID
sectionLocked Phone or App in Background
Loop will not work in the background without either a real CGM or a real pump to \"wake\" it up.
The app will only work in the background in these special cases:
In all other cases, the phone must be open and unlocked for you to test the app.
These CGM and pump options work to provide glucose readings or accept pump commands while the app is open, but will not \"wake\" the app when in the background or phone is locked:
Disable Notifications
When you have the Loop app on your phone to test as a simulator, you may want to disable notifications when you are not actively using it. Even if you quit the app, you will get Loop not Looping notifications while the app is on your phone.
To Disable Notifications:
Allow Notifications
The Loop app, when open, will be quite aggressive at warning you that you have disabled Notifications, so you can reverse those directions to enable notifications when actually using the app.
"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":"Welcome to the LoopDocs website where you can learn about the Loop app.
"},{"location":"#what-is-the-loop-app","title":"What is the Loop App?","text":"The Loop app is an automated insulin delivery application that you build and operate on an iPhone.
Closed Loop
: Predict, recommend and control insulin dosingOpen Loop
: Explore interface, test settings, learn to enter meals and doseLoop\u00a0Video
This site shows you step-by-step how to build, set up and operate the Loop app.
In order to become proficient with the app, you should learn the information on this site. Consider doing this over a period of time and reviewing the materials more than once.
There is a common saying in our community:
Do It Yourself (DIY) does not mean Do It Alone!
Once you are using the app, you should regularly follow one or more support forums for important updates on the Loop app. Spending this time is important for success in building and operating the Loop app safely.
This website is updated regularly to keep pace with development of the Loop app and Apple releases.
"},{"location":"#important-disclaimer","title":"Important Disclaimer","text":"Please consult with your health care professional regarding your diabetes management.
The Loop app has been, and continues to be, developed and supported by volunteers. From the code to this website, you are able to use this app because many volunteers continue to give their personal and family time.
Please add your time by reading this website before embarking on your Loop journey.
"},{"location":"translate/","title":"Translation","text":""},{"location":"translate/#language-list","title":"Language List","text":"\u0639\u0631\u0628\u064a
\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438
\u010ce\u0161tina
Deutsch
Dansk
\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac
Espa\u00f1ol
\u65e5\u672c
Suomi
Fran\u00e7ais
\u05e2\u05d1\u05e8\u05d9\u05ea
Hrvatski
\u0939\u093f\u0902\u0926\u0940
Italiano
\ud55c\uad6d\uc5b4
Norsk
Nederlands
Polski
Portugu\u00eas
Rom\u00e2n\u0103
\u0420\u0443\u0441\u0441\u043a\u0438\u0439
Sloven\u010dina
Svenska
Turkish
\u4e2d\u6587\uff08\u7b80\u4f53)
\u4e2d\u6587\uff08\u7e41\u9ad4)
"},{"location":"translate/#google-translate-links","title":"Google Translate Links","text":"Click on a language on the list of links above to turn on Google's automatic translation.
"},{"location":"translate/#change-language","title":"Change Language","text":"To modify the language choice for the whole site, copy the line below, and paste it into the URL, and then choose the desired language from the list above.
Copy and Paste in Browser URL to return to original versionhttps://loopkit.github.io/loopdocs/translate\n
OR
Use the Google Translation three-dot menu and select Go to Original URL
while on the Translation page.
Every website page gets automatically translated to the selected language as do links to other websites
The Google Translate Tool will appear at the top of each page
Automatic Translation
These links connect this site to the Google Translation service.
Once Google Translate has been turned on, clicking on a language link above shows a \"Google Translate: Can't translate this page error\".
The graphic below shows the Google Translate Tool when maximized (default) for a browser and mobile display. The tool can be minimized by tapping on the up/down carets at the right of the tool. This is very useful if the tool obstructs part of the original screen. Additional options can be selected with the three-dot menu as shown in the graphic.
"},{"location":"build/apple-developer/","title":"Apple Developer Program","text":""},{"location":"build/apple-developer/#enroll-in-apple-developer-program","title":"Enroll in Apple Developer Program","text":"Time Estimate
Summary
There are two options: Paid ($99/year) or Free (re-build weekly, Xcode only)
FAQs
The Apple ID is DIFFERENT than the Apple Developer ID.
Apple ID
Parents should set up a different Apple ID for each of their looper children and looper children should not use the parent Apple ID. Use Apple's Instructions for Create an Apple ID for your child.
The Apple Health record is a convenient record of blood glucose, insulin and carbohydrates and should be associated with only one individual.
Sharing an Apple ID among two or more loopers can cause safety issues. You don't want Sally to be dosed for Joe's lunch in addition to her own and vice versa.
To build the Loop app on a phone, you must use an Apple developer account associated with an adult (minimum age of 18). This Apple developer account is tied to the email address associated with your Apple ID. You can build apps on phones for everyone in your family with a single Apple Developer Account tied to the Apple ID of an adult.
You have two options for an individual account: free or paid.
"},{"location":"build/apple-developer/#free-developer-account","title":"Free Developer Account","text":"If you decide to use a FREE developer account, here's what you need to know:
If you decide to use a PAID developer account, here's what you need to know:
You can try a free account first before buying a paid developer account. If you start with a free account, you'll build a Loop app (let's call it FreeLoop). When you switch to a paid account, you'll be building a totally new and separate Loop app onto your phone (let's call it PaidLoop).
The two apps will look identical on your phone and they will both have the name Loop with the same icon, but they will be functionally separate from each other. Make sure you are successful building the PaidLoop app before deleting the FreeLoop app from your phone. Use the search feature on your phone to find both apps. One will have your configuration settings (FreeLoop), the other will not (PaidLoop).
Before deleting the FreeLoop, either record all the settings or take screenshots of all the relevant settings screens.
PaidLoop will know nothing about the settings and information you had stored in FreeLoop, so you will need to re-enter all your settings (basal rates, ISF, carb ratios, etc.) and configurations into the new PaidLoop. It will also not connect or control any pods you are currently using with the old FreeLoop app. The one exception is Nightscout credentials, which are stored in your keychain. If you entered your Nightscout credentials into FreeLoop, they will persist across app removal and be used by PaidLoop.
With Loop 3, if you use Nightscout, you can import settings that were uploaded to Nightscout by FreeLoop into PaidLoop, so that simplifies the transition.
Once PaidLoop is working, delete the FreeLoop instance from your phone to avoid confusion. If you followed the directions when building, you may have configured your phone to prevent deletion of Loop. Head over to Protect that App, reverse the steps, delete FreeLoop, then do the steps again to protect PaidLoop.
"},{"location":"build/apple-developer/#enrolling","title":"Enrolling","text":"To enroll in an individual paid Paid account, go to the Apple's Developer Program website Apple Developer website.
Be sure to use the credit card already associated with the email you are using for the developer account. If you switch credit cards, it can cause delays.
If you choose to use the free account, you don't have to do anything on that website. You'll just wait for the instructions on the Xcode Settings page and get your free account then.
"},{"location":"build/apple-developer/#next-steps","title":"Next Steps:","text":"Take the time to read the next three articles. You will be reminded again when you begin to set up your app.
Time Estimate
Summary
You will:
FAQs
The Loop and Learn team prepared this YouTube video showing how to build Loop 2.2.x including the steps required to update if you previously built. The steps are different now. The video may be worth watching, but once you've reviewed it, work through the new build process described on this page.
If you do watch this video, please note that you no longer are required to delete provisioning profiles as a separate step and the overall building process is streamlined.
"},{"location":"build/build-app/#build-with-browser","title":"Build with Browser","text":"If you previously used Build with Browser to install Loop on this phone, you should Disable Automatic Install from TestFlight to be sure the version of the app on the phone is the one you build with Xcode.
"},{"location":"build/build-app/#developer-mode","title":"Developer Mode
","text":"If you are running iOS 15/watchOS 8, you do not have Developer Mode
and can skip ahead to Download Loop.
If you upgrade an iOS 15 phone to iOS 16 or 17, the Loop app will not open until you enable Developer Mode
on that phone.
You will see a message similar to the next graphic.
If you are running iOS 16 or 17 with watchOS 9 or newer, you must enable Developer Mode
to run or build Loop directly from Xcode. (This is true for any app created by Xcode directly on your device.) If you want to know more, click on this Apple Link about Developer Mode
.
If you have never built an app with Xcode on a particular phone, Developer Mode
will not show up in the iOS Settings, Privacy & Security menu until you connect that phone to Xcode.
Developer Mode
on the watch and then build to the phone again while watch is paired and on your wrist.To keep all the steps in one place, the instructions for configuring phone and watch are kept in this one section. If you have never built with Xcode to this phone, skip ahead to Download Loop for now and return at the appropriate part of the script instructions below. A clear message with a link will bring you back here.
When Xcode is open and you plug in your phone, you will not be able to select the phone until you have enabled Developer Mode
. The phone will show up, but be an \"Unavailable Device\" as shown in the graphic below.
Developer Mode
on iPhone","text":"Once your phone has been plugged in to the computer while Xcode is opened and you accepted have the Trust this Computer option, you will be able to enable Developer Mode
.
Developer Mode
rowDeveloper Mode
If you are in the middle of building on a new phone, return to Initial Xcode Screens to continue.
"},{"location":"build/build-app/#developer-mode-on-watch","title":"Developer Mode
on Watch","text":"Build, Enable, Build
Reports from users indicate that when you are building to a new Apple Watch - you must first build the app with Xcode before the developer mode will be available. So plan to build with Watch paired, and then enable Developer Mode
and build again.
This must be configured on the watch itself (not the watch app on the iPhone). To determine if Developer Mode
is enabled, look at the watch face icons and find the Settings icon. Tap on it and scroll to and tap the Privacy & Security icon. Then scroll to the bottom and tap on Developer Mode
. If you don't see the Developer Mode
row under Privacy & Security, see the Extra Watch Instructions.
Developer Mode
is enabled, the slider will be green and no further action is requiredDeveloper Mode
is not enabled, the slider will be blankTurn On
optionDeveloper Mode
","text":"With the latest watchOS, there are now options that show up after you enable Developer Mode
. Go on and configure those now. Select the Settings icon on the watch, but instead of tapping on Privacy & Security, scroll all the way to the bottom and there is now a Developer row at the very bottom of the watch Settings. If you don't see this row, reboot the watch again.
There have been a lot of reports of trouble getting Developer Mode
to show up on a new Apple watch and then having further trouble getting the Loop app to show up on the watch. Previously, just having the watch paired to the phone when you build once followed, by enabling Developer Mode
on the watch and building again, was enough. If you have problems, here are extra steps to try.
These steps have been reported on Facebook and have not been tested in a controlled environment. They may not all be necessary.
At this point, be sure to reboot the watch.
"},{"location":"build/build-app/#download-loop","title":"Download Loop","text":"This page has the detailed steps to run the Build Select Script to download the Loop code, prepare your computer and build Loop.
Every attempt was made to put messages directly in the script for each step. The next few sections of this page walk you through what you will see when you run the script.
"},{"location":"build/build-app/#open-terminal","title":"Open Terminal","text":"Go to the Finder app, click on Applications, then open the Utilities folder. Locate the Terminal app and double-click Terminal to open a terminal window. The terminal window is very plain looking when you open it. That is normal.
"},{"location":"build/build-app/#build-select-script","title":"Build Select Script","text":"With the release of Loop 3, the build process is different and simpler
These instructions show each step needed to download Loop using the Build Select Script.
Copy the line below that starts with /bin/bash
by hovering the mouse near the bottom right side of the text and clicking the copy icon (should say Copy to Clipboard
when you hover over it). When you click the icon, a message that says Copied to Clipboard
will appear on your screen.
/bin/bash -c \"$(curl -fsSL \\\n https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildSelectScript.sh)\"\n
Paste the line of text into Terminal. Be sure to click anywhere in the terminal before trying to paste. (Ways to paste: Cmd+V ; or Ctrl click and select from menu or Edit
-Paste
at top of Mac screen.)
You will be informed of the menu options as shown in the graphic below. You will choose Option 1
to Build Loop.
You will be informed that you are downloading open source software. Type 1
and return if you understand the warning and agree.
The next screen informs you of what you will be downloading. Type 1
and return to begin the download or 2
to return to the main menu.
This download can take from 3 minutes to 30 minutes depending on your download speed. You can leave the room and return later to check on progress. When you read the words in the terminal, as the script runs, you may see terminology you do not understand - don't worry - you do not need to understand enumeration or submodule or cloning. You only need to review the display to look for any error messages.
New Feature
The Build-Script automatically reports when the download is successful.
The next graphic shows terminal messages for the beginning of a successful download.
If the download was successful, your terminal will be similar to the following graphic. Continue with the Download was Successful section.
If you see a failure message, scroll up in the terminal to find the error message(s) and go to Xcode Errors with Build-Select.
"},{"location":"build/build-app/#download-was-successful","title":"Download was Successful","text":"If there are no errors, hit return to continue. The next step involves signing the targets.
"},{"location":"build/build-app/#sign-targets","title":"Sign Targets","text":"What does Sign Targets Mean?
\"Sign Targets\" in Xcode identifies who built the app. You cannot deploy an app to a phone if you do not sign each target associated with that app.
Experienced Builders
This replaces several of the steps that used to be required to build Loop.
If you have never built an Xcode app using your developer ID on this computer, then the first time you use the script, you will be asked how you want to sign the targets.
I did not get this question
The script searches for your developer ID for you and skips this question if it finds it.
Skip ahead to Review LoopConfigOverride.xcconfig.
The next question, as shown in graphic below, is whether you will (1) Sign Automatically or (2) Sign Manually.
Continue with this page only if you have a paid developer account.
The following graphics show the terminal display after selecting option 1 to use Apple Developer ID.
After hitting return, the user can verify the entry.
"},{"location":"build/build-app/#review-loopconfigoverridexcconfig","title":"Review LoopConfigOverride.xcconfig","text":"Once the permanent signing file is configured, the review step is the same each time.
If there is a problem with the ID that is stored on your computer, you can modify it before continuing. The instructions, shown in the terminal message if you select option 2, Editing Instructions, are repeated here:
To edit the LoopConfigOverride.xcconfig file with a different developer ID:
You can now return to the terminal and hit return for the next step.
"},{"location":"build/build-app/#ensure-a-year","title":"Ensure a Year","text":"The next question asks if you want to ensure a year with your new app. Unless you have a good reason, you should enter 1 and continue.
"},{"location":"build/build-app/#build-loop","title":"Build Loop","text":"Build to Simulator
If you are an experienced builder and plan to build to a simulator on your Mac before building to your phone, you do not need to plug in your phone yet. You will need to select a simulator manually once Xcode opens.
For first time builders - go on and build to your phone.
"},{"location":"build/build-app/#plug-in-your-phone","title":"Plug in Your Phone","text":"Refer to the graphic below. The messages in the terminal instruct you to:
The next action of the script is to
If this is a new phone that has never had an app built from Xcode, return to Prepare your Phone and Watch. After you get developer mode turned on for the phone continue with the build instructions. If you also want to set up the watch, you'll need to build one time, follow directions in Developer Mode on Watch and then build again.
It is suggested that you wait until you've successfully built the app before closing the terminal.
"},{"location":"build/build-app/#initial-xcode-screens","title":"Initial Xcode Screens","text":"Refer to the graphic below. Your intial Xcode screen should be similar.
If there is a red x in the dashed-blue rectange region on your Xcode screen you need to click over to the Build Error page
"},{"location":"build/build-app/#first-time","title":"First Time","text":"The first time you build, there will be steps that will not be required for subsequent builds. These are clearly marked in the intructions with the word First-Time. Do not get confused when you are asked to enter your password multiple times, see Codesign / Keychain Access. Be sure to enter your Mac login password and select Always Allow
every time it is requested.
Refer to the GIF below:
Cancel Running
, just hit the build button again
If the app opened on your phone, the next two sections for first-time builders are not needed. Skip ahead to Successful Build.
If you got red error messages, skip ahead to Build Failed?
"},{"location":"build/build-app/#codesign-keychain-access","title":"Codesign / Keychain Access","text":"First Time Using Developer ID on Computer
During your first build with a given Developer ID on your computer, you will see a codesign/keychain access prompt, as shown in the graphic below. Enter the same password you use to log in to the mac, select \"Always Allow\" and then do it again each time you are asked.
It is normal for this prompt to come up repeatedly even after you enter the correct password (once for each target Loop needs to sign).
In frustration, people think the prompt must be broken because it keeps reappearing and press deny or cancel. Don't press deny. Keep entering your computer password and pressing the \"Always Allow\" button as many times as it takes. The build will then continue.
FYI: codesign is for code sign - nothing to do with design.
"},{"location":"build/build-app/#update-settings-for-developer","title":"Update Settings for Developer","text":"First Time Building on a New Device?
If this is the first time you have installed an app on your iPhone using a free account, you will see warnings in both Xcode and on your phone after a successful build and install on your phone.
Don't worry, dismiss the messages and do this extra step on the phone. These instructions are valid for iOS 15:
Sometimes, something goes wrong with the automatic signing. Just the fact that you clicked on a few places in Xcode can change a particular file required to enable automatic signing. It is possible to reset that file, but it is easier to sign manually.
Apple Developer
accountBundle Identifier
with your 10-digit Apple Developer Membership ID
embedded after com.
TEAMID
No red error messages? Skip ahead to Successful Build.
Red Errors
If you get a message that your build failed and see RED ERROR messages:
FAQ: But what about those yellow or purple warnings that remain in Xcode? Should I worry about them?
If you see yellow or purple warnings after your build is done...those are not an issue. Don't try to resolve them or fret about them. They mean nothing to the successful use of your Loop app.
NOTE: purple warnings are still warnings and can be ignored.
"},{"location":"build/build-app/#clear-the-error-message","title":"Clear the Error Message","text":"Once you've resolved a build error and start the build process again, Xcode will continue to show a red indicator on the top line from the previous failure. If you don't like seeing that, clean the build folder to clear the error. Otherwise, as long as the steps of the build are showing across the top line, Xcode is still working on the build. When the build succeeds, the red circle will disappear.
Clean Build Folder
After you see the Loop app open on your phone, you can unplug your phone and acknowledge the Xcode message: Lost connection to the debugger on . . .
. The square icon next to the play button goes away as soon as you unplug your phone from Xcode.
The Loop app on your phone closes (but does not quit) when you unplug the phone. Open the Loop app on your phone just to be sure.
Congratulations!
If you plan to build again on a backup phone, or want to try a customization, easiest for you to leave Xcode open. Otherwise, you can quit out of Xcode now.
But wait - there's more.
Protect Against Deletion
Prevent your Loop app from being deleted accidentally.
If you, or a child, deletes the app from the home screen, it is gone - you have to rebuild and reenter all settings and start a new pod or add back in your Medtronic pump.
The steps vary depending on iOS. With iOS 15 and 16, it is under Screen Time, Content & Privacy Restrictions, iTunes & App Store Purchases, Deleting Apps. Choose Don't Allow. If those steps don't help, do an internet search like this, where you use your current phone iOS version number:
Follow the instructions to prevent deletion of what is now a critical medical app.
"},{"location":"build/build-app/#important-safety-reminder","title":"IMPORTANT SAFETY REMINDER","text":"If this is your first build with Loop 3, head to the Set Up tab starting here: Loop 3 Overview.
Pro Tip: Read Along in LoopDocs as you Onboard
One of the goals for Loop 3 is to make the app robust even if you don't read the documentation, but a lot of questions may be resolved if you read along in LoopDocs as you onboard.
All those mentors who answer questions are volunteers.
Even if you don't read all the pages under the Set Up tab now, these links are important.
Add a Calendar Reminder
New Loop users: Customizations are not a required part of any Loop build. As you gain experience using your Loop app, you may want to customize some of the features. First time builders are encouraged to build with the standard, default code. You can always update your Loop app to add customizations at a later time, using the same download. Subsequent build time is much faster than the initial build for a given download.
Pro Tip
With a fresh download of code, it's always best to build to a simulator without customization to ensure the build works without errors. Then add the customizations and check the build again. Now you are ready to build to your phone to update your existing app.
To add custom configurations to your Loop or Loop Apple Watch apps, follow the step-by-step instructions on the Code Customizations page and then build the app again.
"},{"location":"build/build-app/#apple-watch","title":"Apple Watch","text":"Existing Apple Watch users: Please update your watchOS prior to building the Loop app. The minimum iOS for Loop 3 is iOS 15.1, which means watchOS 8.1. When running iOS 16.x, you will need a watchOS of 9.x.
New Apple Watch users: If you have an Apple watch and want to use it with Loop, first pair the watch with the iPhone before continuing to the next steps. If you get a new watch after building the Loop app, you'll need to redo your Loop build.
For more information, please see Operate: Apple Watch
"},{"location":"build/build-app/#build-again-with-this-download","title":"Build Again with this Download","text":"Follow the Find My Downloaded Loop Code instructions if you later wish to build with this same dowload. Plug in an unlocked phone and start at the Start Build section of this page. You may need to select the phone you just plugged in. Everything else should be ready for you the start the build process.
Don't use a really old download
Do not use a really old download.
Check the date of your download against the latest Current Release date and decide whether to get a fresh download instead.
"},{"location":"build/build-app/#xcode-errors-with-build-select","title":"Xcode Errors with Build-Select","text":"The errors shown below should be prevented - the script will attempt to correct them automatically - follow the directions in the script.
If this is not successful, the script told you the download failed and exited. Scroll up in the terminal to find the error message(s):
WARNINGS
If you see errors like these . . .
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcode-select: Failed to locate 'git', requesting installation of command line developer tools
xcode-select: error: tool 'xed' requires Xcode
You missed one of these steps:
This page is only relevant when building the dev
branch with a Mac.
For Browser Build, please see: Build Loop dev with Browser
No matter the method used to build Loop-dev, you are testing development code. Please read this link now before continuing.
dev branch
BuildLoopDev
Script","text":"There is a script to assist in building the dev branch
. It gives you the option to choose the tip of the dev branch
or to build a lightly tested commit. If you have not used the Build Select Script to build Loop previously, you may want to review that page. The command below can be pasted into the terminal of your Mac. Read the directions in the script.
Copy and Paste to start the BuildLoopDev script
/bin/bash -c \"$(curl -fsSL \\\n https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildLoopDev.sh)\"\n
Both the dev branch
and the lightly tested branch of dev
have Libre support."},{"location":"build/build-dev-mac/#buildloopdev-other-branches","title":"BuildLoopDev Other Branches","text":"You can use the BuildLoopDev script to build a specific development branch, other than dev
. See the example below that would build other-branch
, if such a branch existed. This is just an example. You need to substitute the branch you desire for other-branch
. There must be a space after the final quote, followed by a hyphen, another space and then the branch name.
other-branch
with the BuildLoopDev script/bin/bash -c \"$(curl -fsSL \\\n https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildLoopDev.sh)\" - other-branch\n
"},{"location":"build/build-dev-mac/#update-loop-dev","title":"Update Loop-dev","text":"While Loop-dev is under active development, you should monitor zulipchat and update frequently.
Checking for updates every week is a good idea. Also - subscribe to all the streams on Loop Zulipchat to make sure you don't miss critical information.
You may choose to download fresh each time you update.
You may prefer to use commands to fetch and pull the latest code without making a new clone.
The version of code that shows up under the Loop Settings screen does not change when the dev branch
is modified.
If you need help with your app, the mentors need more information. Please issue a Loop Report when asking for help. Refer to Support for how to issue a Loop Report. If you want to keep track yourself, refer to Identify Loop-dev Version
Loop
Version NumberingThe version of code that shows up under the Loop Settings screen will remain fixed until Loop-dev is released. In order to identify which version of dev you have on your phone, you need the commit.
The commit is identified by a 7-digit alphanumeric code. That code was also appended to the folder name of the downloaded code under Downloads/BuildLoop as shown in the graphic above. You can use finder to view the folder name after the script completes. It also appears in the Loop Report, refer to Support for instructions on issuing a Loop Report. After you issue the Loop Report, look at the workspaceGitRevision number near the beginning of the report.
"},{"location":"build/build-errors/","title":"Oh dear! Build errors?","text":""},{"location":"build/build-errors/#build-errors","title":"Build Errors","text":"Important
These are only relevant when building with a Mac and Xcode. For Building with Browser Build errors, please see: Errors with Browser
There are two types of build indications that may be seen: they are warnings (yellow or purple icons) and red errors. You'll see the warnings and errors in the left-hand column of the Xcode window.
Yellow and Purple warnings do not cause the build to fail, those are just warnings. You will often see yellow and purple icons. Ignore those. Do not try to do anything to fix those.
Red errors will have to be resolved before you can successfully build the app. The steps below explain how to resolve them based on the messages you are seeing.
"},{"location":"build/build-errors/#xcode-not-responding","title":"Xcode Not Responding","text":"Sometimes, Xcode stops responding. You have to fix this before any of the other steps on this page will help. The signature is that Xcode shows a colorful spinning icon and does not respond to anything you do.
This can happen sometimes. You just need to force quit Xcode. Sometimes rebooting the Mac may be required, but start with force quit. Then just open up Xcode again and keep going.
Force Quit
menu appears (should be fast)Xcode
and tap on the Force Quit
buttonNew Loop Builders
This page contains build error help for people updating their Loop app as well as brand new Loop app builders. Review the \"obvious\" errors causes first. If that doesn't help, then, skim the page until you reach Find Your Error Message or search the page (Cmd+F) or search LoopDocs for your error. Once you've identified your error message, try to resolve it. Still stuck? Read Posting for Help
Before you start trying to resolve your red errors, start with the most obvious things that can cause a red error message:
For older builds, before 3.2.0, you had to select Loop(WorkSpace) The first time you build after downloading new code, you had to manually select Loop (Workspace) instead of Loop in Xcode.
Did you check that you have the minumum Xcode version for your iOS? This is critical. If you are updating your Loop app, please review the iOS driven requirements for minimum version of macOS and Xcode.
Did you check your Apple developer account for new license agreement? Periodically, Apple will release a new developer license agreement that you need to sign before you can build new apps. You will get a build failure if there is a pending license agreement to sign. Login to your Apple developer account to check if there's a new license agreement.
Do you have a new computer, never used to build Loop? Did you Add Apple ID to Xcode?
Did you reboot, i.e., restart, your computer after updating Xcode? You should reboot following Xcode installation or update and you must make sure your command line tools match the version of Xcode you just installed. Xcode Command Line Tools
Did you get a fresh download of Loop code? If you tried to build with an old download that you used a long time ago, that old version may not be compatible with the new iOS and Xcode versions. Check also, that you are actually using the new download in Xcode. When you use the Build Select Script, it automatically opens Xcode using the new download.
If you want to build using a recent download, this section tells you how to Find My Downloaded Loop Code.
Are you are using a free developer account? Make sure you finished the removal of Siri and Push Notification capabilities described in the Free Account link.
DO NOT USE BETA VERSIONS If you are using an iOS beta version or an Xcode beta version, Loop might not build. Deleting iOS beta from a phone is a pain...so don't install it unless you know what you are doing.
If you have checked all those steps above and think you have a true build error, here's a tip that resolves 95% of all build errors when updating Loop code.
Product
menu item. Use the drop down selection for Clean Build Folder
or press Shift+Cmd+K. Either will work the same. Wait for the clean to finish before trying to build again.This is reported to fix a variety of watch building errors and cannot prepare phone for development
errors:
It may not be necessary, but the suggestion is to reboot phone, (watch) and Mac - in other words, you can try to build without rebooting, but if that fails, repeat the steps and reboot before trying again.
The next time you plug this phone into your computer, you will be asked to trust the computer on the phone (and watch). Note this is unpairing the device from Xcode and your computer, not the same as, and much faster than, unpairing your watch from your phone.
If the build fails again, look through the list below and see if you can match your error message with one of the error messages listed later in this page. If you really can't find your solution, then post for help. But help us help you.
If you build any older version of Loop with Xcode 15, you will see this error: Cycle inside Loop: building could produce unreliable results
.
Solution: Build Loop 3.2.3 or later
What about other forks
Other forks are not being maintained.
If you are using FreeAPS or Loop with Patches (from the loopnlearn GitHub username), it is time to switch to released code.
"},{"location":"build/build-errors/#new-with-xcode-14","title":"New with Xcode 14","text":"This may change, but for now, the watchOS simulator is not automatically included with the Xcode 14.x download and install. Some version of the watchOS simulator is required to build Loop, independent of whether you use a watch.
You will be asked if you want to download & install. Make sure watchOS
is selected.
If you are getting watch errors or having trouble with your watch, try this:
Tap on the Xcode name on the menu bar and select Settings.
Choose the Platform tab. If there is a missing watchOS simulator that you think might help, then download it using the GET
button. Use the minus icon (bottom left) to remove simulators that are no longer being used. (The watchOS 9.0 is required to build with Xcode 14.0.1. The watchOS 9.1 was downloaded with a release candidate for Xcode 14.1 - your screens may look different.)
STOP!! Read this section! Important!
Before you post in a Loop Social Media site asking for help with build errors, do your work first. The build errors listed below (and the checks listed above) will fix most of the problems you may encounter.
PLEASE READ THIS PAGE. The volunteers answering questions online would love to spend more time helping people use Loop and less time answering questions that can be addressed by using this page.
Therefore, try to resolve your build error yourself. Then, if you need to post for help, please include enough information with the post so the volunteers know where you are in your troubleshooting attempts.
Your Post Must Include:
Please take screenshots of your issue and use them in your posts. On an Apple computer, press Shift+Cmd+4 keys at the same time followed by pressing the space bar Space and then click on the window of interest. The screenshot will be saved to your desktop with a file name starting with the name \"Screen Shot\". Use screenshots instead of cell phone images or words whenever possible. Screenshots are higher resolution and easier to read.
Use the whole Xcode window screenshot when posting for build help.
"},{"location":"build/build-errors/#find-your-error-messages","title":"Find Your Error Message(s)","text":"To begin fixing the error, use the Report Navigator view to find your error message.
The key is to (1) READ THE ERROR MESSAGE and then (2) FIND YOUR MESSAGE IN ONE OF THE TOPICS BELOW.
Here's a super tip: Merely seeing the \"exit code\" in Xcode is not enough information to discern what error is causing your build to fail; some exit codes have multiple causes. Look at the detailed message to guide your search for the matching solution.
Notice the screenshots below have red circles highlighting certain error messages. Read your error message(s) from your screen, being guided by the red circles in the screenshots. Once you find your error message (hint: not \"exit code\"), you can either:
Take the error message from your Xcode screen and use LoopDoc's search function to enter in some of that phrase to bring up the appropriate solution topic, or
Take the error message from your Xcode screen and read through EACH OF THE TOPICS BELOW. Check each of the red circles to see if you have a match. Kind of like a matching puzzle.
For example, if you see \"Invalid active developer path (/Library/Developer/CommandLineTools)\" in your error message, use the search tool in LoopDocs with \"invalid active\". You will get a couple of links and one is the Command Line Tools fix for that error message. Click on the link and you'll find the solution.
"},{"location":"build/build-errors/#specific-error-messages","title":"Specific Error Messages","text":""},{"location":"build/build-errors/#unable-to-read-included-file-loopconfigoverridexcconfig","title":"Unable to read included fileLoopConfigOverride.xcconfig
","text":"Error Message: This error occurs inside Xcode with the build halting at the line that reads the LoopConfigOverride.xcconfig
file.
Solution:
Modify the permissions for Xcode in your macOS.
The graphic below has steps labeled 1 through 4 to guide you to the setting that must be enabled for you to build the app with Xcode.
Error Message: This error occurs during the Build target WatchApp
or Build target WatchApp Extension
.
Communication with Apple failed: Your team has no devices from which to generate a provisioning profile. Connect a device to use or manually add device IDs in Certificates, Identifiers & Profiles. https://developer.apple.com/account/
No profiles for 'com.XXX.loopkit. Loop. LoopWatch' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.XXX.loopkit.Loop.LoopWatch'.
Solution:
\u25b6\ufe0f
) againError Message:
The run destination for name's phone is not valid for running the scheme \"Loop (Workspace)\"
Solution:
First make sure your Xcode version is new enough to work with your phone iOS version and make sure developer mode is turned on for iOS 16 or newer. If so, then try this procedure:
Error Message:
Package.resolved file is corrupted or malformed; fix or delete the file to continue: unsupported schema version 2
This error is new with Loop 3, which uses Package Dependencies.
There are 2 problems shown here
Solution:
Update Xcode, which may require you to update macOS.
"},{"location":"build/build-errors/#couldnt-get-revision-for-package-dependency","title":"Couldn't Get Revision for Package Dependency","text":""},{"location":"build/build-errors/#many-search-143-for-this-error","title":"Many Search 1.4.3 for this Error","text":"This error is new with Loop 3, which uses Package Dependencies.
Error Message:
Text in error:
Solution:
Refer to the graphic below
Package Dependencies
row to display the dropdown menu (shown in the inset)This error has been seen with Loop 3. The permanent xcconfig file, created by the build script and used to sign targets, is written to a folder where the user does not have read permission.
Error Message:
Text in error:
path inserted here
Solution:
No need to quit Xcode. If your build script terminal is still open, use it. Otherwise, open a new terminal window.
Copy the lines below that start with ls -l
by hovering the mouse near the right side of the text and clicking the copy icon (should say Copy to Clipboard
when you hover over it). When you click the icon, a message that says Copied to Clipboard
will appear on your screen.
ls -l ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig\nchmod +r ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig\nls -l ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig\n
Paste the lines into the terminal. The response to the first line will be something like this:
--w------- 1 marion staff 490 Nov 8 04:58 /Users/marion/Downloads/BuildLoop/LoopConfigOverride.xcconfig\n
There will be no response after the second line - although if an error is reported, please grab a screenshot.
The response to the last line will be something like this:
-rw-r--r-- 1 marion staff 490 Nov 8 04:58 /Users/marion/Downloads/BuildLoop/LoopConfigOverride.xcconfig\n
The addition of r
where there used to be -
on the left side, means you now have permission to read that file.
Final step is to return to Xcode and clean the build folder. Otherwise Xcode remembers it could not read the file and it won't try again.
Product
menu (of Xcode), select Clean Build Folder
This error is new with Xcode 13.3 (late Sep 2021) which has a new requirement
Headers
keyword must be located before the line with the Sources
keywordrepositories
that did not have lines in that orderError Message:
Text in error:
Left window (the exact target names are not important):
Middle window:
Solution:
No need to quit Xcode - follow these steps using the Xcode Menu bar. (It's possible that only Step 1 is required, but sometimes all steps are needed.)
Product
menu (of Xcode), select Clean Build Folder
File
menu, select Close Workspace
File
menu, select Open Recent
and choose the top lineError Message:
Text in error message can be either of these:
Entitlements file \"WatchApp Extension.entitlements\" was modified . . .
or
Entitlements file \"Loop.entitlements\" was modified . . .
Solution:
No need to quit Xcode - follow these numbered steps as indicated in the graphic below.
Product
menu (of Xcode), select Clean Build Folder
It turns out that
This error is found when there is a space embedded in the path name to your LoopWorspace folder. The good news is that LoopWorkspace seems to be able to build from an iCloud or Dropbox drive.
Text in error message:
Command CompileAssetCatalog failed with a nonzero exit code. . .
Solution:
This is very similar to the steps for the WatchApp Entitlements Error but you need to repeat it for 2 targets: Loop
and WatchApp
- the graphic below matches the step numbers in the list.
Loop
folderLoop
targetGeneral
tabApp Icons Source
dropdown menuApp Icons Source
dropdown menu selection for the WatchApp
targetFor older builds only. With Loop 3.2.0 and newer, the default selection is already LoopWorkspace.
You should not see carthage errors, but if you do, you probably did not select Loop (Workspace) at the top of the Xcode window. Review the graphic from the Prepare to Build Instructions.
Or maybe you are trying to build using an old download; some older versions did require carthage. Best practice is to download new code.
Error Message:
Wrong Version of Carthage Error
Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: one of -create, -thin , -extract , -remove , -replace , -verify_arch \u2026 , -archs, -info, or -detailed_info must be specified.
Solution: Download fresh code with Build Select Script.
"},{"location":"build/build-errors/#could-not-locate-device-support-files","title":"Could Not Locate Device Support Files","text":"Error Message: \"Could not locate device support files.\" That message is telling you that your iOS on the Loop phone requires you to get a newer version of Xcode to be able to build Loop onto that phone.
Solution: Update your Xcode version; this may also require a macOS update. Please review the phone iOS driven requirements for Xcode and macOS.
"},{"location":"build/build-errors/#no-such-module-loopkit-or-similar-message","title":"No Such Module 'LoopKit' or Similar Message","text":"Error Message: If you see a Cartfile failure and several other red errors (in particular saying there is \"no such module 'LoopKit'\").
Solution: Read the Carthage Error section above.
"},{"location":"build/build-errors/#developer-license-update-pla-update","title":"Developer License Update (PLA Update)","text":"Error message: The Apple Developer Program License Agreement has been updated, In order to access certain membership resources, you must accept the latest license agreement
. Or you may see Unable to process request - PLA Update available. You currently don't have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account.
Solution: You'll need to log onto your Apple Developer account at developer.apple.com and accept the latest license agreement.
"},{"location":"build/build-errors/#could-not-get-a-container-directory-url","title":"Could Not Get a Container Directory URL","text":"Error message: \"Could not get a container directory URL. Please ensure App Groups are set up correctly in entitlements.\"
Solution: To resolve this error, you will need to click on the Loop target's signing area and then the plus-sign in the App Groups area under the signing. Copy and paste the bundle indentifier into the new container that starts with group.
and then add Group
to the end of the name. Click OK to save. Note, the line will start with lower case group.
followed by your bundle identifier and an upper case Group
added to the end of the bundle identifier.
The final App Group should now have a blue check box, the name should start with group
and end with LoopGroup
. See the screenshot as an example. Click the build button after your App Group is setup similarly and you should be good.
Error message: \"Invalid active developer path (/Library/Developer/CommandLineTools)\"
Solution: Go to your Xcode -> Settings and under the Locations tab, select your Xcode version (the figure shows 14.0.1 - yours should match your Xcode version) in the dropdown menu for Command Line Tools.
"},{"location":"build/build-errors/#device-management-could-not-launch-loop","title":"Device Management Could Not Launch Loop","text":"Error message: \"Could not launch \"Loop\". Verify the Developer App certificate for your account is trusted on your device. Open Settings and navigate to General -> Device Management, then select your Developer App certificate to trust it.\"
New Solution First try the Unpair and Reboot process above. If that doesn't work, then try the solution listed below.
Solution: If you get this message and are unable to find the Device Management option in your phone settings, then we need to do a little extra step to clear out some old info.
That should clear the out, problematic profiles and allow a successful build.
If your problem persists after that, then you might need to do total reset of your phone to clear out the pesky problem. Before you do this, you may want to Post for Help to make sure it is really necessary:
Error message: \"You already have a current iOS Development certificate or a pending certificate request.\"
Solution: This error message has recently started to appear for some new Loop builders. To resolve the issue, please log in to your Developer account at developer.apple.com and then click on \"Certificates, Identifiers & Profiles\". Under that screen, you will see \"Development\" under the \"Certificates\" section in the column on the left. You will need to click on the certificates, and choose \"revoke\" from the options that show after you click on the certificate. Confirm the warning message that will appear asking \"Do you want to revoke the certificate?\"
After you do that, return to Xcode and open up Xcode -> Settings and choose the Accounts tab. Highlight your Apple ID and click on the minus sign to delete your Apple ID.
Re-enter your Apple ID (yes...add that account right back that you literally just deleted), return to your Loop's target signing areas in Xcode and your error message should have resolved as a new certificate will have been issued and a provisioning profile should have been created automatically.
You can verify the iOS development certificates are working by clicking on \"Manage Certificates\" in Xcode -> Settings, Accounts tab and viewing the iOS Development Certificates. You should have one for your account that has a clean status similar to the screenshot below.
"},{"location":"build/build-errors/#command-codesign-failed","title":"Command CodeSign Failed","text":"Error message: \"errSecInternalComponent, Command CodeSign failed with a nonzero exit code\"
Solution: This error message is likely due to inadvertently saying \"no\" to allowing Keychain Access or changing your computer or AppleID password. Regardless, the solution is as follows:
login
highlighted and then right-click the lock next to the login
. Click the lock closed, and then click the lock to open it again. You will be prompted for a password. Enter your computer admin password. Close Keychain Access app.Product
and then select the option for Clean
. (Keyboard shortcut is Shift+Cmd+K)Error message: \"Unrecognized arguments: --cache-builds\"
Solution: This is a homebrew / carthage error, so I don't think you'll see this. If you do, download a fresh copy of Loop code and try again. If it repeats, it is time to request assistance. Please read Posting for Help.
"},{"location":"build/build-errors/#abort-with-payload","title":"Abort with Payload","text":"Error message: \"Abort with payload\" Your app will only open briefly with a white screen and then close, if you build with this error.
Solution: This error message is caused by having the Loop download folder in an iCloud mapped drive when doing the zip download. Move your Loop download folder back to the Downloads folder, then rebuild. LoopWorkspace builds with Xcode 13 appear to work fine with an iCloud drive. You may run into the spaces in your path name problem - which has a different solution.
"},{"location":"build/build-errors/#apple-watch-issues","title":"Apple Watch Issues","text":""},{"location":"build/build-errors/#apple-watch-loop-app-not-appearing","title":"Apple Watch: Loop App Not Appearing","text":"Error: Apple watch app is not appearing.
Solution: This error usually appears because you have not updated the watchOS prior to building Loop, or you didn't have your Apple watch paired at the time of building Loop.
Don't forget to open the iPhone's Watch app, select My Watch tab on the bottom left, scroll all the way down, and click Install
for the Loop app listed at the very bottom under \"available apps\".
Before trying this solution, see if the Unpair and Reboot procedure works.
Error: The Loop app appears on the list of apps available to install on the watch, but when you press \"install\", and it goes through the animation of filling in the circle while it's installing, but then at the end it just toggles back to saying \"INSTALL\".
Solution: Plug your iPhone into the computer and start Xcode. On your watch, look for a prompt that says \"Trust this computer\". Scroll down on the watch face and select the \"Trust\" button. In Xcode, go to the top menu bar and select \"Clean Build Folder\" from the Product menu option, and then rebuild your Loop app.
If the watch app still fails to install properly, the next section should work.
"},{"location":"build/build-errors/#apple-watch-loop-app-not-running-on-watch","title":"Apple Watch: Loop App Not Running on Watch","text":"Error: Tapping the Loop app icon on the watch results in flash of the watch screen and then return to the Loop app icon or a brief display of the watch interface and then return to the Loop app icon.
Solution: Plug in your iPhone, with the watch already paired, into the computer and start Xcode with your current build folder. In Xcode, from the list of schemes where you normally choose Loop (Workspace) (with Loop 3.2.x and newer, LoopWorkspace is the default), choose the WatchApp scheme (near the bottom of the list) and then select your watch (not a simulator) from the device list, see the graphics below. Press the play button to build and deploy the WatchApp directly to your watch. It will launch correctly and will not crash when you subsequently launch it from the complication or your watch Home Screen..
Warning: Make sure your watchOS is up to date with respect to your phone iOS. If not, you may need to update to be successful. On pressing clicking build/play, some people report receiving an error stating \u201ciPhone/Apple Watch are ineligible because the OS on the watch doesn\u2019t support WatchKit App Products\u201d or similar wording. This is a known issue with some Mac USB ports. Fixes in preference order are: 1) swap which USB port is in use; 2) unplug and replug the USB cable from both the iPhone and Mac; or 3) as a last resort, reboot the iPhone and Mac.
Don't forget to select Loop(Workspace) after building to the watch before trying to build to a phone.
"},{"location":"build/build-free-loop/","title":"Build Free Loop","text":""},{"location":"build/build-free-loop/#prepare-to-sign","title":"Prepare to Sign","text":"This page is not stand-alone. You typically get here after choosing to Sign Manually after a successful download using the Build Select script.
Normally this option is chosen by people building the app with the Free option or if you want to build to a simulator on your computer.
If you have a paid developer account and are building Loop 3, you are far better off choosing to configure the permanent override file with your Apple Developer ID. Refer to Sign Targets.
The instructions found on this page are for the first build. With the Free version, you need to build every week. Refer to Build Again with this Download.
"},{"location":"build/build-free-loop/#select-the-loop-folder","title":"Select the Loop Folder","text":"Don't touch that button!
You will be told exactly where on each screen you should click. Please only click in the designated places.
Follow the directions and compare your Xcode screen to the graphics as you walk through the steps.
As shown in the GIF below:
If this is the First Time your phone or watch has been connected to Xcode, you will need to tell the phone and watch to \"Trust this Computer\".
The GIF (not updated for Loop 3.2.x) below shows:
I don't see my phone
Skip this section if building to a phone and proceed to Select Signing & Capabilities Tab.
If you want to build to a simulator, follow the directions in this section and skip the rest of this page.
What does Signing Targets Mean?
\"Signing Targets\" in Xcode identifies who built the app. You cannot deploy an app to a phone without signing each target associated with that app.
The graphic below indicates in red the three places you need to click in order to begin signing targets.
Signing & Capabilities
Loop
under the word TARGETS
Team
Click Only where Instructed
All
, indicated by dashed blue oval, is selectedDebug
or Release
is accidentally tapped, you will not be able to buildAutomatically manage signing
, indicated by dashed blue rectangle, is checkedIt is time to Sign the Targets with your Apple ID.
If you chose to sign manually but have a paid account, you can skip the Free Account steps below.
You will be building multiple targets to make a complete app and must sign each one. With Loop 2.2.x, there are 4 targets. With Loop 3, there are 5 targets.
Start with the Loop target, the first one on the target list. Choose your Apple ID.
"},{"location":"build/build-free-loop/#free-account","title":"Free Account","text":"This section is required if you are using the free account.
Some features of Loop are not available with the Free option, so as you sign, you will need to remove features that are not supported.
SIRI_DISABLED
to the LoopConfigOverride.xcconfig fileSWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited)
$(inherited)
and before the slashes near the end of the lineSWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) SIRI_DISABLED
Details about removing unsupported capabilities:
Click on each of the three remaining targets shown in the red box below, and repeat the signing steps by choosing the same team name as you selected in the first target. The targets that must be signed prior to building are Loop, Loop Status Extension, Watch App, and WatchApp Extension for Loop 2.2.x, with the addition of Loop Intent Extension for Loop 3.
After signing the targets, click on the Loop icon under the PROJECTS
heading. (Refer to the bright blue box in graphic above - click on that Loop icon.)
Projects
Now that you have signed your app, return to the Build Loop page at Start Build.
"},{"location":"build/cgm/","title":"Compatible CGM","text":""},{"location":"build/cgm/#compatible-cgm","title":"Compatible CGM","text":"Time Estimate
Summary
The Loop app is compatible with:
FAQs
The Loop app uses your CGM glucose readings, carbohydrate input and therapy settings, to model your current glucose trend, predict future glucose and automatically adjust insulin dosing. A compatible CGM is essential to operation of the Loop app.
"},{"location":"build/cgm/#dexcom-g5-g6-and-one-cgm","title":"Dexcom G5, G6 and ONE CGM","text":"The Dexcom G5, G6 and ONE CGM transmits data directly to the Dexcom app on your iPhone via Bluetooth.
The Dexcom ONE, available in some countries, acts just like the G6 as far as the Loop app is concerned. The Dexcom ONE app does not provide some features, such as Dexcom Share, that come with the G6. When you set up the Loop app, select Dexcom G6 as your CGM to use Dexcom ONE CGM with the Dexcom ONE app installed on your phone.
Dexcom ONE+ is not yet compatible
There are reports that Dexcom is transitioning to the ONE+ based off the G7 platform. These devices cannot be used with the Loop app at this time.
Pay attention to social media - an early indication is that a simple patch will allow this to work, but that patch is not available - more testing is needed.
Only available in some countries. This link is for Poland Dexcom ONE+
If the Dexcom app is on the same device as the Loop app, your system can function without an internet connection. See Offline Use below.
Dexcom G5 Support
Dexcom has stopped supporting the G5 system in the US. In the US, and some other countries, the G5 is not available for download from the Apple Store. There are countries in which Dexcom does supply and support G5. The G5 capability will continue to be supported in Loop.
There are third party apps, which interface with G4 and G5 transmitters, supported by some forks of Loop. The version of the Loop app supported by these documents only works with the Dexcom apps.
"},{"location":"build/cgm/#dexcom-g7-cgm","title":"Dexcom G7 CGM","text":"Dexcom G7 is supported with version 3 or greater of the Loop app.
"},{"location":"build/cgm/#medtronic-cgm","title":"Medtronic CGM","text":"The Minimed Enlite CGM, available with the Medtronic 522/722, 523/723, and 554/754, wirelessly sends glucose readings to the pump. The Loop app can read the Medtronic CGM data directly from the pump using a RileyLink compatible device.
"},{"location":"build/cgm/#offline-use","title":"Offline Use","text":"\"Offline Use\" means using the Loop app when there is no cell data or internet available. The Loop app does not require any special setup to operate offline.
For offline use, the iPhone's Bluetooth still needs to be active; and for Dexcom users, the G5, G6 or G7 app also needs to be running on the same phone as the Loop app. If you put your iPhone into Airplane mode, remember to turn Bluetooth back on to keep both the CGM and the Loop app running. If your offline use is failing, chances are you have forgotten to update your transmitter ID in the Loop app settings when you changed transmitters.
"},{"location":"build/cgm/#dexcom-share","title":"Dexcom Share","text":"The Loop app can download Dexcom Share data for use in modeling glucose. However, this is not a typical configuration and requires internet connection for both the phone with the Dexcom app and the phone with the Loop app. The steps for adding a CGM explain that you usually enter the Dexcom transmitter ID and leave the Dexcom Share setting blank.
Dexcom ONE
The Dexcom ONE app does not support Share.
"},{"location":"build/cgm/#nightscout-as-a-remote-cgm","title":"Nightscout as a Remote CGM","text":"Version 3 or later of the Loop app can use Nightscout as a remote source for CGM data. This requires cell or WiFi connection.
"},{"location":"build/cgm/#cgms-not-supported-in-the-loop-app","title":"CGMs Not Supported in the Loop App","text":"Libre Support (for some Libre sensors) is available with Loop-dev or by adding customizations.
Loop and Learn: Loop Customization
Currently, there are no solutions for Eversense, Guardian or Libre 3 CGM to be used directly with the Loop app, but some Uploaders to Nightscout are available using an Android phone. Version 3 or later of the Loop app allows the use of Nightscout as a CGM source.
"},{"location":"build/cgm/#next-step","title":"Next Step","text":"If your compatible pump is Medtronic or Omnipod (not DASH)
If your compatible pump is Omnipod DASH
Time Estimate
Summary
FAQs
There's a wonderful community of Loopers who are willing to help you through the process. This link on Social Media Options walks you through those groups and how to join.
Volunteers provide assistance on building and using the Loop app at these sites. None of the people are paid to answer questions or spend time troubleshooting. They simply want to help others. Please decrease their support burden by doing your homework and providing the information they need when requesting help. Please click the image below to watch this video full of tips to make the most of your online resources.
Please watch this video (just under 7 minutes) to learn about using announcements and searches in Facebook groups and the LoopDocs pages.
Note, the LoopDocs menus were reorganized after this video was prepared to make it easier to progress through the pages.
"},{"location":"build/community/#screenshots","title":"Screenshots","text":"Please take screenshots of your issue and include them in your posts. On an Apple computer, press Shift+Cmd+4 keys at the same time and a little crosshairs tool will appear. Click-and-drag across the area you'd like to include in the screenshot. When you let go of the button, the screenshot will be saved to your desktop with a file name starting with the name Screen Shot
. To capture an entire window, press Shift+Cmd+4 keys at the same time followed by pressing Space (the space bar) and then click on the window of interest.
Use screenshots instead of cell phone images whenever possible. Screenshots are higher resolution and easier to read.
Take a wide screenshot (full window capture) when asking for help with settings or Xcode build errors. Nightscout and Xcode have lots of valuable information off-to-the-side that can be valuable for troubleshooters.
"},{"location":"build/community/#descriptive-language","title":"Descriptive Language","text":"Use descriptive language - the most accurate, detailed words possible - when asking for help. Try to avoid the word \"it\" and instead use details and information to explain why you're asking for help, what you've already tried, and what happened when you tried those things (including screenshots). Let's illustrate with a couple of examples.
"},{"location":"build/community/#example-1","title":"Example 1","text":"The Loop app no longer allows you to enter your correction range in the wrong order, i.e., 110 to 90; but it once did and the Loop app would stop working. We're using that problem as an example below.
Bad: \"It's not working.
\" <----makes me wonder what \"it\" is? What part of \"it\" isn't working exactly? The app? The glucose control? The pump integration? Alarms? Bolusing? CGM
Ok: \"My Loop app won't open.
\" <---- Ok, so now I know the Loop app itself seems to be the problem, but still don't know if this is a build error or an error that has happened after building. The solutions might be different.
Better: \"My Loop app was working yesterday just fine, and now today it's not doing the things like I expect.
\" <----- Getting closer. Now, I know this is not a build error and that it sounds like a more recent issue. I'm starting to narrow down the potential causes. This is about as much detail as it takes for me, as a volunteer, to consider helping. I might not have to ask 42 questions, but instead only 4 questions to find the remaining information for troubleshooting. If there were more details, it would save time.
Awesome: \"My Loop app was working yesterday. Around lunch time, I went into the settings screen and made some adjustments and ever since it just turns white and closes no matter what I try.
\" <---- DEFINITELY getting closer. Now I have a strong suspicion about where the bug is happening and can help with a couple links.
GOLD MEDAL WORTHY: \"My Loop app was working yesterday. Around lunch time, I went into the settings screen and made some adjustments to correction ranges. Ever since I did that, the app immediately turns white and shuts down. I have tried restarting my phone, but it has not fixed the problem. I tried searching the docs for 'loop closing' but didn't see results that matched my issue.
\" <----- This person is doing an outstanding job of describing the problem. Lots of good details. Has shown initiative to try to use the resources already. This person did an excellent job of helping all of us help them.
This example is not quite as old, but does refer to details from older Loop and iOS versions. It exemplifies the details needed to assist someone with a build error.
Build with Browser
If you are using the Build with Browser method, we still need descriptive details but we do not need screenshots. All that is required is to list your GitHub user name. The volunteers can then read your publicly available log files. (All private information is automatically redacted in those logs.)
Bad: \"My Loop app won't build.
\" <----- What step are you on? What is the iOS on your phone? What kind of computer are you using? What macOS? What Xcode version? Have you built successfully before or is this new?
Ok: \"I'm trying to update my Loop app and am getting a few errors that I don't understand.
\" <----- Wow, sure would be nice to know what those error messages are. Are they red or yellow? A screenshot sure would help here.
Awesome: \"I have a macOS Big Sur 11.5.3 computer with Xcode 12.5.1 and my phone is running iOS 14.7.1. Downloaded Loop-master (2.2.6) this morning and I'm getting some red errors about an exit code that I don't understand. I've tried everything in the docs and nothing worked.
\" <---- While I'm super happy they \"tried everything\", I'm no closer to knowing what the exact error message is nor which \"stuff\" exactly they tried. But all the version numbers are included.
GOLD MEDAL WORTHY: \"I have a macOS Big Sur 11.5.3 computer with Xcode 12.5.1 and my phone is running iOS 14.7.1. Downloaded Loop-master (2.2.6) this morning and I'm getting some red errors about an exit code 645 that I don't understand. Here's the screenshot of the error message. I tried searching the docs for \"exit code 645\" and didn't see any responses that helped.
\" <---- This is the kind of detail that will get you to an answer very fast.
Often, the best answer to your question is sending a link to the answer in LoopDocs or LoopTips. This provides you a quick, accurate and complete answer. We understand that there is so much information in these sites that it can be hard to find answers. Mentors know the docs well, are experts at using the search tools and will send direct links to the sections that best answer your question.
If you've searched the docs and read relevant info already, please include that in your post or your reply. That way you don't get linked back to the part you are confused about. And if you have already read the specific section a mentor just linked, be specific about why your problem is not addressed by that link. Or just say \"I'm confused when the doc says this\". Letting us know when these docs can be improved is very useful.
"},{"location":"build/community/#next-step","title":"Next Step","text":"Now you are ready to build or continue with setting up the Loop app.
"},{"location":"build/community/#return-to-set-up","title":"Return to Set Up","text":"If you are a new looper who got to these pages from the Set Up app page - congratulations. Now that you've reviewed these introductory pages, please continue with the Brand New Loopers section of the Set Up Overview page.
"},{"location":"build/community/#build-with-browser","title":"Build with Browser","text":"Click here if you want to Build with Browser.
"},{"location":"build/community/#build-with-mac","title":"Build with Mac:","text":"Click here if you want to Build with Mac.
"},{"location":"build/computer/","title":"Compatible Computer","text":""},{"location":"build/computer/#compatible-computer","title":"Compatible Computer","text":"Time Estimate
If you are building with a Mac and Xcode:
Hint: OS stands for Operating System
Build with Browser
If you do not have a Mac, you can build\u00a0Loop 3\u00a0with any computer using a browser. If you want to use that method, review this list and head over to Build with Browser.
Summary
Your computer, iPhone and Xcode must have compatible versions to build the Loop app using a Mac.
If you are buying a Mac specifically to use the build with Mac method, chose one with capabably of being updated to the Sonoma (macOS 14) operating system and at least 256 GB (512 GB is better). The Build with Browser method works on any computer or tablet.
FAQs
If you have access to a computer with MacOS 13.5 or newer, you can skip ahead to Check Space Available.
"},{"location":"build/computer/#compatible-versions","title":"Compatible Versions","text":"The current development version and the next release of\u00a0Loop\u00a0will require Xcode version 15 regardless of the iOS on the phone. This requires macOS 13.5 or higher. As an alternative, use Build with Browser, which supports iOS 15, 16, and 17.
When this page was last updated, macOS 14.0 and Xcode 15.0 were tested to successfully build the app for phones with iOS 15 through iOS 17.0.2.
The table below lists the minimum requirements to build the current release of\u00a0Loop 3.2.3. If your macOS or Xcode version is higher, you can build with Mac.
Find your phone iOS in the table below. If your iOS is not listed, e.g., 16.6, choose the first row that is less than your iOS.
iOS Version minimum Xcode minimum macOS 17.0 15.0 13.5 16.4 14.3 13.0 16.2 14.2 12.5 15.1 14.1 12.5iOS Dictates Your Computer Needs
The more up-to-date you keep your phone iOS, the more up-to-date your computer and macOS needs to be to build the Loop app with the Mac build method. A new build is required at least once a year. More information on iOS is on the Xcode Version page.
There are important security updates that go along with iOS updates. Please install those iOS updates as soon as you can.
Do not use any of the beta macOS versions. (If you don't know what that means, you aren't using one.)
"},{"location":"build/computer/#check-your-macos-version","title":"Check Your macOS Version","text":"To find your macOS version, click on the Apple icon in the computer's upper left corner and select About this Mac
. The graphic below highlights the macOS version with a red rectangle. Your computer can be a MacBook, iMac, macMini, etc. It will work to build Loop if it has the minimum required macOS version and enough storage.
With the Ventura macOS version, the About this Mac
display changed. For Ventura, when you tap on the More Info
icon, it opens the General -> About screen from the System Settings menu. This is very similar to the phone Settings -> General -> About screen.
Sonoma, macOS 14.0, is expected to be released 26 September 2023.
If you do not have the required minimum macOS version
Software Update
button on the screen shown aboveSystem Settings
General
and Software Update
, just like you would on the phone interfaceApple says upgrading to macOS Ventura requires 26 GB of available storage.
"},{"location":"build/computer/#check-the-space-available","title":"Check the Space Available","text":"You need to have 50 GB free space in order to install Xcode as directed on the Xcode Version page. At the top of the menu on the graphic above, click on the Storage Tab highlighted with a red rectangle, or, if running Ventura, tap on More Info to open the About screen (under System Settings->General), which includes storage at the bottom of the display.
To free up space, move things like photos to an external drive. The Xcode application cannot be run from an external drive.
If you are evaluating a used computer, it's best to have at least 256 GB total disk space (more is better).
"},{"location":"build/computer/#which-macs-are-compatible-with-macos-ventura","title":"Which Macs Are Compatible with macOS Ventura?","text":"Ventura is required for building the Loop app on a phone running iOS 16.4 or higher with the Mac method. You can install Ventura on the following:
Look into building with GitHub Actions - no need to worry about versions for Mac OS or Xcode - all done for you on GitHub (some configuration required). Works with any computer (PC or Mac or Tablet).
"},{"location":"build/computer/#next-step","title":"Next Step:","text":"If you already have an Apple Developer ID or you are using a free ID, next step is Xcode Version.
Free ID
The free ID method only works when using the build with Mac method. The Build with Browser method requires a paid developer ID ($99/year) but does not require a Mac computer.
"},{"location":"build/custom-mac/","title":"Customize using Mac","text":""},{"location":"build/custom-mac/#overview","title":"Overview","text":"This page is only relevant when building with a Mac.
For Building with a Browser, please see: Customize using Browser
For new Loopers, please build the code before you make any changes. Start with Open Loop and familiarize yourself with the interface. Later, you can make the customization(s) you desire and build again. The second build will be much easier than your first build.
These customizations require you to modify the code used to build the Loop app and then build the app again with the modified code.
You take responsibility
You are responsible when you decide to use customizations.
Be sure to report what changes you made if you need to ask for assistance with your app.
"},{"location":"build/custom-mac/#customizations-prepared-for-you","title":"Customizations Prepared for You","text":"Some customizations are the same for everyone and have been prepared for easy use.
The Loop and Learn team is committed to maintaining these prepared customizations and provides an easy method to add your selection from these customizations to your version of Loop.
Please read the documentation for these on the Loop and Learn: Customization Select Page:
If you are using main
branch to build Loop 3.2.3
and rely on either xDrip4iOS or GlucoseDirect to read your CGM and transfer the readings to the Loop app, you need to review this section of the Loop and Learn customization page.
Alternatively, you can switch to the dev
branch, which already supports Libre. Build Loop dev with Mac
Some customizations must be created for yourself. These are of two basic types: Custom Edits and Build-Time Flag.
The information needed to modify the code to make these customizations is found in the Versions tab because the information is independent of build method (think of these as your personal versions). The links are found below.
When preparing these personal edits using a Mac, there is a page explaining how to open Xcode to the correct folder (where code is stored on your Mac) and incorporate those changes into your personal copy of LoopWorkspace
on your Mac before building.
The code changes required for these customizations are the same regardless of the build method. The pages that provide the documentation on modifying and incorporating these changes are found at the links above.
"},{"location":"build/edit-mac/","title":"Custom Edits with Mac","text":""},{"location":"build/edit-mac/#overview","title":"Overview","text":"When applying a customization using Mac, the downloaded code should be fairly recent. If you are not sure, get a fresh download. If you know your downloaded code is the Current Release, you can skip the download and use the same folder as last time.
"},{"location":"build/edit-mac/#find-my-downloaded-loop-code","title":"Find My Downloaded Loop Code","text":"Refer to the graphic below. The Downloads folder in Finder is highlighted on the upper left. The full path to Loop.xcworkspace is highlighted along the bottom.
Loop to LoopWorkspace
Note that the directory Loop.xcworkspace
has been renamed to LoopWorkspace.xcworkspace
in the released code. For experienced builders - you realize this is good because the build process is easier.
The words were updated, but it will take time for the graphics to be updated.
Experienced Builders
Experienced builders will often build a fresh download to a simulator for their phone iOS (not their phone) to ensure download is good and is compatible with macOS, Xcode and phone iOS. Once the build is successful, they apply their customizations and build again to the simulator. Last step is to build the customized version to their real phone.
"},{"location":"build/edit-mac/#instructions-for-finding-the-lines","title":"Instructions for Finding the Lines","text":"For each customization, you are given landmarks to find the correct location in the code when you review Version: Custom Edits. You can choose to search using the Key_Phrase
or navigate to the file in the folder structure and look for ( Cmd+L # ) the line number.
use the copy button at right, paste into search\nThe copy button for this exampe is just for practice\nDo not paste the result anywhere\n
To search using the Key_Phrase
(see graphic below for clarification):
Key_Phrase
; click on it to copy the phraseFind in Workspace
1 result in 1 file
(for most cases)Key_Phrase
Key_Phrase
was selected to limit the search to just the relevant line (if possible)Key_Phrase
gets you close but not exactly on the line where you need to make the modifications - please read carefullyEach customization will also show Module, Folder and File bullet below the key phrase.
If you use the Loop and Learn: Customization Select Script, it automatically locates your most recent download, makes the customization you select in that download and then opens Xcode for you.
But sometimes, you need to find your downloaded code and make your own changes in Xcode. This section tells you how to do this.
Refer to the graphic below. The Downloads folder in Finder is highlighted on the upper left. The full path to Loop.xcworkspace is highlighted along the bottom. Double clicking on that file opens Xcode; but to apply customizations, you need to type commands in the terminal.
New Terminal at Folder
(near the bottom of the list)This new terminal window is ready to accept commands as needed when the instructions say to start a terminal in the LoopWorkspace folder.
To confirm you are in the correct location, type pwd
and return in the terminal. The response must end in LoopWorkspace. For example, using the graphic below, the response to pwd
should be similar to:
/Users/marion/Downloads/BuildLoop/Loop-20220803-1145/LoopWorkspace
The folders listed in the code customization steps are the actual directory names as stored on your computer. However, a shortened name is used for some folders when being displayed as icons in Xcode. Some people prefer to search through the folder icons to find a file instead of using the Find in Workspace
feature.
In the graphic below, the user searched for an item found for both Eros and DASH pods (in two different files). The top part of the graphic shows the result of the search with user clicking on one instance. On the right side of the top graphic (highlighted by red rectangle) is the name of the selected file on the computer with the full directory name.
These folder icon names are different from the directory names on the computer:
Folder Icon Name Directory Name ShareClient dexcom-share-client-swift RileyLink rileylink_ios Amplitude Amplitude-iOSAll other icons and directory names match.
"},{"location":"build/edit-mac/#modify-and-save","title":"Modify and Save","text":"Key_Phrase
or Module, Folder, File
method described on Version: Custom Edits can be used to find the lines inside Xcode on your MacThe Loop app uses the Health app to record blood glucose, insulin, and carbohydrate data. The blood glucose, insulin, and carbohydrate data stored in the Health app can also be accessed and uploaded by the Tidepool Mobile app which enables the display of your data on the Tidepool web-based display tool. Please review the settings below to ensure you have the proper settings.
"},{"location":"build/health/#loop-permissions","title":"Loop Permissions","text":"You need to set up Loop's permissions to read and write some data in the Health app. When you finish building your first Loop app, the Health app screen for Loop permissions automatically appears. (People who have been looping a while should be aware that the permissions are slightly different now.) Do not enable permission for Loop to read carbohydrates from the Apple Health app.
You can also get to this screen (for iOS 15) by iPhone -> Settings -> Health (heart icon) -> Data Access & Devices -> Loop.
New Instructions
Loop does not need to read carbohydrates from the Health app.
The old instructions suggested turning on all switches. This is NOT necessary for carbohydrates and can be dangerous if
Blood Glucose: Permission to Write and Read
Carbohydrates: Permission to Write ONLY
Insulin Delivery: Permission to Write and Read
Sleep: Permission to Read
You also need to enable your Dexcom Mobile app to write to the Health app. The steps shown in the figure below are valid for iOS 12.
For iOS 13/14, the menu items are: iPhone -> Settings -> Health (heart icon) -> Data Access & Devices -> Dexcom app. Make sure Dexcom has permission to write Blood Glucose (after the 3 hour delay). If you do not do this, you will have a maximum history of 3 hours displayed in the Loop Glucose screen.
"},{"location":"build/loop-data/","title":"Loop Data","text":""},{"location":"build/loop-data/#make-plans-for-your-loop-data","title":"Make Plans for yourLoop Data
","text":"Time Estimate
Summary
FAQs
Take some time to familiarize yourself with these data options and choose your preferred system(s). Many Loopers use all three for various aspects.
Loop 2
allows overrides to be enabled or disabled remotelyLoop 3
allows remote commands for carbs, bolus, or overridesNightscout options include free or nominal cost sites you build yourself or there are several Nightscout as a Service vendors who provide turn-key sites for a monthly fee. Links to the options are found in the Nightscout: Documentation.
Nightscout provides a secure, real-time Dashboard with status of the Loop app visible to anyone with access codes and the internet. It is required for remote commanding.
If you plan to use remote commanding with Nightscout, please read these links with additional information:
Now you are ready to Meet the Community.
"},{"location":"build/overview/","title":"Mac Overview","text":""},{"location":"build/overview/#build-with-mac-requirements","title":"Build with Mac Requirements","text":"The complete requirements for building Loop with a Mac and Xcode are summarized below. The first list contains the common requirements that are the same regardless of build method. The second list contains the additional requirements for building with a Mac and Xcode.
Each requirement in the list is linked to the LoopDocs pages with more information.
"},{"location":"build/overview/#common-requirements","title":"Common Requirements","text":"If using a Mac to build to a Simulator to try things out, the only requirements are a computer and Xcode.
"},{"location":"build/overview/#getting-ready-to-build","title":"Getting Ready to Build","text":"Review the Common Requirements pages, listed above.
Then review the Build pages for the method you have chosen. Read the top three boxes on each page: icons for those boxes are displayed below for reference. On a desktop, you can use n
for next and p
for previous.
Time Estimate
Summary
FAQs
Next, read pages completely and skim Oh dear! Build errors?. Most of the mistakes you can make when building with Xcode and a Mac have already been made. The Build Errors page shows how to fix them.
When you are ready to proceed, complete the tasks on each page. You can do one a day, take a week per page or blaze through them quickly. Just be sure to read carefully and if you are confused - reach out for help: How to Find Help.
After you build Loop on your phone, keep following along in the docs as you Set up and Operate your Loop app.
"},{"location":"build/overview/#what-if-i-get-stuck","title":"What if I get stuck?","text":"Try to:
Time Estimate
Summary
FAQs
Nightscout
monitoring of the Loop app is a priority, then a cell plan may be desired.The Loop app requires an Apple device and uses the Apple Health app to store and retrieve your blood glucose and insulin data and to store your carbohydrate records. Older iPads do not support Apple Health which is required for the Loop app. It may be possible with newer iPads and newer iOS, but this has not been tested.
You need a minimum version of the mobile operating software, called the iOS, to be installed on your iPhone. The Loop app is compatible with iPhone devices with iOS 15.1 or newer.
These devices are compatible.
These devices are compatible (now), but are limited to iOS 16.
These devices are compatible (now), but are limited to iOS 15.
s
Your iOS version can be found under the phone Settings -> General -> About display as shown below. The iOS number is found on the Software Version
line.
Do not use any of the beta iOS versions. (If you are uncertain what that means, then you are not using one.)
"},{"location":"build/phone/#developer-mode-mac-build-only","title":"Developer Mode - Mac Build Only","text":"When you build the Loop app using Build with Browser, you are not required to enable Developer Mode on the phone or watch.
With iOS 16 or newer and watchOS 9 or newer, Apple added a feature. If you want to know more, click on this Apple Link about Developer Mode.
When you build the Loop app on your phone from Xcode directly and then transition to or start with iOS 16 or newer, you need to have Developer Mode enabled. This is also a requirement to use the Loop app on a watch paired to your phone running watchOS 9 or newer. You will be told to enable it in the Build the Loop App: Prepare your Phone and Watch instructions.
Developer Mode with iOS 16 or newer, watchOS 9 or newer
If you already have the Loop app built with Xcode on your phone/watch when you update to iOS 16 or newer/watchOS 9 or newer or newer, you will be told that the Loop app requires Developer Mode to run.
You will not be able to run the Loop app on your phone (or watch) until you have enabled Developer Mode on the device(s).
"},{"location":"build/phone/#battery-health","title":"Battery Health","text":"Make sure the battery on your phone is solid. Your phone will become a critical health device - you want it to keep working.
Low Power Mode
With newer iOS, some people have reported the Loop app continues working in the background (phone locked) even in Low Power Mode. Others have reported they still get red loops. You can experiment to determine if your phone/iOS/app is able to maintain green loops in low-power mode. Otherwise, the best practice is to avoid Low Power Mode.
"},{"location":"build/phone/#use-automatic-time","title":"Use Automatic Time","text":"Be sure to set the phone to automatic time. Do not try to defeat a game by modifying time on the same phone used to control your insulin.
Please read: The Loop Phone Must be on Automatic Time.
"},{"location":"build/phone/#turn-off-automatic-updates","title":"Turn Off Automatic Updates","text":"Apple provides updates regularly to the iOS. Often, these updates include critical security patches in addition to improved new features.
Please be proactive - install updates as soon as the all-clear is given for using the Loop app with that iOS update.
If a limitation on your Mac prevents you from updating your phone to the latest iOS, consider using Build with Browser.
"},{"location":"build/phone/#why-turn-off-automatic-updates","title":"Why Turn off Automatic Updates?","text":"When iOS updates are released, the Loop and Learn Version Updates page is typically updated faster than LoopDocs. Check to see if a new update is causing an issue with the Loop app or your CGM before accepting the update from Apple.
Within a few days, the \"All-Clear\" or (very rare) the \"WAIT there is a problem\" message will be posted.
"},{"location":"build/phone/#next-step-compatible-pump","title":"Next Step: Compatible Pump","text":"Now you are ready to check if you have a Compatible Insulin Pump.
"},{"location":"build/pump/","title":"Compatible Pump","text":""},{"location":"build/pump/#compatible-pump","title":"Compatible Pump","text":"Time Estimate
Summary
FAQs
There are three types of pumps compatible with Loop.
If you have one of the pumps listed above, you are good to go on Loop! Congrats!
"},{"location":"build/pump/#extra-details-on-medtronic","title":"Extra Details on Medtronic","text":"There are a number of Medtronic insulin pumps manufactured between 2006 \u2013 2012 which are compatible with the Loop app. Compatibility has two requirements: (1) pump model and (2) firmware.
"},{"location":"build/pump/#medtronic-pump-model","title":"Medtronic Pump Model","text":"To determine your pump model, look at the backside of your pump. There should be a sticker on the underside of the pump. On the right-hand side of the sticker, it says REF MMT-XXXXXX
Some pumps may have an \u201cL\u201d or \u201cS\u201d or \"R\" before the pump region, e.g. a model number like MMT-722LNAS. This does not affect compatibility with the Loop app.
"},{"location":"build/pump/#medtronic-pump-firmware","title":"Medtronic Pump Firmware","text":"A pump\u2019s firmware is the internal software that runs your pump. Older Medtronic firmware allows the Loop app to act as a \u201cremote control\u201d to set temp basals and report back pump data. Newer firmware disabled that \u201cremote control\u201d access and therefore cannot be used with these DIY closed-loop systems. There is currently no ability to downgrade a pump\u2019s firmware or replace it with older firmware. Before you buy a used pump, make sure you are getting one with compatible firmware.
The firmware on all 515/715 and 522/722 model Medtronic pumps is compatible with Loop. You will only need to check the firmware version for 523/723 and 554/754 model Medtronic pumps.
To find your pump\u2019s firmware you will need to power it on. If the pump has not been powered on for some time (i.e., has been in storage without a battery for a while), it will run through a start-up count and the firmware version will appear on the bottom right of the pump\u2019s screen. Don\u2019t turn away, as the version number will only be displayed for a little while before the screen moves onto other information displays.
If the pump has been active recently or has a reservoir installed, follow these steps:
Press the button on your pump.
Scroll down with the button to the bottom of the status display.
Read the bottom line of the display.
If you are in the position of being able to shop around for different pump models, there are some slight differences between the Loop-compatible Medtronic pumps.
500 vs 700: The difference between the Medtronic 500 series and the 700 series pumps is the size of the insulin reservoirs. The 500 series pumps use a 180 unit reservoir, and the 700 series pumps use a 300 unit reservoir (or smaller 180 unit reservoir, if you want).
x15/x22 vs x23/x54: The differences noteworthy between the x15 and x22 pumps versus the x23 and x54 series pumps are:
Additionally, because of the way the Loop app fetches information from the pump, the x23/x54 series of pumps are slightly better at conserving battery life through the use of the MySentry packets to collect information from the pump. x22 pumps do not use MySentry.
The x23/x54 series pumps are also faster at delivering boluses greater than 10 units. On an x23 pump, a 13-unit bolus takes 5:00 minutes to complete. On an x22 pump, a 13-unit bolus takes 8:40 minutes to complete.
Finding a compatible Medtronic pump is probably the most difficult part for most new Loopers. Our suggestions:
Talk to friends in the diabetic community.
Ask your endocrinologist.
Ask at a local JDRF chapter meeting if someone has an old backup pump they'd be willing to donate to you.
Join diabetic supply groups on Facebook; both for-trade and for-sale groups.
Check Craigslist often and be willing to expand your search area to include larger cities.
Check out the HelpAround, NextDoor, OfferUp, and/or LetGo apps for pumps.
Looping in a time of covid
The most success appears to come from either one-on-one discussions with fellow diabetics/doctors or using apps (Craigslist, NextDoor, LetGo, HelpAround). If you are using Craigslist, you may wish to use an app on your iPhone to make the searching easier. There are apps to search multiple cities at once for your keywords and set up alerts.
"},{"location":"build/pump/#safe-purchasing","title":"Safe Purchasing","text":"If you choose to purchase from a remote or unknown seller, here are some tips for safe purchasing:
Use PayPal and purchase using the \"Goods and Services\" payment option. This costs nothing for the buyer, but the seller will lose 2.95% of the sale to PayPal fees. PayPal offers some protection for both buyer and seller in the event of fraud.
Ask for photos of the pump. Check to make sure the serial number of the pump on the backside matches the serial number of the pump showing in the display menu. Ask for a short video of the pump, or at least a photo of the pump turned on, so that you can see the pump's firmware and model number. Cracks and some wear on these pumps are expected. These pumps are not usually free of marks. Many people are successfully looping on pumps that have cracks and rub marks, but you may want to ask if you are concerned about any you see in photos.
Beware if the bottom of the reservoir/motor sleeve has the drive support cap pushed out, as shown here. Those pumps will generally not work (or only work intermittently), however some people have successfully repaired those pumps as shown in that link. Just be aware that it should be checked in advance.
Repairs to cracks or missing bits of plastic on battery cap area and reservoir caps are possible and not very difficult in most situations. You can read more about how to repair those here.
Ask for shipping that includes a tracking number. USPS Priority Mail's smallest box is a great option. It's only $7.20 domestically in the US and includes tracking. Ask the seller to add a small bit of packing protection such as bubble wrap around the pump to keep it safe during shipping. Make sure you get a tracking number within a reasonable period of time after you have paid.
Red flags that may indicate a scam:
Asking for payment through \"friends and family\" on PayPal, especially if you don't know the person or have any solid references for them. Paying in that way offers you no buyer protection. It's just like giving the seller cash, so you had better trust the seller.
Offering an \"almost new\" pump is a big red flag. These pumps should be at least 5-years-old by now. Do you really think a 5 year old pump should be unused and sitting in shrink wrap at this point? This seems highly suspicious. There are some out there, but they are very infrequent.
Not able to provide new pictures of the pump when requested. Sure they posted some pictures with the ad, but what if they just downloaded them from other people's ads? The seller should be able to furnish a couple of \"new\" photos at your request. A good one to ask for is the battery and reservoir tops so you can see the condition of those.
Medtronic will not typically sell pump supplies directly to customers who have not previously purchased a registered Medtronic pump. Ask your insurance about purchasing pump supplies through a durable medical equipment (DME) provider. Typically, the DME provider will coordinate with your insurance and doctor's office to get the necessary insurance approval and prescriptions for the supplies. If you are brand new to Medtronic infusion sites, you may want to ask for help from friends to try a variety of infusion sets before purchasing a full 90-day supply of any type in particular.
"},{"location":"build/pump/#omnipod-pumps","title":"Omnipod Pumps","text":"Reminder and Disclaimer
The use of Omnipod pumps with the Loop app is not supported by Insulet, although they are aware it is happening. Do not call Insulet asking for help with your Loop app build, setup, or operation. You are fully responsible for your use of the Loop app and do so at your own risk. Please read these documents and familiarize yourself with the Loop app before using it.
"},{"location":"build/pump/#omnipod-eros","title":"Omnipod Eros","text":"Eros pods (also known as Gen 3) were launched in 2013 and continue to be sold by Insulet. Insulet has announced they will stop providing Eros pods in the US in December 2023. As far as we know, there are no timelines announced for the discontinuation of Eros pods for other countries. Insulet doesn't specifically call these \"Eros\" anymore, they just use the term \"omnipod system\". For clarity, from Insulet's webpage:
Alternative Names for Omnipod Eros Pump and Pods
Eros pump is also known as Classic, or UST400, or Omnipod Insulin Management System.
Pharmacy sites sometimes may refer to the Eros pods as Gen 3 but they are the same exact pods.
Eros system has a big Personal Diabetes Manager (PDM) that does not look like a phone.
"},{"location":"build/pump/#omnipod-dash","title":"Omnipod DASH","text":"The DASH system has the newer, slimmer locked-android Personal Diabetes Manager (PDM) and built-in BLE communications in the pod, so there is no requirement for a RileyLink compatible device.
A RileyLink-compatible device is not required to use DASH with the Loop app. The communication with your iPhone uses Bluetooth.
Loop 3.0
and later works with DASH pods. If your version of the Loop app is 2.2.9 or earlier, you cannot use DASH pods.
Loop does not support Omnipod 5 pods.
"},{"location":"build/pump/#next-step-compatible-cgm","title":"Next Step: Compatible CGM","text":"Now you are ready to check if you have a Compatible CGM.
"},{"location":"build/rileylink/","title":"RileyLink","text":""},{"location":"build/rileylink/#order-a-rileylink-compatible-device","title":"Order a RileyLink Compatible Device","text":"Not needed for DASH
Time Estimate
Summary
FAQs
The RileyLink compatible device is required to allow your phone to talk to compatible Medtronic and Omnipod Eros pumps. It is not needed for Omnipod DASH pumps.
Details for RileyLink
The RileyLink compatible device is an open-source hardware device that can bridge Bluetooth Low Energy (BLE) to the radio-frequency wireless communication used by compatible Medtronic and Omnipod Eros pumps.
Loop 3 has Omnipod DASH support, among other new features. When using Omnipod DASH, the RileyLink compatible device is not necessary. If you are using Medtronic or Omnipod Eros (not DASH), you still need the device regardless of which version of Loop you are running.
Medtronic and Omnipod Eros pumps require a RileyLink compatible device.
"},{"location":"build/rileylink/#rileylink-compatible-devices","title":"RileyLink Compatible Devices","text":"The RileyLink protocol defines a specific Bluetooth interface and way of opening a Sub-GHz radio channel to pumps. All RileyLink compatible devices follow the RileyLink protocol.
There used to be just one option, the original RileyLink. Now there are more options, so you have to make a decision. Depending on your choice, be sure to have the correct charger and cables or batteries handy and add spare compatible supplies to your diabetes go-bag.
There is an entire FAQs page on RileyLink Compatible Devices.
Sections of interest include:
While you are waiting for the RileyLink compatible device to arrive, you can proceed with these build directions and can try one of the Simulated Loop options. After that, unless you are using Omnipod DASH, you'll have to wait for your device.
The population of DIY loopers (Loop and Android APS) has grown enough that you might be able to find someone local to loan you their spare.
"},{"location":"build/rileylink/#next-step-enroll-in-apple-developer-program","title":"Next Step: Enroll in Apple Developer Program","text":"Now you are ready to enroll in the Apple Developer Program.
"},{"location":"build/test-settings/","title":"Test Settings","text":""},{"location":"build/test-settings/#test-settings","title":"Test Settings","text":"Time Estimate
Open Loop
while you testSummary
Closed Loop
mode, test and validate your basal rates, ISF (correction factor), and CR (carb ratios)FAQs
Loop is just a fancy calculator underneath the hood. The math problems it solves depend on the settings you provide. So test settings before using the Loop app.
"},{"location":"build/test-settings/#basal-rates","title":"Basal Rates","text":"Correct basal rates keep your blood glucose steady without food present. The standard method is to test your basal by having a relaxing 4-6 hours without eating at least two hours before you begin the test. Does your blood sugar stay steady? Or do you climb and need a correction? Or do you go low and need to eat? Setting basal is a crucial step to setting yourself up for success with the Loop app. It determines how much of the insulin delivered (from basal and bolus) is counted as insulin on board (IOB).
Basal Tricks
The Loop app keeps track of how much more or less insulin than your scheduled basal rates are required to keep glucose in target. Once you become a proficient looper, you can tune your basal by looking at IOB overnight or when food and exercise are not involved.
"},{"location":"build/test-settings/#insulin-sensitivity-factor","title":"Insulin Sensitivity Factor","text":"The Insulin Sensitivity Factor (ISF), sometimes called Correction Factor, is how much one unit of insulin will bring down your glucose. The higher the value of this setting, the more sensitive to insulin you are. An ISF of 50 or 100 (2.8 or 5.5) means one unit of insulin lowers your glucose 50 or 100 mg/dL (2.8 or 5.5 mmol/L) in the absence of food or activity, when basal rates are correct.
Test ISF after you test and determine your basal rates. Simply bring yourself to a higher glucose with a glucose tab or choose a time when you are \"stuck\" higher than your target.
The Carb Ratio (CR) is the amount of carbs covered by one unit of insulin. Ideally, a good carb ratio will restore your glucose close to its starting point within 3 hours of the meal. (High fat/protein meals may cause glucose to be impacted longer.)
If you are spiking higher than you\u2019d like after a meal, but still coming back to the starting glucose, consider pre-bolusing your meal earlier (maybe by 15-20 minutes) rather than changing the carb ratio.
"},{"location":"build/test-settings/#other-resources","title":"Other Resources","text":"Check the companion site LoopTips. Several direct links to discussions are provided below:
If you\u2019re fascinated by this topic, read the book 'Think Like A Pancreas' by Gary Scheiner for a really great discussion.
"},{"location":"build/test-settings/#next-step-make-plans-for-loop-data","title":"Next Step: Make Plans forLoop Data
","text":"Now you are ready to make plans for Loop Data.
"},{"location":"build/testflight-xcode/","title":"TestFlight from Xcode","text":""},{"location":"build/testflight-xcode/#introduction","title":"Introduction","text":"There are several different methods for making use of TestFlight:
This guide can also be followed to install other apps you build with Xcode via TestFlight. Examples include Loop Follow
, Loop Caregiver
, xDrip4iOS
and GlucoseDirect
.
Some useful features of using TestFlight to install Loop:
Since apps built with TestFlight expire after 90 days, it is suggested you also setup a build using the Build with Browser method even if you don't plan on using it. The GitHub build can be updated in a few minutes from any browser and is an extra layer of protection in these scenarios if you do not have access to your Mac for a rebuild:
In all cases, except accidental deletion of Loop or loss of phone, the Loop you install from TestFlight builds over your existing app and you keep all your settings including your pump.
"},{"location":"build/testflight-xcode/#build-to-testflight-via-xcode","title":"Build to TestFlight via Xcode","text":""},{"location":"build/testflight-xcode/#initial-steps","title":"Initial Steps","text":"Before creating the app or uploading it to TestFlight, use the Build with Mac guide to sign your targets and build Loop to a simulator phone in Xcode. This checks to ensure the app you upload to your TestFlight will work as expected.
"},{"location":"build/testflight-xcode/#archive-the-project","title":"Archive the Project","text":"Change the build target to from building to a simulated phone to LoopWorkspace > Any iOS Device (arm64) like the image below.
Now go to the top menu and choose Product > Clean Build Folder. Once it's done, it should say \"Clean Finished\".
Go back to the top menu and choose Product > Archive. This will build Loop into a file rather than a phone or simulator. It should take about the same amount of time as building to a phone or simulator does.
"},{"location":"build/testflight-xcode/#upload-the-archive","title":"Upload the Archive","text":"Once the archive finishes building, it should automatically open the Archives window. If you want to open this window without re-archiving, click the following in the top menu: Xcode > Window > Organizer.
Select the archive and click Distribute App. If you've archived the project before, be sure to select the archive you intend to upload - most likely the one with the most recent Creation Date.
On the next screen, App Store Connect is selected by default. Click Next.
On the next screen, Upload is selected by default. Click Next.
"},{"location":"build/testflight-xcode/#first-time-archive-upload","title":"First-Time Archive Upload","text":"If you have already created a TestFlight for Loop via Xcode or the GitHub Build method, the next screen will not be shown, so skip ahead to Subsequent Archive Upload.
If this is the first time you're creating a TestFlight for Loop, enter the following on the next screen and click Next:
On the next screen, leave everything checked and click Next.
On the next screen, leave it set to Automatically manage signing and click Next. You will see a few messages as it performs some tasks. Be patient.
When you see the next screen, click Upload.
Wait until uploading is finished. Don't be alarmed if you see the following screen, just click Done.
"},{"location":"build/testflight-xcode/#deploy-app","title":"Deploy App","text":"Now that it's uploaded to TestFlight, it will take a little bit before it finishes processing and becomes available for installation on your iPhone. You can check appstoreconnect.apple.com/apps to find it's progress by clicking Test Flight and then iOS under Builds in the upper left. Once it no longer says \"Processing\" and instead says \"Ready to Submit\" next to the build's number, it should be available and ready to install on your iPhone.
To install Loop from TestFlight onto your iPhone, follow the instructions on the GitHub Deploy page.
"},{"location":"build/testflight-xcode/#update-app","title":"Update App","text":"Apps installed via TestFlight are only valid for a maximum of 90 days, so you must upload a new build to TestFlight at least every 90 days.
To update, simply repeat all the steps on this page.
Add a Calendar Reminder
Note that the built-in Loop Notification for expiration has not been modified to read TestFlight expiration, yet.
So, please add a calendar reminder.
"},{"location":"build/updating/","title":"Update/Rebuild with Mac","text":""},{"location":"build/updating/#overview","title":"Overview","text":"This page is only relevant when building with a Mac and Xcode.
For Browser Build, please see: Update/Rebuild with Browser
Time Estimate
Summary
Summary of tasks to prepare for and update your app:
In each of the sections below, follow links to sections of other build pages then hit the back button on your browser to return to this page.
FAQs
Under ordinary circumstances, you do not have to update your Loop app until it expires (1 year for a paid account). However, we encourage regular updates when a new version of iOS, or of Loop, is released because they often contain bug fixes or improvements which may increase operational stability.
"},{"location":"build/updating/#ios-updates","title":"iOS Updates","text":"Under ordinary circumstance, updating the iOS on your phone does not require a rebuild of the app on your phone. However, it's important to be prepared in case of an emergency, such as a lost phone.
Best Practice
It is good practice to first check if your computer (macOS or Xcode) will require an update to support building Loop to your phone BEFORE applying an iOS update to your Looping phone.
Follow these \"safe Looping\" steps for updating your iOS:
Loop Releases provides information about current and previous Loop versions.
Updating to iOS 16 (watchOS 9 or newer) requires enabling Developer Mode. Your existing app will not open until you take this step. Once enabled, the app opens again. A rebuild is not required.
"},{"location":"build/updating/#loop-is-no-longer-available","title":"\"Loop\" is No Longer Available","text":"The apps built and signed by you in Xcode with a paid developer account will last for 12 months; then they expire and must be rebuilt. At least once per year you will have to rebuild your app and go through this update process. If you do not update and the \"provisioning profile\" on your phone expires, you will see the \"Loop\" is No Longer Available message. You will be given multiple Loop App Expiration Notifications on the Loop phone, but might miss them if you are a caregiver.
When you see \"Loop\" is No Longer Available on your phone, the only solution is to rebuild the app. All of your settings are still present on your phone, but your \"provisioning profile\" expired and you need to generate a new one. Once you build Loop on your phone, following the instructions on this page, all your settings will be maintained - assuming you build with the same Apple Developers ID that was used initially.
"},{"location":"build/updating/#macos-and-xcode-versions","title":"macOS and Xcode Versions","text":""},{"location":"build/updating/#determine-required-xcode-and-macos-versions","title":"Determine Required Xcode and macOS Versions","text":"Between Loop app builds, there's a high likelihood that Apple has updated one or more of the systems involved in your Loop app. If you don't have the minimum Xcode version required for your phone iOS, you cannot build on that phone. Sometimes you must also update the macOS version to allow you to use the required Xcode version.
Based on the iOS on your phone, or the iOS you plan to install on your phone, determine the required macOS and Xcode versions. Click on this link versions for iOS, macOS and Xcode to determine the versions needed and then hit the back button in your browser to finish the steps on this updating page.
If you are tired of the macOS and Xcode version update requirements, check out the Build with Browser option.
First macOS and Then Xcode
Your macOS must meet the minimum requirement for the Xcode version you need to support your current iOS as detailed in that link above.
Don't be that person. Follow the directions.
Minimum means you need to have at least that version - newer versions build just fine.
"},{"location":"build/updating/#verify-update-macos","title":"Verify / Update macOS","text":"Click on this link Check your Xcode Version to find your Xcode version number.
If you need to update your Xcode, follow the instructions at this link Install Xcode and continue through Xcode Settings.
Advanced users: If you are finding installation of Xcode from the App Store incredibly slow, try the alternate method of Direct Download of Xcode.
Direct Download
Make sure your new computer has the macOS and Xcode required by your phone iOS. Be sure Xcode Command Line Tools are installed and that you Add Apple ID to Xcode.
"},{"location":"build/updating/#missing-xcode-or-command-line-tools","title":"Missing Xcode or Command Line Tools","text":"WARNING
If you fail to have Xcode or Xcode Command Line Tools installed, you will get one of these errors (or something similar) when you attempt to run the Build Select Script:
Follow Xcode Settings page after updating Xcode
Make sure to restart your computer after updating Xcode and follow the instructions on the Xcode Settings page. There's a known issue that happens often enough to be frustrating if you skip those steps. It's not always required...but this is a good easy ounce of prevention step.\n
"},{"location":"build/updating/#check-your-developer-account","title":"Check your Developer Account","text":"Apple updates its License Agreement for the Developer Program frequently. You need to login to your developer account to manually check if there is a new agreement to accept. If you see a big red or orange banner across the top of your Developer Account announcing a new license agreement like shown below...please read and accept it before building Loop.
"},{"location":"build/updating/#ready-to-build-loop","title":"Ready to Build Loop","text":"As long as there are no errors, you are now ready to proceed to Build the Loop App: Developer Mode
After building the new app, you may choose to return to this page and follow the instructions to Delete Old Copies. This is optional, but cleans up space on your computer.
"},{"location":"build/updating/#delete-old-copies","title":"Delete Old Copies","text":"This step is optional, but if your computer is low on space, it helps to clean up old downloads your are no longer using.
There is an easy way to do this. The Build Select Script used to download and build Loop provides Maintenance Utilities to help free up disk space.
Please review Loop and Learn: Build Select Script for more information.
Copy the line below that starts with /bin/bash
by hovering the mouse near the bottom right side of the text and clicking the copy icon (should say Copy to Clipboard
when you hover over it). When you click the icon, a message that says Copied to Clipboard
will appear on your screen.
/bin/bash -c \"$(curl -fsSL \\\n https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildSelectScript.sh)\"\n
Paste the line of text into Terminal. Be sure to click anywhere in the terminal before trying to paste. (Ways to paste: Cmd+V ; or Ctrl click and select from menu or Edit
-Paste
at top of Mac screen.)
If you prefer to clean up old downloads yourself, keep reading.
Where is the old folder?
Assuming you used the Build Select Script, your downloads are in the ~/Downloads/BuildLoop folder as shown in the graphic below. If you are tight on space, the older folders can be deleted. Best practice, download fresh and build Loop; and then go back and delete all but the most recent copy. The nice thing about the Build Select script is it automatically generates the folder name with the date and time of the download. Delete each unwanted folder, one at a time.
If you see a file (not a folder) in ~/Downloads/BuildLoop called LoopConfigOverride.xcconfig, keep that around. If you delete it, you'll need to recover it from the trash, regenerate it (if you know how) or sign your targets manually for your current download.
The Scripts folder can also be left alone, but if you delete it, it is regenerated with the next use of the Build Select Script.
"},{"location":"build/updating/#background-information","title":"Background Information","text":"New Loopers do not need to read the rest of this page.
Experienced Loopers may wonder what happened to deleting derived data.
If you build frequently, you do not have to delete the profiles every time. When the build script asks if you want to \"Ensure a Year?\", you can skip that step.
On the other hand, you may need to delete the provisioning profiles or saved Xcode information about a version of LoopWorkspace (or other app) currently on your computer. The maintenance utilities found in the BuildSelectScrip can be run to delete your provisioning profiles or clear derived data. Or you can use the individual commands in the next sections to do the same thing.
"},{"location":"build/updating/#delete-provisioning-profiles","title":"Delete Provisioning Profiles","text":"You can delete your provisioning profiles by copying this command and pasting it into any terminal. This does not affect any build you currently have on your phone - this just forces your current computer to generate a new one next time you build with Xcode.
Copy and Paste to manually remove your Provisioning Profiles on your computerrm ~/Library/MobileDevice/Provisioning\\ Profiles/*.mobileprovision\n
"},{"location":"build/updating/#delete-derived-data","title":"Delete Derived Data","text":"If you build using the same clone on your computer and then update that clone, sometimes you want to remove derived information that Xcode remembers and force it to start fresh.
First quit out of Xcode. The following command will delete all derived information for all your clones, so next time you build any app from an existing clone on your computer, the build will take longer. All dependencies will download again. So wait until you see the \"indexing\" indication on Xcode before trying to build.
Copy and Paste to manually force Xcode on your computer to start freshrm -rf ~/Library/Developer/Xcode/DerivedData\n
"},{"location":"build/updating/#revoke-certificate-issue","title":"Revoke Certificate Issue","text":"What does it look like if you run into the Revoke Certificate message? When you prepare to Sign the Targets with Xcode, you'll see the message highlighted in the figure below.
More information is shown in the orange box below.
Revoke certificate
The important part of this message is:
WAIT - You might not need to revoke your certificate
If you revoke and keep going:
Be aware that you will have to rebuild to every device that used the certificate you just revoked and if you have other apps built with this certificate, they will stop working too.
"},{"location":"build/updating/#direct-download-of-xcode","title":"Direct Download of Xcode","text":"Many people find updating Xcode from the App Store to be incredibly slow - especially when a new version has just been released. This method still takes time and enough space on your disk but is faster than going through the App Store. Depending on your internet speed, this download can be done in about an hour. Then once it is downloaded, expect another fifteen minutes to several hours (depending on the speed of your computer) for the \"xip\" file to \"expand\".
The instructions do not hold your hand.
Here are the different steps you need to follow when doing the Direct Download instead of the App Store method:
Time Estimate
Summary
FAQs
(personal team)
beside it even though I enrolled in the paid Developer Account program...what should I do?\" You should check your spam email box in case Apple sent you an email there. Make sure you've waited the 48 hours that Apple says it may take to get your account approved. If it's been 48 hours and you still don't see anything in your email, contact Apple support and ask them about the status of your enrollment. It may be held up by something on their end.Open Xcode from your Applications folder. If it offers to start a new project with you, just close that window.
Click on the Xcode->About Xcode menu item. The version number is displayed.
"},{"location":"build/xcode-settings/#privacy-settings","title":"Privacy Settings","text":"This is not typical, but it does happen.
Some people have their macOS privacy settings configured so that Xcode does not have permission to access their ~/Downloads
folder. This will cause a lot of grief when trying to use the Build Select Script to build an app with Xcode. This will be mentioned on the build errors page, but this is a good time to check. The graphic below has steps labeled 1 through 4 to guide you to the setting that must be enabled for you to build the app with Xcode.
Yes, watchOS simulators are required to build Loop. If Xcode asks if you want to download them - say yes. It's slow but you cannot build Loop without the simulator.
The very first time you open Xcode it may install a package of command line tools. Wait patiently until it finishes. The command line tools may have installed without asking.
Xcode
in the top menu bar (just to the right of the Apple icon in the upper-left corner) and select Settings
in the drop-down menuLocations
tab in the Settings window to see the dropdown menu for Command Line Tools. Make sure the Xcode version listed matches what you just installed (not the version in this graphic)Go to the Xcode Settings window from above, click on the Accounts
tab and then press the + in the lower-left corner to add an Apple ID account.
The Xcode Accounts Tab, shown in the graphic (from Xcode 13) below allows you to have more than one account available to choose from when you sign your targets (another new term that is explained later). Normally, you would only have one.
In the graphic, whichever item is selected on the left side (highlighted by Xcode in blue) shows up with more details on the right side of the display. If the Free account had been selected, the information shown in the red inset would have been displayed.
Free and Paid
The graphic below shows examples for a paid account and a free account. You will only see one.
"},{"location":"build/xcode-settings/#free-developer-account","title":"Free Developer Account","text":"If you want to use a free developer account, you will simply enter your Apple ID in this section and Xcode will automatically enroll your Apple ID in the free developer program. It will show up with the (Personal Team)
and User
indication.
If you enrolled in the paid account already and have confirmation that your account is active, enter the Apple ID of the paid developer account. It will show up with just your name and the Admin
indication. If you have enrolled and are waiting, the (Personal Team)
and User
indication shows up until the paid account is confirmed by Apple.
Description
The description line is initially empty. You can add your own description or just leave the line blank. Text added to the decription line shows up in two places: To the left, just above the email address and to the right once that Apple ID is selected.
You are now done setting up Xcode. Great job! You will not need to redo the account setup steps on any subsequent builds or updates of your Loop app. Xcode will remember these settings.
"},{"location":"build/xcode-settings/#next-step-build-loop","title":"Next Step: Build Loop","text":"Now you are ready to Build the Loop App.
"},{"location":"build/xcode-version/","title":"Xcode Version","text":""},{"location":"build/xcode-version/#install-required-xcode-version","title":"Install Required Xcode Version","text":"Time Estimate
Summary
FAQs
Xcode is a free application for Apple computers. You will use Xcode to turn the \"raw\" Loop source code into an iOS application and install it onto your iPhone. Which version of Xcode you install on your computer depends on the iOS version you have on the iPhone you are going to be installing Loop on and the macOS version you have on your computer.
Because of the complexity of these dependencies, please read this entire page.
Or - look into building with GitHub Actions - no Mac computer required, no need to worry about versions for Mac OS or Xcode - all done for you on GitHub (some configuration required).
"},{"location":"build/xcode-version/#which-version-of-xcode-do-i-need","title":"Which version of Xcode do I need?","text":"First, choose a version of Xcode appropriate for your iOS device. Then, determine the minimum macOS version required for that Xcode version. Update to at least that minimum macOS version. Then follow the instructions to download and install Xcode (or update an existing installation):
Have you turned off automatic updates on your iOS device?
Loop and iOS Updates
Please Read: Turn Off Automatic Updates
Before manually accepting an iOS update, be sure you have compatible versions of Xcode and MacOS.
Minimum Xcode Version
The minimum version of Xcode you need depends on the iOS version you have on your phone.
Please Read: Minimum Version List
Can't find the required Xcode version
Don't be the person who posts for help saying, \"I'm trying to update my Loop app but am getting errors.\" When asked what Xcode version they have and if they've updated, they respond, \"I don't have any Xcode updates available in the App Store, so I must be running the most current version.\"
Actually, they forgot to check for macOS updates and therefore cannot see the needed Xcode update yet.
"},{"location":"build/xcode-version/#after-update-reboot","title":"After Update - Reboot","text":"After any update of macOS or Xcode, it is always a good idea to reboot your computer.
"},{"location":"build/xcode-version/#how-do-all-the-minimum-versions-relate-to-each-other","title":"How do all the minimum versions relate to each other?","text":""},{"location":"build/xcode-version/#compatible-versions","title":"Compatible Versions","text":"The current development version and the next release of\u00a0Loop\u00a0will require Xcode version 15 regardless of the iOS on the phone. This requires macOS 13.5 or higher. As an alternative, use Build with Browser, which supports iOS 15, 16, and 17.
When this page was last updated, macOS 14.0 and Xcode 15.0 were tested to successfully build the app for phones with iOS 15 through iOS 17.0.2.
The table below lists the minimum requirements to build the current release of\u00a0Loop 3.2.3. If your macOS or Xcode version is higher, you can build with Mac.
Find your phone iOS in the table below. If your iOS is not listed, e.g., 16.6, choose the first row that is less than your iOS.
iOS Version minimum Xcode minimum macOS 17.0 15.0 13.5 16.4 14.3 13.0 16.2 14.2 12.5 15.1 14.1 12.5"},{"location":"build/xcode-version/#wikipedia-chart-for-apple-versions","title":"Wikipedia Chart for Apple Versions","text":"This graphic (copied from Wikipedia and last updated March 2023) is not updated with every iOS update - use it as a map to read the minimum requirements. Every attempt will be made to update the words in the Minimum Version List promptly - that's much easier than updating a graphic.
Follow this link to Wikipedia and scroll down to the current version of this figure - the graphic shown below is a map of how to read the current version of this figure at Wikipedia.
"},{"location":"build/xcode-version/#what-happens-if-you-try-using-too-old-of-xcode","title":"What happens if you try using too old of Xcode?","text":"It isn't some catastrophic failure if you try to build with an outdated Xcode without realizing it. If the build fails, nothing happens to your phone (or Loop on your phone if you are rebuilding). Nothing is copied from the computer to the phone until after you see the Build Succeeded message. You'll see a pretty obvious error message during your Loop build. Check Oh dear! Build errors?.
Some error messages that have shown up in earlier updates:
Package.resolved file corrupted or malformed\n
This is for trying to select an iOS 17 phone when building with Xcode 14:
Could not locate device support files\n
This is for building development code with Xcode 14 instead of Xcode 15:
Loop Widget errors like:\nCommand SwiftCompile failed with a nonzero exit code\nCannot infer contextual base in reference to member 'widget'\n
"},{"location":"build/xcode-version/#next-step-xcode-settings","title":"Next Step: Xcode Settings","text":"Now you are ready to set up Xcode Settings.
"},{"location":"faqs/algorithm-faqs/","title":"Algorithm FAQs","text":""},{"location":"faqs/algorithm-faqs/#does-loop-learn-or-detect-changes-in-your-insulin-needs","title":"Does Loop \"learn\" or detect changes in your insulin needs?","text":"The answer is both Yes and No.
Yes in that:
No in that:
Perhaps in subsequent versions of Loop, auto-adjustment of settings or machine learning could be incorporated. Until then, you will need to tell Loop if your underlying settings change or make temporary adjustments for short term issues.
The use of Overrides can be quite helpful for short-term changes.
"},{"location":"faqs/algorithm-faqs/#what-does-negative-active-insulin-mean","title":"What does negative Active Insulin mean?","text":"When Loop withholds or suspends some of your scheduled basal insulin, that starts an accumulation of insulin deficit. If you have a kinked cannula and insulin is not delivered, you'd call yourself \"lacking insulin\" (negative IOB).
When Loop reports negative IOB, it is a sign that Loop has been actively helping you prevent a low blood sugar. If you find significant negative IOB regularly, you probably need to adjust/test your settings. Glucose that continues to decrease (away from a meal) when IOB goes negative is typically a sign that the scheduled basal rate is too high.
Developer Notes
Scheduled basal rates are meant to counteract your endogenous glucose production. Another way of saying this is that Loop expects your body to be producing an amount of glucose at a rate that is handled by your basal insulin settings.
Your body doesn't really produce glucose at a fixed rate, but that's how it's modeled in Loop.
\"All models are wrong, but some are useful.\" (Quote attributed to British statistician George E. P. Box.)
"},{"location":"faqs/algorithm-faqs/#how-is-iob-calculated","title":"How is IOB calculated?","text":"Insulin on board (IOB) is calculated from the amount of insulin delivered above or below the scheduled basal rate. For each dose of insulin, the insulin model is used to determine how much of that insulin is active over time. Loop is adding up all the amounts over the full Duration of Insulin Action (DIA). The DIA is 6 hours for most rapid insulin in the models used by Loop.
IOB is plotted on the Active Insulin Chart in the main Loop display.
"},{"location":"faqs/algorithm-faqs/#how-do-delivery-limits-affect-automatic-dosing","title":"How do Delivery Limits Affect Automatic Dosing?","text":"With each cycle, Loop\u00a0generates a glucose prediction and a recommended dose (positive or negative) to bring you to your correction range.
Let \\(\\mathit{dose}\\) be the amount the app thinks you need for this cycle before considering Delivery Limits. The relationship between \\(\\mathit{dose}\\), delivery limits: \\(\\mathit{maximumBolus}\\) and \\(\\mathit{maximumBasalRate}\\), and current IOB: \\(\\mathit{currentIOB}\\) are detailed in the following sections:
In this case, where you are manually requesting a bolus recommendation by using the double orange triangles (circled below) in the toolbar at the bottom of the Loop status screen, only the \\(\\mathit{maximumBolus}\\) Delivery Limit is considered.
Because this will be an automatic dose, the app will not provide a dose that would exceed an IOB of 2 times the \\(\\mathit{maximumBolus}\\). The term automatic dose refers to insulin the app automatically delivers above your scheduled basal rate.
\\[ autoDose = minimum (dose, {2*maximumBolus} - currentIOB) \\]Note that a manual dose can exceed \\(\\mathit{autoDose}\\). There will be no warning if this happens. But no additional automatic dosing will happen until IOB is below \\(\\mathit{2*maximumBolus}\\). As long as the prediction is above the correction range, scheduled basal continues regardless of IOB.
"},{"location":"faqs/algorithm-faqs/#automatic-bolus-constant-partial-application-factor","title":"Automatic Bolus: Constant Partial Application Factor","text":"There is a new feature coming with the next release, available now with customization or the development version, called Glucose Based Partial Application Factor. This feature is disabled by default. When disabled, the Partial Application Factor is a constant 40%.
When Glucose Based Partial Application Factor is enabled, the application factor is modified based on the current glucose level. The value ranges from 20% at lower glucose to 80% at higher glucose. Let \\(\\mathit{gbpa\\%}\\) represent the application factor, then:
This automatic method uses both Delivery Limits: \\(\\mathit{maximumBasalRate}\\) and \\(\\mathit{maximumBolus}\\). As explained above, the \\(\\mathit{maximumBolus}\\) is used to calculate \\(\\mathit{autoDose}\\).
The desired dose, \\(\\mathit{autoDose}\\), is multiplied by two (to get an hourly rate) and then added to the scheduled basal rate to determine the desired temporary basal rate (\\(\\mathit{BR_temp}\\)) with a duration of half-an-hour to provide that amount of insulin. This calculated \\(\\mathit{BR_temp}\\) is compared to \\(\\mathit{maximumBasalRate}\\).
There is more detail about the Loop Algorithm at the bottom of the Operate tab.
Loop uses Apple HealthKit as long term storage for glucose, insulin and carbohydrates. But there is more going on than simple storage.
It is important that permissions for Loop be properly configured for the Health app.
Loop 3.x.x
: See Apple Health PermissionsLoop 2.2.x
: See Health PermissionsTo view the list of data stored in Health
To Set Blood Glucose, Carbohydrates and Insulin as Favorites
The health app on the Loop phone provides useful plots of data since you started to Loop with that Apple ID. Examples for insulin delivery and carbohydrates are shown in the graphic below. New versions of iOS modified details of the display with the same or improved capabilities.
"},{"location":"faqs/apple-health-faqs/#healthkit-details","title":"HealthKit Details","text":""},{"location":"faqs/apple-health-faqs/#glucose-and-apple-healthkit","title":"Glucose and Apple HealthKit","text":"For Dexcom users with the Dexcom app on the Loop phone, the Dexcom app writes the value to Health with a 3-hour delay.
Loop reads the Dexcom information at the same time the Dexcom app gets the reading from the transmitter. It uses the glucose value to update predictions and stores it in Health.
If you look at your Health glucose readings, you'll notice the Loop icon for the last 3 hours and the Dexcom icon for times earlier than that.
All other CGM readings are reported with the Loop icon and there is no transition after 3 hours.
"},{"location":"faqs/apple-health-faqs/#carbohydrates-and-apple-healthkit","title":"Carbohydrates and Apple HealthKit","text":"In Loop* 2.2.x
, if you set Apple Health app permissions to allow it, Loop will read carbohydrates from the Health app. If you give a third-party app permission to store carbohydrate data in Health, and do not realize that Loop reads that information, you might get unexpected insulin delivery based off those carbs. To avoid that unanticipated behavior, the directions tell you to set permissions to allow Loop to write to carbohydrate storage but not read.
In Loop 3
, the option to read from Health carbohydrates is explicitly disabled and can only be enabled by setting up special parameters when you build the app. The insructions for the code customization are not in LoopDocs yet. If it is important to you to use a third-party app to record carbohydrates and have Loop read the information and automatically dose with insulin, ask for help in zulipchat.
The relationship between Loop and Apple HealthKit is very important to understand if you ever need to do one of these actions:
Be Cautious
Allowing users to delete events is fairly risky. If a user deletes a dose accidentally, or does not understand the IOB impact while in closed loop is enabled, then Loop may start giving insulin that is not needed.
One method to deal with insulin that wasn't given is to go disable closed loop for 3 to 6 hours. However, if you take care, you can remove insulin from Loop.
Developer Notes: Pump Events and Insulin Delivery
Loop stores Pump Events separately from Insulin Delivery. With permissions set to allow Loop to read insulin from Health (recommended), the Insulin Delivery store contains doses entered from Health as well as the subset of pump events that represent doses.
Pump Events are displayed by tapping an insulin chart on the main screen and viewing the Event History tab.
When you delete a pump event using the Event History interface in Loop, the associated entry in Insulin Delivery is not deleted.
"},{"location":"faqs/apple-health-faqs/#bolus","title":"Bolus","text":"Event History
and in the Health app insulin data listEvent History
list, but leave that same entry in Health, Loop reads it back from HealthEvent History
and Health data; it is best if you do this within one loop cycleEvent History
but you could not find it in Health, look again after the next loop cycleEvent History
, Loop reports it to Health againEvent History
list and Health data; it is best if you do this within one loop cyclePro Tip
Write on a piece of paper the times and values you think you should delete.
Look at those values in both Event History
and Health Insulin data list.
Record what Loop is reporting as IOB.
Review the values one more time, and then delete those entries in both places. Review IOB again. If you made a mistake, you can refer to that written list and adjust appropriately.
"},{"location":"faqs/apple-health-faqs/#basal","title":"Basal","text":"Loop keeps track of how much basal is delivered so the IOB is properly reported. In older versions of Loop, there may be occasional display glitches, but the internal accounting is correct and updates every Loop Cycle.
Developer Notes: Scheduled Basal is Not a Pump Event
Scheduled basal is not a pump event so you will not see it listed in the Event History tab.
Scheduled basal does not affect IOB when delivered as scheduled.
The Insulin Delivery store keeps track of the insulin delivered via scheduled basal.
Loop updates the amount of insulin delivered through basal (both scheduled and temporary) to Health at regular intervals - this does not happen every Loop Cycle when basal rates are not changing. The updates to Health happen:
A simple example to illustrate this - for a pump with smallest insulin delivery of 0.05 U:
Schedule Temp Basal (TB) Health Explanation 12:00 AM0.4 U/hr --- --- Start of Day / Start of Example 06:00 AM0.5 U/hr --- 06:00 AMBasal2.4 U Loop reports insulin delivered by basal for the last 6 hours when the scheduled basal rate has a new entry --- 07:15 AM0.0 U/hr 07:15 AMBasal0.6 U Loop reports insulin delivered by basal since last report up to time TB starts --- 07:45 AMTB expires 07:45 AMBasal0 U No insulin was delivered during TB 08:00 AM0.4 U/hr --- 08:00 AMBasal0.1 U Loop reports insulin delivered by basal since last report; the scheduled basal rate has a new entry"},{"location":"faqs/apple-health-faqs/#tidepool-and-apple-healthkit","title":"Tidepool and Apple HealthKit","text":"If you have a Tidepool account and use the Tidepool uploader on your Loop phone, the data in Health is uploaded to your Tidepool database where you can view displays with the Tidepool web browser tool.
"},{"location":"faqs/apple-health-faqs/#how-do-i-modify-apple-healthkit-permissions","title":"How Do I Modify Apple HealthKit Permissions","text":""},{"location":"faqs/apple-health-faqs/#loop-health-permissions","title":"Loop Health Permissions","text":"You can review and modify the Apple HealthKit permissions for the Loop app.
Open the Apple Health app ( icon)
At this point, you can review and modify the settings.
"},{"location":"faqs/apple-health-faqs/#cgm-health-permissions","title":"CGM Health Permissions","text":"If you choose to, you may add permission for your CGM app to write to Apple Health. Loop will read glucose from Apple Health, but only while the phone is unlocked and the app is open.
Note that if a glucose value is added to Apple Health \"now\", Loop will pick up that value and use it for the glucose prediction. This can happen with a finger-stick entry or some Libre third-party apps, but not with Dexcom, which has a 3-hour delay before writing to Health.
"},{"location":"faqs/apple-health-faqs/#dexcom","title":"Dexcom","text":"The Dexcom app for both G6 and G7 has a 3-hour delay before writing to the Health app. If you tap Glucose data in Health, scroll to the bottom to select Show All Data
and then scroll back in time, notice the Loop
icon is replaced by either the G6
or G7
icon starting 3 hours ago.
If you happen to wear a Dexcom G6 and G7 sensor at the same time, then starting 3 hours in the past, both sensor traces will show up in the Loop Glucose chart
.
Loop only uses data from the CGM you selected as your CGM for closed-loop insulin delivery, but don't be surprised at the double trace if you want to wear both during the transition from G6 to G7.
Add Permission to Health for Dexcom to Write Glucose
If either the G6 or the G7 has permission to write to Apple Health, then Loop will delete the Loop glucose data in Apple Health that are older than 3 hours and newer than 1 week. The Dexcom app will write its glucose values to Health when each value is 3 hours old.
If you transition from G6 to G7 (or alternate back and forth), be sure that at least the app you are currently using has permission to write to health. (I inadvertently forgot to turn on health permission for G7. By the time I noticed, I had a gap of several days in my Apple Health storage of glucose values.)
"},{"location":"faqs/apple-health-faqs/#libre","title":"Libre","text":"There are several choices for reading Libre sensors.
With Loop dev
(will be Loop 3.4.x
after release), LibreTransmitter is integrated with the Loop
app.
The frequent updates (1-minute glucose data) provided by Libre did cause some issues with released versions (Loop 3.0
and Loop 3.2.x
with customizations that use various third-party apps to read the Libre). These were fixed initially by modifying the third-party apps to limit how frequently they supplied glucose data.
With Loop dev
(will be Loop 3.4.x
after release), the Loop app only initiates a closed-loop cycle automatically following a new glucose value if it has been more than 4.2 minutes since the last one.
Loop 3.0
and Loop 3.2.x
versions do not have that limitation on how frequently Loop responds to a new glucose reading. There is a Customization that incorporates the 4.2 minute interval check which can be applied to Loop 3.2.2.
The glucose units (mg/dL or mmol/L) Loop uses match what is in Apple Health. Once you connect a device that reports glucose to the phone, make sure the units match the device. Note - you can change units for Dexcom Share and it translates units for you - not sure about other devices.
The next release of the Loop app and the current Loop-dev branch includes Libre support in addition to the CGM listed below.
The Loop app supports G5, G6, G7, Dexcom ONE, Dexcom Share, Nightscout and the Medtronic CGM systems compatible with Looping pumps.
Libre Support (for some Libre sensors):
There are more details on the Compatible CGM page.
"},{"location":"faqs/cgm-faqs/#do-i-need-wait-for-a-new-sensor-session-to-start-loop","title":"Do I need wait for a new sensor session to start Loop?","text":"No, you can start Looping mid-sensor session. There's no need to do anything special with regards to your CGM session when starting or ending the Loop app.
"},{"location":"faqs/cgm-faqs/#what-do-i-do-when-sensor-is-in-warm-up","title":"What do I do when sensor is in warm-up?","text":"The Loop app will stop automatically adjusting insulin when the most recent glucose value is older than 15 minutes. This is indicated by seeing three dashes in place of the glucose reading on the HUD.
No Recent Glucose
is displayed, making it easier to add the fingerstick value directly in Loop, which also saves it in Apple HealthWith no recent glucose readings, your pump returns to the scheduled basal delivery (within 30 min or less).
Loop continues to accept carb entries and manual bolus commands. Manual Temp Basal can also be commanded.
"},{"location":"faqs/cgm-faqs/#dexcom-g7-warmup","title":"Dexcom G7 Warmup","text":"The Dexcom G7 begins warming up as soon as you insert the device and completes in less than half an hour. Many Loopers use the combination of this warmup upon insertion and the 12-hour grace period offered by the G7 to have continuous CGM readings with no gap.
After waiting for the sensor to settle, stop the old sensor and connect to the new sensor
When you change transmitters (prior to Dexcom G7), you will need to update the transmitter ID in your Loopsettings. The instructions for Dexcom are provided below:
Delete CGM
button at the very bottom of the CGM info pageNot Connected
and select Forget This Device
If you don't update your transmitter ID when you change active transmitters, and you included your Dexcom share credentials, then the Loop app uses your Dexcom Share server to get your CGM data and will not work without cell or wifi connection. When the Loop app is using data from Dexcom Share servers, a small cloud will appear above the BG reading in the Loop app and should tip you off that maybe you forgot to update your transmitter ID. It's best not to enter Share Credentials. This makes it really obvious that you need to update the CGM settings in the Loop app at transmitter change time.
"},{"location":"faqs/cgm-faqs/#dexcom-g7","title":"Dexcom G7","text":"With Dexcom G7, the Loop app automatically picks up the active sensor/transmitter pair from the Dexcom G7 app on the phone. Once Dexcom G7 is added to the Loop app as the CGM, the Looper does not need to do anything to the Loop app after selecting the new sensor/transmitter pair in the Dexcom G7 app.
"},{"location":"faqs/cgm-faqs/#dexcom-g5-g6-and-one","title":"Dexcom G5, G6 and ONE","text":"The diagram below illustrates the steps needed to switch transmitters on Dexcom G5, G6, and ONE (for the version of ONE based on G6). This typically needs to be done every three months when a new transmitter is started.
sequenceDiagram\n actor user as User\n participant dexcom as Dexcom App\n participant loop_app as Loop App\n\n autonumber\n user ->> loop_app: Delete CGM\n user ->> dexcom: Stop old Sensor\n activate dexcom\n Note over dexcom: Switching sensors and transmitters... \u23f1\ufe0f\n user -->> user: Remove old Sensor and old Transmitter\n user ->> dexcom: Enter/Scan new Transmitter ID\n user ->> dexcom: Enter/Scan new Sensor Code\n user -->> user: Insert new Sensor then attach new transmitter\n user ->> dexcom: Pair then Start new Sensor\n deactivate dexcom\n dexcom -->> user: New Sensor warming up... \n activate dexcom\n Note over dexcom: New sensor warmup... \u23f1\ufe0f\n user ->> loop_app: Add CGM\n user ->> loop_app: Enter new Transmitter Serial Number\n user ->> loop_app: Enable Remote Upload\n dexcom -->> user: New Sensor operational\n deactivate dexcom
"},{"location":"faqs/cgm-faqs/#can-i-use-libre-sensors-with-a-reader-like-miao-miao","title":"Can I use Libre sensors with a reader like Miao Miao?","text":"If you use Loop dev code, then any Libre sensor supported by LibreTransmitter can be used with the Loop app.
See Which CGMs are supported by the Loop app?.
"},{"location":"faqs/cgm-faqs/#can-i-use-eversense","title":"Can I use Eversense?","text":"There is a method to upload Eversense to Nightscout using an Android phone, but there is no method to read an Eversense directly with an iPhone at this time.
You can use Nightscout as a CGM with Eversense, but that requires internet access.
"},{"location":"faqs/cgm-faqs/#can-the-loop-app-read-cgm-data-from-nightscout","title":"Can the Loop app read CGM data from Nightscout?","text":"Yes.
"},{"location":"faqs/cgm-faqs/#what-other-cgm-apps-can-be-used-with-loop","title":"What other CGM apps can be used with Loop?","text":"If you are willing to build a development version of Loop, the dev branch incorporates LibreTransmitter into the Loop app itself. Please read about Loop Development before building dev and using the dev app.
You can add xDrip4iOS and GlucoseDirect as a CGM option to the Loop app by applying a code customization.
Please read the docs for xDrip4iOS and Glucose Direct. You must build these apps yourself to Loop; you cannot use the TestFlight pre-built versions.
"},{"location":"faqs/glossary/","title":"Glossary","text":"Each item in the glossary is also a Tooltip. The word or phrase is repeated in parentheses to assist those using Google Translate.
When Google Translate is selected:
Actions\u00a0 (Actions): a custom application for the GitHub Actions platform that performs a complex but frequently repeated task; specifically used to build Loop from a browser
Activated\u00a0 (Activated): for Omnipod: time at which insulin was injected into pod and 2 beeps were heard
Anchor Links\u00a0 (Anchor Links): any header on a LoopDocs page can be used as a link, tap on the paragraph symbol at the end of the header to view the link in the URL
API_SECRET\u00a0 (API_SECRET): password (min 12 characters) needed to access Nightscout Site
API\u00a0 (API): Application Programming Interface
APN\u00a0 (APN): Apple Push Notification service, required for issuing remote command via Nightscout
App Group\u00a0 (App Group): a unique identifier that Apple users for a given app, yours has your TEAMID embedded in it, group.com.TEAMID.loopkit.LoopGroup
Automatic Bolus\u00a0 (Automatic Bolus): provide a fraction of the recommended insulin automatically with each updated CGM reading (default 40%)
BAGE\u00a0 (BAGE): pump battery age on Nightscout site
Big Sur\u00a0 (Big Sur): older version for operating system for Mac, macOS 11.x
BLE\u00a0 (BLE): Bluetooth low energy, used for communication by phones, CGM and some pumps
Build Select Script\u00a0 (Build Select Script): by running a command in your terminal, this menu-driven tool assists in building Loop
branch\u00a0 (branch): version of code within a single repository or workspace repository
CAGE\u00a0 (CAGE): cannula (or pump site) age on Nightscout site
carthage\u00a0 (carthage): a program that used to be required to build Loop - no longer needed
Catalina\u00a0 (Catalina): older version for operating system for Mac, macOS 10.x
Certificate\u00a0 (Certificate): Apple certificate is used to sign your iOS or Mac apps - tied to but different from your permanent Developer ID
CGM\u00a0 (CGM): continuous glucose monitor, wearable medical device that measures and reports glucose in interstitial fluid
Closed Loop\u00a0 (Closed Loop): Loop will make automated adjustments of insulin delivery using predictions based off user entries, settings, IOB and COB
Open Loop\u00a0 (Open Loop): Loop will not make automated adjustments of insulin delivery but predictions and recommendation features are available
clone\u00a0 (clone): create a copy of a repository on your computer including revision history and ability to update using git commands
COB\u00a0 (COB): Carbs on Board, affects automated insulin delivery: the g of carbohydrates that Loop expects to be absorbed and uses for glucose prediction
commit\u00a0 (commit): a formal change to files in a repository; each commit has an alphanumeric identifier (SHA-1)
Config Vars\u00a0 (Config Vars): configuration parameters for a Nightscout Site
Correction Factor\u00a0 (Correction Factor): how many points your blood sugar will drop for each unit of insulin; Loop calls this Insulin Sensitivity Factor (ISF)
Correction Range\u00a0 (Correction Range): Loop recommends changes to basal and / or bolus to bring glucose predictions into this range
CR\u00a0 (CR): Carb Ratio; how many grams of carbs are covered by one unit of rapid-acting insulin
Delivery Limits\u00a0 (Delivery Limits): max bolus and max basal rates allowed by your therapy settings
Developer Mode\u00a0 (Developer Mode): Extra security for iOS 16 and newer; this must be turned on to allow an app built from Xcode directly to the phone to run on a phone or watch
DIA\u00a0 (DIA): Duration of Insulin Action, the full time insulin is active including a long, low-level tail
DIY\u00a0 (DIY): Do it yourself, a common acronym for the open-source software community (and the maker community)
Dosing Strategy\u00a0 (Dosing Strategy): chosen method for increased insulin dosing: (1) High Temp Basal or (2) Automatic Bolus with scheduled basal
dynos\u00a0 (dynos): used to reboot a Nightscout Site
EmaLink\u00a0 (EmaLink): radio-frequency device Loop uses to control Eros pods (aka. Gen 3) and older Medtronic pumps
EGP\u00a0 (EGP): Endogenous Glucose Production: glucose produced by the body from its reserves (mainly glycogen in the liver)
Event History\u00a0 (Event History): record of pump events (bolus or temp basal) reported and used by Loop
Expiration Date\u00a0 (Expiration Date): your Loop app has a finite life, the app warns you starting 3 weeks before the expiration date
fastlane\u00a0 (fastlane): used as part of the github Build Action method that enables building Loop without a Mac computer or Xcode
Finder\u00a0 (Finder): graphical folder and file display on Mac
fork\u00a0 (fork): a copy of code in a github repository other than the original
GBPA\u00a0 (GBPA): Glucose Based Partial Application: modification to Automatic Bolus Dosing Strategy
GIF\u00a0 (GIF): Graphics Interchange Format (GIF) can be used for small animations and low-resolution video clips
git\u00a0 (git): a tool for version control
GitHub\u00a0 (GitHub): an online service for storing repositories, accessible from a browser
github.com\u00a0 (github.com): an online service for storing repositories, accessible from a browser
GitHub Personal Access Token\u00a0 (GitHub Personal Access Token): used to enable Browser Build of Loop
Glucose Chart\u00a0 (Glucose Chart): Display of measured and predicted glucose values
Glucose Safety Limit\u00a0 (Glucose Safety Limit): Loop will not suggest insulin delivery when glucose prediction (in next 3 hours) goes below this limit; in Loop 2 this was called Suspend Threshold
GMT\u00a0 (GMT): Greenwich Mean Time is mean (average) solar time at 0 degrees longitude, see UTC
Guardrails\u00a0 (Guardrails): limits in the code for user selected settings, recommended and absolute limits are provided
Hamburger Menu\u00a0 (Hamburger Menu): three parallel lines that, when tapped, open a new menu
HUD\u00a0 (HUD): Heads-Up Display at top of Loop main screen, phone in portrait mode
ICE\u00a0 (ICE): Insulin Counteraction Effect - Loop models the expected glucose change based on carbs entered, absorption time and your settings; and adjusts based on measured glucose
Identifiers\u00a0 (Identifiers): names of modules found on your Apple Developer Identifiers page that are required for GitHub build method
IOB\u00a0 (IOB): Insulin on Board, affects automated insulin delivery: the current active insulin (above or below the basal rate) that Loop calculates and uses for glucose prediction
iOS\u00a0 (iOS): operating system used by Apple Mobile devices (iPhone, iPod, iPad)
IRC\u00a0 (IRC): Integral Retrospective Correction: Optional alternative to Retrospective Correction that integrates glucose deviations over a longer time frame
ISF\u00a0 (ISF): Insulin Sensitivity Factor; how many points your blood sugar will drop for each unit of insulin; sometimes called Correction Factor
Issue\u00a0 (Issue): On github - a formal method to report a problem, either code behavior or documentation
JSON\u00a0 (JSON): JavaScript Object Notation; a standard data interchange format that is text-based and human readable
macOS\u00a0 (macOS): operating system for Mac computer
Lock your Phone\u00a0 (Lock your Phone): click the button on the side of the phone to lock it - prevent accidental touch, i.e., accidental Loop command
Loop 3\u00a0 (Loop 3): Latest release with major updates
Loop Cycle\u00a0 (Loop Cycle): typically 5 minutes: new CGM reading, prediction update, pump update and, if in Closed Loop, dosing update if needed
Loop Caregiver\u00a0 (Loop Caregiver): An app you can build to provide remote commands to Loop
using Nightscout
Loop Follow\u00a0 (Loop Follow): An app you can build to provide extra alarms and views of important information - can use Dexcom Share or Nightscout
to include Loop
information
Loop\u00a0 (Loop): With a capital L, Loop is one of several do-it-yourself artifical pancreas systems
Match-Secrets\u00a0 (Match-Secrets): a private repository you must create in your github account, stores keys required to build with github Build Actions
MTB\u00a0 (MTB): Manual Temp Basal: user initiated temporary basal, Omnipod Common feature
MDT\u00a0 (MDT): common abbreviation for Medtronic pumps
modal\u00a0 (modal): message or alert appearing in front of app that must be acknowledged to return to app
Modules\u00a0 (Modules): the Loop code uses a number of modules to handle different components of the entire app
Monterey\u00a0 (Monterey): operating system for Mac, macOS 12.x
Nightscout\u00a0 (Nightscout): a personal website used to view your glucose and diabetes management data, Loop
can upload to Nightscout
Onboarding\u00a0 (Onboarding): familiarize new, and existing, Loop users with settings in Loop 3 and ensure the Therapy Settings are all entered and are within safety guardrails
Omnipod\u00a0 (Omnipod): Insulet tubeless insulin pump; Loop supports Eros (with RileyLink) and DASH. Eros is also known as Classic, UST400, and System.
OrangeLink\u00a0 (OrangeLink): radio-frequency device Loop uses to control Eros pods (aka. Gen 3) and older Medtronic pumps
OTP\u00a0 (OTP): one-time password, this is used to enable caregivers to securely execute remote commands to a Looper's phone
Override\u00a0 (Override): a modification to Loop settings that can change the correction range, the sensitivity (basal, ISF and CR) or both
Package Dependencies\u00a0 (Package Dependencies): packages that must be downloaded by Xcode (once) to build the app after downloading the LoopWorkspace to your computer
pill\u00a0 (pill): on Nightscout, small boxes with information, tap for extra details
PR\u00a0 (PR): Pull Request - a formal method to request changes to a repository
prebolus\u00a0 (prebolus): take some or all of a meal bolus before eating
Pre-Meal Range\u00a0 (Pre-Meal Range): modify the correction range for up to one hour by tapping on an icon in the toolbar
Provisioning Profile\u00a0 (Provisioning Profile): associates your app with your Developer ID and limits app lifetime to 1 year (paid) or 1 week (free)
Pull Request\u00a0 (Pull Request): formal method to request changes to a repository
QR\u00a0 (QR): a machine-readable code consisting of an array of black and white squares
Quit the Loop App\u00a0 (Quit the Loop App): quit out of the app - different from closing the app - typically you swipe up in the app switcher
repository\u00a0 (repository): contains project files and each file's revision history
RileyLink\u00a0 (RileyLink): radio-frequency device Loop uses to control Eros pods (aka. Gen 3) and older Medtronic pumps
RC\u00a0 (RC): Retrospective Correction: part of the Loop model that considers actual glucose compared to earlier predictions
SAGE\u00a0 (SAGE): sensor age on Nightscout site
Secrets\u00a0 (Secrets): a method to securely embed personal information into your fork of LoopWorkspace to enable GitHub to have access required to build Loop
TEAMID\u00a0 (TEAMID): One of 6 Secrets: Apple Developer account member number
FASTLANE_ISSUER_ID\u00a0 (FASTLANE_ISSUER_ID): One of 6 Secrets: the issuer ID is associated with your Apple Developer ID and never changes
FASTLANE_KEY_ID\u00a0 (FASTLANE_KEY_ID): One of 6 Secrets: Key ID provided when you create an API key in App Store Connect; it is associated with the FASTLANE_KEY
FASTLANE_KEY\u00a0 (FASTLANE_KEY): One of 6 Secrets: Really long key (several lines); it and FASTLANE_KEY_ID are generated together
GH_PAT\u00a0 (GH_PAT): One of 6 Secrets: Generated with your GitHub account; set it to never expire
MATCH_PASSWORD\u00a0 (MATCH_PASSWORD): One of 6 Secrets: password you make up but must save and cannot change without deleting the Match-Secrets repository
SHA-1\u00a0 (SHA-1): Secure Hash Algorithm 1; used to generate an alphanumeric code for commits in git (github)
Sign Targets\u00a0 (Sign Targets): associate a Developer ID with an app; must sign all targets for a given app
submodules\u00a0 (submodules): for Loop, submodules are repositories defined in the Workspace repository that are required to build the app
Table of Contents\u00a0 (Table of Contents): (TOC) is the list of level 2 and 3 headers on a given page; the title at the top of the page is a level 1 header
Temp Basal Only\u00a0 (Temp Basal Only): provide the recommended insulin automatically using an increase in temp basal over half an hour (limited by max temp basal)
Temp Basal\u00a0 (Temp Basal): modify the scheduled basal rate for a pump
Terminal\u00a0 (Terminal): interface for entering commands to the computer
TestFlight\u00a0 (TestFlight): a method to distribute apps without direct connection
Therapy Settings\u00a0 (Therapy Settings): Basal Rates, ISF, CR, correction and safety ranges and delivery limits
Tokens\u00a0 (Tokens): on Nightscout, configure access permissions using tokens
Tooltip\u00a0 (Tooltip): brief definitions provided for important terms and abbreviations on the website
URL\u00a0 (URL): website address (Uniform Resource Locator)
UTC\u00a0 (UTC): Coordinated Universal Time is a time standard for civil time and time zones worldwide
Ventura\u00a0 (Ventura): operating system for Mac, macOS 13.x
watchOS\u00a0 (watchOS): Apple watch operating system; must be compatible with phone iOS
workflow\u00a0 (workflow): a set of instructions to GitHub to perform an action; the instruction files are found in the .github/workflows folder of the repository
Workspace\u00a0 (Workspace): a grouping of several repositories into a complete package
Xcode Preferences\u00a0 (Xcode Preferences): older name for Xcode Settings
Xcode Settings\u00a0 (Xcode Settings): as of Xcode 14, Xcode menu uses Settings instead of Preferences
Xcode\u00a0 (Xcode): program used to build an app
"},{"location":"faqs/loop-faqs/","title":"Loop FAQs","text":""},{"location":"faqs/loop-faqs/#what-do-i-need-to-loop","title":"What do I need to Loop?","text":"Please click on the Requirements link.
"},{"location":"faqs/loop-faqs/#can-i-download-the-loop-app-from-the-app-store","title":"Can I download the Loop app from the App store?","text":"No. The Loop app is not available for download. You must build your own Loop app. The Loop app app will not be available in the Apple App store because that would be distribution of a medical device, and we are not in that \"business\". You can build yourself, but we are not distributors.
Each step needed to successfully build your Loop app is found in these docs. The harder part will be having the patience to read all the documents before you start. New Loop users are so excited to get started that they often skip reading all the great info that these docs contain. As you begin the build...please include time to read the documents that follow what happens after you successfully build your Loop app.
If you have any questions, use the Search feature to find topics in LoopDocs.
"},{"location":"faqs/loop-faqs/#can-i-use-an-android-phone-or-ipad-for-loop","title":"Can I use an android phone or iPad for Loop?","text":"Loop requires an Apple device. Older iPads do not support Apple Health which is required for Loop. It may be possible with newer iPads and newer iOS, but this has not been tested.
There is open source software that runs on Android phones. Check out AndroidAPS Documention.
"},{"location":"faqs/loop-faqs/#do-i-have-to-be-tech-smart-to-build-loop","title":"Do I have to be \"tech-smart\" to build Loop?","text":"No. You do not need any experience in code or computers to build Loop. If you already own a computer or tablet and an iPhone, you already have the required level of experience. Beyond that, simply read the directions slowly and diligently...all the information you will need are in these documents.
Often times the non-tech people do better than the tech people in building Loop. Why? Because the non-tech people take the time to read slowly and look at the screenshots in the directions. The tech people often skim and miss steps...which then leads to build errors that have to be retraced and fixed.
"},{"location":"faqs/loop-faqs/#is-there-a-cheat-sheet-for-a-school-nurse-to-use","title":"Is there a cheat sheet for a school nurse to use?","text":"Sure, you can give this one a try. School nurse's cheat sheet download
"},{"location":"faqs/loop-faqs/#how-long-does-it-take-to-build-loop","title":"How long does it take to build Loop?","text":"The answer is varied, but a few hours from start to finish, depending on where you are starting and how comfortable you are with your computer.
Start at the Requirements Overview to decide which build method you wish to use. Each method starts with an overview page.
Once you choose your method, you can break the required steps into shorter bits of effort.
Yes, there are some costs, beyond the obvious costs of owning a pump and CGM.
There are no other costs, ongoing or initial, to use the Loop app beyond what you already pay for your CGM, pump supplies and insulin.
"},{"location":"faqs/loop-faqs/#rileylink-options","title":"RileyLink Options","text":"This is not required for DASH users.
There are several options for RileyLink Compatible Devices at this time. They typically cost around $150. This is a one-time cost and the devices should last for years (unless it goes swimming, goes through the wash, gets run over by a car, etc.). It's fine to buy one device and make sure you want to Loop, but if you can afford it, go on and get two or get two different kinds. Once you Loop, you'll want a backup.
Many used devices are available in the community. You may find posts for resale on this Facebook Group Looping in a time of covid. This is a private FB group where you must agree to the rules.
Posts offering to buy or sell items in the support FB groups like The Looped Group, Loop and Learn or Little Loopers will be immediately taken down, or you will be directed to the appropriate location and comments will be turned off. FB can shut down groups without warning if they detect sales and the support groups are too important to risk.
"},{"location":"faqs/loop-faqs/#free-developer-account-options","title":"Free Developer Account Options","text":"The Apple Developer License can be done for free, however, you will have to rebuild your Loop app every 7 days and you must use a computer with Xcode, Build with Mac. That could get very tedious. The $99 annual Apple Developer program enrollment is an excellent investment.
"},{"location":"faqs/loop-faqs/#do-i-need-to-own-my-own-apple-computer","title":"Do I need to own my own Apple computer?","text":"You no longer need to own an Apple computer - see Build with Browser.
If you chose Build with Mac, then you still don't have to own an Apple computer, but you do need to at least borrow one - or you can build using a virtual Mac if you have a PC with Intel chips (see next section).
If you are borrowing an Apple computer, look at the required minimum settings associated with your iPhone Compatible Computer and Xcode Version. It would be really good to have the longer-term ability to borrow that computer again for updating Loop later when needed.
"},{"location":"faqs/loop-faqs/#can-i-use-a-pc-or-windows-computer-to-build","title":"Can I use a PC or Windows computer to build?","text":"You can build the Loop app using just a browser on any device: Build with Browser.
If you want to use Build with Mac, there is a hacked way of installing macOS on a Windows computer called a Virtual Machine. This link provides some helpful information. This Virtual Machine method will not work on PCs that have AMD processors, only Intel. Double-check that your computer uses an Intel processor before attempting the virtual machine method. If you want to try this, there are mentors on The Looped Facebook Group who can assist.
"},{"location":"faqs/loop-faqs/#how-often-do-i-need-to-get-on-the-computer-for-loop","title":"How often do I need to get on the computer for Loop?","text":"When you use the Browser Build method, you need to access a browser at least once every 90 days to Update with Browser. This is simple enough to do that you can do the steps on your phone in just a few minutes. Several people are already working on automated methods so that won't be required, but a manual Build Actions step is required for now.
When you use Build with Mac: the short answer is (1) when you first build and (2) once per year minimum after that. (If you decide to use a free Apple Developer Account, you will need to get on the computer every 7 days.)
Loop code is updated periodically to include new features and bug fixes. When those updates are released, you'll need access to a browser or an Apple computer again to update your Loop app.
Loop updates are not available through the iPhone's app store...instead you do the app update yourself
In general, there are updates to the Loop app released a few times a year - these can occur more frequently after a major release.
"},{"location":"faqs/loop-faqs/#will-i-need-to-build-a-new-loop-app-if-i-switch-between-medtronic-and-omnipod","title":"Will I need to build a new Loop app if I switch between Medtronic and Omnipod?","text":"No. The Loop app lets you move between different pump types from within the same Loop app. See Change Pump Type.
"},{"location":"faqs/loop-faqs/#can-i-use-my-apple-developer-account-to-build-for-others","title":"Can I use my Apple Developer account to build for others?","text":"If there is more than one Looper in the family, you only need to have one Apple Developer ID and only one annual payment. The developer must be an adult.
With the Build with Browser method, you just add each Looper to your TestFlight test group and they get updates whenever you Build a new version on GitHub.
With the Build with Mac method, you just plug into your computer each phone on which you want to build the Loop app. (New Xcode and newer iOS phones allow you to build across WiFi after the initial connection with Xcode.)
It's a good idea to let someone else in the family know how to build and have access to your Apple password (and for Browser Build, your GitHub password) in case you're out of town. It's also a good idea to build the Loop app on a backup phone especially for travel.
The Apple Developer ID and the Apple ID are two different things. PLEASE read this: Loopers Need Their Own Apple ID.
"},{"location":"faqs/loop-faqs/#what-happens-when-i-switch-apple-developer-id","title":"What happens when I switch Apple Developer ID?","text":"The Loop app on the phone is different if the build uses a different Apple Developer ID from the one currently on the phone. So if the Apple Developer ID used for a new Loop build is different from the one used for the existing Loop app, there will be two Loop apps on the phone. The Looper will have to on-board the new app, enter all the settings again and delete the old app.
"},{"location":"faqs/loop-faqs/#can-i-use-someone-elses-apple-developer-account","title":"Can I use someone else's Apple Developer account?","text":"It's best that you build your own Loop app using your own Apple Developer ID.
One developer account can only be \"linked\" to a limited number of devices. So one person \"loaning out\" their developer license to a lot of people will quickly exceed the number of allowed devices. In those cases, that person will be told they need to revoke the certificates on some devices (essentially dropping old ones to make room for new ones). If they revoke your device certificate (and they can do that without you knowing through their developer portal), your Loop app will immediately stop working and not even open.
Your Loop app will also die immediately if their developer account is not renewed or expires.
Moral of the story, out of all the ways to save money...borrowing someone's developer account is not a good place to save money. You don't want your Loop app to suddenly stop working.
"},{"location":"faqs/loop-faqs/#how-can-i-find-a-compatible-pump-supplies","title":"How can I find a compatible pump? supplies?","text":"You can use Omnipod DASH and Eros pumps with the Loop app. You do not need the Omnipod Personal Diabetes Manager (PDM), just the pod supplies. Your insurance or pharmacy coverage may cover some of the cost. See Which pods work with the Loop app? for more details.
There is a whole page with detailed information about Medtronic pumps; how to find them, how to find supplies, and assessing whether your Medtronic pump is compatible. Please check out that page for more info.
Some Looping equipment can be found on this Facebook Group Looping in a time of covid. This is a private FB group where you must agree to the rules.
"},{"location":"faqs/loop-faqs/#can-i-pay-someone-else-to-do-build-the-app-for-me","title":"Can I pay someone else to do build the app for me?","text":"We do not know whether someone who builds the app for you incurs legal responsibility if something goes wrong while you are using a version they built for you.
There are a few companies that provide the Loop app as a service.
Best Practice: Learn to Build
You are strongly encouraged to build the Loop app for yourself.
For Medtronic users, you simply go back to old school pump use until you get a new RileyLink compatible device. You can either let your temp basal finish by itself (30 minutes or less) or cancel the temp basal on the pump's menu. For bolusing, you'd go back to using the pump's bolus commands. When you get a device (either finding your old one or getting your backup device out) and the Loop app running again, you'll want to do one thing. Enter in any carbs to the Loop app that you may have eaten in the recent past that could still be affecting blood glucose. While the Loop app will read whatever insulin deliveries had happened while the RileyLink compatible device was missing, it will not read any carbs you entered into the pump...so make sure to add those to the Loop app and backdate them to the time they were eaten. That will help make the transition back to closed loop smoother.
For Pod users, your Pod will finish any currently running temporary basal rate (maximum of 30 minutes) and then revert back to your scheduled basal rate. Without a RileyLink compatible device, you will be receiving normal basals, but will need to pull out pens/syringe for boluses. If you have a backup device, you can simply connect to the new device on the same Loop app and it will work with the existing pod session. If you don't have a backup device, you'll have to remove the pod and start a new pod paired with your PDM until you get a new device.
"},{"location":"faqs/loop-faqs/#what-if-i-lose-or-get-a-new-iphone","title":"What if I lose or get a new iPhone?","text":"If you lose your phone - follow the same dosing protocol as if you lost your rileylink.
When you get a new iPhone, you can plan ahead. There's a whole FAQs page about transferring your Loop information to a new phone. New Phone.
"},{"location":"faqs/loop-faqs/#what-about-other-pumps-when-will-they-loop","title":"What about other pumps? When will they Loop?","text":"Hey now...let's be grateful for what we have first. The ability to use the Loop app is the result of tremendous amounts of effort, time, and sacrifice by volunteers. Cracking the pumps for the Loop app use is a large undertaking. If and when another set of people spend a large amount of time figuring out other pumps, then they could conceivably be added to Loop. But you don't need to let us know that you'd love to see more pumps compatible with Loop. There is just an awful lot of work that needs to happen and it is neither quick nor easy.
Yes, this is technically possible. You can have multiple Loop apps built onto the same iPhone. However, having multiple Loop apps on a single phone may lead to unexpected conflicts that can negatively affect your Loop's ability to stay green (keep looping). Additionally, your Pod will only work on one Loop app at a time anyways. So for smooth looping, just keep one Loop app on any phone for looping use.
"},{"location":"faqs/loop-faqs/#will-i-be-able-to-the-loop-app-on-a-plane-or-in-the-mountains","title":"Will I be able to the Loop app on a plane? Or in the mountains?","text":"Yes. The Loop app does not require internet or cell coverage to work. So long as the Loop user has Bluetooth enabled on the iPhone, then the CGM and DASH pod (or RileyLink for Eros or Medtronic pumps) will still be able to do their work with the Loop app and your pump/Pod.
One exception - if you've chosen to use a CGM source that does require the internet, you will need to have cell or internet coverage. This ability is provided as a service to folks who cannot get their CGM data any other way. It is also a convenience for people testing the code.
"},{"location":"faqs/loop-faqs/#what-happened-to-freeaps","title":"What happened to FreeAPS?","text":"FreeAPS hasn't really had an owner to develop it for several years, but many depended on it. Because of that, the Loop and Learn team kept it on life-support. It was updated in early 2023 to include DASH, but that was the last improvement. It is strongly recommended people switch to Loop 3
or iAPS
. Do not use an application without an owner.
Many features people used with FreeAPS are now included in Loop 3
or can be added with customization. The dev
branch has Libre support, see Build Loop Dev.
The addition of customizations has been simplified.
Please do not blindly apply customizations. First read the documentation provided at the links above carefully.
"},{"location":"faqs/new-phone/","title":"New Phone Tips","text":""},{"location":"faqs/new-phone/#overview","title":"Overview","text":"Time Estimate
At least a few hours.
You can choose to keep Looping on the old phone and swap later. Most vendors give you more than a week to turn in your old device for credit.
Phone Transition Overview - Detailed steps below
Don't start right before a meal:
Keep your old phone (if you can, connected to WiFi) and use it for the Loop app:
Two methods to transfer your phone information (plan for 1 hour, may be faster):
What happens after you transfer your phone information:
When ready to start using the new phone to control your app:
Plan to stay in Open Loop until all Glucose, Insulin and Carbohydrate Apple Health records transfer:
Plan Ahead
Changing phones means you have to rebuild the Loop app onto the new phone. When you transfer information from your old phone to your new one, all your\u00a0Loop\u00a0information is included and the\u00a0Loop\u00a0icon will appear, but the app will not open until you install\u00a0Loop\u00a0from either TestFlight or Mac with Xcode.
The records on the new phone are from the time you started the transfer from the old phone to the new phone. The more recent records are transferred via Apple Health. You may want to adjust carbs after the transfer because those are not read by the Loop app. But if you enter them again and you are uploading to Nightscout or Tidepool - they will show up twice. Best to have COB and IOB close to zero when you start using your new phone.
Some people don't have access to their old phone. There are instructions for handling that on this page. It makes the whole process more stressful, but remember, pods continue to deliver basal rate and Medtronic pumps can be controlled on the pump itself. Use your backup plan until you can get\u00a0Loop\u00a0running on a new phone.
"},{"location":"faqs/new-phone/#forced-ios-update","title":"Forced iOS Update","text":"When you change phones, Apple will force you to the latest iOS version available for your new phone.
"},{"location":"faqs/new-phone/#prepare-before-upgrade","title":"Prepare Before Upgrade","text":"If you are using Dexcom, record the transmitter or sensor number in case it doesn't transfer
If you still have your old phone, you can prepare before switching to the new phone.
If you don't have your old phone, hopefully you have an iCloud backup and can use that to transfer your information to your new phone.
Keep the Old Phone Until the Loop app is Working on the New One
Even if you plan to turn your old phone in for a rebate, you can ask to keep the old one for a week or two. Most vendors will agree to this.
Update your old phone to the latest iOS the hardware supports - this simplifies the automatic transfer process Apple provides to move all your data and apps from your old phone to your new phone.
New Phone Checklist for Build with Browser
New Phone Checklist for Build with Mac
Different Developer ID
If you need to build the Loop app with a different developer ID on the new phone, the settings and pump information will not transfer.
If you cannot keep the old phone, or it is not available, then skip ahead to the Use the New Phone.
It is easier if you transfer information from the old phone to the new phone before you install and open\u00a0Loop\u00a0on the new phone. If this is not possible, then you will do the normal Onboarding for a new\u00a0Loop\u00a0app.
Closed Loop
.Closed Loop
disabled until you complete the full transfer and checkout.Preparatory steps:
When building:
If you have trouble finding the new phone in Xcode or trouble building, you should try to reboot phone, watch, quit Xcode, restart computer, delete old provisioning profiles and then ask for help
"},{"location":"faqs/new-phone/#prepare-to-change-phone-used-for-the-loop-app","title":"Prepare to Change Phone used for the Loop App","text":"On old phone (if available):
Bluetooth must be off on the old phone.
It is now time to transfer the CGM to the new phone.
The Dexcom app might have transferred successfully, but it\u2019s not a bad idea to install that fresh from the App Store on the new phone. Doing so may be required.
On the new phone, open the Dexcom app and pair to the transmitter (G5, G6 or One) or enter the four-digit code for G7
Wait for Dexcom to connect
Placeholder for\u00a0Libre CGM instructions. Suggested procedures from the community are encouraged.
Stay in Open Loop (closed loop disabled) until you complete the full transfer and checkout.
Check Every Setting
Do a manual bolus of the smallest possible amount to make sure\u00a0Loop\u00a0and pump are working.
Monitor CGM values to ensure new readings are coming in.
Check Glucose, Insulin and Carbohydrate records
Apple Health\u00a0History
Your Glucose, IOB and COB may not have correct history on your new phone.
Loop\u00a0 reads from\u00a0Apple Health\u00a0and will restore Glucose and Insulin records if health is stored on iCloud and synchronized between old and new phone - but this can take a long time to synchronize
The Loop app does not read Carbohydrates from Apple Health, so stay Open Loop if you have high COB from an entry on the old phone
Be prepared to spend 3 to 6 hours in Open Loop.
Once you are happy with the configuration of\u00a0Loop\u00a0on your new phone, your glucose is being read and your COB and IOB on the new phone is valid, then you can restore Closed Loop.
Once you are using\u00a0Loop\u00a0on your new phone, you can delete the pump from the old phone.
You can either keep the Old Phone as a backup, reset it and turn it in for credit or give it to some deserving individual.
"},{"location":"faqs/omnipod-faqs/","title":"Omnipod FAQs","text":""},{"location":"faqs/omnipod-faqs/#which-pods-work-with-the-loop-app","title":"Which pods work with the Loop app?","text":"You can use DASH and Eros Omnipod pods with the Loop app. You cannot use Omnipod 5 pods.
You do not need the Omnipod Personal Diabetes Manager (PDM), just the pod supplies. Your insurance or pharmacy coverage may cover some of the cost.
Alternative Names for Omnipod Pods
All three types of pods can be packaged five to a box, don't let the 5-pack indication confuse you.
Eros pods are also known as Classic or UST400
DASH pods have DASH in the name
Omnipod 5 pods have 5 in the name
DASH pumps communicate with the phone via Bluetooth so they do not require a RileyLink compatible device.
"},{"location":"faqs/omnipod-faqs/#what-about-tidepool-loop","title":"What about Tidepool Loop?","text":"Tidepool Loop was approved by the FDA in Jan 2023, but at the current time, there are no announced pump or CGM partners. What does this mean?
Tidepool Loop, cleared by the FDA, is the first:
With this approval, there is now an FDA-approved pathway for independent selection of an app, a pump, and a CGM. Stay tuned for updates at https://tidepool.org/tidepool-loop.
"},{"location":"faqs/omnipod-faqs/#do-i-still-need-a-pdm-with-omnipod-loop","title":"Do I still need a PDM with Omnipod Loop?","text":"No, pods are monogamous little creatures. They will pair with only one device at a time for safety reasons...so a pod is either paired with a PDM or your Loop app on your iPhone. In other words, your PDM can stay in the diabetes closet while you are Looping. You cannot use the PDM for a pod that has been activated with the Loop app. That doesn't mean you should get rid of your PDM if you have one. Instead, keep it for backup situations if you lose your phone. See below for what to do if you lose your phone or RileyLink.
"},{"location":"faqs/omnipod-faqs/#can-i-cancel-a-bolus","title":"Can I cancel a bolus?","text":"Yes, you can cancel a bolus in progress. In fact, because it is very easy to cancel, make sure your phone is locked prior to being put away to avoid inadvertently cancelling a bolus. (This behavior is very similar to the Insulet PDM - which also needs to be locked once a bolus has started.)
As soon as a bolus is initiated, look at your phone in portrait orientation. You will see a bolus message indicating the progress of the bolus. This message is highlighted with a red rectangle in the graphic below. If you tap on this part of the display, the bolus is immediately cancelled.
Bolused
is based on the time since the bolus was startedWith Loop 3, disabling the setting for Closed-Loop immediately restores the basal rate on the pump to the scheduled basal rate, which effectively cancels the temp basal.
You can tap on disable Closed-Loop and then immediately tap on enable Closed-Loop if all you want to do is cancel the current temp basal. If you do restore Closed-Loop, then Loop will resume automatic insulin delivery adjustments within 5 minutes.
Bolus in progress
Even if a bolus is in progress, you can still switch to Open-Loop and restore scheduled basal. The current bolus continues unless you separately cancel the bolus.
"},{"location":"faqs/omnipod-faqs/#cancel-temp-basal-with-loop-v22x","title":"Cancel Temp Basal with Loop v2.2.x","text":"If you are running Loop v2.2.x, the method for canceling a temp basal is to suspend the pump and then resume delivery. This also interrupts any bolus that might be in progress.
Be sure to follow the suspend with the resume command. Otherwise, all insulin delivery is stopped and remains stopped until the user either clicks on the \"Tap to Resume\" command from the main screen or the \"resume delivery\" command accessed in the pump settings display. The resume insulin delivery command returns insulin delivery to your scheduled basal rate.
If a bolus was interrupted, the bolus will not resume.
As long as you are in closed-loop mode, the Loop app will resume automatic insulin delivery adjustments within 5 minutes.
"},{"location":"faqs/omnipod-faqs/#can-i-set-my-own-temp-basal-on-loop","title":"Can I set my own temp basal on Loop?","text":"With version 3, the Loop app provides a Manual Temp Basal feature.
"},{"location":"faqs/omnipod-faqs/#what-if-i-lose-my-phone-or-rileylink","title":"What if I lose my phone or RileyLink?","text":"For pod users, your pod will finish any currently running temporary basal rate and then revert back to your scheduled basal rate. Without a phone or RileyLink, however, you will not be able to affect any pod use; no basal change, suspend, cancel, or bolus. To do anything other than let basals continue, you will need to take action depending on the situation.
Lost RileyLink only: You can replace your missing RileyLink with one from your backup supplies. No problem to switch out to a different Rileylink mid-pod session. If you don't have a backup RileyLink to use, then you will need to remove the pod and put on a new pod paired with your PDM until you can get a new RileyLink. In the interim, you are still getting basal from the pod. If you are taking bolus insulin via injection, just add it to Apple Health under insulin. The Loop app will read it and keep making predictions for you. Once you inject, then add the carbs that go with that injection into Loop.
Lost iPhone only: You will need to remove the pod and put on a new pod paired with your PDM or a backup phone (with a copy of the Loop app on it). You cannot use the old pod with a new device. In the interim, the pod will continue to deliver your scheduled basal until the pod reaches 80 hours. See New Phone for more information.
Lost both RileyLink and phone: You're having a really bad day. You'll need a hug and to follow the same directions as if you lost the phone as shown in the bullet above.
There is more communication between the pod and the controller (your Loop phone) than is typical with the PDM (Insulet provided controller). This increases the load on the pod battery. Most people have no increase in pod failures, but there are steps to take to limit \"extra pod battery use\". Every time the Loop app requests an update of the pod state or issues a command (bolus, basal schedule, temp basal), messages are exchanged with the pod.
If you get a pod that is failing to pair, please see this page for steps on how to fix the problem. Follow these steps before filling and trying another pod. If the pod is not screaming, you can probably recover it.
"},{"location":"faqs/omnipod-faqs/#what-do-you-do-to-stop-a-screaming-pod","title":"What do you do to stop a screaming pod?","text":"Screaming pods indicate the pod is out of insulin or out of time (80 hours) or there has been a critical pod fault. In all these cases, there is no more delivery of insulin.
The first step is to use your phone to Deactivate
the pod. You may need to go to the pod settings and tap on the Replace Pod row or the app may take you to the screen with a Deactivate button directly. This only works if the app is able to communicate with the pod. Sometimes this is not possible. After you attempt to deactivate two times, the app will \"discard\" the pod as active if communication fails and enable you to pair a new pod. But you still need to make that noise go away.
If you are not successful at deactivating a pod and you've tried the steps at Reset-Loop-to-Pump-Communications, make sure the old pod is removed from the area before trying to connect a new pod. (Placing it in a microwave temporarily prevents the phone from detecting that pod.) The paperclip trick (next paragraph) only breaks the sound connection, the pod electronics is still active.
Once you have removed the screaming pod, it can be silenced using a paperclip. Simply put the paperclip in the small hole that is on the bottom (the side opposite where the cannula is) of the pod as shown. Push the paperclip in until you hear a little click, that click is breaking the circuit that connects the speaker to the electronics.
"},{"location":"faqs/overview-faqs/","title":"FAQs Overview","text":""},{"location":"faqs/overview-faqs/#frequently-asked-questions-faqs-overview","title":"Frequently Asked Questions (FAQs) Overview","text":"The FAQs tab of LoopDocs contains pages with safety tips, frequently asked questions and the Glossary.
Map to this section:
A RileyLink compatible device is required to use the Loop app with Medtronic pumps or Omnipod Eros pods.
A rileylink is not required with DASH pods.
The device uses the RileyLink protocol to communicate information to/from your pump by radio communications and to/from your iPhone using Bluetooth. You will need the device within range of your phone and pump so that these communications can happen. Put it in a purse, pocket, SPIbelt. Clip it to a backpack, belt, or bra...but please do bring it with you..
Purchase information for these devices is found in RileyLink Compatible Devices
"},{"location":"faqs/rileylink-faqs/#adding-or-changing-rileylink","title":"Adding or Changing RileyLink","text":"You can add or change the RileyLink compatible device in use without affecting the pump that is connected to the Loop app. You can even have more than one connected, although only one will be used at a time.
If you are connecting to a new Medtronic pump or switching between Medtronic and Omnipod, please follow the Modify Pump instructions under Set up App.
Change Connected Devices:
You can have more than one RileyLink compatible device turned on and connected. Loop only uses one device at a time. Remember - if you do have two devices in use, make sure they are both charged (or have batteries).
Example of using more than one device:
All the RileyLink compatible devices communicate with the pump through radio frequency communications and with the phone through Bluetooth.
Bluetooth (BT) Troubleshooting
If your iPhone has BT issues, your Loop will have failures. There have been reports of BT audio devices (such as BT pairings in your car or home audio BT speakers) interfering with the Loop. If you are finding Loop failures frequently happening at a particular location, you may try to troubleshoot if there are BT problems in the area.
Your BT signal strength can be seen in the Loop settings, Pump settings, Device menu, on the Signal Strength
line. As you move closer and further away from your phone, you can watch that number dynamically change. This line is not displaying the signal strength of your pump RF communications, just BT between the RileyLink compatible device and the phone.
You will notice the Signal Strength is a negative number and in units of dB. Remember that number line from elementary school? A signal strength of -50\u00a0dB is a stronger signal than -80\u00a0dB.
"},{"location":"faqs/rileylink-faqs/#range","title":"Range","text":"The range at which RileyLink compatible devices will function is dependent on the environment that you are in and the specific device design. Both the OrangeLink and some sizes of the EmaLink have reported longer ranges than RileyLink (typically 10 to 20 ft) - but they still need to be \"near enough\".
What influences this distance for a given device? The biggest external influences are (1) body-blocking and (2) \"noisy\" environments. The human body is a lot of water, and water is an excellent blocker of wireless communication. So, sleeping on a pod and smothering it entirely with your body can decrease the ability of the device to communicate with the pod. Environments with a high concentration of wireless signals can also interfere with device communications and make closer proximity a benefit. Where might those kinds of situations happen? Concerts, conferences, and sporting arenas are pretty prone to interference.
Many people keep their device on the same side of their body as their pump during the day. They use a pocket, carabiner, lanyard, SPIbelt - the options are endless. What you don't want to do is put it in a blocking bag that has RFID blocking (some travel fanny packs have that).
"},{"location":"faqs/rileylink-faqs/#what-happens-if-loop-loses-communication","title":"What happens if Loop loses communication?","text":"While you are out of the communication range for your RileyLink compatible device(s), any running temp basal will keep going until it finishes (the longest temp basal that Loop sets are for 30 minutes duration...so within 30 minutes or less your pump would go back to your regularly scheduled basal). When you come back into range of your device, Loop will pick back up within 5-10 minutes without you needing to do anything.
"},{"location":"faqs/rileylink-faqs/#are-these-devices-waterproof","title":"Are these devices waterproof?","text":"The electronics are not waterproof but there are waterproof cases available and some have wireless charging available. Check with the manufacturer.
RileyLink Compatible Device Information
"},{"location":"faqs/rileylink-faqs/#firmware-version","title":"Firmware version","text":"In Loop settings, tap on your pump, find your device (RileyLink or other) and tap on that menu. The figure below shows firmware specific to the RileyLink. If you have another type of device, the firmware value reported will be different. (Note - the displays for Ema, Orange and Riley have been updated to include device-specific features as shown in the RileyLink Display page. The graphic below shows the original RileyLink display.)
With RileyLink, the firmware displayed should match or be a higher version number than what is shown in the figure above, e.g., subg_rfspy 2.2/ble_rfspy 2.0
. (If you are running with a very old RileyLink from pre-Aug 2018, it might be a lower number.) Check it when the device is working well and make a note of what it says. If you're having Red Loops, you might want to check firmware and connected state. Make sure, after power cycling your device, that the correct firmware is displayed AND that there are two items shown.
subg_rfspy 2.2
is the sub-gigahertz radio frequency firmware that talks to the insulin pump (if this does not show up, the device will talk to the phone but not the pump)ble_rfspy 2.0
is the Bluetooth firmware that talks to the phone (if this is not working, you will not even see the device in the list)HINT: You might need to quit the Loop app. (Don't just close it, actually quit.) Then do the power cycle on the RileyLink compatible device to attempt to have both sets of firmware boot up. When you restart the Loop app, it may show the correct firmware. Don't give up after one failure, try several times.
If several power cycles do not make the correct firmware show up, contact the manufacturer for assistance.
"},{"location":"faqs/rileylink-faqs/#orangelink-firmware","title":"OrangeLink Firmware","text":"The OrangeLink devices allow the user to update the firmware on the device using an app on the phone itself (available for iPhone 7 and later devices).
A number of OrangeLink Pro devices were shipped with FW2.6 and for people who already had OrangeLink devices, a version of FW2.6 was offered for download. However, this firmware did not work well with Loop (or AndroidAPS).
Firmware/Hardware Labeling
Earlier versions of the OrangeLink firmware did not put the hardware (HW) version and the firmware version (FW) in the \"correct\" location to hand off to Loop for interpretation. Do not worry if you are running on any FW version 1.x or 2.x and your HW version number doesn't say 1.0 or 1.1. This has been fixed for FW versions 3.x.
"},{"location":"faqs/rileylink-faqs/#emalink-and-orangelink-features","title":"EmaLink and OrangeLink Features","text":"Some of the features of the OrangeLink were added to the RileyLink Display with Loop 2.2.x. However, as mentioned above, the FW and HW information in some OrangeLink firmware was inconsistent in earlier versions. The consequence is that the OrangeLink Pro screen does not show the Find Device feature that many people want to use with the versions of firmware that provide good communication with Loop. The patch listed below fixes this issue.
The EmaLink features were not added with Loop 2.2.x. The patch listed below adds some EmaLink features.
"},{"location":"faqs/rileylink-faqs/#emalink-and-orangelink-patch","title":"EmaLink and OrangeLink Patch","text":"A patch was developed to update the RileyLink screen of the Loop app that detects the OrangeLink hardware for all versions of the OrangeLink firmware and adds the battery level reporting and notification to the EmaLink screen. Click on the link below. There are detailed instructions on how to use this patch for Loop 2.2.x.
Since the RileyLink version of the communication link device has been around the longest, some additional information about that device has been added to LoopDocs throughout the years. The rest of this page is specific just to the RileyLink device.
"},{"location":"faqs/rileylink-faqs/#rileylink-assembly","title":"RileyLink Assembly","text":"Your RileyLink will come with the Lithium-ion Polymer (LiPo) battery disconnected and the parts not already inside the case. It will be up to you to put the RileyLink in the case and attach the battery.
Make sure the LiPo battery is well-plugged into the connection. Line up the little ridge appropriately, and push fairly firmly to get the connection tight. Poor battery cable connection can make the Loop communications fail. See photos below, for example.
Common new user errors
The most common two errors for new RileyLink owners are (1) not fully pushing in the LiPo battery cable connection and (2) failing to charge the RileyLink. Compare your LiPo battery cable with the photos; it takes a bit of oomph to push that plug fully in like the photos shown below. Remember to charge your RileyLink each night.
Loose battery cable on left. Proper battery cable on right
Finally, the board and the battery fit into the slim case fairly tightly as well. Click on the image below to watch a helpful assembly video.
"},{"location":"faqs/rileylink-faqs/#rileylink-lights","title":"RileyLink Lights","text":"The RileyLink has several lights that you may notice from time to time. There is no 'power' light. If you suspect that your RileyLink is not being powered, try turning it off and on using the small sliding switch. You should see lights in the middle of the board flash when you do this. If they flash, that means the board has power.
Red light: Charging light. The red light will remain on while RileyLink is charging, and it will turn off when charging is complete. You may notice the red light turn on periodically even after charging is complete...it's just \"topping off\".
Green light: Bluetooth connection light. The green light will remain on while you have a BT connection with your iPhone. If that green light fails to stay on, you should troubleshoot your BT connections. Try restarting BT on your iPhone and/or turning the RileyLink off/on by its power switch.
Blue light: Pump communications. If you have an older firmware on your RileyLink, some of the blue lights will flash periodically as it communicates with the pump. It's just letting you know that it is busy talking and collecting info. You will also see increased blue flashes if you have \"Enabled Diagnostic LEDs\" for Medtronic users that have the RileyLinks with updated firmware (shipping since late August 2018).
A solid blue light that consistently remains lit on the board could mean one of two things:
A temporary issue that can be resolved by rebooting the RileyLink physically (turning the switch off/on), or
An electrical short or damage to the board. Sweat and moisture are most likely culprits, so try to keep case free from those environments. Don't keep RileyLink in sports bras or waistband next to skin, for example, while exercising.
If your blue light remains on despite trying a restart, it is time to pull out your backup RileyLink.
"},{"location":"faqs/rileylink-faqs/#rileylink-charging","title":"RileyLink Charging","text":"The battery that comes with RileyLink is not charged completely when it is shipped, so be sure to charge it up before initial use. RileyLink takes about 2 hours to fully charge (the red light will turn off when fully charged, read note above about red light patterns) and should easily last at least a full day of constant Loop use. Typically, it can go into the 30-hour range without any problems. Most people charge their RileyLink each night when they are sleeping. You don't have to worry about leaving the RileyLink plugged in \"too long\" for charging. It will automatically stop charging the battery when it is fully charged.
Since the best practice is to charge your RileyLink overnight while you sleep, and the battery lasts safely over 24 hours, there is no battery level indicator for the RileyLink. The RileyLink's charge level is not viewable on Nightscout, nor within the Loop app. If you forget to charge your RileyLink overnight, you can recharge it with a portable USB battery in a pinch. A short mini-USB cable could be a good addition to a small gear bag.
"},{"location":"faqs/rileylink-faqs/#what-are-the-differences-between-the-rileylink-medtronic-and-omnipod-antennas","title":"What are the differences between the RileyLink Medtronic and Omnipod Antennas?","text":"There are two types of antennas for RileyLinks; each antenna is optimized for the pump you are using. Otherwise they are identical. See RileyLink Compatible Devices for other devices. The OrangeLink has both antennas included in its design and can talk to either Medtronic or Omnipod. The EmaLink requires selection for type of pump.
The color of the RileyLink circuit board in the photos below is irrelevant.
"},{"location":"faqs/rileylink-faqs/#what-will-happen-if-your-rileylink-has-the-wrong-antenna","title":"What will happen if your RileyLink has the wrong antenna?","text":"You can technically use that RileyLink with either pump on Loop. But, you will have significant frustrations and probably a lot of red loops. With mismatched antenna/pump, the device needs to be very close (think inches) and in clear line-of-sight to pump/pod. This makes everyday living (and sleeping) a bit hard. If you use the appropriate-antenna-for-your-pump device, the distances the pump/pod and RileyLink can tolerate from each other is much more \"real world\" friendly and stable. The OrangeLink contains both antennas so will work with either pump. This may be a good choice if you like to switch between Medtronic and Omnipod.
In a pinch, if you have a RileyLink that you used with a Medtronic pump and have switched to Omnipod, it might work as a backup, but you won't love it.
"},{"location":"faqs/rileylink-faqs/#how-long-will-my-rileylink-go-between-charging","title":"How long will my RileyLink go between charging?","text":"RileyLinks can go about 30-36 hours on a single charge. There is no way to see the remaining charge level, so most people just get into the habit of charging overnight while they sleep. The actual time to fully recharge is about 1 or 2 hours; you'll know it is fully charged when the red light turns off. After a full charge, the red light will turn off and then periodically turn on for short times while it \"tops off\" while still on a charger.
"},{"location":"faqs/rileylink-faqs/#how-can-i-tell-how-much-charge-my-rileylink-has","title":"How can I tell how much charge my RileyLink has?","text":"You can't. There is no charge level indicator. Just charge it nightly, and you won't have a problem. Full battery charge should last about 30-36 hours depending on battery health. Charging takes less than 2 hours.
"},{"location":"faqs/rileylink-faqs/#how-long-will-my-rileylink-battery-last","title":"How long will my RileyLink battery last?","text":"Eventually, Lithium-ion Polymer (LiPo) batteries will lose charging capacity. You would want to replace if you notice the battery not lasting the full day. Many people report using their battery for more than 2 years without issue.
Be aware that if a battery is failing, it may swell. If you notice that the RileyLink battery is swollen, remove the swollen battery from your home and place in a fire-safe area and recycle it properly. Either order a new battery or pull out your spare.
After a year of use (and a year of being dropped), the antenna may no longer be securely soldered. If you are getting a lot of red loops, it might be a poor antenna connection instead of a failing battery. Check the solder joint at the antenna. The solder should be shiny and the antenna base should be firmly attached to the board.
"},{"location":"faqs/rileylink-faqs/#rileylink-battery","title":"RileyLink Battery","text":"Keep your RileyLink and its Lithium-ion Polymer (LiPo) battery protected from damage. LiPo batteries are unsafe when damaged or punctured, so the case is an important part of safe Looping. If your battery is damaged in some way, please disconnect it immediately, and dispose of it (it should be recycled). You can order new RileyLink batteries on the GetRileyLink website
"},{"location":"faqs/rileylink-faqs/#rileylink-battery-removal","title":"RileyLink Battery Removal","text":"To remove the LiPo battery from the RileyLink, please do so slowly and patiently. Work the battery connection side to side slowly to loosen it from the plug. Some people have reported success using small, curved needle-nose pliers such as hemostats. Others have used small flathead screwdrivers as shown in this video.
"},{"location":"faqs/safety-faqs/","title":"Safety Tips","text":""},{"location":"faqs/safety-faqs/#know-your-settings","title":"Know your settings","text":"Do not enter settings that you are unsure of. For example, if you haven't any idea what your carb ratio is, please don't enter a wild guess. Instead, test your settings and talk to your health care provider about what your appropriate settings should be.
"},{"location":"faqs/safety-faqs/#ios-focus-notifications","title":"iOS Focus Notifications","text":"iPhones have Focus modes to enable maximum flexibility for notifications. These modes must be configured by each user to allow important notifications from your diabetes apps.
Set up every Focus mode you use to allow glucose alerts or you will not get them.
Critical notifications, for example, urgent low from Dexcom, are enabled regardless of your Focus settings. But regular low and high glucose notifications might be suppressed. Open source apps, like the Loop app, can only be allowed to notify during a Focus mode when configured by the user.
Under iOS Settings, select Focus, then choose the Focus mode you want to adjust.
The graphic below has numbered highlights to follow along for configuring Sleep focus initially:
The little clock icon indicates that time-sensitive notifications are enabled. The other icons represent the apps you added to have permission to notify you when in this Focus mode.
Be sure to do this for every Focus mode you use.
"},{"location":"faqs/safety-faqs/#understand-the-app-displays","title":"Understand the App Displays","text":"If you do not understand the components displayed in the graphic below, please spend time reviewing the information at Displays.
"},{"location":"faqs/safety-faqs/#carb-entry-and-insulin-delivery","title":"Carb Entry and Insulin Delivery","text":"If you configured the app with closed-loop enabled:
If you entered carbs and then changed your mind on the amount or the time at which they were eaten, use these instructions to delete or edit them. This will make\u00a0Loop\u00a0better able to predict blood glucose and adjust insulin delivery appropriately.
"},{"location":"faqs/safety-faqs/#how-to-cancel-a-bolus","title":"How to Cancel a Bolus","text":"Once a bolus starts, the progress of that bolus appears in the HUD Status Row. Note that the phone must be held in portrait mode to see this. Simply tap on the row that shows the delivery to halt the bolus.
"},{"location":"faqs/safety-faqs/#understand-delivery-limits","title":"Understand Delivery Limits","text":"With each cycle, Loop\u00a0generates a glucose prediction and a recommended dose (positive or negative) to bring you to your correction range.
For more information, please read How do Delivery Limits Affect Automatic Dosing?.
"},{"location":"faqs/safety-faqs/#health-app-permissions","title":"Health app permissions","text":"For older versions of\u00a0Loop, or if you customized\u00a0Loop 3\u00a0to read carbohydrates from third-party apps, be aware that you cannot edit those entries inside the\u00a0Loop\u00a0app.
If you let other apps, such as MyFitnessPal, write carbohydrates to the Health app, Loop\u00a0could read those carbohydrates and you could be dosed for those carbohydrates.
Users often reach out if the glucose prediction shown on the Loop app screen is very low - negative even.
It is pretty common for new users to think a 10% override setting should behave similarly to a 10% temporary basal rate setting on a manual pump. This is not true.
Read this section on the override page for information: Avoid Extreme Insulin Needs Setting
"},{"location":"faqs/safety-faqs/#scenario-2-entry-error-into-apple-health","title":"Scenario 2: Entry Error into Apple Health","text":"With version 3 of the Loop app, it is no longer necessary to enter glucose or insulin manually into the Apple Health app for the Loop app to read. There are methods within the Loop app for entering a fingerstick value or non-pump insulin.
However, some people are used to entering information into Apple Health directly - and it still works. The Loop app will read entries from Apple Health. But if you do this:
A recent user entered a fingerstick value into the insulin record in Apple Health. They use mmol/L glucose units, so it wasn't as obvious as it would have been for someone using mg/dL. At any rate, they could not figure out why their child had such a high IOB and were afraid the pump had delivered 10 U of insulin! Once they deleted the incorrect entry from Apple Health, the Loop app was able to make the appropriate prediction.
"},{"location":"faqs/safety-faqs/#beware-the-medtronic-easy-bolus-button","title":"Beware the Medtronic Easy Bolus button","text":"Medtronic's easy bolus button has been the cause of several accidental boluses when the pump has been carried in a pocket. Best practice would be to disable the Easy Bolus button since you will be doing boluses from the phone anyways.
"},{"location":"faqs/safety-faqs/#finish-your-medtronic-priming","title":"Finish your Medtronic priming","text":"After a site change and reservoir rewind, Medtronic's pump will have a menu on the pump screen related to finishing your prime. Make sure you complete that screen and always return to the main menu. Medtronic's pump won't resume basal insulin delivery until that priming screen is completed.
"},{"location":"faqs/time-faqs/","title":"Time FAQs","text":""},{"location":"faqs/time-faqs/#the-loop-phone-must-be-on-automatic-time","title":"The Loop Phone Must be on Automatic Time","text":"The Loop Phone is a Medical Device
There have been several instances where a Looper disabled automatic time to change the time on their Loop phone.
As of January 2023, this change in time is detected and the Loop app stops all automatic dosing of insulin other than your scheduled basal rates and begins to aggressively warn the user.
One scenario should be enough to convince you not to do this:
You can configure the iPhone to only allow automatic time.
The ability to use anything other than automatic time is disabled as long as that iOS setting has a passcode. Parents can use this for children. Adults can use this too in case they need a reminder not to change the time - you must first disable the passcode.
This does not affect automatic time zone changes, those are handled by the phone without need for interaction.
"},{"location":"faqs/time-faqs/#remove-future-glucose","title":"Remove Future Glucose","text":"If you have future glucose from a manual time change or just entering something into Apple Health with the wrong timestamp:
The Loop app is very aggressive at warning you if you make this mistake. you will get a notification - even when you are in a different app. The graphic below shows the alert when you next view the Loop app after turning off automatic time and changing the time. Even if you respond right away, you may have at least one glucose reading in the future when you see this alert. Please Remove Future Glucose.
The rest of this page is about changing time zones.
This is safe because the Loop app keeps track of records internally using UTC.
"},{"location":"faqs/time-faqs/#time-zones-daylight-savings-time-summer-time","title":"Time Zones, Daylight Savings Time, Summer Time","text":"The Loop app operates across time zones and time changes. The phone that is running the Loop app will automatically update the time, but you choose when to modify the time zone for \"pump time\".
What Therapy Settings are set by \"pump time\"?
Time Change comments:
Medtronic Users
Do not use the Medtronic pump menus to change your pump's time when Looping.
"},{"location":"faqs/time-faqs/#iphone","title":"iPhone","text":"The Loop app will warn you if your phone does not have time configured to automatically update. The configuration is under iOS Settings -> General -> Time & Date.
Do not ever adjust the time manually on your Looping phone to \"defeat\" time-based rules for a game. Your phone with the Loop app is now a critical medical device - make sure anyone who uses your phone understands this.
"},{"location":"faqs/time-faqs/#minimed-pump-and-cgm","title":"Minimed Pump and CGM","text":"The Minimed pump doesn't expose a universal clock, instead it exposes the components of a date (YMDHIS). It has no concept of political time zones, and just continues to increment its components on schedule. Therefore, the Loop app assumes that the pump's date, until changed, remains at a fixed offset from UTC.
That offset is stored by the Loop app the first time the pump ID is changed, and every time the pump's time is changed using the \"Change Time Zone\" command.
"},{"location":"faqs/time-faqs/#dexcom-cgm","title":"Dexcom CGM","text":"No particular input is needed on your part for the Loop app to work with Dexcom CGM data. All times use UTC. However for Dexcom receiver users, at time changes you may want to manually change your receiver's time setting just so the time visually appears correct when you are viewing the screen.
"},{"location":"faqs/time-faqs/#airports","title":"Airports","text":"RileyLinks, pumps and CGM have no problem going through any of the airport security systems. You can carry it with you in the airplane cabin and it can go through the x-ray scanner that your carry-on bags go through.
"},{"location":"faqs/time-faqs/#airplane-mode","title":"Airplane Mode","text":"Nothing wrong with airplane mode, but many people forget about it at the time they travel. So, you can do this simple preparation step now:
Turn airplane mode on. Then make sure your Bluetooth is still slid \u201con\u201d. If Bluetooth isn\u2019t on, then go slide it on again. Now go ahead and turn airplane mode off again.
Why did we just do that? Because in older versions of iOS, airplane mode turned off Bluetooth the first time you ever use it. New iOS don't do that, but worth checking.
But, if you remember to turn Bluetooth back on while in airplane mode, two things happen (1) your CGM and the Loop app will work while in airplane and (2) airplane mode will \u201cremember\u201d the next time that you like Bluetooth left on in airplane mode and will not turn it off the next time you slide airplane mode on. So now you\u2019ve just prevented yourself from forgetting to turn Bluetooth on the next time you fly and are in a hurry to meet your lovely seat mate and stow your luggage. You can safely follow cabin instructions and put phone in airplane mode without losing access to the Loop app or CGM.
"},{"location":"faqs/update-faqs/","title":"Update/Rebuild Loop FAQs","text":""},{"location":"faqs/update-faqs/#overview","title":"Overview","text":"First, please take a minute to understand what the words mean.
Update the Loop App is the process of building a new version of code, updated from that already on your phone
Rebuild the Loop App is the process of building the same version of code, identical to that already on your phone
In both cases, you build the code to install over an existing app on your phone or onto a new device.
Check Apple Developer Account
If you have an updated agreement, be sure to accept it before you update or rebuild.
Apple Program License Agreement
If you have a very slow download speed or if you do a lot of customizations, it may be worth your time to decide if you need a new download.
LoopKit/Loop releases
There's a whole page devoted to just this topic: New Phone
"},{"location":"faqs/update-faqs/#when-should-i-update","title":"When Should I Update?","text":"Updating the Loop app is the same idea as what happens to your other apps on your iPhone when you update them from the App Store on the phone. A newer version of the same app appears on the phone, simply updating-in-place the same the Loop app you were using with an updated version.
Regardless of the build method, always check your Apple Developer Account status.
Apple updates its License Agreement for the Developer Program frequently. You need to log in to your developer account to manually check if there is a new agreement to accept. If you see a big red or orange banner across the top of your Developer Account announcing a new license agreement like shown below...please read and accept it before building Loop.
"},{"location":"faqs/update-faqs/#updates-with-the-browser-build-method","title":"Updates with the Browser build method:","text":"Go to Update/Rebuild with Browser and follow the instructions.
"},{"location":"faqs/update-faqs/#updates-with-the-build-with-mac-method","title":"Updates with the build with Mac method:","text":"ALWAYS start with the Update/Rebuild with Mac before any new build with Mac. That page is important because it will offer information on the updates you may need for your Mac and Xcode before building.
Do not simply build with your old downloaded folder from months ago. There is a high likelihood that your original code from awhile ago is outdated and might not build with the current phone iOS. Grab new code and you will get the compatible version that has all the latest and greatest features and bug fixes.
"},{"location":"faqs/update-faqs/#will-i-have-to-delete-my-old-loop-app","title":"Will I have to delete my old Loop app?","text":"No. Do not delete your old Loop app. In fact, that is a bad idea as you will lose your currently paired pod and/or settings if you do that. So, don't delete.
No. The Loop app is simply updated in-place, written right over the old version.
The only exception to this is if you update/build using a different developer signing team than your current Loop app.
Yes. That's why we don't delete the app. Your settings will be saved so long as you use the same developer ID.
"},{"location":"faqs/update-faqs/#will-my-pod-still-work-when-i-update","title":"Will my pod still work when I update?","text":"Yes. So long as you use the same developer ID as you originally built the app with before.
"},{"location":"faqs/update-faqs/#how-can-i-confirm-what-version-was-installed","title":"How can I confirm what version was installed?","text":"The Loop app version is given at the top of the Loop settings page.
There is more detailed information about how the Loop app was built at the top of the Issue Report as shown in the graphic in the next section.
"},{"location":"faqs/update-faqs/#when-will-my-app-expire","title":"When will my app expire?","text":"The information in the graphic below shows the Build Details included at the very beginning of a Loop Report (Loop, Setting, Support, Issue Report
).
Up through version 3.2.3, the Browser Build versions do not report the correct date in the Expiration Alert. The date reported is correct with Mac Build or later versions using the Broswer Build.
runner
in the * sourceRoot
line in the graphic above* buildDateString
, that is approximately when the app expires* profileExpiration
line in the Build Details* sourceRoot
line will be recognizable as where on your computer the download is locatedDoes not matter. Changing the branch and even the fork is an update action. Nothing about the information above changes with the following exception.
The exception to the rule is if you build Loop 3
on your phone and want to return to Loop 2.2.x
or any FreeAPS fork
.
Loop 3
and Loop 2.2.x
Loop 3
can read the data stored by Loop 2.2.x
, but the reverse is not trueLoop 3
to FreeAPS
, you need to first record settings, delete the old app and then build the desired app, enter your settings and add your pump (new pod required for Omnipod)Assuming your macOS and Xcode updates are done, then plan on about 30 minutes for a Mac build. The Browser build steps are very fast, but then you need to wait about an hour for the build to complete and appear in TestFlight.
"},{"location":"gh-actions/automatic/","title":"Automatic Update & Build","text":""},{"location":"gh-actions/automatic/#overview","title":"Overview","text":"After the next release of the Loop app (version 3.4.0), this page will be required for all versions when building with a browser.
Before that release, this page is only relevant when building the dev
branch with a browser and only when the dev
branch is the default branch.
For someone using development code for their own use, they probably want to decide when to update their fork
to the most recent commit. They can still have the advantage of automatic building without automatic updates. There may be other configurations someone would choose. These options are added to Loop 3.3.0 (dev
branch) and later.
You can affect the default behavior:
You can modify the automation by creating and using some variables.
To configure the automated build more granularly involves creating up to two environment variables: SCHEDULED_BUILD
and/or SCHEDULED_SYNC
. See How to configure a variable.
Note that the weekly and monthly Build Loop
actions will continue, but the actions are modified if one or more of these variables is set to false. A successful Action Log will still appear, even if no automatic activity happens.
SCHEDULED_SYNC
to false and either do not create SCHEDULED_BUILD
or set it to trueSCHEDULED_BUILD
to false and either do not create SCHEDULED_SYNC
or set it to trueSCHEDULED _SYNC
SCHEDULED _BUILD
Automatic Actions true
(or NA) true
(or NA) keep-alive, weekly update check (auto update/build), monthly build with auto update true
(or NA) false
keep-alive, weekly update check with auto update, only builds if update detected false
true
(or NA) keep-alive, monthly build, no auto update false
false
no automatic activity, no keep-alive"},{"location":"gh-actions/automatic/#how-to-configure-a-variable","title":"How to configure a variable","text":"Secrets and Variables
.Actions
Variables
tabNew repository variable
button (upper right)SCHEDULED_BUILD
in the \"Name\" fieldfalse
in the \"Value\" fieldAdd variable
button to save.New repository variable
button (upper right)SCHEDULED_SYNC
in the \"Name\" fieldfalse
in the \"Value\" fieldAdd variable
button to saveYour build will run on the following conditions:
alive
branch if necessaryfalse
), no updates, keep-alive or building happens when Build Loop
runsSCHEDULED_SYNC
set tofalse
), it will only run once a month, on the first of the month, no update will happen; keep-alive will runSCHEDULED_BUILD
set tofalse
), it will run once weekly, every Wednesday, to check for changes; if there are changes, it will update and build; keep-alive will runTo enable the scheduled build and sync, the GH_PAT
must hold the workflow
permission scopes. This permission serves as the enabler for automatic and scheduled builds with browser build. To disable this, follow these steps:
repo
, workflow
next to the FastLane Access Token
link, then automatic building is enabledworkflow
boxrepo
boxUpdate token
buttonrepo
permissionIf you choose not to have automatic building enabled, be sure the GH_PAT
has repo
scope or you won't be able to manually build.
What if I decide I don't want the automatic building feature?
If you are using the released version of Loop, please leave automatic building running
If you are taking a break from Loop and want to stop monthly Build emails, consider disabling actions for the Build Loop
action for your app.
If you are done with Loop, you can delete the whole repository; but you should be sure about this because you'll need to start over with Configure to Use Browser to restore ability to build Loop with GitHub.
This page is only relevant when building the dev
branch with a browser.
For Mac, please see: Build Loop dev
with Mac
No matter the method used to build Loop-dev, you are testing development code. Please read this link now before continuing.
dev
branchFor Experienced Builders
Building the development (dev
branch) is not typically used for your first attempt at building the Loop app.
The instructions on this page assume you are familiar with building the Loop app using a browser as detailed on Configure to use Browser
dev branch
You can build any desired branch (available at LoopKit/LoopWorkspace) using the GitHub Browser build method. This section is suitable if you have already built either dev
or main branch using the GitHub First-Time instructions.
The graphics on this page show the dev
branch. If you want a different branch, just substitute that branch name for dev
.
Overview of what you will do
LoopWorkspace fork
must have the branch
you wantdev
- you must get the dev
branch from LoopKit4. Build Loop
and then click on the Run Workflow
dropdown, you must select dev
there before clicking the green Run workflow
button - see Build Branch
Branch
","text":"Your LoopWorkspace fork
is at https://github.com/username/LoopWorkspace
where you substitute your actual GitHub username
. You need to be logged into GitHub. Review the graphic below as you go through the steps.
branch
icon to display the branches
as shown in the lower half of the graphic below:branch
you want is not listed, then continue with Step 2Branch
New branch
button and follow the Add Branch
stepsBranch
","text":"Each step in the list below matches with the number in the graphic. In the top half of the graphic, the left side shows the initial display and the right side shows the display after making the indicated selections:
dev
Branch
name box labeled 3 in the graphic and type dev
fork
should always match the branch name you are adding; check that you type it correctlyBranch
","text":"Tap the Code
button (upper left) and ensure this branch in your fork
is up to date.
dev
branch)fork
button and then the Update branch buttonLook in this section for one-time changes for building dev
with a browser that require special, one-time actions.
If you have already completed the One-Time Changes, skip ahead to Build Branch
.
dev
","text":"When updating from\u00a0Loop\u00a03.2.x to dev
, you will need to take some extra steps.
You have a choice:
dev
, see Change Default Branch
and then your\u00a0Loop\u00a0app will be automatically updated and automatically built at least once a monthdev
branch in the drop-down menuHere is a summary of the extra steps; each step has an associated link. This assumes you have already updated your fork
and are at the correct branch.
repo, workflow
and to never expireNew Indentifier
Create Certificates
alive branch
","text":"What about the alive branch
alive branch
dev branch
and you have workflow
permission added to the scope
for your GitHub Personal Access Token
alive branch
and run the Create Certificates
againIdentifier
","text":"The bundle ID
for the \"widget
\" changed from \"SmallStatusWidget
\" to the more descriptive \"LoopWidgetExtension
\".
dev branch
App Group
to this one new IdentifierAll other identifiers should be already set up. If they are not, please go through the steps on the Configure to Use Browser page to figure out what you are missing.
NAME
IDENTIFIER
Loop Widget Extension
com.TEAMID.loopkit.Loop.LoopWidgetExtension
LoopWidgetExtension
\" identifiergroup.com.TEAMID.loopkit.LoopGroup
where you use your TEAMID
You must create certificates again to cover the new Identifier name and to provide support for the addition of the Libre sensors. (This step is required whether you use Libre or not - Loop needs permission to have that capability). Once the certificate action succeeds, then run the action to build Loop.
dev branch
Build Loop
(see Build Branch
)Branch
","text":"If you want a branch to be the one you build all the time, you may choose to Change Default Branch
. This is not necessary except for special cases.
If you have one branch as default, for example main, and choose to build a different branch, there is an extra step when you Build Loop
. Refer to step 4 in the graphic below. Use the branch dropdown menu to select the branch you want before hitting the green Run workflow button.
!!!
"},{"location":"gh-actions/build-dev-browser/#change-default-branch","title":"Change DefaultBranch
","text":"There can be several reasons why you would change your default branch.
These are the steps to modify the default branch.
For this example, we show how to change from a default branch of main
to a default branch of dev
. Note - only the owner of the repository can take this action and they must be logged in. Otherwise the Settings tab does not appear.
For the numbered steps below, refer to the graphic found under each group of steps.
Click on the Settings Icon near the top right of your LoopWorkspace
Default Branch
as shown in the graphicTo the right of the default branch name there is a pencil and a left-right arrow icon
Switch default branch to another branch
dialogmain
dev
Click on the Update
button
You will be presented with an are-you-sure question.
I understand, update the default branch.
buttonYour default branch has been changed.
"},{"location":"gh-actions/build-dev-browser/#automatic-update-build","title":"Automatic Update & Build","text":"The automatic update and build features of the development branch are only available if you set the dev
branch as your default branch. Be sure to read the Automatic Update & Build if you did this.
This page is only relevant when building with a browser.
For Mac, please see: Customize with Mac
For new Loopers, please build the code before you make any changes. Start with Open Loop and familiarize yourself with the interface. Later, you can make the customization(s) you desire and build again. The second build will be much easier than your first build.
These customizations require you to modify the code used to build the Loop app and then build the app again with the modified code.
You take responsibility
You are responsible when you decide to use customizations.
Be sure to report what changes you made if you need to ask for assistance with your app.
"},{"location":"gh-actions/custom-browser/#customizations-prepared-for-you","title":"Customizations Prepared for You","text":"Some customizations are the same for everyone and have been prepared for easy use.
The Loop and Learn team commits to maintaining these prepared customizations and provides an easy method to add your selection from these customizations to your version of Loop.
Please read the documentation for these on the Loop and Learn: Customization Select Page:
fork
of your LoopWorkspace
repository. There are several sections you need to review on the Loop and Learn page:main
dev
If you are using main
branch to build Loop 3.2.3
and rely on either xDrip4iOS or GlucoseDirect to read your CGM and transfer the readings to the Loop app, you need to review this section of the Loop and Learn customization page.
Alternatively, you can switch to the dev
branch, which already supports Libre. Build Loop dev with Browser
Some customizations must be created for yourself. These are of two basic types: Custom Edits and Build-Time Flag.
The information needed to modify the code to make these customizations is found in the Versions tab because the information is independent of build method (think of these as your personal versions). The links are found below.
When preparing these personal edits using a browser, there is a page explaining how to get these edits into your personal fork
of LoopWorkspace
prior to building.
The code changes required for these customizations are the same regardless of the build method. The pages that provide the documentation on modifying and incorporating these changes are found at the links above.
"},{"location":"gh-actions/edit-browser/","title":"Custom Edits with Browser","text":""},{"location":"gh-actions/edit-browser/#hot-topics","title":"Hot Topics","text":"Pro Tip
The method on this page allows you to create a set of personalized customizations that you can use in addition to the Loop and Learn: Prepared Customizations. You can use (and re-use) your customizations with either Browser Build or Mac builds so you don't have to repeat the customization with every update.
Modules vs Submodule
This page has instructions to set up your own fork
for the Modules, otherwise known as submodules, associated with\u00a0LoopWorkspace\u00a0that are needed for a selected customization.
Each Module has its own GitHub repository
;and you will be working with your fork
of that Module at https://github.com/username/Module, where username is your username.
What is a SHA-1?
SHA-1 means Secure Hash Algorithm 1; which is used to generate an alphanumeric code.
Each time you save a change to your\u00a0GitHub repository, a unique SHA-1 is created. That identifier is used to tell GitHub a specific change that you want applied or identifies a specific version for that repository
. These work for any compatible fork
from the original\u00a0GitHub repository.
Ignore\u00a0Compare & pull request\u00a0Prompts
Please do not click on boxes that GitHub might show you that ask if you want to Compare & pull request.
This would be an attempt to merge changes from your fork
back to the original version that everyone uses. These changes are for you only. Ignore those prompts.
Time Estimate
Summary
Fork
the Module (if needed) - this is your fork
where you will make changesSync
the Module (if needed)fork
where you will make changesFAQs
You do this using any browser on a computer or laptop. (Phone is not recommended - screen is too small.)
There is some background information at the bottom of this page starting at\u00a0LoopWorkspace\u00a0if you want to know what you are doing. Otherwise, just follow the steps like a cookbook.
"},{"location":"gh-actions/edit-browser/#decide-which-modules-you-want-to-modify","title":"Decide Which Modules You Want to Modify","text":"Decide which Version: Custom Edits changes you want to make. Each customization lists a Module name.
Look also at the Stable line for the desired customization:
Review Only
Review this section so you know what to expect. The actual steps will come later, starting with Create your Fork
for Selected Module or Edit Module in Browser.
In the next sections, the exact process for making changes will be documented. But the steps may feel confusing. There are no links here because you are supposed to review the steps before taking action in the next section.
fork
main
branch
for your fork
using the SHA-1 tablefork
Later, you will use information from your fork
to create your customizations. (Suggestion - use same file as your Secrets, or at least keep the customization file in the same folder). Details are found at the Prepare the Customizations section.
What should you do if you see the message:
There was an error committing your changes: File could not be edited
This is fairly rare, but it can happen. A user got this error when editing a file using GitHub:
The solution was to make sure the email address in their GitHub profile was correct. See GitHub Discussions for more information.
"},{"location":"gh-actions/edit-browser/#create-your-fork-for-selected-module","title":"Create yourFork
for Selected Module","text":"Choose your link:
Fork
: if you do not have a fork
of this ModuleFork
for Module: if you have a fork
but need guidance on whether it is the right fork
New Release
If you have previously used this process for a prior release, use the same Modules you already copied.
You can often reuse customizations that you created earlier even with a new release. Attempt to use your existing patches before creating new ones.
If a customization did not work, then
fork
of each ModuleSkip ahead to Personalized Customization for this Module.
"},{"location":"gh-actions/edit-browser/#new-fork","title":"NewFork
","text":"If you want a modification that uses a particular Module, you must make a fork
of that module to your account in GitHub. You will repeat the Fork
and Modify steps for each module.
fork
fork
will show up in the browserThis table lists all the modules referred to on the Code Customization page linked above:
ModuleFork
From Loop https://github.com/LoopKit/Loop LoopKit https://github.com/LoopKit/LoopKit OmniBLE (for DASH) https://github.com/LoopKit/OmniBLE OmniKit (for Eros) https://github.com/LoopKit/OmniKit Remember - you can only have a single fork
of a given\u00a0GitHub repository. If you already have a fork
, you don't need another one; but it must be a linked to the URL listed the Module Table.
I already have a fork
Go to Existing Fork
for Module and follow the directions.
When you\u00a0\"fork a repository\", the default\u00a0branch\u00a0is the one that should be forked
.
branch
if needed","text":"dev
branch, regardless of the Stable notation, there is no need to create a special branch
, simply update the default branch to the latest (sync it) and use the current version of the customization when you skip ahead to Personalized Customization for this Modulemain
and dev
and you want to build the main
branch, you need to create a branch for this Module that is consistent with the version you wish to customize.Open your browser to your https://github.com/username/Module URL. If you already created the branch
you need, you do not need to create a new one.
If you are customizing a released version, use the Table of SHA-1 under your version number below. Copy the SHA-1 for your Module so you can paste it into the URL in Step 2 below. Notice the suggested branch name for that table. You will use this in Step 3.3 below.
You should create a branch
following the numbered steps and watching the GIF. Each Frame in the GIF corresponds to a numbered step below.
/tree/SHA-1
where you change SHA-1 to be the value in the table below and hit returnbranch
iconbranch
name in the blank spacebranch
buttonThis will be updated with each release. The versions for the dev
branch are not reported here because they are frequently updated. If customizing dev, use the default branch for each Module and sync
that branch if needed.
Suggested branch
name is v-3.2.3
Repository
SHA-1 LoopWorkspace
81a3d9b03305a4b2a844bd6bac14a14f27626fef Loop
c6b058b4276681600979aaeba518c635f06ac135 LoopKit
9835a29f1bac9f75023f39c376479a2e6a6c8ccd OmniBLE
f21360781c0b8eee26c531d20f1b0aa192a227f2 OmniKit
c1e0d395975c93d15b3f84ac21097e40b7d5d93f"},{"location":"gh-actions/edit-browser/#personalized-customization-for-this-module","title":"Personalized Customization for this Module","text":"Navigate to the file you need to modify (using the instructions to find the lines from the Version: Custom Edit page)
Pro Tip
Look at the files you want to change - if more than one change is desired for a single file - do them at the same time.
This section provides the steps to make a single customization for the Module. If you need more than one, just repeat the process and make additional\u00a0\"\"patch\" branches.
"},{"location":"gh-actions/edit-browser/#example-gif","title":"Example GIF","text":"The GIF showing the creation of one customization is shown below. Please review the 4 frames of the GIF, read the detailed instructions below and then review the GIF again. In case you are concerned by the\u00a0\"Pull Request\u00a0shown here; this is to your own fork
, not back to the original.
You will be using the \"pencil\" tool in the browser display for your fork
.
Are there detailed instructions?
For more information about editing with GitHub:
The bullets below go with Frame 1 of the GIF above:
The bullets below go with Frame 2 of the GIF above:
fork
(this does not go back to the original)Between Frame 2 and 3 of the GIF, your display will look similar to the graphic below:
You see there an opportunity to\u00a0\"Compare & pull request\"
fork
back to the originalThe\u00a0branches\u00a0selection is highlighted with a brown rectangle in the graphic above.
Your screen should now look like Frame 3 of the GIF above:
Now your display should look like Frame 4 of the GIF above:
For example:
# OmniBLE: Increase insulin at insert by 0.35 U\nSHA-1 = 5e9f4f407ff5544663f496d2e3a5ed8aa4f32a68\n
Warning - that is not a valid SHA-1 for this change. Do not try to copy it and use it. You must make your own personalized changes.
Later on, you will create the actual command needed to insert into build_loop.yml so you can add this customization when your build the app.
Repeat this process until you've done all your customizations for this Module and then move on to the next Module.
"},{"location":"gh-actions/edit-browser/#prepare-the-customizations","title":"Prepare the Customizations","text":"Once you prepare the commands, then you will edit the build_loop.yml file of your fork
of\u00a0LoopWorkspace.
Ensure your fork
is from\u00a0LoopKit/LoopWorkspace
If your\u00a0LoopWorkspace fork\u00a0did not come from\u00a0LoopKit/LoopWorkspace, then delete your existing fork
and make a new one. See Already Have\u00a0LoopWorkspace?.
fork
For each customization you want to include, create a pair of lines consisting of the comment (must start with a #) followed by the\u00a0curl
\u00a0statement pointing to the SHA-1 that has the customization.
Save the customization lines in your text file for later use in the build_loop.yml file.
Customization Template:# Module: File: code customization description\ncurl https://github.com/username/Module/commit/SHA-1.patch | git apply -v --directory=Module\n
where:
curl
\u00a0means copy from URL.patch
\u00a0after the SHA-1 informs GitHub to format that code change so it can be applied to your fork
--directory=Module
\u00a0is critical to apply the customization to the correct ModuleTo view the exact code change associated with that patch, open a browser at the URL of\u00a0https://github.com/username/Module/commit/SHA-1
.
The final step is to update your\u00a0LoopWorkspace fork\u00a0to apply these customizations by adding those customization lines into the build_loop.yml file.
Return to your\u00a0GitHub fork for LoopWorkspace\u00a0and make sure to sync it if needed.
# Patch Fastlane Match to not print tables
# Customize Loop: Download and apply patches\n - name: Customize Loop\n run: |\n\n # For each patch, edit comment line (keep the #) then update curl (and remove the #)\n\n # Submodule Loop patches:\n # Loop: Filename: customization details\n #curl https://github.com/username/Loop/commit/SHA-1.patch | git apply -v --directory=Loop\n\n # Submodule LoopKit patches:\n # LoopKit: Filename: customization details\n #curl https://github.com/username/LoopKit/commit/SHA-1.patch | git apply -v --directory=LoopKit\n\n # Submodule xxxxx patches: Follow prototype above\n
"},{"location":"gh-actions/edit-browser/#add-personal-customizations-to-build_loopyml","title":"Add Personal Customizations to build_loop.yml","text":"Open the text file in which you saved the customization lines.
For a given submodule, paste the comment / curl command as indicated in the template above.
The indenting needs to match, so tab or (shift-tab) to line up the columns.
Once you are done with all the edits for build_loop.yml you will commit the changes to your fork
directly.
fork
as you wantWhen you are ready, it's time to build with your customizations.
"},{"location":"gh-actions/edit-browser/#build-with-customizations","title":"Build with Customizations","text":"At the top of the display, click on\u00a0Actions.
Wait about 2 minutes before walking away to make sure there are no errors. If you get an error, then look for the first \"did not apply\" error message and fix the customization right before that line.
In about 1 hour, your customized app will be available for installation on your phone via TestFlight.
"},{"location":"gh-actions/edit-browser/#customization-and-sha-1","title":"Customization and SHA-1","text":"When you commit your customization to your branch
of your fork
, there is a new SHA-1 associated with that step. The SHA-1 for a given branch, typically main
or dev
identifies to a mentor exactly which version of code you used for your build.
The SHA-1 for customized code will not be recognized by a developer or mentor. If you are having a problem and need to ask for help you need to identify what the SHA-1 was before you added your customizations.
If you are on main
branch and it is up-to-date, this is less of an issue. If you are on dev
branch, that can require some investigation.
The easy method is to provide a mentor with your GitHub username and they can figure out the base version you are using aside from customization. They can also identify the customizations you added.
"},{"location":"gh-actions/edit-browser/#identify-your-base-version","title":"Identify Your Base Version","text":"If you want to do this yourself, this section explains the steps.
Step 1: In your customized LoopWorkspace fork
: tap on Code
at upper left
fork
is behind the LoopKit
repository
, consider updating your fork
fork
will be ahead of the LoopKit
repository
main
branch in the graphic below - it is one commit
ahead of LoopKit
as indicated by the message highlighted by the red rectangleStep 2: Click on the clock symbol, highlighted by blue rectangle in the previous graphic, to view the commit
history - the history is presented in reverse chronological order
Step 3: Look at the commit
descriptions for your fork
; several examples are shown below
commit
made by the developers that is included in your fork
is the one a mentor will recognizeThe first example is for main
with one customization
commit
is highlighted in the blue rectangleThe second example is for dev
where the fork
was synched both before and after customizations were applied
repository
- note that the SHA-1 here is specific to this repo and does not help a mentor identify the base version of your buildFork
for Module","text":"What if you already have a fork
of one of the modules?
Your existing fork
is from a username other than LoopKit
fork
you do not care about, you can delete the repository
.fork
, you are probably experienced enough to know how to solve the issue.Instructions to delete a repository
are found at\u00a0GitHub Docs
Once deleted, go to Create Your Fork
for Selected Module.
The\u00a0LoopWorkspace repository\u00a0is the umbrella organization holding all the pieces needed to build the Loop app. It provides a list of pointers to a specific version for each of the Modules used in the workspace.
You are telling GitHub to apply specific customizations when it builds your app for you. It extracts from GitHub all the code needed, applies your specific customizations and then starts the build.
"},{"location":"gh-actions/gh-deploy/","title":"Install on Phone","text":""},{"location":"gh-actions/gh-deploy/#general-installation-information","title":"General Installation Information","text":"This is only available with\u00a0Loop 3.
The Loop app must be built at least every 90 days when using a browser to build.
After you Build the Loop App with a browser and it has automatically uploaded to the TestFlight app, you are ready to install on as many phones as you and your family members need.
If you later need to add an adult family member to your list, refer to Set Up Users and Access (TestFlight).
Children (under 13 in US, varies by country) cannot use TestFlight with their ID. When you use TestFlight for a Child, you will need to use your ID on their phone (not the whole phone - just the Media & Purchase portion), so send the TestFlight invitation to the email associated with your ID.
If you already have the TestFlight app installed on your phone, skip ahead to Install App with TestFlight.
To install TestFlight, refer to the GIF below:
Once you get an email that the TestFlight processing completed, you can install the app on your phone. Note this can be half-hour to an hour after the build displays the green check mark on your browser.
The first time you use TestFlight on any phone associated with a given email, you must Redeem
the code sent to that email inviting you to test the app. The GIF below is for someone who has never used TestFlight.
If you already have the\u00a0Loop\u00a0app on the phone, you'll see the warning about possible loss of data. Don't worry, all your settings remain. Go ahead with the installation.
Automatic features will be available when the next version is released and are available now in 3.3.0 (when\u00a0dev is the default branch). The instructions on the Configure to Use Browser page will, unless you make a change, automatically take the following actions when you update to the next release or use dev
:
It is already true that, unless you make a change, the default setting will:
Recommended settings:
If you are running the development code, you may prefer to turn off the automatic update, but keep the automatic build. To read more about modifying automatic update and build options, please read Modify Automatic Building.
"},{"location":"gh-actions/gh-deploy/#disable-automatic-install-from-testflight","title":"Disable Automatic Install from TestFlight","text":"Once the app is installed one time, you can adjust whether it is automatically installed when updated versions are available. We recommend you disable automatic installation so you can choose when to switch to a newer build, which in some cases, may be a newer version.
Go back to the TestFlight app on your phone and tap on your app name in the list to see an expanded screen similar to the graphic below. The row to enable or disable automatic updates is highlighted in the graphic, which shows the feature disabled. This is recommended for all users.
When you are ready to install, just open the TestFlight app and click Install to get the most recent build and then click Open when it completes the installation. All your settings and connections to CGM and Pump are maintained.
If you tap on the bottom row that says Previous Builds
, highlighted by the dashed-green rectangle, you can view and choose an older build (as long as it has not expired).
The adult (Apple Developer Account owner) can log into Media & Purchase (see steps below) without affecting the child Apple ID associated with a phone (and thus their health records used by\u00a0Loop). After the adult installs or updates the app using TestFlight, they probably should reverse those steps to remove their credentials from Media & Purchase.
Media & Purchase affects access to the App Store, Books, Music and Podcasts.
On the Child phone:
my kids phone
Suppose you really don't like the name you picked initially for the\u00a0Loop\u00a0app that shows up in the TestFlight app.
You can change it.
Open this link: App Store Connect Apps and log in as needed.
If you get an error when building with a browser, use this page to figure out what to do.
If you are still unsuccessful, then post your request for help along with your GitHub username. Mentors can go to your public\u00a0GitHub repository, check the status and then view your log files directly.
Username, Not Pictures
If you've been around the DIY community for a while, you know the mantra about screenshots. Well, when using a browser to build, screenshots are close to useless.
All that is needed to assist is your GitHub username.
But first - try to diagnose it yourself using this page.
"},{"location":"gh-actions/gh-errors/#most-common-mistakes","title":"Most Common Mistakes","text":"These are some of the most common errors to date.
Secrets
App Group Identifier
to all 4 of the required identifiers in this step: Add App Group
to Identifiers
GH_PAT
, FASTLANE_ISSUER_ID
and FASTLANE_KEY
contain both upper and lower-case characters and all the values are case-sensitiveTEAMID
, you typed what you thought you saw instead of using copy and pasteIf you are running development code, skip ahead to Preview for Next Version.
"},{"location":"gh-actions/gh-errors/#misleading-error-message","title":"Misleading Error Message","text":"If there are Apple Developer agreements you have not accepted, you may get errors when you try to Build that indicate your Apple Secrets
are incorrect even if they are not.
FASTLANE_ISSUER_ID
, FASTLANE_KEY_ID
or FASTLANE_KEY
is not correctIf you need detailed instructions, click on this Apple Program License Agreement
Help Page.
You can also get this message if the credit card used to purchase the Developer account is not current, e.g., no longer valid or expiration date has passed.
One user reported: The expiration date on the credit card used for auto-renew of my developer account was updated and the value in the Apple account did not match the new one. After updating my account with the new expiration date - Browser Build succeeded again.
"},{"location":"gh-actions/gh-errors/#find-your-error","title":"Find Your Error","text":"For Version 3.2.3 and earlier - later versions have an improved method for display errors.
There is a separate section for each step in the process. First, you must follow the Examine the Error instructions to view the record of the failed action. Then go to the section for the Action you were trying to complete to look for possible error strings to copy into the search box.
Validate Secrets
Add Identifiers
ErrorsCreate Certificates
ErrorsBuild Loop
Errors before a successful buildBuild Loop
Errors after a successful buildIf you discover a new error, please reach out to help us update the documentation.
"},{"location":"gh-actions/gh-errors/#examine-the-error","title":"Examine the Error","text":"It doesn't matter which action you are running; after the action completes, you will either see a green check mark for success or a red x mark for failure. The graphic below shows an example for the Add Identifiers
action.
If you click on the action name, it opens a secondary screen as shown below.
Click on the top link to view the record of the failed action as shown in the graphic below. You will be pasting strings into the search box (highlighted with a green rectangle) to look for a documented error. Please read the instructions below the graphic.
Where to find my GitHub username?
You can find it:
Loopworkspace
, after github.com
in between the forward slashes (/
). https://github.com/username/Loopworkspaceor on the GitHub website
As your GitHub username
is case-sensitive, use copy and paste.
Validate Secrets
Errors","text":"To generate the graphic below, some items were deliberately set to be incorrect in the Secrets list. Representative error messages are shown when running the validate secrets action.
"},{"location":"gh-actions/gh-errors/#action-add-identifiers-errors","title":"Action:Add Identifiers
Errors","text":"Use the Examine the Error instructions to find your error message.
There are two errors that we are familiar with at this point. Look for text matching what is listed below and view what has caused this error to be seen.
"},{"location":"gh-actions/gh-errors/#error-credentials-missing-invalid","title":"Error: credentials missing / invalid","text":"Copy the words on the line below and paste them into the search function for your action log.
Authentication credentials are missing or invalid\n
The full error looks like this:
Authentication credentials are missing or invalid. - Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens`
This can be caused by an error in the value (or spelling) of one of these keys:
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
GH_PAT
Use a Text-Only Editor
If you used a \"smart\" editor when saving your Secrets in an archive file before pasting them into the repository Secrets
, it might have changed a lowercase letter to an uppercase letter.
If even one character is capitalized when it should not be, you will not succeed at the Add Identifiers step.
"},{"location":"gh-actions/gh-errors/#error-invalid-curve-name","title":"Error:Invalid curve name
","text":"If you see:
invalid curve name\n
This was caused by an error in the format of the value entered for the FASTLANE_KEY
.
Make sure you copy in a text editor from the first hyphen to the last hyphen.
"},{"location":"gh-actions/gh-errors/#action-create-certificates-errors","title":"Action:Create Certificates
Errors","text":"Use the Examine the Error instructions to find your error message.
"},{"location":"gh-actions/gh-errors/#error-wrong-teamid-in-secrets","title":"Error: Wrong TEAMID inSecrets
","text":"Copy the words on the line below and paste them into the search function for your action log.
error: No profile for team '***' matching 'match AppStore\n
If that phrase is found, then:
TEAMID
entered in your Secrets
TEAMID
Add Identifiers
and before Action: Create Certificates
Follow these steps:
Open each link below in a separate tab
It is best to open each link below in a separate tab so you can return to this list and keep using the links in each step.
Delete all the identifiers that you can, following the steps in Configure to Use Browser: Delete Identifiers
TEAMID
TEAMID
, but do not use themEnter your TEAMID
correctly in the repository Secrets
TEAMID
.GH_PAT
, you'll do the same but for TEAMID
) Update SecretsRun Action: Configure to Use Browser: Add Identifiers
again
Follow all the steps in this section with the correct TEAMID
Configure to Use Browser: Configure Identifiers for Loop but when you get to the Configure to Use Browser: Create Loop App in App Store Connect, you need to return to this page and follow the instructions below to remove the app and add a new one.
The first time through, you created an app with a Bundle ID
that does NOT include your TEAMID
.
You will remove that app and create a new one.
"},{"location":"gh-actions/gh-errors/#remove-app-with-incorrect-teamid","title":"Remove App with IncorrectTEAMID
","text":"Go to App Store Connect / Apps
and follow the numbered steps in the graphic below.
General
, click on App Information
Bundle ID
is the incorrect oneBundle ID
says: com.NOT_YOUR_TEAMID.loopkit.Loop
Remove App
Remove
Restore App
Apps
at the very top of the screen and proceed to the next stepThat App with the wrong Bundle ID
remains in the App store but it is hidden so it won't confuse you.
TEAMID
","text":"Now click on the Add Apps
button or the (plus sign) if you have other apps in the App Store.
Follow the Configure to Use Browser: Create Loop App in App Store Connect directions with these additions:
Bundle ID
you choose is for Loop and contains your TEAMID
, it should look like: com.TEAMID.loopkit.Loop
SKU
for your Loop App (try 1234
, if you used 123
before)You should be able to continue with the Configure to Use Browser Steps to Create Certificates
and then proceed from there with Build Loop
and keep going.
Copy the words on the line below and paste them into the search function for your action log.
Error cloning certificates\n
The full error looks like this:
Error cloning certificates repo, please make sure you have read access to the repository you want to use
or
Error cloning certificates git repo, please make sure you have access to the repository - see instructions above
If you see this phrase, the fastlane
package that is utilized during the 3. Create Certificates
action cannot access your repository to create certificates for your Loop app. This is due to insufficient repository access rights that were not granted during the creation of your GH_PAT
token.
To fix this error:
Fastlane Access Token
) that was created during Configure to Use Browser: Setup GitHub: Create GitHub Personal Access Token
Tokens (classic)
is highlighted in the menu on the leftFastlane Access Token
) to open its detail pageSelect Scopes
will be checked\u00a0\u2013 this is what's causing the issue.workflow
permission scope (the graphic does not match the words, you want to use workflow
to get both repo
and workflow
scope)Update token
(it's a long way, ignore all other settings, do not check anything else)After you have clicked Update token
you should see the token overview again with the message Some of the scopes you\u2019ve selected are included in other scopes. Only the minimum set of necessary scopes has been saved.
(You can dismiss the message using the X
near the upper right side if it appears).
NOTE: for next release or if using the dev branch - you want GH_PAT
to have repo, workflow
scope. So click on the workflow scope now and save yourself a step later.
You should be able to continue with the Configure to Use Browser Steps to Create Certificates
and then proceed from there with Build Loop
and keep going.
Copy the words on the line below and paste them into the search function for your log file.
Could not create another Distribution certificate\n
The full error message is:
Could not create another Distribution certificate, reached the maximum number of available Distribution certificates
These steps are needed to make room for a Certificate
:
Distribution Certificate
Distribution Certificates
Type
column - do not delete a Development
Certificate
Development
Type
certificate associated with an Xcode build for your Loop app - it will stop working and you will be very sadDistribution
Certificate
and revoke itCertificate
:Action
: Create Certificates
Action
: Build Loop
But what about TestFlight builds?
Previous builds using this method that are already in TestFlight are not affected by deleting the Distribution Certificate
.
Copy the words on the line below and paste them into the search function for your log file.
decrypt the repo\n
The full error message is:
Couldn't decrypt the repo, please make sure you enter the right password
If you know you entered the incorrect MATCH_PASSWORD
in your repository Secrets
, go and fix it now and try again.
Otherwise, you need to follow the steps to Reset Match-Secrets.
"},{"location":"gh-actions/gh-errors/#action-build-loop-errors","title":"Action:Build Loop
Errors","text":"Run Create Certificates
First
You must run Action: Create Certificates
before attempting to run Action: Build Loop
Use Examine the Error
For each section below, copy the phrase into the search function of the log. If you find it, solve that error. If not, move on to the next one.
"},{"location":"gh-actions/gh-errors/#could-not-find-an-app-on-app-store-connect","title":"Could not find an app on App Store Connect
","text":"Copy the words on the line below and paste them into the search function for your action log.
Could not find an app on App Store Connect\n
If that phrase is found, then:
Make sure you completed the Create Loop App in App Store Connect Step
Create Certificates
Build Loop
This can also be caused if you correctly created the Loop App but entered an incorrect value for the TEAMID
.
TEAMID
, check this link: Certificates, Identifiers & Profiles for entries with the incorrect TEAMID
embeddedTEAMID
is 0123456789
, but you entered 000123
, you may see both of these in your identifiers listcom.0123456789.loopkit.Loop
com.000123.loopkit.Loop
TEAMID
and rerun all three steps:Add Identifier
Create Certificates
Build Loop
Error: Provisioning Profile
","text":"Copy the words on the line below and paste them into the search function for your action log.
error: Provisioning profile \"match AppStore\n
If that phrase is found one, or more times, it means you missed a step when configuring the Loop identifier or missed associating your Loop App Group with one or more identifiers.
For example, if you see:
error: Provisioning profile \"match AppStore com.***.loopkit.Loop\" doesn't include the com.apple.developer.usernotifications.time-sensitive entitlement.
Go back to First-Time: Add or Review Configuration for Loop Identifier and make sure you enabled the Time-Sensitive notification
for Loop.
For example, you might see:
error: Provisioning profile \"match AppStore com.***.loopkit.Loop.SmallStatusWidget
error: Provisioning profile \"match AppStore com.***.loopkit.Loop.statuswidget
error: Provisioning profile \"match AppStore com.***.loopkit.Loop.Loop-Intent-Extension
Return to Add App Group to Other Identifiers and fix the missing items.
You must create certificates again before you can build Loop:
Create Certificates
Build Loop
A new one cannot be created because you enabled
","text":"Copy the words on the line below and paste them into the search function for your action log.
A new one cannot be created because you enabled\n
If that phrase is found with lines similar to the following:
[31mA new one cannot be created because you enabled `readonly`\u001b[0m\n[31mProvisioning profiles in your repo for type `appstore`:\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.statuswidget.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.SmallStatusWidget.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.LoopWatch.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.Loop-Intent-Extension.mobileprovision'\u001b[0m\n[31m- 'AppStore_com.NOT_YOUR_TEAMID.loopkit.Loop.LoopWatch.watchkitextension.mobileprovision'\u001b[0m\n
This tells you, the Bundle ID
you selected in First-Time: Create Loop App in App Store Connect does NOT have your TEAMID
embedded in the name.
Once you have created an app in the App Store that is not based on your TEAMID
, you cannot delete it, but you can Remove it (i.e. hide it so that it is no longer visible on this page and you don't accidentally click on it).
Bundle ID
and click on itApp Information
(under General
)Bundle ID
listed does not include your TEAMID
Remove App
Remove
At this point, get your correct TEAMID
, fix your Secrets file to have the correct TEAMID
and then return to First-Time: Configure Secrets. This time you will be updating TEAMID
in the repository secret list.
Build Loop
Errors","text":"This section is only for people who have successfully built using GitHub Build Actions.
Use the Examine the Error instructions to find your error message.
"},{"location":"gh-actions/gh-errors/#could-not-install-wwdr-certificate","title":"Could not install WWDR certificate
","text":"Assuming you have successfully built using the Browser-Build / GitHub method before:
Could not install WWDR certificate
, make sure your Apple developer account is in good standing and that there are no agreements that need to be acceptedMatch-Secrets
","text":"This is not the first thing to try, but sometimes it is the best approach.
There might be several reasons to do this:
MATCH_PASSWORD
and want to build one of the Other AppsMATCH_PASSWORD
but you are getting Error: Could not decryptThese steps are needed to reset your Match-Secrets
:
Match-Secrets
RepositoryMatch-Secrets
RepositoryMatch-Secrets
Action
: Validate Secrets
automatically creates a new private Match-Secrets
repository if you don't have oneAction
: Create Certificates
Secrets
and try againAction
: Build Loop
Other Apps
All DIY iOS apps that have an associated GitHub Browser Build
method require the same 6 Secrets
.
If you add an app to your GitHub username (by forking the repository and adding Secrets
) and then build it, it encrypts your Certificate
using MATCH_PASSWORD
.
If you already have the other apps configured and then you delete Match-Secrets
and add a new one, you will need to run Create Certificates
for each app before the next time you build each app - go ahead and do that now so you don't forget.
Error annotations are available for Version 3.3.0 and later. These were contributed by community volunteers along with the improvements to enable automatic updates and automatic builds.
"},{"location":"gh-actions/gh-errors/#examine-annotation","title":"Examine Annotation","text":"If a\u00a0GitHub Action\u00a0fails, you will see a clear notification.
First consider the following results from the\u00a0GitHub Action: 1. Validate Secrets.
Your screen may look similar to the graphic below. The name in parentheses refers to the branch used to develop these wonderful messages. Yours may be (dev) or (main), once 3.4.0 is released.
But there are so many reasons why this could happen. The first step is to click on the link highlighted by the red rectangle in the graphic above. This opens a new detailed view. The GIF below shows two different error messages. The first frame shows the error in the Annotation box at the bottom (you may need to scroll down to see this), and you may need to click on \"Show More\" to see the full message as seen in the second frame. The third frame of the GIF shows a different message. Each one these messages is designed to make it easier for you to diagnose your own problem.
Notice that\u00a0GitHub Action: 1. Validate Secrets\u00a0is broken into three jobs each of which will either pass and show a green check or fail and show a red check. The secrets are validated with each action, so you will see this a lot.
For example, the graphic below shows a failure of\u00a0GitHub Action: 3. Create Certificates\u00a0.
This is an example of a message that is not terribly descriptive - which is why it is shown here. In this case, you can click on just the one job that failed. There will be less to sort through to find your error. The most likely reason for this error is Error: Could not Create.
If you run across an error that does not have a nice message, be sure to post as discussed in Help with Errors. You may be contributing to future improvements for this process.
"},{"location":"gh-actions/gh-first-time/","title":"Configure to use Browser","text":""},{"location":"gh-actions/gh-first-time/#build-the-loop-app-using-github","title":"Build the Loop App using GitHub","text":"Time Estimate (click to open/close)repositories
: 1-2 hoursSecrets
(requires Apple Developer Account): 1 hourAction
steps: 30 minutes to 2 hoursThere is a lot of introductory information on this page.
A narrated video is available:
Once you have Apple Developer and GitHub accounts, the steps below are a high-level summary with links to the detailed section of this LoopDocs page.
You can think of the first part as a scavenger hunt where you find or generate and save six Secrets
.
Secrets
GH_PAT
SecretNow it's time to use those Secrets
to build the Loop app
Match-Secrets
private repositoryLoopWorkspace
)Secrets
to your copy of LoopWorkspace repositoryAction: 1. Validate Secrets
Action: 2. Add Identifiers
App Store
(personal use only, not for distribution)Action: 3. Create Certificates
Action: 4. Build Loop
Internal TestFlight Group
This page contains fully detailed steps including graphics, which makes it incredibly long.
Responding to a user request, step number indicators were added to this page.
Some sections have a Section Summary:
skip forward
symbol () to skip to the next instructionAn automatic table of contents (TOC) should appear for each page on the right side of your browser (if the browser is \"wide\" enough). If not, tap on the hamburger menu (upper left) and then this page name to see the TOC.
For sparse instructions, click on the link below:
In addition to this page, there is a narrated video of each step needed to build using a browser.
Click in the comments for a full index of topics. If you have issues with a part of this page, use the index to advance to the relevant part of the video. Subtitles are in English. You can choose a different language but the automatic translation feature may provide translations that are not completely accurate.
"},{"location":"gh-actions/gh-first-time/#step-1-of-12","title":"Step 1 of 12","text":"Step 1 of 12 is Prerequisites, things you must complete before you start.
"},{"location":"gh-actions/gh-first-time/#prerequisites","title":"Prerequisites","text":""},{"location":"gh-actions/gh-first-time/#prerequisites-to-build-the-loop-app","title":"Prerequisites to Build the Loop App","text":"There are two prerequisites to build the Loop app using GitHub Browser Build
.
To install Loop, you need the free TestFlight app, from the Apple App Store, installed on your Compatible Phone.
"},{"location":"gh-actions/gh-first-time/#prerequisites-to-use-loop","title":"Prerequisites to Use Loop","text":"To use Loop, you need a Compatible Pump and Compatible CGM. For pumps other than Omnipod DASH, you also need a RileyLink Compatible Device.
"},{"location":"gh-actions/gh-first-time/#new-terms-with-github-browser-build","title":"New Terms withGitHub Browser Build
","text":"You can read details about new terms with GitHub build or skip ahead to Save Your Information.
The GitHub Browser Build
may use new and unfamiliar terms.
Some of these terms have ToolTips, so hover your mouse over those - or review them in the Glossary.
Secrets
discussed on this page, are listed after Secrets
in the Glossary.If this summary of terms is confusing, finish reviewing the whole page and then come back.
Actions
: available in your GitHub account to build your app (once you follow the instructions on this page)Loop 3
, the actions: Validate Secrets
, Add Identifiers
, Create Certificates
, and Build Loop
enable users to build the Loop app from a browser on any computerGitHub Browser Build
Actions are not operating as you expect, check GitHub Status to see if it is GitHub problem.Secrets
: are required to enable GitHub to build the Loop app using GitHub ActionsSecrets
must be added to your fork of LoopWorkspaceSecrets
work for any branch in your fork (main
or dev
, for example)Secrets
can be added to Other Apps configured with the same GitHub Browser Build
methodSecrets
only once, see Use a GitHub Organization Account, and have them available for every repository in that organization accountKey
:Application Programming Interface Key
Secrets
Identifiers
: are required to build the Loop app with GitHub Browser Build
(these are automatically generated for you)App Group
Loop
, Loop Intent Extension
, Loop Status Extension
and Small Status Widget
Small Status Widget
was renamed Loop Widget Extension
WatchApp
and WatchAppExtension
Identifier
screen, has NAME
and IDENTIFIER
columnsNAME
column may start with XC
IDENTIFIER
column match the table in Add App Group
to IdentifiersApp Store Connect
: a website available for Apple Developers to review apps build with your Apple Developer accountGitHub Browser Build
Everyone needs to read this section!
You need to keep a digital copy of your 6 Secrets
.
Secrets
to build the app with a browserSecrets
; use a text-only editor like NotePad (PC) or TextEdit (Mac)Secrets
file for easy referenceArchive Your Information
To complete the steps on this page, you will need a username, email address, and password for Apple and GitHub. You will find, generate or make up six Secrets
as instructed.
Be sure to use a Text-Only editor like NotePad (PC) or TextEdit (Mac) to archive your information.
A Note about Capitalization and Spaces
In places, you use a name like \"FastLane API Key
\" or \"FastLane Access Token
\". Please copy from the docs to use those exact names.
The Secrets
that you add use names that are capitalized and use underscore _ instead of spaces. Be precise and careful.
Use a Text-Only Editor
Be sure to use a Text-Only editor like NotePad (PC) or TextEdit (Mac) to archive your information.
If you use a \"smart\" editor, it may change lower-case letters to upper-case letters at the beginning of a line when you paste items into your archive file.
If even one character is capitalized when it should not be, you will get Errors with Browser Build.
If you use a smart editor to store your FASTLANE_KEY, you are likely to get the mysterious invalid curve name
error.
Step 2 of 12 is Save Six Secrets
.
The creation of accounts at Apple and GitHub, if you don't already have them, are not numbered. Using those accounts, there are 5 Substeps for Step 2.
"},{"location":"gh-actions/gh-first-time/#save-six-secrets","title":"Save SixSecrets
","text":"Section Summary (click to open/close) You require 6 Secrets
(alphanumeric items) to use the GitHub Browser Build
method and if you use the GitHub Browser Build
method to build more than Loop, e.g., Loop Follow
or Loop Caregiver
, you must use the same 6 Secrets
for each app you build with this method.
Each secret is identified with ALL_CAPITAL_LETTER_NAMES
.
Secrets
are from your Apple AccountSecrets
in a text file using a text editorSecrets
are case-sensitive To skip the detailed instructions, click on Collect the Four Apple Secrets
You need to save your information digitally, so you can copy and paste. The information is created in one place and used in another. Refer to Configure Secrets
for how the Secrets
are used. In addition to the 6 Secrets
, other important information to keep handy (like usernames and passwords) is listed below. Be sure to keep this file secure.
Created at developer.apple.com
Secrets
TEAMID
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
Created at github.com
https://github.com/username
https://github.com/username/LoopWorkspace
GH_PAT
)Created yourself
MATCH_PASSWORD
)Apple Secrets
","text":"Section Summary (click to open/close) You will be saving 4 Secrets
from your Apple Account in this step.
TEAMID
.FastLane API Key
\".FASTLANE_ISSUER_ID
.FASTLANE_KEY_ID
.API Key
itself, and open it in a text editor. The contents of this file will be used for FASTLANE_KEY
. Copy the full text, including the \"-----BEGIN PRIVATE KEY-----\" and \"-----END PRIVATE KEY-----\" lines. To skip the detailed instructions, click on Collect the GH_PAT
Secret
This section provides detailed instructions for the four Secrets
associated with your Apple Developer ID.
TEAMID
This 10-character identifier is associated with your Apple Developer ID and never changes FASTLANE_ISSUER_ID
The issuer ID is associated with your Apple Developer ID and never changes FASTLANE_KEY_ID
Key ID provided when you create an API Key
in App Store Connect; it is associated with the FASTLANE_KEY
FASTLANE_KEY
Copy the full key from the text file you downloaded when generating the API Key
- Filename has FASTLANE_KEY_ID
value embedded in it.Include everything in the file from -----BEGIN PRIVATE KEY-----
and ending in -----END PRIVATE KEY-----
"},{"location":"gh-actions/gh-first-time/#new-apple-developer-account","title":"New Apple Developer Account","text":" If you have an Apple Developer Account, skip ahead to Find TEAMID
.
If not, you need to purchase one ($99 annual fee). It may take a few days for the account to be enabled.
Next section, Find TEAMID
, is Substep 1 out of 5 for Step 2.
TEAMID
","text":"Sign in to your Apple Developer account at this link: Apple Developer portal page.
Account
in the top menu barClick the Membership Details
icon
Next to the Team ID
field, is a 10-character ID number. This is your Apple Developer TEAMID
.
Record this for use as TEAMID
in your Secrets
file. You will also need it when you Create \u00a0App Group.
If you get this wrong, you will have errors at the very end, which require you to delete some items and repeat some steps on this page
Do not \"type\" what you think you see
Copy and paste the Team ID
from the webpage.
TEAMID
must be 10 characters8
\u00a0when it should be a\u00a0B
Next section, Generate API Key
, is Substep 2 out of 5 for Step 2.
API Key
","text":"Paid Apple Developer Account is Required
To generate the API Key
, you must have a paid Apple Developer account.
If you are waiting for Apple to enable your account, you can skip ahead to create a New GitHub Account and Create GitHub Personal Access Token
. You then pause at Configure Secrets
until your Apple account is active.
Click this link to open in a new tab: App Store Connect/Access/Integrations/API
Click the Integrations
tab as indicated in the graphic above
If this is your first time here, you will see:
\"Permission is required to access the App Store Connect API. You can request access on behalf of your organization.
\"
Request Access
and follow directions until access is grantedOnce access is granted, click on the Generate API Key
button
If you did not get routed through the permission is required
screens click the blue + sign
A new Generate API Key
dialog box will appear as shown in the graphic below
FastLane API Key
\" and choose Admin
in the access drop-down menuAdmin
\" is selected and then click on the \"Generate
\" button.Next section, Copy API Key Secrets
, is Substep 3 out of 5 for Step 2. In this Substep you are dealing with 2 of the Apple Secrets
.
API Key Secrets
","text":"The Integrations
screen appears again with content similar to the graphic below; the key information is blanked out for security.
Review the graphic and then follow the directions below to save more parameters you will need to Configure Secrets
Issuer ID
above the word Active (this is the same for all keys that you generate with this Apple Developer ID)Copy
button - this copies the Issuer ID
into your paste bufferFASTLANE_ISSUER_ID
Key ID
and the Copy Key ID
button shows upCopy Key ID
button - this copies the Key ID
into your paste bufferFASTLANE_KEY_ID
Click on the Download API Key
button - you will be warned you can only download this once.
Find your AuthKey
download in your downloads folder. The name of the file will be \"AuthKey_KeyID.p8
\" where KeyID
matches your FASTLANE_KEY_ID
Choose Application...
\" and then select \"TextEdit
\" (on a Mac, NotePad on a PC, or any text-only editor you prefer)The contents of this file will be used for FASTLANE_KEY
-----BEGIN PRIVATE KEY-----
\" and \"-----END PRIVATE KEY-----
\" linesFASTLANE_KEY
API Key
\u00a0 vs\u00a0APN Key
If you use Remote Commands with Nightscout
, you may notice the Application Programming Interface (API) key has the same type of format as the Apple Push Notification (APN) key. The keys for both of these purposes are p8 keys, but they should not be confused with each other.
The Secrets
for building with GitHub use the\u00a0API Key
.
The config vars for Nightscout
use the\u00a0APN Key
.
Nightscout
and building with GitHub Browser Build
LOOP_PUSH_SERVER_ENVIRONMENT
with a value of production
or remote commands will not work with Nightscout
Nightscout
directly or using Loop Caregiver
In summary, from this section, you have found or generated the following and saved copies for later use
TEAMID
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
Time for a Break?
This is a good place to pause if you need to. Just note where you are on the page so you can return later.
"},{"location":"gh-actions/gh-first-time/#collect-the-gh_pat-secret","title":"Collect theGH_PAT
Secret","text":" If you already have a GitHub Account, skip ahead to Create GitHub Personal Access Token
.
If you do not already have a GitHub account, you need to create one. Be sure to record the email, password, and username for your GitHub account.
Decide on a couple of usernames that you will be happy with - this will get embedded into your GitHub URL. Your first choice might not be available, so be prepared with several candidates. Your personal URL will be: https://github.com/username
.
N
for no - you still get important account information with that emailContinue
Free
option by selecting Continue for Free
The free level comes with plenty of storage and compute time to build the Loop app.
"},{"location":"gh-actions/gh-first-time/#substep-24-for-step-2","title":"Substep 2.4 for Step 2","text":"Next section, Create GitHub Personal Access Token
, is Substep 4 out of 5 for Step 2.
GitHub Personal Access Token
","text":"Section Summary (click to open/close) Log into your GitHub account to create a personal access token, which you will save as GH_PAT
.
Click to create a new personal access token
:
FastLane Access Token
\"No expiration
workflow
permission scope
(repo
will be automatically selected)GH_PAT
To skip the detailed instructions, click on Make up a Password.
You must be logged into your GitHub account before starting this step. If you are continuing, you are already logged in.
Personal Access Token
and giving it the name \"FastLane Access Token
\"Open this link: https://github.com/settings/tokens/new
Tokens (classic)
is highlightedclassic Token
tokens
, that is fineFastLane Access Token
No expiration
(use the drop-down menu to select)workflow
permission scoperepo
scope as well - this is normalGenerate token
(it's a long way, ignore all other settings, do not check anything else)A new screen appears showing your access token
token
and record it - once you leave this screen you can't see it againGH_PAT
when you set up your SecretsGH_PAT
if you lose it, but then you have to update that in the Secrets
for all repositories using GitHub Build.Next section, Make up a Password, is Substep 5 out of 5 for Step 2.
"},{"location":"gh-actions/gh-first-time/#make-up-a-password","title":"Make up a Password","text":"If you have not already made up a password, do it now and record it as MATCH_PASSWORD
.
Step 3 of 12 is Prepare your Repositories. This step has 2 Substeps.
"},{"location":"gh-actions/gh-first-time/#prepare-your-repositories","title":"Prepare your Repositories","text":""},{"location":"gh-actions/gh-first-time/#substep-31-for-step-3","title":"Substep 3.1 for Step 3","text":"Next section, Create Match-Secrets, is Substep 1 of 2 for Step 3. This is done only one time for a given GitHub username.
"},{"location":"gh-actions/gh-first-time/#create-match-secrets","title":"Create Match-Secrets","text":"Section Summary (click to open/close)The creation of the Match-Secrets
repository is a common step for all GitHub Browser Builds
; do this step only once. You must be logged into your GitHub account.
Click on the link to create a new empty repository titled Match-Secrets
. It should be private.
Once created, you will not take any direct actions with this repository; it needs to be there for GitHub to use as you progress through the steps.
To skip the detailed instructions, click on Fork LoopWorkspace
Open your github.com URL (this is https://github.com/username
), (username
is the name you chose above).
Create a new private repository - you can either click on the link below or follow the instructions with the first graphic:
or
At the top right of the screen, click on the + sign and select New Repository
This shows you a screen similar to the following graphic which has 3 regions highlighted:
Repository name
, type Match-Secrets
(use a hyphen between Match
and Secrets
)Private
(red circle) to make the repository privateMatch-Secrets
repository as private.Create repository
\"A screen will appear with a lot of options - do not do anything on this screen.
You will not directly interact with your Match-Secrets
repository.
Next section, Fork LoopWorkspace, is Substep 2 out of 2 for Step 3.
If you are creating an app other than the Loop app, you substitute the appropriate URL for the app you are building.
"},{"location":"gh-actions/gh-first-time/#fork-loopworkspace","title":"Fork LoopWorkspace","text":"Section Summary (click to open/close)Fork https://github.com/LoopKit/LoopWorkspace into your account.
To skip the detailed instructions, click on Configure Secrets
Existing Fork
If you already have a fork of LoopWorkspace
, click on Already Have LoopWorkspace to decide what to do. That section provides links to return you to these instructions.
LoopWorkspace
repository owned by LoopKit
.Fork
button is in the same place)Fork
Now your screen should look like the graphic below
Owner
)LoopWorkspace
is the repository name (Repository Name
)Copy the main branch only
\" checkedCreate fork
buttonAfter creating the \u00a0fork, your screen should be similar to the next graphic - it will say main
for the branch instead of dev
because this graphic was prepared before the release of Loop 3
. You may or may not see the messages you are told to dismiss in the next two bullets. No worries if you don't see them.
x
) to dismiss the Successfully fetched
messageDismiss
button to remove the \"Your branch is not protected
\" messageCarefully compare your screen to the graphic below paying attention to the highlighted sections.
main
This branch is up to date with LoopKit/LoopWorkspace:main
\"Time for a Break?
This is a good place to pause if you need to. Just note where you are on the page so you can return later.
"},{"location":"gh-actions/gh-first-time/#step-4-of-12","title":"Step 4 of 12","text":" Step 4 of 12 is Configure Secrets
. This step does not have Substeps, however, you must enter all 6 SECRETS
.
If you are already feeling overwhelmed - skip this tip.
If you plan to build more that one app, you will making a fork of each repository associated with each app, and then you must add the 6 Secrets
to each repository. It is not hard but it can get tiresome.
There is a way to enter the 6 Secrets
only one time for all your repositories, but this requires setting up a free GitHub organization. This is also not hard, but it modifies some of displays you see on GitHub. If you are interested, refer to Use a GitHub Organization Account
Secrets
","text":"Section Summary (click to open/close) These Secrets
are the same for any repository for which you use GitHub Browser Build
.
Loop Caregiver
, for which you also use GitHub Browser Build
For each of the following Secrets
, tap on \"New repository secret\", then add the name of the secret, along with the value you recorded for it:
TEAMID
FASTLANE_ISSUER_ID
FASTLANE_KEY_ID
FASTLANE_KEY
GH_PAT
MATCH_PASSWORD
To skip the detailed instructions, click on Validate Secrets
.
Branches
and Repositories
fork of LoopWorkspace
and work for any branch
(main
or dev
, for example)repositories
Secrets
","text":"Log into GitHub.
Return to your forked copy of LoopWorkspace
Your repositories
\"You should see (at least) 2 repositories: Match-Secrets
and LoopWorkspace
LoopWorkspace
to open that repositoryClick on the Settings Icon near the top right of your LoopWorkspace
Settings
, make your browser wider or scroll to the rightSettings
, then you are not on your fork or you need to sign in to your GitHub accountAfter you click on \u2699\ufe0f Settings
, your screen should look like the graphic below
On the left side, find the Secrets and variables
dropdown and choose Actions
After you select Actions
, your screen should look like the graphic below
Secrets
","text":"New repository secret
(highlighted above)Secret
name is provided for you to copy and pasteName *
, click on YOUR_SECRET_NAME
and paste one of the 6 secret names, as directed in Enter Each SecretSecret *
box and paste the value for that secretAdd Secret
, the secret will be addedTEAMID
added and ready for saveEnter the name of each Secret
found in Save Your Information and your value for that Secret
.
Add Secret
TEAMID
TEAMID
is incorrect, the initial Actions
will succeed but Build Loop
will fail and you will have some clean-up to doYou can copy the names of the Secrets
by hovering to the right of each word below until you see the copy button (). Click on the button to copy the Secret
name and paste it into GitHub where you see YOUR_SECRET_NAME
. This avoids spelling errors.
TEAMID\n
FASTLANE_ISSUER_ID\n
FASTLANE_KEY_ID\n
FASTLANE_KEY\n
GH_PAT\n
MATCH_PASSWORD\n
FASTLANE_KEY
value, copy the entire contents from-----BEGIN PRIVATE KEY-----
through-----END PRIVATE KEY-----
MATCH_PASSWORD
value - if you did not already make up a password and save it with your other Secrets
, do it nowMATCH_PASSWORD
must be the same for any repository using this method (Other Apps)Once all six Secrets
have been added to your LoopWorkspace
, your screen should look similar to the graphic below.
Secrets
are spelled correctlyNew repository secret
with the correct nameTime for a Break?
This is a good place to pause if you need to. Just note where you are on the page so you can return later.
"},{"location":"gh-actions/gh-first-time/#step-5-of-12","title":"Step 5 of 12","text":"Step 5 of 12 is Validate Secrets. This step has 2 Substeps.
"},{"location":"gh-actions/gh-first-time/#substep-51-for-step-5","title":"Substep 5.1 for Step 5","text":"Next section, First Use of Actions Tab, is Substep 1 out of 2 for Step 5. This is done only once for a given repository.
"},{"location":"gh-actions/gh-first-time/#first-use-of-actions-tab","title":"First Use of Actions Tab","text":"Near the top middle of your LoopWorkspace
fork\u00a0 is an Actions
tab. This section provides detailed directions to enable Actions
.
Click on the Actions
tab of your LoopWorkspace
repository.
Workflows aren't being run on this forked repository
as shown in the graphic belowTap on the green button that says: I understand my workflows, go ahead and enable them
The workflows
are now displayed on the left side as shown in the graphic below. (Dismiss the Actions Enabled
message using the X
near the upper right side if it appears).
Next section, Validate Secrets
, is Substep 2 out of 2 for Step 5. This should only be needed one time, unless you modify any of your Secrets
.
Secrets
","text":"Section Summary (click to open/close) This step validates most of your six Secrets
and provides error messages if it detects an issue with one or more.
1. Validate Secrets
.Run workflow
button.Secrets
are added and that they are correctly formatted. If errors are detected, please check the run log for details. To skip the detailed instructions, click on Add Identifiers
Near the top middle of your LoopWorkspace
fork, click on the Actions
tab.
Actions
on this repository before, and need instructions (in addition to what GitHub shows), please back up to First use of Actions Tab.Refer to the graphic below for the numbered steps:
Actions
tab of your LoopWorkspace
repositoryValidate Secrets
Run Workflow
to show a drop-down menumain
)Tap the green button that says Run workflow
.
The Validate Secrets
Action\u00a0 should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
X
(): Step 6 of 12 is Add Identifiers
. This step has no Substeps.
This should only be needed one time, unless the developers add or modify an identifier.
For example going from version 3.2.x to version 3.3 or higher requires this to be repeated. There will be clear instructions on to update page when you need to do this.
"},{"location":"gh-actions/gh-first-time/#add-identifiers","title":"Add Identifiers
","text":"Section Summary (click to open/close) Run workflow
button.To skip the detailed instructions, click on Configure Identifiers for Loop.
Refer to the graphic below for the numbered steps:
Actions
tab of your LoopWorkspace
repositoryAdd Identifiers
Run Workflow
to show a drop-down menumain
)Tap the green button that says Run workflow
.
The Add Identifiers
Action\u00a0 should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
X
():Step 7 of 12 is Configure Identifiers for Loop. This step has 2 Substeps, some of which may not be required but are numbered so you can check them off.
This should only be needed one time, unless the developers add or modify an identifier.
For example going from version 3.2.x to version 3.3 or higher requires this to be repeated. There will be clear instructions on to update page when you need to do this.
"},{"location":"gh-actions/gh-first-time/#configure-identifiers-for-loop","title":"Configure Identifiers for Loop","text":"Some steps can be skipped if you previously built the Loop app with a Mac using Xcode.
Please read carefully to avoid confusion.
"},{"location":"gh-actions/gh-first-time/#substep-71-for-step-7","title":"Substep 7.1 for Step 7","text":"Next section, Create App Group
, is Substep 1 out of 2 for Step 7. This is only required one time and can be skipped if you previously built this app with Xcode.
App Group
","text":"Section Summary (click to open/close) If you have already built the Loop app via Xcode using this Apple ID, skip ahead to Previous Xcode Builders.
App Group
on the Apple Developer site.TEAMID
. To skip the detailed instructions, click on Add App Group
to Identifiers
The Loop
App Group already exists if you previously built the Loop app using Xcode with this Apple Developer ID. In that case, skip ahead to Previous Xcode Builders.
If you have never built the Loop app with Xcode using your TEAMID
, you need to create an App Group associated with your TEAMID
.
Description
, use Loop App Group
.Identifier
, enter group.com.TEAMID.loopkit.LoopGroup
, substituting your team id for TEAMID
.TEAMID
must be correct and the Loop
App Group must match the format shown in the previous stepContinue
and then Register
.If you ever built the Loop app using Mac, skip ahead to Previous Xcode Builders.
"},{"location":"gh-actions/gh-first-time/#new-builders","title":"New Builders","text":"Click this link: Certificates, Identifiers & Profiles: Identifiers List
on the Apple Developer site.
If you never built using Xcode, then after the Add Identifiers
Action, you will see the six items under NAME
in the table below with the associated IDENTIFIER
information. Your Developer ID
replaces the TEAMID
in the identifier.
Skip ahead to Table with Name and Identifier for Loop 3
.
Click this link: Certificates, Identifiers & Profiles: Identifiers List
on the Apple Developer site.
Because you built the Loop app using Xcode, then the NAME
associated with at least the Loop identifier
will appear as XC com.TEAMID.loopkit.Loop
under the NAME
column. Ignore the NAME
column and key off what you see under the IDENTIFIER
column of the table. Only the six listed in the table below need to appear when building Loop 3
.
Loop 3
","text":"NAME
IDENTIFIER
Loop
com.TEAMID.loopkit.Loop
Loop Intent Extension
com.TEAMID.loopkit.Loop.Loop-Intent-Extension
Loop Status Extension
com.TEAMID.loopkit.Loop.statuswidget
Small Status Widget
com.TEAMID.loopkit.Loop.SmallStatusWidget
WatchApp
com.TEAMID.loopkit.Loop.LoopWatch
WatchAppExtension
com.TEAMID.loopkit.Loop.LoopWatch.watchkitextension
Loop dev Builders
The name and identifier for \"Small Status Widget
\" has been renamed to \"Loop Widget Extension
\". This only affects those using the dev branch until the next release. At that time, this table will be updated.
If you are building with the dev branch, follow the directions at One-Time Changes.
"},{"location":"gh-actions/gh-first-time/#substep-72-for-step-7","title":"Substep 7.2 for Step 7","text":"Next section, Add or Review Configuration for Loop Identifier
, is Substep 2 out of 2 for Step 7.
This should only be needed one time, unless the developers add or modify an identifier.
For example going from version 3.2.x to version 3.3 or higher requires this to be repeated. There will be clear instructions on to update page when you need to do this.
"},{"location":"gh-actions/gh-first-time/#add-or-review-configuration-for-loop-identifier","title":"Add or Review Configuration forLoop Identifier
","text":"Section Summary (click to open/close) Note 1 - If you previously built with Xcode, the Names
listed below may be different, but the Identifiers
will match. A table was provided above that lists both Names
and Identifiers
. The Add Identifier Action that you completed above generates 6 identifiers, but only 4 need to be modified as indicated in this step.
Note 2 - Depending on your build history, you may find some of the Identifiers are already configured - and you are just verifying the status; but in other cases, you will need to configure the Identifiers.
Loop
Loop Intent Extension
Loop Status Extension
Small Status Widget
(released code) / Loop Widget Extension
(dev branch)Loop Identifier
only, you must add a check box next to Time Sensitive Notifications
To skip the detailed instructions, click on Create Loop App in App Store Connect
Find and click on the row for the Loop identifier
on the Certificates, Identifiers & Profiles: Identifiers List page. Look in the IDENTIFIER
column to find com.TEAMID.loopkit.Loop
. The name in the NAME
column may be different than Loop.
NAME
IDENTIFIER
Loop
com.TEAMID.loopkit.Loop
The Edit Your App ID Configuration
screen will open. Take two actions for the Loop identifier
.
App Services
column, scroll down to the App Groups
rowCapabilities
column) for App Groups
is checkedXC Loop
) - If the word Edit
shows up under NOTES
, move on to step 2 belowConfigure
shows up, tap on itApp Group Assignment
screenLoop
App Group that uses your TEAMID
in group.com.TEAMID.loopkit.LoopGroup
and then Continue
Continue scrolling down to the Time Sensitive Notifications
row
Time Sensitive Notifications
is checked as shown in the following graphicLoop
identifierNow scroll slowly back up to the top of the page. As you go, confirm that each of these is configured with a check mark; if any are missing, click to enable.
Time Sensitive Notifications
Siri
(formerly known as SiriKit
)Push Notifications
HealthKit
App Groups
(enabled with group.com.TEAMID.loopkit.LoopGroup
)If you modified settings for an identifier, the Save
button at the top right will become active. Click on Save
before leaving this page - otherwise, the change does not take effect.
Save
Modify App Capabilities
confirmation screenConfirm
If you did not need to make changes, the Save
button will not be active.
< All Identifiers
button at the top leftThe full list of Identifiers should be displayed again.
"},{"location":"gh-actions/gh-first-time/#add-app-group-to-identifiers","title":"AddApp Group
to Identifiers","text":"You will now be checking the status for 3 more identifiers to ensure the App Group
is configured to use the Loop
App Group. You must add or confirm the App Group for these 3 identifiers (for released code):
NAME
IDENTIFIER
Loop Intent Extension
com.TEAMID.loopkit.Loop.Loop-Intent-Extension
Loop Status Extension
com.TEAMID.loopkit.Loop.statuswidget
Small Status Widget
com.TEAMID.loopkit.Loop.SmallStatusWidget
Double-check when finished with this step
When you think you have completed this step, double check to make sure all 4 Identifiers
listed in the table have the App Group
added.
If not, Create Certificates
will succeed but Build Loop
will fail.
If you are building the dev branch, the Small Status Widget
was renamed. Look for it and add the App Group to it now.
NAME
IDENTIFIER
Loop Widget Extension
com.TEAMID.loopkit.Loop.LoopWidgetExtension
"},{"location":"gh-actions/gh-first-time/#back-to-how-to-instruction-for-main-or-dev","title":"Back to How-to Instruction for main or dev","text":"Find and click on a given identifier row on the Certificates, Identifiers & Profiles: Identifiers List page.
The Edit Your App ID Configuration
screen will open. Take one action for each of these three identifiers.
Looking at the App Services
column, scroll down to the App Groups
row
Capabilities column
) for App Groups
is checkedEdit
shows up under NOTES
, return to the identifiers listConfigure
shows up, tap on itApp Group Assignment
screenLoop App Group
that uses your TEAMID
in group.com.TEAMID.loopkit.LoopGroup
and then Continue
If you had to modify a given identifier, the Save
button at the top right will become active
Save
Modify App Capabilities confirmation
screenConfirm
If you did not need to make changes, the Save
button will not be active.
< All Identifiers
button at the top leftThe full list of Identifiers should be displayed again.
"},{"location":"gh-actions/gh-first-time/#step-8-of-12","title":"Step 8 of 12","text":"Step 8 of 12 is Create Loop App in App Store Connect. This step has no Substeps. It is only required one time.
If you are building other apps using this page as a guide, you must complete this step one time for each app.
"},{"location":"gh-actions/gh-first-time/#create-loop-app-in-app-store-connect","title":"Create Loop App in App Store Connect","text":"Section Summary (click to open/close)If you have created a Loop app in App Store Connect before, skip ahead to Create Certificates.
com.TEAMID.loopkit.Loop
, with TEAMID matching your team id.You do not need to fill out the next form. That is for submitting to the app store.
To skip the detailed instructions, click on Create Certificates.
If you have created a Loop app
in App Store Connect before, skip ahead to Create Certificates.
If you have previously used some kind of remote build, like diawi
or TestFlight
, you may have your Loop in the App Store but can't see it. Don't worry - there are instructions for this case.
Open this link: App Store Connect / Apps
to view your apps; log in if needed.
All Statuses
dropdown. If you get to step 3 and cannot find your com.TEAMID.loopkit.Loop
in the Bundle ID drop-down, this means you need to follow Find My Loop.Click the Add Apps
button or the blue \"plus\" icon ( ) and select New App
as shown in the graphic below
The New App
dialog box opens and should appear similar to the graphic below. Before you fill anything out, make sure your Bundle ID
is available in the dropdown menu (it shows as Choose
in the graphic below). If you do not see com.TEAMID.loopkit.Loop
, with TEAMID
matching your TEAMID
in the dropdown menu; back out of this screen and follow the directions in Find My Loop instead.
iOS
.Loop_ABC
where ABC
are your initialsLoop_ABC_123
Loop Logo
Bundle ID
that matches com.TEAMID.loopkit.Loop
SKU
can be anything; for example 123
.Full Access
\".One last check - if the Bundle ID
has a number other than your actual 10-digit TEAMID
embedded in it, you will be creating an App in the App Store that you cannot use
Create
TEAMID
Secret and follow the steps in Delete IdentifiersCreate
but do not fill out the next form. That is for submitting to the app store and you will not be doing that.You are done with this activity and can close the browser tab. It's time to head back to your GitHub account and Create Certificates
"},{"location":"gh-actions/gh-first-time/#find-my-loop","title":"Find My Loop","text":"This section is for people who were not able to follow the instructions in the last section because com.TEAMID.loopkit.Loop
, with TEAMID
matching your TEAMID
, was not in the dropdown menu for Bundle ID
.
There are two possible reasons:
App Group
to Identifiers or one of the predecessor steps; review those stepsYou may have no memory of ever setting up Loop
in App Store Connect. If you previously used some kind of remote build, like diawi
, your Loop
may be there as a Removed App.
Open this link: App Store Connect / Apps, look for the All Statuses
dropdown indicator, and select Removed Apps
Click on the App name:
Ensure this is the app you want by selecting App Information
, highlighted on the left side in the graphic below.
Bundle ID
(not in view in this graphic) - confirm it is correct.com.TEAMID.loopkit.Loop
with your TEAMID includedThen scroll down to the bottom and choose Restore App
.
Make sure User Access
is set to Full Access
and click on Restore
.
You are done with this step and ready to Create Certificates
Step 9 of 12 is Create Certificates
. This step has no Substeps.
The next section will be required again in the future for these cases:
Create Certificates
","text":"Section Summary (click to open/close) Run workflow
button.To skip the detailed instructions, click on Build the Loop App
Refer to the graphic below for the numbered steps:
Actions
\" tab of your LoopWorkspace
repositoryCreate Certificates
\"Run Workflow
\" to show a drop-down menumain
)Tap the green button that says \"Run workflow
\".
Wait a minute or two for the action to finish
Create Certificates
. (The Add Identifiers
might not be required but it is fast and should be done as a matter of routine.)Step 10 of 12 is Build the Loop App. This step has no Substeps.
The next section is repeated every time you need to manually build. With the next release, building can be configured to be automatic, but for now, plan to run this once a month so you always have a fresh build in your TestFlight app.
"},{"location":"gh-actions/gh-first-time/#build-the-loop-app","title":"Build the Loop App","text":"Section Summary (click to open/close)Run workflow
button.To skip the detailed instructions, click on Set Up Users and Access (TestFlight).
Refer to the graphic below for the first four steps:
Actions
\" tab of your LoopWorkspace
repository.Build Loop
\".Run Workflow
\" to show a drop-down menumain
)Tap the green button that says \"Run workflow
\".
Wait a few minutes to make sure there is not an early failure
App Store Connect
.You can ignore an email from Apple that there are things you must fix in your app:
Did you get a red X? Head over to the Errors with Browser to page find a solution.
"},{"location":"gh-actions/gh-first-time/#successful-build","title":"Successful Build","text":"Congratulations
If you get the green check mark, your app successfully built. Just a few more steps.
"},{"location":"gh-actions/gh-first-time/#step-11-of-12","title":"Step 11 of 12","text":"Step 11 of 12 is Set Up Users and Access (TestFlight). This step has no Substeps.
The next section is repeated if you need to add a User to your account. For example, you want to add another adult who can install the app on your child's phone or you want a spouse or friend to have a copy of the app on their phone as backup for a trip.
As a developer, you are already included as a user with the Role of Account Holder, Admin.
"},{"location":"gh-actions/gh-first-time/#set-up-users-and-access-testflight","title":"Set Up Users and Access (TestFlight)","text":"Once the first build completes, you will be able to configure TestFlight for the app.
Add Each Users One Time
Once you add a user to have access to your TestFlight for this app, you don't need to do it again - it remains available to them across rebuilds and different versions for that app.
You are configuring a private capability for your family using an Internal Testing group. You need the Apple ID email address for each adult installing from your build. When building for a child, you will use your own Apple ID, not theirs. See TestFlight for a Child.
First you need to add the email address(es) to your App Store Connect Access Users list:
Customer Support
is a good choiceTestFlight
group for your appOpen this link: App Store Connect / Apps to view your apps; log in if needed. Then select your Loop app. Click on the TestFlight
tab then click the blue plus button () next to Internal Testing
to add a group.
Fill out the name you want for the Internal Testing
group
Enable automatic distribution
Create
when done (this can always be modified later)As soon as you create the group, you'll be asked who should be included
GitHub Browser Build
methodAdd
when you are doneStep 12 of 12 is Install on Phone. This step has no Substeps.
The next section is repeated for every phone that you want to install a given build from TestFlight. Because a TestFlight app only last 90 days, you should probably build and install at least every 60 days.
"},{"location":"gh-actions/gh-first-time/#install-on-phone","title":"Install on Phone","text":"The Install on Phone page walks you through the steps to use the TestFlight app to install the Loop app on a phone.
But wait - there's more.
Most people won't need the information on the rest of this page.
"},{"location":"gh-actions/gh-first-time/#already-haveloopworkspace","title":"Already Have\u00a0LoopWorkspace?","text":"Some people may already have a copy of LoopWorkspace
.
If your copy is not from LoopKit
, follow the Delete and Start Fresh directions.
If your copy is from LoopKit
:
LoopWorkspace
repository (https://github.com/username/LoopWorkspace
) where you use your GitHub username
in the URLSync fork
button and follow the instructionsGitHub Personal Access Token
If your fork is not from LoopKit
:
When you have already built the Loop app with Xcode, the Identifier names will not match the directions and you might have trouble deciding which ones to configure. Your existing Loop
identifier will have a name that starts with XC
as shown below, where your 10-digit TEAMID
is used.
Name: XC com TEAMID loopkit Loop
Identifier: com.TEAMID.loopkit.Loop
The Identifier
that is associated with the Loop
identifier cannot be deleted if it is already in the App Store but all others can. If you attempt to delete the XC
Loop identifier, you may be told it cannot be deleted because it is in use in the app store. That's OK. Same for other identifiers (if you build a bunch of Apps). If a Bundle ID
has ever been associated with an app in the App Store, you cannot delete the Identifier
.
To make it easy when configuring the identifiers, go through and delete as many as you can.
TEAMID
Loop
identifier with your TEAMID
, it will refuse, don't worry, just keep goingTEAMID
TEAMID
, then delete it if you can and Update Secrets
with your correct TEAMID
Loop identifier
that does not have your TEAMID
, but you already added to the App Store, it will refuse, don't worry, just keep goingIf coming here from the Errors with Browser page because you enter the wrong TEAMID
in Secrets
- return to that page once you've deleted as many identifiers as you can: Errors: Wrong TEAMID in Secrets.
If you were just trying to clean up the identifiers, then follow these steps:
App Group
to IdentifiersOnce Loop 3 was released with the ability to build using a browser, a lot of other apps in the DIY universe added the same feature.
Only apps that are companions to\u00a0Loop\u00a0are included on this page.
If you want to build another DIY app that is not included here, look for the file fastlane/testflight.md
in the GitHub repository associated with that app and open it in a browser. The instructions for that app should be located in that file.
The same technique is used and the same six Secrets
are applied to each repository
. Those secrets are tied to your Apple Developer ID and your GitHub account.
The Loop Caregiver App Requires an App Group
As of 2023 December 8, the updated version of the Loop Caregiver app requires the addition of an App Group
to an expanded list of Identifiers
.
Repository
App Group
to LoopCaregiver
Optional - Set up a Organization Account
If you are going to be building a lot of different apps, you can choose to set up a free organization account with GitHub and use that to build.
Pros:
Secrets
can be added to the organization one-time and apply to every repositoryCons:
For more information, see Use a GitHub Organization Account.
"},{"location":"gh-actions/gh-other-apps/#multiple-copies-of-loop-follow","title":"Multiple Copies ofLoop Follow
","text":"For the convenience of caregivers who use Loop Follow
to monitor multiple people, updates were added in v2.1.2 to make this more convenient. This works regardless of the build method. (Build with Browser or Build with Mac).
Loop Follow
Loop Follow
screenIf you have already built using the Browser Build method, it is easy to build other apps which use the same method. Skip ahead to Fork and Add Secrets
If this is the first repository you have built with the Browser Build method, you must first complete the initial steps found on Configure to Use Browser. When you reach the point where
Use the repository
for the application you are building
Many graphics on this page show\u00a0LoopWorkspace, just remember to use the repository
for the app you want to build, that is either\u00a0Loop Caregiver\u00a0or \u00a0Loop Follow.
fork
the repository
for the app you plan to builddev branch
main branch
Repositories
","text":"App Fork from this Address Documentation Loop Caregiver https://github.com/LoopKit/LoopCaregiver LoopDocs: Loop Caregiver Loop Follow https://github.com/loopandlearn/LoopFollow Loop Follow The two repositories below are only if you need to follow a second or third looper. All others should use just the table above. The instructions for the second and third looper are otherwise identical to the first looper. Note that LoopCaregiver
can follow multiple Loopers; you select the person inside the app.
Repository
","text":"If you just created the fork
, you can skip this section.
If you are returning to this page to update an app, please follow these steps. Each step has a link to instructions on the Update LoopWorkspace
page. Follow the Update Fork
directions for the repository
of the app you are updating:
Fork
Then return to this page.
Normally you skip ahead to Build App after an update.
If you are updating the LoopCaregiver app after the 2023 December 8 update, you need to go to Add Identifiers after updating the fork
.
Secrets
for this App","text":"If you choose to use the optional GitHub organization method, you can skip this section:
repositories
in your GitHub organization use the organization Secrets
Secrets
to your GitHub Organization instead of this sectionSecrets
After successfully creating your fork of the repository for this app:
If you have already built Loop using the Browser Build method, skip ahead to Add Existing Secrets
If this is the first repository you have built with GitHub
Secrets
, except you will apply the Secrets
to the repository for the app you are planning to buildSecrets
on this page.Secrets
","text":"MATCH_PASSWORD
An early version of GitHub First-Time had incorrect information about the need to save MATCH_PASSWORD.
If you did not save your MATCH_PASSWORD in your file with all your Secrets
, you will need to delete your Match-Secrets repository, create a new one and then add all your Secrets
into all you repositories again and run all the Actions again.
Instructions are found at Reset Match-Secrets.
Open the text file in which you maintain a copy of your 6 Secrets
so you can copy each value into the Secrets
for this repository.
Click on the Settings Icon near the top right of your repository
Secrets and variables
dropdown and choose ActionsTap on New repository secret
and add each of the 6 Secrets
Once all six Secrets
are added, proceed to the first Action to validate your secrets.
Secrets
","text":"The first action step is to Validate Secrets
. Near the top middle of your Repository fork, click on the Actions
tab.
Actions
with this repository you'll be informed that Workflows aren't being run on this forked repository
I understand my workflows, go ahead and enable them
The workflows are now displayed: look at the list on the left side similar to that shown in the graphic below. (You can dismiss the Actions Enabled message using the X near the upper right side if it appears).
This step validates most of your six Secrets
and provides error messages if it detects an issue with one or more.
Validate Secrets
Run Workflow
to show a drop-down menumain
for LoopFollow, dev
for LoopCaregiver)Run workflow
.The Validate Secrets
Action\u00a0 should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
X
():Secrets
Errors tells you what to search for in the fileSecrets
Near the top middle of your Repository fork, click on the \"Actions\" tab.
Refer to the graphic below for the numbered steps:
main
for LoopFollow, dev
for LoopCaregiver)Tap the green button that says \"Run workflow\"
The Add Identifier
Action\u00a0 should succeed or fail in a few minutes.
X
():Open this link: Certificates, Identifiers & Profiles: Identifiers List on the apple developer site.
After successfully performing the Add Identifiers Action
, you will see the identifier for your app with a Name and Bundle ID matching that in the table below. You will see your unique TEAMID embedded in the identifier. (If you previously built this App with Xcode, the name may start with XC but the ending should match.)
If you build from a second or third repository
for Loop Follow
, the Name will end in Second
or Third
and Bundle ID will have .Second
or .Third
at the end.
The Loop Caregiver app requires updates to the Identifiers
after they are generated.
The Loop Follow app does not require this extra step. You can skip ahead to Create App in App Store Connect.
"},{"location":"gh-actions/gh-other-apps/#add-app-group-to-loopcaregiver","title":"AddApp Group
to LoopCaregiver
","text":"As of 2023 December 8, the Loop Caregiver app requires the addition of an App Group
to an expanded list of Identifiers
. Follow these steps one time to be able to build the Loop Caregiver app after this update.
App Group
Exists","text":"Open this link to view your applicationGroup
Identifiers
: App Group Identifiers
NAME
of LoopCaregiver App Group
and the IDENTIFIER
contains your TEAMID
in this format: group.com.TEAMID.loopkit.LoopCaregiverGroup
App Group
to Identifiers
App Group
for the Loop Caregiver App","text":"Open this link: Register an App Group on the Apple Developer site.
Description
, use LoopCaregiver App Group
Identifier
, enter group.com.TEAMID.loopkit.LoopCaregiverGroup
, substituting your team id for TEAMID
.TEAMID
must be correct and the LoopCaregiverGroup
App Group must match the format shown aboveContinue
and then Register
.App Group
to Identifiers
","text":"Click to open this link in a new tab: Certificates, Identifiers & Profiles: Identifiers List
on the Apple Developer site.
LoopCaregiver
","text":"All five of these identifiers should be found after running the Add Identifier
action on GitHub.
If you do not see them, please sync your LoopCaregiver
repository and then run the Add Identifier
action. The NAME
might begin with an XC
if you previously built with Xcode. However, the IDENTIFIER
column value should match.
NAME
IDENTIFIER
LoopCaregiver
com.TEAMID.loopkit.LoopCaregiver
LoopCaregiverIntentExtension
com.TEAMID.loopkit.LoopCaregiver.IntentExtension
LoopCaregiverWatch
com.TEAMID.loopkit.LoopCaregiver.watchkitapp
LoopCaregiverWatchWidgetExtension
com.TEAMID.loopkit.LoopCaregiver.watchkitapp.WidgetExtension
LoopCaregiverWidgetExtension
com.TEAMID.loopkit.LoopCaregiver.WidgetExtension
"},{"location":"gh-actions/gh-other-apps/#add-loopcaregivergroup-to-each-identifier","title":"Add LoopCaregiverGroup
to each Identifier","text":"Find and click on the row for the LoopCaregiver
on the Certificates, Identifiers & Profiles: Identifiers List page. Look in the IDENTIFIER
column to find com.TEAMID.loopkit.LoopCaregiver
. The NAME
might begin with an XC
if you previously built with Xcode. However, the IDENTIFIER
column value should match.
NAME
IDENTIFIER
LoopCaregiver
com.TEAMID.loopkit.LoopCaregiver
The Edit Your App ID Configuration
screen will open.
App Services
column, scroll down to the App Groups
rowCapabilities
column) for App Groups
is checkedEdit
or Configure
, whichever shows upApp Group Assignment
screenLoopCaregiver
App Group that uses your TEAMID
in group.com.TEAMID.loopkit.LoopCaregiver
Loop App Group
is checked, you should uncheck itContinue
, otherwise, tap Cancel
If you modified settings for an identifier, the Save
button at the top right will become active. Click on Save
before leaving this page - otherwise, the change does not take effect.
Save
Modify App Capabilities
confirmation screenConfirm
If you did not need to make changes, the Save
button will not be active.
< All Identifiers
button at the top leftThe full list of Identifiers should be displayed again.
Continue down the list until every identifier in the table below has the App Group
for LoopCaregiver App Group
added to it. (DO NOT SELECT the Loop App Group
) If you miss any, the GitHub action to 3. Create Certificates
will succeed but the GitHub action to 4. Build LoopCaregiver
will fail.
NAME
IDENTIFIER
LoopCaregiver
com.TEAMID.loopkit.LoopCaregiver
LoopCaregiverIntentExtension
com.TEAMID.loopkit.LoopCaregiver.IntentExtension
LoopCaregiverWatch
com.TEAMID.loopkit.LoopCaregiver.watchkitapp
LoopCaregiverWatchWidgetExtension
com.TEAMID.loopkit.LoopCaregiver.watchkitapp.WidgetExtension
LoopCaregiverWidgetExtension
com.TEAMID.loopkit.LoopCaregiver.WidgetExtension
"},{"location":"gh-actions/gh-other-apps/#create-app-in-app-store-connect","title":"Create App in App Store Connect","text":"You will be following the directions below to create an App in App Store Connect if you don't already have one.
This requires you to provide some information. Examine the table below for the bundle ID associated with your app.
App Name Bundle ID Loop Caregiver com.TEAMID.loopkit.LoopCaregiver Loop Follow com.TEAMID.LoopFollowIf you build from a second or third repository
for Loop Follow
, the Bundle ID will have .Second
or .Third
at the end.
Open this link: App Store Connect / Apps to view your apps; log in if needed.
If this App already exists, you can continue to Create Certificates
Click the Add Apps button or the blue \"plus\" icon and select New App as shown in the graphic below
The New App dialog box opens and should appear similar to the graphic below. Before you fill anything out, make sure your Bundle ID is available in the dropdown menu. If you do not see the Bundle ID for your app; back out of this screen and follow the directions in Configure to Use Browser: Find My Loop, where you'll be finding App Name instead of Loop.
Click Create but do not fill out the next form. That is for submitting to the app store and you will not be doing that.
You are done with this activity. Before you close this browser window, note the TestFlight tab at the top of the page. You'll be using that tab after you complete the next two actions.
"},{"location":"gh-actions/gh-other-apps/#create-certificates","title":"Create Certificates","text":"Refer to the graphic below for the numbered steps:
main
for LoopFollow, dev
for LoopCaregiver)Tap the green button that says \"Run workflow\".
Wait a minute or two for the action to finish
The graphic below is an example from Loop, your screen will show your app and associated repository
If you are building the Loop Caregiver app, skip ahead to Build Action.
"},{"location":"gh-actions/gh-other-apps/#display-name-customization-for-loop-follow","title":"Display Name Customization forLoop Follow
","text":"If you build Loop Follow
for one, two or three loopers, you may choose to customize your fork
or forks
to insert a custom display name.
LoopFollowDisplayNameConfig.xcconfig
display_name = LoopFollow
(or LoopFollow_Second
or LoopFollow_Third
)display_name = LF custom name
main
branchContinue to build as instructed below. After you install the app on your phone, iPad or Mac via TestFlight, that custom name is what is displayed. The prefix LF is suggested to make it easier to find the custom named Loop Follow
app in the list of apps, but is not required.
Refer to the graphic below for the first four steps:
main
for LoopFollow, dev
for LoopCaregiver)Tap the green button that says \"Run workflow\".
Wait a few minutes to make sure there is not an early failure
Once the first build completes, you will be able to configure TestFlight for the app - follow the template for setting up TestFlight for Loop found in Configure to Use Browser: Set Up Users and Access (TestFlight).
"},{"location":"gh-actions/gh-other-apps/#install-on-phone","title":"Install on Phone","text":"The Install on Phone walks you through the steps to install the app to a phone. When going through those steps, replace your App Name for\u00a0Loop. Everything else is the same.
"},{"location":"gh-actions/gh-other-apps/#use-a-github-organization-account","title":"Use a GitHub Organization Account","text":"This section is optional. It is provided to assist:
Secrets
repeatedlySecrets
just one time instead of entering them for each repository
individuallyPrerequisite: You need a personal GitHub account.
In the instructions below, use your GitHub username instead of my-name
.
my-name-org
(of course naming is up to you)my-name
and click on your icon (at upper right) and choose SettingsCreate a free organization
.Set up your organization
screen:my-name-org
into the Organization name
boxmy-name
accountMy personal account
Complete setup
my-name
my-name
account The GitHub personal access token used as one of the 6 Secrets
is associated with your personal account (my-name
); so if you already have one, you just keep using it.
There are three steps to using this account moving forward:
One-time only: You need to add your 6 Secrets
to this organization account (instructions are in next section)
One-time only: Create a Match-Secrets
repository in the my-name-org
account
github.com/my-name-org
)Repositories
New repository
my-name-org
as owner and enter Match-Secrets
as the namePrivate
and tap on the Create
buttonMatch-Secrets
For each repository: you need to fork
for each app you wish to build to the new my-name-org
account
fork
fork
directionsFork LoopWorkspace
Repositories
when building apps other than the Loop appThen, for every build, you will use just the organization account. The original account is maintained to give you access to GitHub and holds your GitHub personal access token.
WARNING - If you have forks
of DIY apps in your original my-name
account that are configured to build automatically, you want to disable that and have only the my-name-org
account be configured for automatic building. Refer to Disable Building for Personal GitHub account.
Secrets
to your GitHub Organization","text":"Adding the Secrets
to an organization is similar to adding them to each repository
for a personal GitHub account. The difference is you add them at the organization level and then they are available to each repository
in that organization.
Follow the directions below to prepare to add secrets to the organization and then skip (when provided the link) to the per-repository directions for more details about adding each secret.
Make sure you are in the organization for GitHub:
Your Organizations
my-name-org
github.com/my-name-org
Secrets and variables
and click on the drop-down symbol and choose Actions
New organization secret
Secrets
, for adding Secrets
repository
and indicate the button will says New repository secret
- your screen will show New organization secret
Secrets
are entered for your organization account my-name-org
Secrets
are entered, they are used by every repository you fork with this organization as the ownerThe GitHub personal access token used as one of the 6 Secrets
is associated with your personal account (my-name
); so if you already have one, you just keep using it. If not, follow these instructions to get or configure a new one.
Once you have your apps building as you expected from the my-name-org
organization account, you should configure your personal account to stop any automatic building that may be taking place.
repository
","text":"You can delete the DIY repositories from your personal account
Your Repositories
my-name
instead of my-name-org
You can disable the build actions from the repositories in your personal account
Your Repositories
my-name
instead of my-name-org
To build the\u00a0Loop\u00a0app using a browser, you need:
Once you have the\u00a0Loop\u00a0app in TestFlight, you need:
Steps that must be completed to configure for building with a browser are found at:
This is a very long page because there are a lot of steps and each step is explained with graphics of what you will see when you work through the steps.
"},{"location":"gh-actions/gh-overview/#how-to-video-to-build-with-a-browser","title":"How-to Video to Build with a Browser","text":"In addition to the webpage linked above, there is a narrated video of each step needed to build using a browser.
Click in the comments for a full index of topics. If you have issues with a step, use the index to advance to the relevant part of the video. Subtitles are in English. You can choose a different language but the automatic translation feature may provide translations that are not completely accurate.
"},{"location":"gh-actions/gh-overview/#install-on-phone","title":"Install on Phone","text":"Instructions to install on your phone are found at:
Instructions to make updates are found at:
There is also a helpful video for this process:
If you get an error, please consult:
For experienced and/or advanced users who want to build the development version of the app, there is additional information at the link below. If you have not built using the browser build method before, it is suggested you first build the released version. Once you have a successful build, then follow the steps for the development version. Building the app is independent of installing the app on your phone from TestFlight.
Try to:
This page is only relevant when building with a browser.
For Mac, please see: Update/Rebuild with Mac
Time Estimate (click to open/close)Build the Loop App
Once a Year Renew Certificate
The Loop app must be built at least every 90 days when you build with a browser - this is TestFlight requirement.
Most users will start at How to Update or Rebuild.
If your GitHub Personal Access Token
has expired, we recommend you update it with No Expiration
as explained at GitHub Token.
If you are running Loop-dev
, be sure to review these instructions but modify for the branch you are using: refer to Build Loop dev with Browser
No Expiration
.Personal Access Token
to never expire and to support the automatic rebuild feature? See this section Regenerate Token.GH_PAT
only affect future builds. Previous build are available for the full 90 days.Distribution Certificate
. These only last one year. See this section Renew CertificateUnder ordinary circumstances, you do not have to rebuild or update your Loop app until TestFlight forces you to (90 days). However, there is no harm in building more frequently.
Summary of Update Steps
Fork
Ignore the email that says you need to fix \"issues\" in your app. You are not selling the app in the app store; so no action is required. The app you built is for personal use for you or a family member.
There is also a helpful video for updating (it does not include the Renew Certificates step, which is only done once a year):
This is Step 1 of 6 - it may not always be necessary, but please check every time.
Sign in to your Apple Developer account. If there are agreements you have not accepted, you will get errors when you try to Build that indicate your Apple Secrets
are incorrect - that is very unlikely. You may also need to update your credit card information if it has changed, for example, if there is a new expiration date.
FASTLANE_ISSUER_ID
, FASTLANE_KEY_ID
or FASTLANE_KEY
If you need detailed instructions, click on this Apple Program License Agreement
Help Page.
Apple Program License Agreement
(only)Paid Applications Schedule Agreement
App Store
Wait After You Agree
It typically takes 15 minutes before your updated agreement is available so you can complete your build.
If your build with browser fails, wait longer. An hour wait was reported by one person.
"},{"location":"gh-actions/gh-update/#renew-certificate","title":"Renew Certificate","text":"This is Step 2 of 6 - it is only needed once a year - you should get an email from Apple 30 days before your Distribution Certificate
expires. (Don't worry if you did not see the email.)
Apps in TestFlight are not affected when a certificate expires or is revoked.
This is only a summary - please follow the detailed steps below carefully.
Delete all your Distribution Certificates
. Apple only allows you to have 2 of these. So get rid of the old ones so you will be able to create a new one that will last a full year. (Step 1 below.)
The Certificate in question is embedded in your Match-Secrets repository
. In order to proceed, you need to remove the old certificate from Match-Secrets
. Later this will be automated and can be done without modifying your Match-Secrets repository
, but for now the easiest way to do that is to just delete the certs/distribution
folder in your current Match-Secrets repository
.
Finally, for every app that you build with this method, you need to run Create Certificates
for that app. (Step 4 below.)
Distribution Certificate
","text":"Delete and Create
Do not miss the final step in this section. After you delete certificates, you must run the Action for Create Certificates
before you can build an app again.
Match-Secrets
RepositoryType
column - do not delete a Development Certificate
Distribution Certificate
, your certificate already expired and was removed by Apple; so skip ahead to Step 2Fork
Distribution Certificate
and revoke itNavigate to your Match-Secrets
Repository
https://github.com/username
where username
is replaced by your GitHub usernameDelete the certs/distribution
folder of your Match-Secrets
repository
using these instructions. The GIF below indicates the places to click with numbered red rectangles:
certs/distribution
Delete directory
Commit changes
in the upper right and then accept the suggested choice by clicking on Commit changes
in the lower rightDeleting the certs/distribution folder did not work for me
Some people reported trouble with this step. The other option is to delete and create a new Match-Secrets
repository: see Reset Match-Secrets
While still within your Github account, navigate to your fork of LoopWorkspace.
Repositories
and select LoopWorkspace
Action
: Create Certificates
Other Apps
If you build other apps using the build with browser method, they have just had their certificates revoked.
Create Certificates
for that apprepositories
nowFork
","text":"This is Step 3 of 6 - it may not always be necessary, but please check every time.
Open your GitHub account and select your LoopWorkspace repository
from your repositories list.
fork
is up to date with LoopKit version, you will see the message This branch is up to date with LoopKit/LoopWorkspace:{branch}
- there is no need to build again unless your Loop app in TestFlight is about to expire - in which case, proceed to Build the Loop Appfork
shows a message such as This branch is 3 commits behind LoopKit:main
and you want to update and build, then click Sync Fork
by tapping where the red rectangle is shown in the graphic above, then in the pop-up window, tap on Update branch
fork
shows a message such as This branch is 3 commits behind LoopKit:main and 4 commits ahead of LoopKit:main
; you might need to manually sync and choose to discard changes
; you can always customize again after the updateBuilding a different branch
Do I need to do anything special to build a different branch?
Yes: please follow instructions at Build Development Version
"},{"location":"gh-actions/gh-update/#build-the-loop-app","title":"Build the Loop App","text":"This is Step 4 of 6 - this is always required.
Refer to graphic below as you follow the steps to build the Loop app.
Actions
tab4. Build Loop
workflow on the leftRun workflow
to see the dropdownRun workflow
button in the dropdownIf a new release is announced at Current Release, look to see if there are instructions about extra steps required with the release. (The release after 3.2.3 will certainly have extra instructions.)
If you are using the dev branch, head over to Build Development Version for information.
Otherwise, head over to Errors with Browser.
"},{"location":"gh-actions/gh-update/#apple-email-to-ignore","title":"Apple Email to Ignore","text":"You can ignore an email from Apple that there are things you must fix in your app:
You'll receive an App Store Connect email confirming that the build has completed processing, and a TestFlight email confirming the new app is ready to test.
Could not install WWDR certificate
This is Step 6 of 6 - once you finish this, you are done and your app will last 90 days.
Open the TestFlight app on the Loopers phone and install the most recent version of the Loop app. Most Loopers have automatic update disabled on their phones, so this is a manual process. Don't forget.
The updated Loop app will show up in your TestFlight app on the Looper's phone.
Calendar Reminder
This is a good time to put a calendar reminder in your favorite app.
Set it up for a few days before the TestFlight app will expire.
"},{"location":"gh-actions/gh-update/#automatic-update-disabled","title":"Automatic Update Disabled","text":"Option 1: If you chose to Disable Automatic Install from TestFlight, you control when to install the app on the phone.
Install
as shown in the GIF belowWe strongly recommend you toggle off Automatic Updates to allow you to be in full control over when the app is updated. This is even more important if you're using automatic builds from GitHub for version 3.3 or later.
Option 2: If you chose to enable Automatic Updates from TestFlight for the Loop app, the updated build will be installed over your existing app as soon as it uploaded to TestFlight.
Open
instead of Install
If you are a typical user who just builds a single version for yourself or your child, you do not need to read this section.
This section provides detailed instructions if you want to choose a previous build to install on your phone. Typically, the most recent build is selected but there may be special cases:
branch
or set of customizations; you can install a previous build once you are done with the testThis section covers two topics.
About half an hour after the build action completes, the new build will appear in the TestFlight screen at this link: App Store Connect / Apps
TestFlight
tab to see a screen similar to the graphic belowSelect the build to which you wish to add testing notes. When you tap on that icon, it opens a screen similar to that in the next graphic.
Click inside the box under Test Details. Insert the text you want to see on the phone before you install this version of the app. Tap the Save
button at upper right and then < iOS Builds
at upper left.
In this example, the branch and commit number are included followed by an indication that this version includes the customizations preferred by this person. Your test details can be as simple as \"Use this for Charlie\".
Commit Number
If your build includes customizations, your commit number will not match what the developer expects to see if you need to ask for help.
Use this section Customization and SHA-1 to determine the SHA-1 before customization.
"},{"location":"gh-actions/gh-update/#select-a-previous-build","title":"Select a Previous Build","text":"First open the TestFlight app on your phone and select the Loop app.
Near the bottom of the screen is a row labeled previous builds.
The following graphic shows the view seen in the TestFlight app on the phone. By adding test details (as explained in the previous section), the desired build is clear. For most people - they will just use the most recent build. This procedure is useful for those who build often or who support multiple family members.
"},{"location":"gh-actions/gh-update/#the-loop-app-build-details","title":"The Loop App Build Details","text":"In the Loop app, once installed on your phone, tap on Settings -> Support -> Issue Report
. The graphic below shows an example of the Build Details included in the report.
profileExpiration
listed here is irrelevant - the app expires when the TestFlight expiration indicatessourceRoot
that starts with /Users/runner/work/LoopWorkspace
buildDateString
is when the app was built and transferred to TestFlight, not when it was installed on your phoneYour GitHub Personal Access Token
should be configured:
Never expire
repo, workflow
permission scopeIf you are not logged in to GitHub and have not logged in recently, then you may see the authentication screen when doing the steps below.
Authenticate if requested by clicking on the green Send SMS
button or entering your password.
Once you are authenticated, you will have access to view your personal access token.
"},{"location":"gh-actions/gh-update/#modify-personal-access-token","title":"ModifyPersonal Access Token
","text":"If your Personal Access Token
has not expired but does not have the correct permission, you should modify it. Do not regenerate it.
Click on the link to view your token and compare it to the graphic below.
Personal Access Token
The graphic above has a blue rectangle added to indicate where you should see your token. If yours does not look like this, click on the link (FastLane Access Token
) to open a new display. Watch the GIF below - there are 4 frames, the last one has the Update token button.
FastLane Access Token
) to open a new displayUpdate token
buttonAfter you click on the Update token
button, your FastLane Access Token
should now show repo, workflow
and look like the earlier graphic above.
The only reason to regenerate a token is if it is set to expire. Do not do the next section unless you have to.
"},{"location":"gh-actions/gh-update/#regenerate-token","title":"Regenerate Token","text":"If your Personal Access Token
has expired or has an expiration date, you can regenerate the new one at any time.
Update new GH_PAT to Secrets
After you get your new token, immediately add it to your Secrets
for any app you build with this method. You don't have to rebuild the app, but it's a good idea to at least run Action 1. Validate Secrets
for each repository to make sure you did not make a mistake.
You can regenerate your GitHub Personal Access Token
at any time by clicking on the link below. (it will open in a new browser tab.)
The FastLane Access Token
is a clickable link.
After you click on FastLane Access Token
your screen should be similar to the graphic below.
Your existing TestFlight builds are fine
The yellow GitHub warning by the Regenerate Token
button is for new builds you make in the future.
Previous builds are still available in TestFlight and are not affected by this action.
Note - selecting the workflow
check box below is new. If yours does not show that selection, add it before you click on Regenerate token (red highlight in graphic below).
Click on Regenerate token (red highlight in previous graphic) to see screen similar to next graphic.
Be sure to change the Expiration from 30 days
to No Expiration
. When you select No Expiration
a GitHub warning appears. Click on the green Regenerate Token
button (red highlight in following graphic).
The next screen shows your new token. Copy the token using the copy icon and save it along with your other secret settings.
The next step is to update GH_PAT in your Secrets
. (If you build other apps with this method - update the GH_PAT for all of them right now - do not forget.)
Secrets
","text":"This example is for updating GH_PAT in the Secrets
for your repository
, but the same method can be applied when changing any of the Secrets
.
Open the repository
for which you will update Secrets
. On the far right is a Settings selection. If you don't see Settings (if last item on row is Insights), then you are not on your fork
or you need to sign in to your GitHub account. You should see username/LoopWorkspace
with forked
from LoopKit/LoopWorkspace
underneath.
Refer to the GIF for help. There are 3 frames.
Secrets and variables
on the left side and click on the drop down indicator to display Actions
.Action secrets / New repository secret
row, until you see the list of your current Secrets
. Scroll all the way to the top of the screen and tap on your LoopWorkspace link. Then follow the How to Update or Rebuild instructions to start a new build.
"},{"location":"gh-actions/gh-update/#build-development-version","title":"Build Development Version","text":"The information to build a development (dev
or any other branch) has been moved to a new page: Build dev with Browser
Volunteers generously provide support for Loop via online platforms. You have several options for joining conversations on Loop and asking for help. Links to the main platforms are listed below. Non-US Loop users in Italy, Australia, and several other countries have also formed Facebook (FB) groups.
If you are having trouble building or using your Loop app, there are some important steps to get responses to your question, while also being considerate of our volunteers' time.
One of our awesome Loop volunteers captured the domain names loopdocs.org
and looptips.org
. So you can find these valuable websites by simply typing loopdocs or looptips followed by .org in your browser. In other words, you don't need to remember or type https://loopkit.github.io/loopdocs/
.
There are a lot of links you can click on this website.
If you click on the link, you are moved to the new location and must hit the back button on your browser to return.
You can choose to open that link in a new window or new tab.
Keyboard Navigation
When viewing the site at a computer, you can use keys as shortcuts:
n
for next pagep
for previous pages
for searchThe website navigation depends on whether you are on a mobile device or a computer (with browser width > 1220 pixels).
It is not uncommon to have a question about Loop. But, it is exceptionally rare to have the question not already answered in LoopDocs, so please search for answers by selecting the Search tool (upper right) or typing s
then a search term at a computer. As you begin to type, suggested completions and links to pages are displayed. Click on the item you think answers your question.
Please submit suggestions for updates and improvements to this documentation. There are many pages of content and we welcome reviewers to help find typos and outdated info/links. If you notice a typo, poor word choice or some explanation that could be improved or clarified, there are a few options. The first two options use github, a website where open-source code and documentation is often shared. You can only use github if you have an account (it's free).
If you decide to do a GitHub Pull Request (PR) or create an Issue, first look to see if someone has already opened a PR or Issue on the topic so you don't create a duplicate.
New Issue
buttonHelpful tips for providing LoopDocs feedback through Facebook and/or Zulipchat:
Take a deep breath
It is totally understandable if the thought of building and operating your own\u00a0Loop\u00a0app feels intimidating.
As you learn the information explained in\u00a0LoopDocs, this will start feeling more comfortable.
"},{"location":"intro/overview-intro/#loopdocscontents","title":"LoopDocs\u00a0Contents","text":"The\u00a0LoopDocs\u00a0website is organized as follows
You will notice many links in the LoopDocs pages pointing to detailed information.
If you notice an arrow pointing up and to the right beside the link:
This link format is used anytime the link will take you to a different website
The LoopDocs pages contain words that may be unfamiliar. For a definition of any word with a dashed underline, simply hover your mouse over the word, or tap on the word on a mobile device, to view the definition. For example, Omnipod has a tooltip.
Every tooltip definition is also found in the Glossary - so head over there if you have trouble reading a tooltip.
"},{"location":"intro/overview-intro/#buildingloop","title":"Building\u00a0Loop","text":"The process for building the\u00a0Loop\u00a0app is divided into short segments (sections or pages) in the Build tabs of\u00a0LoopDocs.
Best Practice: Learn to Build
You are strongly encouraged to build\u00a0Loop\u00a0for yourself.
You can build\u00a0Loop\u00a0and practice with a simulated phone, CGM and/or pump. You can \"dose\" the simulated pump and your real pump at the same time and watch the glucose predictions.
Starting with a simulator can help you decide if you want to move forward with purchasing additional items required to use the app. You can:
Locked Phone or App in Background
Do not expect the simulator to work when the phone is locked or the app is in the background. The app relies on a real insulin pump or a real CGM to wake up the app when the phone is locked or the app is in the background. The simulator cannot do this.
Please review Simulator Build for more information.
"},{"location":"intro/overview-intro/#operatingloop","title":"Operating\u00a0Loop","text":"A significant amount of content is provided on this website and via link to other sources.
Please review these pages when initially setting up and learning to use\u00a0Loop.
Some techniques are specific to\u00a0Loop, but the general concepts of how man-made insulin works and strategies to test basal, carb ratios and insulin sensitivity apply to all the hybrid closed-loop systems, commercial and open source.
"},{"location":"intro/overview-intro/#development-history","title":"Development History","text":"Loop\u00a0is an open-source, shared project. The entire project has been, and continues to be, done by volunteers. From the code to the website, you're getting all this because dozens of volunteers have given their time, so please add your time by reading this website thoroughly before embarking on your\u00a0Loop\u00a0journey.
Here are development history links to other resources for you to explore.
The early history of\u00a0Loop\u00a0development:
The early days and the many advances brought about by the #We Are Not Waiting
diabetes community:
How the Omnipod Eros pods were cracked to work with\u00a0Loop:
With the release of\u00a0Loop 3\u00a0, there are two ways to build the app.
The Build Steps have been split into two tabs:
There are some requirements common to both methods. Some requirements are specific to only one method.
"},{"location":"intro/requirements/#common-requirements","title":"Common Requirements","text":"These requirements are independent of how you build the Loop app:
If you plan to build using the Build with Browser instructions, you also need:
Detailed instructions are included in the link above.
"},{"location":"intro/requirements/#added-requirements-to-build-with-mac","title":"Added Requirements to Build with Mac","text":"If you plan to build using the Build with Mac instructions, you also need:
Go through the Common Requirements to see what you need to actually Loop.
Simulator Option
If you want to test the Loop app without attaching CGM or pump hardware, you can run a simulated CGM or simulated pump. You can use actual CGM data using Dexcom Share or Nightscout as a Remote CGM.
These simulators are part of the Loop app and are available with either build method you choose.
Check out the Simulator page.
Once you have chosen your Build Method, go through the pages for that build method several times before beginning, especially if this is new to you.
When you are ready to proceed, work through the tasks on each page. Take your time. You can do one a day, take a week per page or blaze through them quickly. Just be sure to read carefully and if you are confused - reach out for help: How to Find Help.
After you build Loop on your phone, keep following along in the docs as you Set up and Operate your Loop app.
"},{"location":"intro/requirements/#next-steps","title":"Next Steps:","text":""},{"location":"intro/requirements/#review-the-common-requirements","title":"Review the Common Requirements","text":"Before you start either build method, review the Common Requirements. First one is Compatible iPhone. On each page, keep clicking Next (or n) until you've finished with the Intro pages and are ready to Build.
"},{"location":"intro/requirements/#build-with-browser","title":"Build with Browser","text":"Click on the link if you are done reviewing the common requirements and you want to skip ahead to Build with Browser.
"},{"location":"intro/requirements/#build-with-mac","title":"Build with Mac","text":"Click on the link if you are done reviewing the common requirements and you want to skip ahead to Build with Mac.
"},{"location":"loop-3/add-cgm/","title":"Add CGM","text":""},{"location":"loop-3/add-cgm/#cgm-choices","title":"CGM Choices","text":"A CGM can be added from the Heads-Up-Display (HUD) or from the Loop Settings screen \u2699\ufe0f.
The HUD will look like the graphic below if no CGM or Pump is connected with Loop:
Loop can be connected to the following CGMs:
To add a CGM, go to the Settings screen \u2699\ufe0f, tap on Add CGM
, and tap on your CGM.
If you later decide to use a different CGM type, you must first delete the CGM and then add CGM to choose the new one.
Set up Focus Mode
Don't forgot to check your iOS Focus Notifications when you add or change your CGM.
dev
branch only) must have Loop notifications turned on to get CGM alertsLoop provides an option to upload CGM values to a remote service like Nightscout or Tidepool. In many cases this can be a preferred solution.
With Loop 3, the data-store on the Loop phone keeps a full week of data. If there is an interruption in the upload, when it is restored, Loop will fill in up to 1-week of CGM data that was not previously uploaded.
Some people use Dexcom Share to feed their remote services. There have been outages with Share. When those occur, the data is not back-filled like it is with Loop.
This is the reason why there's a comment under each CGM below to select Upload Readings.
"},{"location":"loop-3/add-cgm/#dexcom-g5-g6-one","title":"Dexcom G5, G6, ONE","text":"To use the Dexcom G5, G6 or ONE:
Dexcom G6
for either G6 or ONEShare Credentials
Tap to set
You can find the transmitter ID in your Dexcom G6 app or on the back of the transmitter box (please refer to the below screenshots).
It is suggested that you enable Remote Upload from Loop.
"},{"location":"loop-3/add-cgm/#change-dexcom-sensor","title":"Change Dexcom Sensor","text":"When you change a Dexcom G5, G6 or ONE sensor, you do this in the Dexcom app. When the sensor completes warmup and CGM values are once again reported in the Dexcom app, Loop picks these values up because you are using the same Dexcom Transmitter.
"},{"location":"loop-3/add-cgm/#change-dexcom-transmitter","title":"Change Dexcom Transmitter","text":"When you change the Dexcom G5, G6 or ONE Transmitter, you need to delete your CGM selection from Loop and then add it back after you complete the pairing with the transmitter in your Dexcom app.
FYI: When You Change Dexcom Transmitters (click to open)Before you change Dexcom transmitters, select the Delete CGM
button at the very bottom of the CGM info page in Loop. If you leave the transmitter connected in Loop, you may have trouble pairing your new transmitter. If pairing does work, then Loop will not get CGM data from the Dexcom app on your phone.
Follow the instructions here: What do I do when I switch Dexcom transmitters?.
The Dexcom G7 is handled differently - Loop automatically detects when a new sensor/transmitter pair is added to the Dexcom G7 app.
Your selection to enable Remote Upload from Loop must be repeated with each new Transmitter. The default setting is disabled.
"},{"location":"loop-3/add-cgm/#about-dexcom-share-credentials","title":"About Dexcom Share credentials","text":"You do NOT need your Share account info listed in Loop settings if you are using a G5 or G6 system. The transmitter ID is sufficient. In fact, you should leave your Share credentials blank so that you don't accidentally become internet-dependent for CGM data if you forget to update your transmitter ID when you start a new transmitter.
"},{"location":"loop-3/add-cgm/#dexcom-g7","title":"Dexcom G7","text":"This is only available on Loop 3.
You must have the G7 app on the same phone as Loop. When the G7 app switches to the next sensor/transmitter assembly, Loop automatically switches too.
It is suggested that you enable Remote Upload from Loop.
Don't forget Health Permissions
For those switching from Dexcom G6 to Dexcom G7, you might forget to add permission for the G7 app to write to Apple Health. If you want long-term history of those CGM readings to persist in Apple Health, turn on the permission for the Dexcom app to write glucose to Health.
If either the G6 or the G7 has permission to write to Apple Health, then Loop will delete the Loop glucose data in Apple Health that are older than 3 hours and newer than 1 week. The Dexcom app will write its glucose values to Health when each value is 3 hours old.
"},{"location":"loop-3/add-cgm/#medtronic-enlite-cgm","title":"Medtronic Enlite CGM","text":"The Medtronic Enlite CGM is only available if you have connected it to your compatible Medtronic Pump.
If you need to use Dexcom Share
If the dexcom is on another phone, you can use Share if internet / cell coverage is good.
Dexcom Share is not available for Dexcom ONE CGM.
The Dexcom Share credentials (in other words, account login) is the same as what you used to log in to the active Dexcom app on your iPhone. Dexcom Share account is not always the same login info as your Dexcom Clarity account. The information is entered when you first log in to the app and then is never displayed again, nor visible under any information screens. If you have forgotten your G5/G6 account info, you can delete the Dexcom app and redownload it to try logging in again. This will not cause a restart of any sensor sessions in progress.
If you do not enter your Share credentials correctly into Loop, you will get an error when Loop tries to access your Share account to backfill CGM data. An example of the error message is shown in the graphic below. If you see that message, delete your Share account from Loop settings and try again.
"},{"location":"loop-3/add-cgm/#nightscout-remote-cgm","title":"Nightscout Remote CGM","text":"If the user is already uploading CGM data to their Nightscout URL, they can select that as a source for CGM data for Loop. The user must acknowledge they understand the risks of using a remote source that requires internet, as shown in the graphic below.
In addition to the risks of missing data if the internet is not reliable, you must also make sure the CGM data sent to Nightscout is reliable.
DANGER - Make sure Nightscout CGM Data is Reliable
Just because you can use Nightscout as a CGM source does not mean you should.
If you decide to use Nightscout as a CGM source, make sure the data stored in Nightscout is reliable. If the app you choose uploads bad results to Nightscout, you don't want Loop to use that bad data.
Sensors that can be added to Nightscout via other apps include Dexcom, some Libre and some Medtronic sensors. Please refer to Nightscout Docs: Configure your Uploader.
There are third party apps that bring Libre data to your Loop phone and there are customization instructions starting at Libre Support for Loop 3.2.x Code that explain how to modify Loop 3 to use one of those apps. Please use these steps to get a version of Loop that does not rely on internet access to work.
It is suggested that you use Open Loop during warmup until the new sensor begins to provide reasonable data. This is especially important with European Libre 2 using direct bluetooth connection.
The xDrip4iOS app (which can also be found in the app store under the name Shuggah) may have a problem during warmup of a new sensor (European Libre 2 using direct bluetooth connection). There were two instances of crazy high values being reported and picked up by Loop 3. One Shuggah user and one xDrip4iOS user who connected via Nighscout as a CGM with Loop 3 had serious overdose of insulin because of bad readings with a new sensor. The developers of xDrip4iOS fixed their application - so make sure you have the latest version. Those developers have no control over what is provided by Shuggah.
The user must enter both the URL and API_SECRET for their site to ensure the security of the data. The URL must start with https://
and cannot have any extra spaces in the line.
When using Nightscout Remote CGM, if the user needs to change credentials or switch to a different CGM, the user must go through the Loop->Settings \u2699\ufe0f->CGM menu.
"},{"location":"loop-3/add-cgm/#change-cgm","title":"Change CGM","text":"To change CGMs, delete your existing CGM and then add a new CGM.
"},{"location":"loop-3/add-cgm/#change-a-nightscout-remote-cgm","title":"Change a Nightscout Remote CGM","text":"For Nightscout Remote CGM, the Nightscout URL is opened when tapping on the CGM icon in the Heads-Up Display, while the credential sections with the Delete CGM
row are shown when tapping on Loop Settings
\u2699\ufe0f, and selecting CGM.
After deleting a CGM, the Head-Up-Display at the top of the Loop main screen will show the Add CGM
icon.
Other CGM, you can tap on the CGM from either the Heads-Up Display or tap on Settings
\u2699\ufe0f, and select your CGM.
Scroll to the bottom of the screen and select Delete CGM
.
For some CGM that can be added to Loop 3 with a patch, the words may be different, but the steps are the same.
"},{"location":"loop-3/add-cgm/#dexcom-g5-g6-and-one-not-g7","title":"Dexcom G5, G6 and One (not G7)","text":"For older Dexcom sensors, the transmitter is replaced separately about once every three months. In order to enter a new transmitter number, you must first delete the CGM and then add the CGM.
Detailed instructions are found at CGM FAQs: What do I do when I switch Dexcom transmitters?.
Once the Dexcom G7 has been added to Loop, the user only needs to let the Dexcom G7 app know when to use the new sensor. The Loop app automatically switches to the new sensor with no additional steps required by the Looper.
"},{"location":"loop-3/add-pump/","title":"Add Pump","text":""},{"location":"loop-3/add-pump/#pump-choices","title":"Pump Choices","text":"You can choose a pump from the Heads-Up-Display (HUD) or from the Loop Settings screen.
The HUD looks like the graphic below if no CGM or Pump is chosen:
Switching Pumps?
To change the pump connected to Loop go to Change Pump Type.
Loopers can choose from 3 pumps and a simulator:
Omnipod Terms
The Loop app and LoopDocs use these terms:
Here is an overview of the different steps for adding each pump. Before changing pumps, you need to delete the old pump first. See Change Pump Type section below.
"},{"location":"loop-3/add-pump/#steps-for-omnipod","title":"Steps for Omnipod","text":"Tap on Add Pump in the Settings screen to see pump options (shown in the graphic below).
Tap on your Pump.
Medtronic pump users - skip ahead to Insulin Type.
"},{"location":"loop-3/add-pump/#omnipod-common-1","title":"Omnipod Common 1","text":""},{"location":"loop-3/add-pump/#pod-nofication-defaults","title":"Pod Nofication Defaults","text":"Here are the common screens for adding Omnipod or Omnipod DASH showing the default settings. You can change the default settings later.
After you complete these screens, you select the insulin type.
"},{"location":"loop-3/add-pump/#insulin-type","title":"Insulin Type","text":"For all pumps, you can choose from the insulin types below.
To add a Omnipod DASH pump, skip ahead to Omnipod Commom 2.
Omnipod and Medtronic users should continue to select a RileyLink compatible device.
"},{"location":"loop-3/add-pump/#omnipod-or-medtronic","title":"Omnipod or Medtronic","text":""},{"location":"loop-3/add-pump/#select-rileylink","title":"Select RileyLink","text":"For Omnipod and Medtronic pumps, you need a RileyLink compatible device to Loop. The Device and your phone must be kept close to your pump for Loop to work.
A new RileyLink compatible device is not listed next to its slider until after you connect the device to Loop. Find the little toggle in the device list, switch on that toggle, and the RileyLink will appear after the toggle is green.
You can personalize the name once it is connected to Loop.
All RileyLink compatible devices in the nearby area, not already connected to a Loop app, will display in the RileyLink Setup screen. Select your RileyLink by sliding the toggle to display green and then press the blue Continue
button at the bottom of the screen.
If your device does not appear:
If you are adding a Medtronic pump, skip ahead to Medtronic.
"},{"location":"loop-3/add-pump/#omnipod-common-2","title":"Omnipod Common 2","text":"After selecting a RileyLink for Omnipod, all other actions for Omnipod and Omnipod DASH are the same. Once a pod is paired, the Pump display is the same, except the Omnipod screen has a RileyLink Devices section.
For Omnipod (left) and Omnipod DASH (right), you should see the Pair Pod
screen.
At this point - you should hit Cancel
(upper right of screen) and review the Omnipod Common page before pairing a pod.
New Looper / New Podder
Carefully review the Pair Pod instructions and the rest of the Omnipod Common page before continuing. Then, when you are ready, pair a pod.
If you are not ready to fill and attach a pod with insulin, try filling a pod with water and let it drip into a ziplock bag to test running Loop on the pod. (Be sure the pod is not near anything when you hit \"Insert Cannula\".)
You may enjoy reading Rufus the Bear.
"},{"location":"loop-3/add-pump/#medtronic","title":"Medtronic","text":"If you followed this page to add your Medtronic pump, you have completed the first three steps. If not, you can prepare your pump now, then do those first three steps using Loop (follow the links). All other steps be completed before you Connect the Pump.
Loop requires these settings on your Medtronic pump.
Check with your users guide (can be found online if you don't have one) for more detailed instructions on your model of pump if you're not sure how to accomplish these steps.
If you have basal rates, insulin to sensitivity factor and carb ratios in your pump - these will be overwritten (using the Therapy Setting values) when you connect your pump to Loop. If those rates are important to you, record them prior to continuing.
Pump Error. Max setting exceeded
.Temp Basal Type
to Insulin Rate (U/hr)
.ON
and enter any random ID (010101 will work - avoid using all zeros). This setting is found in the pump's Utilities menu (for x23 continue to Connect Devices, Remotes) and turn ON
the Remote Options.The final step is to connect your Medtronic pump to Loop.
CM
instead of CA
for the region code. Select CA/CM
in the dropdown menu.Connect
button to connect the pump to Loop.Continue
buttonPump Error. Max setting exceeded
. (See note below for other reasons you might see this message.)Connect
to retry.Max setting exceeded
It turns out the \"Max setting exceeded\" error might be displayed even when Max Bolus and Max Basal Rate are already set appropriately on the pump.
If you get an error Bolus in progress
on the pump when trying to connect, you probably need to rewind and load insulin into the reservoir.
If the pump has alerted that it is out of insulin, you cannot pair to Loop as a new pump.
"},{"location":"loop-3/add-pump/#final-steps","title":"Final steps","text":"Once you have successfully connected to the Medtronic pump, click on Continue
:
Continue
for eachFor x23 and x54 Medtronic pump users only
For x23 and x54 Medtronic pump users, there is a packet of information special to those pumps called MySentry messages. If you have never setup this part of the pump previously, you may see a screen, called \"Pump Broadcasts\", at this point in the setup process.Follow the directions on the screen. They will require you to take some manual steps on your pump to \"pair\" it with your Loop app.Basically, you will need to go to your pump's main menu, scroll down to Utilities, then Connect Devices, then Other Devices, turn that setting On, and then select Find Device. Once you do that, click on theContinue
button in Loop app and the pairing will take place. This will allow those MySentry packets of information to flow to Loop app.This step does not apply for x22 or x15 pump users, since those pumps do not have MySentry capabilities. Now that your pump is paired with Loop, you should select the type of battery you are using and decide whether to use My Sentry:
The Medtronic status and commands available are shown in the Pump Setting page.
"},{"location":"loop-3/add-pump/#change-pump-type","title":"Change Pump Type","text":"Before changing from one pump type to another pump type, you must delete the old pump type.
If you are using Medtronic, scroll to the bottom of the pump screen and select Delete Pump
Before switching between Omnipod and Omnipod DASH or any kind of Omnipod to Medtronic, you must deactivate your current pod
Switch to other insulin delivery device
button will not be available with an active podFollow along in the GIF below - it cycles though these steps.
Switch to other insulin delivery device
and follow the directions to complete the taskNow the new pump type can be selected from settings or tapping on the add pump icon on the HUD
The Head-Up-Display at the top of the Loop main screen will now show the add pump icon.
"},{"location":"loop-3/displays-v3/","title":"Displays","text":"This page has detailed information about Loop 3 Displays.
If you are running Loop v2.2.x, follow this link: Loop v2.2.x Displays.
"},{"location":"loop-3/displays-v3/#main-loop-screen","title":"Main Loop Screen","text":"The main Loop screen contains a Heads-Up Display (HUD) at the top (when in portrait mode) with various charts in the middle and a toolbar at the bottom. As part of the HUD, important messages will appear in the Status Row location.
"},{"location":"loop-3/displays-v3/#landscape","title":"Landscape","text":"When the device is in landscape mode, the HUD is no longer visible, but the chart history is increased. In landscape, the exact number of hours varies by phone, but on my test phone, each chart displays the last 8 hours of history along with the next 6 hours of glucose prediction. The toolbar is always visible while the chart display can be scrolled up and down to view charts of interest.
"},{"location":"loop-3/displays-v3/#heads-up-display","title":"Heads-Up Display","text":"The Heads-Up Display (HUD) shows 3 icons:
There is a Status Row
underneath those three icons that is used to display bolus progress, some alerts and important messages. The Status Row
is also a button that performs an action depending on the message. These are described in the table in the HUD Status Row section. The Status Row
is only visible in portrait mode, so make sure to orient your device to look for these messages.
There are several charts on the main screen to help you navigate and understand Loop. Tapping on a chart on your phone opens up additional information.
"},{"location":"loop-3/displays-v3/#glucose-chart","title":"Glucose Chart","text":"The Glucose Chart displays glucose values in your preferred units.
mg/dL or mmol/L
If your preferred glucose unit is not selected, follow these instructions to change Glucose Units.
The vertical scale is automatically adjusted by Loop to be as useful as possible while including the highest and lowest readings in the chart.
The horizontal axis is set to go forward from the current time through your DIA (insulin duration), so you can see what Loop thinks glucose will be eventually. It then goes back in time as far as there is room, based upon the width in pixels of your screen. Note, if you turn your device to landscape mode you will have more screen real estate and thus will be able to see further back in time.
The glucose Correction Range is shown as a blue bar on the glucose chart. Single-value ranges (such as 100-100 mg/dL), will have a narrower blue bar. When a temporary override range is enabled, a darker blue bar indicates the correction range during that override.
Negative Glucose Prediction
If you have a crazy negative glucose prediction - it is likely that you set an Override with a tiny Overall Insulin Needs percentage.
Best approach:
If you tap on the Glucose Chart itself, it will open the Predicted Glucose chart described below.
"},{"location":"loop-3/displays-v3/#predicted-glucose-chart","title":"Predicted Glucose Chart","text":"The predicted glucose view is a great way to gain insight into the various components\u2019 importance in Loop\u2019s prediction of eventual glucose.
The graph at the top of this view will match your Glucose Chart. Below this chart you will see an explanation of the variables Loop takes into account in predicting your future glucose value: Carbohydrates, Insulin, Glucose Momentum and Retrospective Correction. You can tap on any of the entries to see the effects of that component by looking at the dashed lines.
Display Only
These elements are not turned on and off in the Loop predictions. They just modify the graph so you can view the relative effects.
"},{"location":"loop-3/displays-v3/#active-insulin-chart","title":"Active Insulin Chart","text":"The Active Insulin chart displays the total insulin contribution from both temp basals and boluses. Active IOB can be either positive or negative. Negative IOB results from the suspension of normally scheduled basals.
The active insulin displayed in the upper right corner of the chart updates as soon as Loop issues a command to your pump.
It may later be modified and the Event History updated if:
There are some times when communication is interrupted at a critical moment in the communication cycle. When that happens the Loop Alert - Unable to Reach Pump modal screen appears on your device. Typically, this resolves by itself. Click the link above for more information.
Medtronic Only: So long as you have Event History as the Preferred Data Source in Loop settings, primed insulin deliveries (e.g., cannula fills or manual primes) will not be counted towards IOB.
"},{"location":"loop-3/displays-v3/#insulin-delivery-chart","title":"Insulin Delivery Chart","text":"The Insulin Delivery chart displays a history of the temp basals enacted by Loop. The display is relative to the scheduled basal rates entered in the Loop settings. So, a rate displayed in this chart as +0 units
would indicate no temp basal was set, and Loop defaulted to the scheduled basal rate. Individual boluses are indicated by an orange triangle on the chart (shown in the graphic above, near the left-most time). The total insulin delivered since midnight, including all basals and boluses AND (Medtronic Only) priming insulin, is given in the upper right corner of the graph.
Please note that for safety reasons, Loop will assume a bolus was successful, even if it is not sure that the pump responded as expected. Once the communications with the pump settle down, Loop will (almost always) be able to reconcile whether a dose went through as expected. Occasionally, the bolus may be temporarily rendered (drawn) as a very high temp basal rate vs. a (triangle) discrete bolus event. This does NOT mean that the Loop actually enacted a high temp basal rate...only that the bolus is being drawn on the chart as the equivalent of a high temp basal rate.
"},{"location":"loop-3/displays-v3/#event-history-reservoir-and-non-pump-insulin","title":"Event History, Reservoir and Non-Pump Insulin","text":"Clicking on either the Active Insulin or Insulin Delivery charts will open your Insulin Delivery history. The top of the screen will display the current IOB and the total insulin delivered for the day since midnight (or since the time the loop became active if you started Loop after midnight). There are three tabs that can be viewed, with Event History shown by default:
Event History: Event history is a detailed accounting of all pump/pod actions. Both Medtronic and Omnipod users will have a detailed record of event history. If you tap on an event, you get more detail. Turn your phone to landscape to improve readability.
Reservoir:
Non-Pump Insulin: The user can enter insulin taken by another method such as inhaled or by injection. The user can choose a different insulin type than used by the pump. This is explained further at this link.
Previous Pod Insulin History
For those who want to delete some recorded insulin near the end of a pod because the site was not absorbing properly, this can be done in Apple Health.
Before attempting that modification, please read this entire section on How does Loop use Apple HealthKit in detail.
Pay special attention to Insulin and Apple HealthKit section.
"},{"location":"loop-3/displays-v3/#active-carbohydrates-chart","title":"Active Carbohydrates Chart","text":"The Carbohydrate chart displays the carbs used by Loop to predict glucose changes. The active COB is displayed in the upper right corner of the chart. Clicking on the chart will open the Carb Entries history and you can edit/delete any previous entries through that screen. Please read the Meal Entry page for more information about entering and editing carb entries.
"},{"location":"loop-3/displays-v3/#ice-chart","title":"ICE Chart","text":"Click this link for even more details about Insulin Counteraction Effects. It's a good idea to read both the Meal Entry and ICE pages - this is an important concept.
"},{"location":"loop-3/displays-v3/#toolbar","title":"Toolbar","text":"The toolbar is always found at the bottom of the main Loop screen in both portrait and landscape orientation. By tapping on one of these icons, you can begin a Meal Entry, start a Pre-Meal Range, initiate a Manual Bolus, select an Override or go to the Loop Settings screen.
From left to right, the icons are:
Meal Entry- click on this icon to enter meals. Detailed info regarding how to enter, save, and edit meal entries can be found in the Meal Entry page.
Pre-Meal Range - click on this icon to start the Pre-Meal Range for one hour or until carbs are entered. (plate symbol turns dark green when active)
Bolus - click on this icon to open the Bolus tool.
Overrides - click on this icon to select a saved or custom Override or to cancel an override if one is active (heart symbol turns dark blue when active)
Loop Settings - click on this icon to make changes to any of your Loop settings.
Very Detailed Section
This section is packed with an incredible amount of detail. Remember it exists and come back when you need a reference to Loop 3 icons and messages.
If you are a new looper your eyes may glaze over the first time through. Don't worry. But do come back and read this section again after you've used the system in Open Loop mode (before you enable Closed Loop mode). And then come back again after a day or so of closed loop testing.
Experienced loopers need to read the detail on this page. There are important changes from Loop 2.2.x.
The Heads-Up-Display, visible in portrait mode, shows the Glucose Status on the left, the Loop Status in the middle and the Pump Status on the right. Once a CGM and pump have been added to Loop, the Loop Status icon will update and ideally be similar to the graphic below.
The Loop Status Icon is the colored circle in the center of the main Loop display. The three colors displayed are Green, Yellow or Red. In all cases, more information is displayed by tapping on the Loop Status Icon, which brings up a modal message indicating the last time a loop cycle completed and other descriptive text.
"},{"location":"loop-3/displays-v3/#loop-cycle","title":"Loop Cycle","text":"A complete Loop cycle, at high level, includes these steps:
This table shows examples of Loop Status Icons and what each icon means.
Icon Meaning A green circle indicates the app is in Closed Loop mode and it completed a cycle within the last 5 minutes. A yellow circle indicates the app is in Closed Loop mode and it has completed a cycle in the last 5-15 minutes.It is not unusual to have a few instances of yellow loops per day. They can be caused by being out of range (physically), Bluetooth or RileyLink \u201cnoise\u201d interference, or even that the pump was giving a bolus.Most yellow loops will self-resolve without needing any special troubleshooting. A red circle indicates the Loop has not completed in over 15 minutes.This is not a typical state, and you should troubleshoot the problem.In this case, either the Glucose Icon or the Pump Icon or both will display analert
graphic. When the circle is open at the top, Loop is operating in \u201copen-loop\u201d mode. The color code is the same as for closed loop except the cycle involves updating predictions from available blood glucose values and obtaining pump status; but the app will not make any automated changes in insulin delivery.While Manual Temp Basal (MTB) is active, the Open Loop icon will be displayed until MTB expires or is cancelled. Note that MTB is only implemented in Loop 3 for Omnipod and Omnipod DASH, at the current time. Fun Fact
The loop status icon will pulse slightly when Loop is communicating with the pump. The pulsing will stop when the communication has completed (green loop) or given up (yellow or red loop).
"},{"location":"loop-3/displays-v3/#example-loop-status-modal-messages","title":"Example Loop Status Modal Messages","text":"When you tap on the Loop Icon on the main screen, you will see a message similar to one of those shown below. The message content depends on:
On your phone, you should see the green, yellow or red icon in the background - the color is not captured when taking screenshots of the modal message.
"},{"location":"loop-3/displays-v3/#glucose-status-icon","title":"Glucose Status Icon","text":"The table below shows examples of the Glucose Status Icon and what each icon means. The Glucose Color Code is provided below the table.
Icon Meaning The current glucose reading is displayed. It can be from the CGM or from a finger stick. The value must have been updated within the last 15 minutes to be displayed.For the example shown, a valid trend arrow is available and is blue. Color codes are explained at this link. The last glucose reading from the CGM or from a finger stick is stale, i.e., it was acquired more than 15 minutes ago. In this case, the glucose prediction will stop updating.The HUD Status Row message enables user to enter fingerstick glucose value if desired.If in closed-loop mode, no changes will be made to insulin delivery. If a temporary basal is running, it continues running for the scheduled duration. Once the temporary basal expires, the pump resumes the scheduled basal rate.When the app issues a temporary basal, the duration is always 30 minutes.The user can enter a manual temporary basal duration up to the limits of their pump. If no CGM is currently selected, the Add CGM icon is displayed. The user can add a CGM following these instructions. If no CGM is currently selected, but a glucose value was acquired within the last 15 minutes (from fingerstick or a different CGM), that value is displayed along with a plus sign. By tapping on the icon, the user can add a CGM following these instructions."},{"location":"loop-3/displays-v3/#glucose-color-code","title":"Glucose Color Code","text":"Glucose Range Glucose Value Color Trend Arrow Color 55 mg/dL (3.0 mmol/L) or below red regardless of background color red 56 to 79 mg/dL (3.1 and 4.4 mmol/L) black (light mode) / white (dark mode) yellow 80 to 199 mg/dL (4.4 to 11.0 mmol/L) black (light mode) / white (dark mode) blue 200 mg/dL (11.1 mmol/L) or above black (light mode) / white (dark mode) yellow"},{"location":"loop-3/displays-v3/#cgm-display","title":"CGM Display","text":"Tapping on the CGM icon in the HUD shows more information about the last CGM reading.
For Dexcom G5/G6 and Share, the same screen is obtained by tapping on Loop Settings->CGM.
For Nightscout Remote CGM, the Nightscout URL is opened when tapping on the CGM icon in the HUD, while the credential sections is shown when tapping on Loop Settings->CGM.
The graphic below shows the result of tapping on the CGM icon when using a Dexcom G6. It includes the time of the last reading to the nearest second, along with other information about that sensor and transmitter. It also has an option to go to the Dexcom app on the same device.
"},{"location":"loop-3/displays-v3/#pump-status-icon","title":"Pump Status Icon","text":"The nominal pump icon displays high-level status information for the pump with two main components: left side is the basal delivery status and right side is the reservoir status. For Pods, a lifecycle line is displayed underneath the pump icon during the last 24 hours of nominal pod life.
The table below shows examples for a few nominal Pump Status Icons and Alert messages that might be shown. In all cases, tapping on the Pump Status Icon opens the Pump Settings screen with more information.
Icon Meaning This nominal pump status graphic is for a Pod with temp basal less than scheduled basal rate and no reported reservoir level. This nominal pump status graphic is for a Medtronic pump running scheduled basal rate and with a half-full reservoir.For a Pod, the reservoir shows full until pod estimates reservoir is below 50 U remaining. This nominal pump status graphic is for a pump running a high temp basal rate with the reservoir level reported. When the reservoir level is above the notification level, the reservoir graphic is orange. This pump status graphic indicates 2 alerts: (1) the 15 U reservoir level is less than the notification level of 20 U selected by this user and (2) a small clock icon is added to the display to indicate the phone time zone and pump time zone do not match. When the reservoir level is below the notification level, the reservoir graphic is yellow.Follow the link for time zone information. This alert message indicates the reservoir reports 0 U. Although pumps will continue to deliver some insulin after this point (max of 4 U for pods, or until all insulin is gone for both pods and Medtronic), the user should be aware that insulin delivery could stop at any moment.Note that if you see a display of 0 U in yellow, that means there is 0.5 U or less reported by the pump. This alert message indicates no pod is currently paired so no insulin is being delivered.Tap on the icon to reach the pod setting screen and pair a new pod, or switch to a different source for providing insulin. This alert message indicates all insulin delivery has been suspended. A Status Row message appears to enable the user to resume delivery with one tap. Alternatively, insulin can be resumed by tapping on the Pump Icon to enter the Pump Setting display and resume from that screen. This alert message indicates the user has initiated a manual temp basal (MTB). While the MTB is active, the Loop Icon Status will also display an Open Loop symbol to indicate no automatic adjustments are made until MTB expires or is canceled. The lifecycle indicator across the bottom of the pod status indicates a pod within the final 24 hours of nominal life.Tapping on the icon takes the user to the pump settings display where the rate and duration of the MTB are displayed. This alert message indicates it has been more than 15 minutes since the app was able to communicate with the pump.Follow these troubleshooting steps. This alert message indicates no pump has been added. Follow the instruction for adding a pump."},{"location":"loop-3/displays-v3/#time-zone","title":"Time Zone","text":"Loop allows your pump to have a different time zone from your phone.
Your daily schedule for basal rates, correction ranges, insulin sensitivity factors and carb ratios is displayed with respect to midnight on \"pump time\". When you first Add Pump to Loop, the pump and phone are in the same time zone, but it's important to understand what happens when the time zone changes on the phone.
The scheduled rates for basal, correction range, ISF and CR follow the pump time
To change the pump time zone to match your phone, select the Pump Settings display
The display to modify time zone is slightly different for Loop 2.2.x and Loop 3 (links below):
You can choose to leave the pump and phone time zones different; the pump icon on the HUD (Loop 3 only) will show the clock icon to remind you. Many people do this for short trips.
"},{"location":"loop-3/displays-v3/#other-time-changes","title":"Other Time Changes","text":"What about other time changes? Suppose the iOS -> General -> Time & Date is modified to manually change the time, but the time zone is not adjusted. (Sometimes this is done to defeat limits on games. Do Not do this on a Looping phone. If you have an \"old\" glucose reading in the \"future\" - Loop will not predict correctly which may have dangerous consequences.) There will not be an obvious display in the HUD or Omnipod screen (which keys off time zone) but you will get regular warnings that phone does not have automatic time set.
Loop 3 will display this warning modal screen if it detects a problem with the Phone time. It leaves it up the user to decide what action should be taken. To make this warning stop, go to iOS -> General -> Time & Date and enable Set Automatically.
"},{"location":"loop-3/displays-v3/#hud-status-row","title":"HUD Status Row","text":"The Status Row is located immediately below the CGM, Loop and Pump Icons and is used to provide status, action buttons and information. The messages in the table are in order of priority. For example, a No Recent Glucose
message is displayed even when an Override
is active.
Bolus In Progress
The bolus messages are displayed with the highest priority:
No Recent Glucose
, you must either wait for the bolus to complete or cancel the bolus by tapping on the Status Row
Starting Bolus
information message is displayed. Tapping on this message has no action.As soon as the app issues a command to the pump (or sends it to the RileyLink to be delivered to the pump), the bolus in progress message appears. As soon as a bolus is started, from either a manual command or an automatic bolus, the bolus in progress message is displayed. Tapping on the Status Row
causes the app to attempt to cancel the bolus. The app can only cancel a bolus if communication is active between the app and the pump.The message says Bolused
valueof
totalU
. The value is based on a timer, so it is possible for an occlusion or other fault to occur while the app indicates bolus is in progress.In case of a fault, the user can tap on the pump icon to force a new pump status reading. For the case of pods, this allows you to silence a screaming pod quickly. Once the app communicates with the pump, the actual delivery status will be updated. If the user taps on the bolus in progress message in the Status Row
, the message changes to Canceling Bolus. Tapping on this message has no action. As soon the app determines that the pump is suspended, the Insulin Suspended, Tap to Resume
message is displayed. Tapping on the Status Row
resumes scheduled basal delivery if communication is active between the app and the pump.Medtronic pump users who suspend directly on the pump will notice a delay before this message is displayed. It is best to use the app Pump Settings screen to suspend the pump. If a higher priority message is not displayed in the Status Row
and the glucose value is stale (more than 15 minutes old), the No Recent Glucose, Tap to Add
message is displayed. Tapping on the Status Row
opens the Manual Bolus screen for entry of a Fingerstick Glucose. Note that if you choose not to accept a recommended bolus on this screen but you want to save the Fingerstick value, you need to tap the Bolus line to force it to 0 U and then tap Save Without Bolusing
. However, be aware that, in Closed Loop mode, the app will use that glucose value for the next 15 minutes and may adjust insulin delivery accordingly. If a higher priority message is not displayed in the Status Row
and an override is active, the override symbol and name, along with the time at which the override expires, is displayed. Tapping on the Status Row
opens the screen for that particular override to enable the user to edit the override. Note that any changes made to that override are applied just to the current session. If you want the override permanently modified, refer to the Overrides instructions. If a higher priority message is not displayed in the Status Row
and the Pre-Meal Range is active in the toolbar, the Pre-meal Preset, until time stamp
is displayed. Tapping on the status row has no effect for this message.New with Loop 3: The Pre-Meal Preset can be engaged with an Override. When both are active, the Pre-Meal Range supersedes the range of the active Override, but the other settings for that Override still apply. When both are active, the Status Row
message reflects the Override with both the Pre-Meal and Override icons in the toolbar highlighted."},{"location":"loop-3/features/","title":"Features","text":""},{"location":"loop-3/features/#work-in-progress","title":"Work in Progress","text":"work in progress
This page will be deleted after all the relevant information is incorporated into the appropriate locations as part of the development process for Loop 3.
Now that Loop 3 has been released, this page may be updated, but leaving it alone for now.
This page discusses updated versions of Loop features as well as new capabilities provided with Loop 3.
Loop 3 Displays
One thing you may notice on some screens is the primary button, with associated information message, is always visible at the bottom of even small screens. You may need to scroll to see intermediate rows.
For example, if the default action on a bolus screen is to deliver the recommended bolus, that button is visible and active. The button remains fixed as other portions of the screen are scrolled up and down. When you make changes to selections, then the information displayed and the button label updates to reflect the action taken if you tap on the button.
There are other screens, like the Onboarding and Therapy Settings screens, where you should read all the provided information. Those screens require you to scroll to the bottom before being able to hit Continue
or Save
.
If insulin is taken from a different source and the user wants to let Loop know, there is a new method in Loop 3.
With Loop 2.2.x, the user manually entered the Insulin dose into the Apple Health app. Loop then imported that value.
With Loop 3, the \"old\" method still works, but there is a new method for entering this information. This method enables the user to indicate the type of insulin so that the appropriate model is used by Loop. An updated Glucose
prediction chart is displayed prior to saving the dose.
WARNING
If you are planning to enter non-pump insulin to cover carbs and you do NOT want Loop to automatically start increasing insulin based on the carb entry, enter the non-pump insulin first and then add the carbs.
To find out what Loop recommends, without actually dosing with Loop:
Cancel
Tap on either of the insulin charts (Active Insulin or Insulin Delivery) on the home screen to display the Insulin Delivery Screen
. This screen has 3 tabs.
Select the Non-Pump Insulin
tab to bring up the graphic shown below
Log Dose
screen is displayed showing the current Glucose
predictionBolus
row (blue dash-dot lines) to bring up a keyboardGlucose
prediction chart updates automatically based on the value entered in the Bolus rowDone
on the keyboard display, the entered value is displayed on the Bolus
row and the Log Dose
button changes from gray to blueLog Dose
to record or Cancel
to quitThe bolus following carbs (Meal Bolus
) and manual bolus (Bolus
) screens are updated from Loop 2.2.x version. There is still a predicted Glucose
chart that actively updates as the bolus value is updated and various buttons.
Blue Means Active
Bolus
row is blue to indicate if you tap on that, you can edit the valueWhen the Meal Bolus
screen is entered following a carb entry or edit action, the active button might be Save and Bolus
or, if no bolus was recommended, Save without Bolusing
. The Save
refers to saving the Carb entry or Carb edit that led to this screen in addition to saving the amount that might be bolused. It can also refer to saving a fingerstick value entered in the Meal Bolus screen.
In the graphic below, the user enters carbs and taps continue to display the Meal Bolus screen.
Save and Deliver
button saves the carbs and delivers the bolusSave without Bolusing
saves the carbsRecommended Bolus
and Bolus
rowsGlucose
prediction graph - these are accurate at the time this screen is entered (before carbs or bolus are saved)Glucose
prediction graph with three rows:Carb Entry
, the proposed carbs with the time to add the carbs and the absorption time displayed - to modify that information, tap on the < Carb Entry
button at upper leftRecommended Bolus
displays what Loop recommends for that proposed Carb Entry
Bolus
default display is what Loop recommends, but user can edit that valueIf a CGM entry arrives while in this screen, a Bolus Recommendation Updated modal message will be displayed and must be acknowledged.
"},{"location":"loop-3/features/#modify-bolus","title":"Modify Bolus","text":"This section is a continuation of the information presented in the Accept Recommendation portion of the Meal Bolus
section. In the graphic below, the user overrides the recommended bolus.
Glucose
prediction graph updates based off the Bolus
value, giving the user the opportunity to accept or change their proposed value before tapping Save and Deliver
Correction
rangeCorrection Range
is only offered as a manual feature and is limited to an amount predicted to maintain glucose above the Safety Threshold
Glucose
prediction is what happens if you Save and Deliver
and then no further adjustments are made to insulin delivery by LoopWhen the Bolus
screen is entered directly from the toolbar, the button choices are Enter Bolus
if none is recommended, Deliver
if a value is on the Bolus
row, or Cancel
using the button on the upper left. The user can also tap on the value on the Bolus
row to bring up a keyboard to modify that amount. When doing that, the value is automatically set to zero.
Other alert messages might be displayed if the pump or CGM is not active. Those are found on the Loop 3 Displays page.
The two graphics below are examples of manual bolus screens.
Enter Bolus
button at the bottom, it brings up a screen to enable you to type in an amount and then Deliver
it. 0
amount in the Bolus
row and perform the same action as the Enter Bolus
buttonCancel
button at the upper left.Deliver
that recommended dose is deliveredBolus
row, you can override the amountBolus
row is modified to 0 U with the first tap - at that point, you may enter a new value or tap Cancel
using the button at the upper left of the screenLoop 3 includes a feature for remote input of Carbohydrates and Bolus, enabling caregivers who are not physically present to better assist the individual who requires support in managing Loop.
Please read the documentation about this feature carefully to ensure proper configuration and use: * Remote Command Overview
WARNING
You will be using this feature at your own risk, like any other Loop code you build. It is very important you completely read and re-read the Remote Command Overview before getting started.
There are validation and troubleshooting steps for each section of the guide.
Please make sure not to skip sections as this makes it difficult to troubleshoot.
Be aware:
The Loop 3 app, building off work by Tidepool and DIY contributors, provides a major upgrade in user safety, user experience, and user interface with the same great Loop algorithm.
Here are some highlights:
Congratulations on Building Loop!
The first time you build Loop 3, the app takes you through the Onboarding process. Review this page before using your app.
Suggestion
Review these pages from the Intro tab of LoopDocs
Read the rest of the pages listed under All Loopers, below.
These pages have a lot of detailed Loop information.
And a lot of detailed information about Status and Commands for:
Medtronic Users
You must select Insulin Type on your pump settings screen after updating from Loop 2 to Loop 3 and completing the onboarding. Without an insulin type, closed loop will not work.
"},{"location":"loop-3/loop-3-overview/#safety","title":"Safety","text":"Please be informed so you can Loop safely.
Consult with your health care professional regarding your diabetes management.
Open Source
To bring up the Pump Settings display, tap on the pump icon in the Heads Up Display (HUD) or your connected pump in the Loop Settings screen.
"},{"location":"loop-3/medtronic/#medtronic-status-and-commands","title":"Medtronic Status and Commands","text":"Medtronic status and commands are found in the Pump Settings screen shown in the graphic below. The bottom section with Pump ID, Firware Version and Region is configured at the time the pump is connected to Loop. You cannot edit those lines.
"},{"location":"loop-3/medtronic/#suspend-delivery","title":"Suspend Delivery","text":"Tapping on the Suspend Delivery
row will suspend all insulin delivery: basals, temp basals, and boluses in progress. When you press Suspend Delivery
, the label changes to Suspending
while Loop is communicating with the pump. When the label changes to Resume Delivery
, all insulin delivery is stopped until the user resumes using the HUD Status Row, the Pump Settings screen or on the pump itself.
As long as the spinning icon is spinning, Loop is trying to execute the Suspend or Resume command. If it fails to complete, a modal alert will appear that says \"Error Suspending\" or \"Failed to Resume Insulin Delivery\" which you must acknowledge. You must then repeat the command to try again. Make sure your RileyLink device is powered on and close to the phone and pump.
When the phone is in portrait mode, so the HUD is visible:
You can still suspend and resume insulin on the pump itself. It may take until the next Loop cycle (typically less than 5 minutes), but Loop will detect that the pump is suspended or basal is resumed and the HUD Status Row will update.
If you request a manual bolus with Loop while the pump is suspended, Loop resumes basal delivery as well. No automated boluses are initiated while suspended, only manual ones.
"},{"location":"loop-3/medtronic/#insulin-type","title":"Insulin Type","text":"You select insulin type when connecting to a new Medtronic pump.
If you install Loop 3 over Loop 2 with the pump already configured, be sure to set the Insulin Type on the pump settings screen. If no insulin type is set, you will get red loops.
Use this row if you switch to a different type of insulin.
The type of battery used in the Medtronic pump affects how Loop interprets the battery level for the pump.
"},{"location":"loop-3/medtronic/#preferred-data-source","title":"Preferred Data Source","text":"Leave the Preferred Data Source set to on Event History.
"},{"location":"loop-3/medtronic/#use-mysentry","title":"Use MySentry","text":"The Use My Sentry
row only shows up on pumps that support it.
Using the MySentry feature on some Medtronic pumps when using an OrangeLink causes the batteries to die quickly. This option allows you to turn off MySentry within the Loop app.
"},{"location":"loop-3/medtronic/#devices","title":"Devices","text":"This allows access to the RileyLink screen for each connected RileyLink compatible device.
"},{"location":"loop-3/medtronic/#pump-battery-remaining","title":"Pump Battery Remaining","text":"Loop uses the Pump Battery Type to estimate Pump Battery Remaining. For information about the method, review MDT Pump Battery.
"},{"location":"loop-3/medtronic/#pump-time","title":"Pump Time","text":"Loop keeps the pump time up to date with the phone time automatically. As shown in the graphic in the next section, Loop allows differences in time zone. The user can decide when and if to modify the pump time zone, if different from the phone time zone. If the Pump Time shows as yellow, then the time zones do not match.
"},{"location":"loop-3/medtronic/#change-time-zone","title":"Change Time Zone","text":"During normal operation, Loop automatically keeps phone time and pump time aligned. In the case of time zone or daylight savings time changes, Loop allows the differences to persist until the user chooses to Change Time Zone
. Please review Time Zone for more details.
When the time zone for the pump and phone are not the same, you will notice a small clock symbol in the upper right of the pump status icon.
Navigate to the Pump Settings screen. Right below the Pump Battery Remaining and Pump Time rows, there is a new row Sync to Current Time
. When you tap that row, the time for the Medtronic pump is updated to the current Loop phone time.
If you want to switch to a different pump you must first delete this one:
Delete Pump
Delete Pump
againFor more information, follow this link: Modify Pump.
"},{"location":"loop-3/omnipod/","title":"Omnipod Pump","text":""},{"location":"loop-3/omnipod/#omnipod-and-omnipod-dash-pump","title":"Omnipod and Omnipod DASH Pump","text":"The information and user interface for Omnipod (Eros) and DASH pods is the same, except Omnipod DASH pods do not require a RileyLink compatible device. They communicate directly with the phone through Bluetooth.
"},{"location":"loop-3/omnipod/#pair-pod","title":"Pair Pod","text":"Max Fill is 200 Units
When you fill the Pod do not exceed 200 units.
If you overfill the pods, you may get a pod fault right after priming.
Pod Filling and Insertion
The Pod filling and insertion instructions are the same with the Loop app as they are for the PDM. These videos: Filling a Pod with Insulin and Inserting the Cannula, may be useful.
For DASH Pods:
For Eros Pods:
You'll be pairing a pod every 2 or 3 days (max pod life is 80 hours).
You'll see this screen every time you ask Loop to Pair New Pod
.
The Omnipod Common pairing protocol is the same for all pods. The difference is that Omnipod requires a RileyLink compatible device and Omnipod DASH does not. There are also slight differences in some of the text and graphics, e.g., Omnipod DASH uses a blue needle cap and Omnipod has a clear needle cap.
Graphic below shows the Pair Pod screen for Omnipod (left) and Omnipod DASH (right).
Loop walks you through each step of the filling, pairing, priming, attaching and insertion process.
It makes sure you are really ready to do the insertion.
Please watch the video of the Loop app screen when pairing a DASH pod to see the full process before pairing your first pod. In this video, once the pod starts priming, you may want to skip forward (it takes about a minute to prime).
Keep Gear Close
Continue
button on the phone screenInsert Cannula
Continue
button on the phone screenNew Insert Cannula Control
For version 3.3.0 and later, (which means the dev branch
right now), there is a new slider to control insertion of the cannula instead of a button to tap. It looks like the graphic below. You place your finger on the darker blue icon and, while keeping your finger in contact with the screen, drag all the way to the right. After the drag operation, as soon as you lift your finger off the phone, the cannula insertion command is sent to the pod.
The Screen that says Setup Complete allows you to change the Scheduled Reminder for this pod if you want a different reminder time (including none) from your usual setting.
The Pod Status screen is shown in the graphic below. The dashed green outline indicates the Device
portion that is found only for the Omnipod. All other features of the screen are common for Omnipod and Omnipod DASH.
If you want to make sure Loop can talk to your pod, click on the sound icon (highlighted by the red box) in the graphic above. If the icon is greyed out - that means Loop is having a communication issue reaching your pod. Follow the usual Troubleshoot: Pump is Not Responding steps to resolve this problem.
Other Uses
The next row changes the label depending on the situation. In all cases, the current basal rate is reported.
Label Description Scheduled Basal Pod is running the scheduled basal rate Insulin Delivery Pod is running an automated or manual temporary basal rate"},{"location":"loop-3/omnipod/#insulin-remaining","title":"Insulin Remaining","text":"Pods start reporting reservoir values when 50 U are left.
Value Meaning 50+ U Pod reservoir is greater than 50 U Value U Pod reservoir is estimated to be at least as great as the indicated value. 0 U Pod will attempt to deliver up to 4 U after it reports 0 U. This is not guaranteed. The pod senses when it is not successful delivering pulses and that can happen before 4 U have been delivered."},{"location":"loop-3/omnipod/#activity","title":"Activity","text":""},{"location":"loop-3/omnipod/#suspend-delivery","title":"Suspend Delivery","text":"You may want to consider using a Manual Temp Basal of 0 U/hr instead of suspend.
Tapping on Suspend Delivery
brings up a timed reminder screen. You can choose to be reminded (via a beep on the pod itself) with 4 choices (or you can cancel the request):
After you select the reminder time, Loop issues a command to the pod to halt all insulin delivery: basals, temp basals, and boluses in progress. The label on the Suspend Delivery
row changes to Suspending
while Loop is communicating with the pump. When the label changes to Resume Delivery
, all insulin delivery is stopped until the user resumes using the HUD Status Row or the Pod Status screen.
As long as the spinning icon is spinning, Loop is trying to execute the Suspend or Resume command. If it fails to complete, a modal alert will appear that says \"Error Suspending\" or \"Failed to Resume Insulin Delivery\" which you must acknowledge. You must then repeat the command to try again. For Omnipod, make sure your RileyLink device is powered on and close to the phone and pod.
When the phone is in portrait mode, so the HUD is visible:
If you request a manual bolus with Loop while a pod is suspended, Loop will send a notification that Bolus Failed with instructions that Pump is Suspended, Resume Delivery. In other words, you must resume delivery before you will be allowed to bolus with pods.
"},{"location":"loop-3/omnipod/#suspend-timer-reminder","title":"Suspend Timer Reminder","text":"At the end of the reminder time, an alert beep is issued by the pod and a modal alert will be provided on the Loop app. You must acknowledge the modal alert on the phone to silence future pod alerts.
Manually Resume Insulin Delivery
The halt of all insulin delivery continues until you manually resume. There is no automatic resumption of basal insulin from a suspend command.
If you select a Manual Temp Basal command of 0 U/hr instead of Suspend:
Tap on the Set Temporary Basal Rate
to select a Manual Temp Basal.
This brings up the Temporary Basal
screen shown on the left of the graphic below.
Set Temporary Basal
, Loop goes into Open Loop mode and the pod is commanded to that rate and duration. In other words, you can leave your phone behind and the selected basal rate continues for the selected basal duration. There will be no automated adjustments of delivery for the temp basal duration.
"},{"location":"loop-3/omnipod/#during-manual-temp-basal","title":"During Manual Temp Basal","text":"This Pod Only
The manual temp basal command from Loop tells the pod to initiate a temp basal for the designated rate and duration.
Cancel Manual Basal
Deactivating this pod and pairing a new one interrupts the temp basal.
If you still need that basal rate, you must initiate it on the new pod.
Once the manual temp basal command is sent to the pod, Loop changes to Open Loop mode and updates displays as shown in the graphic above
Insulin Delivery
Cancel Manual Basal
and reports the time remaining until the temp basal expiresOpen Loop
icon and the HUD Pump Status Icon indicates Manual Basal
So long as you were in Closed Loop before requesting the Temp Basal, Loop returns to Closed Loop automatically when the duration ends or you cancel the temporary basal.
Automatic Resumption of Scheduled Basal
The phone does not need to be in contact with the pod for insulin delivery to return to scheduled basal at the end of the selected duration. That duration is commanded along with the temporary rate. Once the pod accepts that command, and you'll get an error message if it does not, the pod will resume scheduled basal rate without further commanding if there is insulin in the reservoir and a pod fault does not occur.
For situations where you need a modification of your insulin needs that is not dependent on a particular pod, review the information on the Overrides page.
"},{"location":"loop-3/omnipod/#devices","title":"Devices","text":"For Omnipod, there is a Devices section used to access the RileyLink status and commands screen.
"},{"location":"loop-3/omnipod/#pod-details","title":"Pod Details","text":"The Pod Details table, shown in the graphic below, reports:
Time Drift
The pod will expire when it thinks it has been 80 hours. The pod clock may drift a few seconds with respect to phone time during the pod life. The Expiration time gets updated when the pod reports how long it thinks it has been since it was activated.
"},{"location":"loop-3/omnipod/#device-details","title":"Device Details","text":"Some additional details from the most recent pod status response message are displayed if you tap the Device Details row, as shown in the graphic below. Most people will not need to view this.
The graphic shows an example for Omnipod on the left, Omnipod DASH (TWI BOARD) in the middle and Omnipod DASH (NXP BLE) on the right. Do not worry about the different board styles (Device Name) for DASH. The developers did that for you. If you are asking for help from a mentor - they may request this information.
"},{"location":"loop-3/omnipod/#replace-pod","title":"Replace Pod","text":"When you tap on the Replace Pod
row, the Deactivate Pod
screen, shown below, is displayed.
Deactivate Pod
on this screen, insulin delivery stops for this pod and cannot be resumedWhen you tap on the Notifcation Settings
row, the graphic below is displayed. The notifications are a combination of beeps on the pod with associated modal alerts on the phone app that must be acknowledged to prevent future beeps.
When you tap on the Confidence Reminder
row, the graphic below is displayed. You can choose from three levels of audible responses that Loop requests from the pod:
Enabled
You selected insulin type when connecting to this pump.
Tap on this row if you switch to a different type of insulin.
Click on Time Zone to understand how Loop treats \"pump\" time for pods.
When the Pump time zone matches the phone time zone, the Pump Time is displayed with black font.
When the phone time zone and pump time zone do not match, there is a clock icon on the main screen in the Pump Status Icon of the HUD.
Sync to Current Time
row appearsSync to Current Time
row to choose whether to make Pump Time match Phone Time or not (bottom red rectangle in graphic below)What about other time changes? Suppose the iOS -> General -> Time & Date is modified to manually change the time, but the time zone is not adjusted. (Sometimes this is done to defeat limits on games. Do Not do this on a Looping phone. If you have an \"old\" glucose reading in the \"future\" - Loop will not predict correctly which may have dangerous consequences.) There will not be an obvious display in the HUD or Omnipod screen (which keys off time zone) but you will get regular warnings that phone does not have automatic time set.
Loop 3 will display this warning modal screen if it detects a problem with the Phone time. It leaves it up the user to decide what action should be taken. To make this warning stop, go to iOS -> General -> Time & Date and enable Set Automatically.
"},{"location":"loop-3/omnipod/#previous-pod-information","title":"Previous Pod Information","text":"When you tap on the Previous Pod Information
row, a graphic similar to those shown below is displayed. This provides summary information about the pod before the one currently in use.
If the previous pod had a fault and you choose to report it to Insulet, this screen reports the PDM reference code that Insulet uses in their tracking system.
Do Not Call Insulet about -049 (0x31) Faults
If you should happen to get a fault where the last 3 digits of the PDM ref code are \"-049\" (the Hex Designation is fault code 0x31), do not report this to Insulet and do not ask for a replacement. This means Loop did not ensure the pod was in the correct state to accept a command. In other words, it was a bug in the Loop code.
We believe the code has been updated to prevent these faults. There was a brief period during development in which at least one of these happened - this was fixed July 3, 2022. If this happens to you, report it on zulipchat for the developers, save a Loop Report and rebuild if you have an older version of the development code.
With Loop 3, do not leave the screen open and unlocked for long periods of time without first reading Is there an increase in pod failures on Loop?
"},{"location":"loop-3/omnipod/#pod-error-messages","title":"Pod Error Messages","text":"This section presents some of the error message screens you may see specific to pods.
"},{"location":"loop-3/omnipod/#pod-faults","title":"Pod Faults","text":"You are likely to hear a pod fault before Loop notices. If your phone is locked, Loop only checks status every 5 minutes for Omnipod or 3 minutes for Omnipod DASH.
Unlock your phone, open Loop, navigate to the Pod Status screen and tap on Deactivate Pod to stop the noise. The pod fault - even if it does not show up in the HUD or the Pod Status screen, will be picked up by the process of hitting Deactivate Pod. You can then view the Fault information in the Previous Pod Information screen.
"},{"location":"loop-3/onboarding/","title":"Onboarding","text":""},{"location":"loop-3/onboarding/#onboarding","title":"Onboarding","text":"As soon as your app builds on your phone, you are guided through the onboarding (set up) process. You will see information screens for each Therapy Setting and must acknowledge each screen. You can review those informational screens later by clicking the Therapy Settings screen after a pump has been added.
"},{"location":"loop-3/onboarding/#entering-and-editing-values","title":"Entering and Editing Values","text":"This section explains how to enter and edit values with Loop 3.
Confirm Setting
or Save
button is inactive, move the picker value to make the button active,First time connecting a glucose monitoring device to your phone's Apple Health app? If so, the units on the phone might not be in the units you want, i.e., mg/dL or mmol/L. Loop uses the units in Apple Health.
Each onboarding step is presented in order on this page. Please follow this document while entering values into your app for the first time.
Settings Help
Please stay in Open Loop until you verify that your settings (basal rates, insulin sensitivity, carb ratio, etc) are properly adjusted to work with the Loop algorithm. You may need time to evaluate and perhaps identify settings to adjust.
If you need help with your settings adjustment, you may find useful tips in the companion website, LoopTips at this link: LoopTips: Settings tab.
"},{"location":"loop-3/onboarding/#welcome-to-loop","title":"Welcome to Loop","text":"The first screen you will see is the Welcome to Loop screen shown in the graphic below. Tap on Let's Go
to continue.
Next, you need to give Loop permission to read and write to Apple Health. In the graphic below, from left to right, tap on the buttons highlighted with red boxes to configure permissions:
Share with Apple Heath
buttonTurn On All
button in the middleAllow
button at upper rightYou need to enable Health Permissions for Loop to work.
You can review the permissions screen later. FAQS: How Do I Modify Apple HealthKit Permissions.
"},{"location":"loop-3/onboarding/#usage-data-sharing","title":"Usage Data Sharing","text":"Language?
If the instructions on this screen are not your preferred language, make sure you built the released code.
Next, you will be asked your preference for Usage Data Sharing, with the default automatically set to Share Version Only
as shown in the graphic below:
If you choose to share usage data, it is collected anonymously. The choices are:
If you select Share Usage Data you may wonder types of information is available to the Loop Developers.
localization
(language translations) can be prioritizedThe Loop Developers are the only ones with access to this data.
"},{"location":"loop-3/onboarding/#connect-loop-to-nightscout","title":"Connect Loop to Nightscout","text":"The next screen, shown on the left of the graphic below, enables the user to both connect Loop to Nightscout and to download existing Loop settings from Nightscout.
Nightscout
Loop 3 with Nightscout Requires API_SECRET
If you have do not have a Nightscout site, or choose not to use it, select Setup Loop without Nightscout
and skip ahead to Therapy Settings (Onboarding)
If you have a Nightscout site, select Use Nightscout with Loop
to connect Loop to your site and download your profile (Therapy Settings) from Nightscout for review.
If you were using a Nightscout site with a prior version of Loop, you need to type it in again.
If you select Use Nightscout with Loop
:
The next onboarding screens take you through the therapy settings one at a time.
The therapy settings are the heart of how Loop makes predictions. If your settings are not close, the predictions will not be correct.
Warning - Outside Typical?
The Therapy Settings have \"guardrails\" to warn you if your settings are unusual.
Take the yellow (and red) indications with a grain of salt. You will get an extra modal screen that you must acknowledge. Simply confirm your choice and keep going.
A red limit cannot be exceeded without modifying the code itself. But values that show up as red can be saved - they are valid therapy selections.
mmol/L
People using mmol/L should avoid the red (the min or max end points) glucose values for their settings. They sometimes cause a crash.
The Guardrails for Settings are summarized on the Therapy Settings page.
"},{"location":"loop-3/onboarding/#glucose-safety-limit","title":"Glucose Safety Limit","text":"If Loop predicts that your glucose will go below the Glucose Safety Limit at any time in the next 3 hours and Loop is in Closed Loop, it will set a temporary basal rate of 0 U/hr in an attempt to prevent that future low.
If you ask Loop for a bolus recommendation, and loop predicts your glucose will go below the Glucose Safety Limit at any time in the next 3 hours, no bolus will be recommended.
The Glucose Safety Limit can never be higher than the lowest of these related settings: Correction Range and Pre-Meal Range.
"},{"location":"loop-3/onboarding/#correction-range","title":"Correction Range","text":"Loop uses the Correction Range as the goal when it recommends a bolus and makes automated adjustments to insulin dosing.
Correction Range vs Time in Range
For example, you may choose a correction range of 100-110 mg/dL (5.6-6.1 mmol/L) for Loop, but you may monitor your \"success\" or Time in Range using 70-180 mg/dL (3.9-10 mmol/L).
"},{"location":"loop-3/onboarding/#manual-vs-automated-dosing","title":"Manual vs Automated Dosing","text":"Loop estimates future glucose over the next 6 hours (DIA) and, when in closed loop, adjusts insulin dosing. Loop uses or recommends the smallest amount of insulin that will bring you to your target (Correction Range midpoint) over the whole forecast.
If you ask Loop for a manual Bolus recommendation while your current glucose is below the bottom of the correction range and above the glucose safety limit, Loop will recommend a value that should keep your glucose above the safety limit.
The Pre-Meal Range, which is optional, gives you a small amount of insulin before a meal to help control post-meal glucose spikes. The Pre-Meal icon is inactive if you choose not to enter a range.
Example
If your normal range is 100-110 mg/dL (5.6-6.1 mmol/L) and pre-meal range is 80-80 mg/d L (4.4 mmol/L), Loop will give you extra insulin to move you towards the lower range number before the meal. This early insulin brings you into the meal with a mini-prebolus. The pre-meal range, when activated by pressing on the pre-meal icon in the toolbar, will stay active for one hour, until carbs are entered, or until it is manually cancelled...whichever comes first.
"},{"location":"loop-3/onboarding/#carb-ratios","title":"Carb Ratios","text":"Your Carb Ratio is the number of grams of carbohydrates covered by one unit of insulin.
You must provide a Basal Rate schedule and the schedule must start at midnight. Loop does not provide the option for having more than one profile saved that you can switch between.
If you onboard basal rates before a pump is added, you are limited to increments of 0.05 U/hr for basal rates and 0.00 U/hr is not allowed. Enter values close to what you actually use because the values determine your maximum basal rate in the Delivery Limits.
Once a pump is added, the basal increments will match those on your pump. The onboarding basal rates will be saved to your added pump. Return to Therapy Settings to adjust the Basal rates to your pump increments.
"},{"location":"loop-3/onboarding/#medtronic-pump-users","title":"Medtronic Pump Users","text":"If you will be connecting a Medtronic pump after onboarding:
The maximum basal rate and maximum bolus settings are collectively referred to as Delivery Limits.
The Maximum Basal Rate the app allows you to choose will be limited based on the basal rate schedule you just entered as well as pump limits, so make sure you put in sensible values. (There is a back button if you need it.)
"},{"location":"loop-3/onboarding/#medtronic-pump-users_1","title":"Medtronic Pump Users","text":"If you will be connecting a Medtronic pump after onboarding:
Maximum Basal Rate will cap the maximum temporary basal rate that Loop issues to meet your correction range when you are in Closed Loop with a Dosing Strategy of Temp Basal Only.
For safety, new loopers should start with a max basal set 2-3 times their highest scheduled basal rate. If you choose 2 times your highest scheduled basal, you may get a message informing you this is \"lower than typical.\" Ignore this to put safety first as a new looper.
Experienced loopers typically set their maximum basal rate around 3-4 times their highest scheduled basal rate. Loop 3 app will not allow you to exceed 6.4 times your highest scheduled rate.
"},{"location":"loop-3/onboarding/#maximum-bolus","title":"Maximum Bolus","text":"Maximum Bolus is the highest bolus amount Loop can recommend at one time to cover carbs or bring down high glucose.
For safety, don't set a maximum bolus limit any higher than your typical large meal bolus. Many people like to set a value less than 10 U, for example, 9 or 9.9 U, to avoid accidentally typing in a bolus of 10 instead of 1.0 U.
This setting also limits how much automated dosing is allowed. Loop will not automatically increase the user's IOB above two times the Maximum Bolus. This is true with Dosing Strategy
of Temp Basal Only
or Automatic Bolus
.
Your Insulin Sensitivity Factor is the drop in glucose expected from one unit of insulin over the entire duration of insulin activity. It may be a different value than what you used as the Correction Factor with shots or manual pumping. Loop uses your ISF every 5 minutes when calculating predicted glucose levels.
Loop works best if you have tested and optimized your ISF settings for accuracy. Insulin sensitivities can change for many reasons including waiting too long to change your infusion set. Loop will not auto-detect changes in ISF.
Incorrectly set ISF is a common cause of roller coaster glucoses for new Loop users. You may need to raise (increase) your ISF value/number to help smooth a roller coaster glucose trend. You can read about that topic more over in LoopTips here.
"},{"location":"loop-3/onboarding/#therapy-settings-review","title":"Therapy Settings Review","text":"Once these are all entered, the Therapy Settings screen is shown for your review. You must scroll down to see all settings and reveal the Save Settings button. Only the top and bottom portions are shown, the other settings were not captured for this graphic.
"},{"location":"loop-3/onboarding/#notifications-and-bluetooth","title":"Notifications and Bluetooth","text":"Once you save settings, Loop asks to send notifications and use Bluetooth. You must allow both for Loop to work properly.
Notifications are necessary for safety reasons while Looping.
Bluetooth lets Loop get data from your CGM and talk to your Pump.
For new Loopers, it is now time to add a CGM and a pump. Follow these links for instructions.
Medtronic CGM
If you plan to use a Medtronic Enlite sensor for your CGM, you must first add that pump to Loop before the sensor will be shown as an option.
If you built Loop 3 over an existing app, your CGM and pump selections should have carried over.
"},{"location":"loop-3/onboarding/#experienced-loopers","title":"Experienced Loopers","text":"Insulin Type
Insulin Type is in Pump Settings (not therapy settings) and will NOT be imported.
After you finish onboarding, you must select Insulin Type on your pump settings screen. Without an insulin type, closed loop might not work or a different insulin type might be selected.
The first time you build Loop 3 on a device, you will need to go through the onboarding process too.
If you build Loop 3 over Loop 2.2.x, the onboarding remembers the settings, previously saved overrides and your current pod or pump information is maintained. (Yes, you can build Loop 3 and keep using the same pod.)
If you build Loop 3 onto a device without an existing Loop app and you have a Nightscout site, you can enter your Nightscout URL (remember to use https: with the \"s\") and API_SECRET and it will ask if you want to import your settings from your Nightscout profile. This includes all the overrides you have previously saved.
If you are building on a device that does not have an existing Loop app and you choose not to use Nightscout, then follow the new Looper Onboarding Steps.
You will be presented with an information screen describing the setting (with a continue button) followed by your current settings (if available), which you must confirm to keep - or can modify and then confirm to change. Depending on the device you are using, you may need to scroll down to see the Continue or Save buttons for each setting.
What is in my Nightscout Profile
To check what is in your Nightscout profile that Loop would use as part of onboarding, follow these instructions.
Note: you will get a json file - look that up using your favorite internet search method.
WARNING
The new onboarding forces you to check all your imported Therapy Settings (Onboarding Summary) but there may be other settings you need to check as well.
Temp Basal Only
, even if you were using Automatic Bolus
beforeHIGHLIGHTING THIS ONE - A LOT OF PEOPLE MISSED THIS:
If you used earlier versions of Loop, please be aware that absorption times have changed.
Loop 3 Carb Absorption Times
Loop uses the absorption time for the carbs, along with your glucose readings, ISF and CR to recommend insulin dosing and estimate over time the carbs absorbed and carbs expected. See Algorithm: Prediction for more details.
If you selected the candy icon for a complex meal, you told Loop to expect your glucose to rise rapidly. When that rapid rise does not materialize, you may find Loop predicts an unexpectedly low glucose because the algorithm assumes something must be affecting your glucose downward in a strong way.
If this happens to you, edit the carb entry to have a longer absorption time and Loop will recalculate the prediction.
"},{"location":"loop-3/onboarding/#carb-data-source","title":"Carb Data Source","text":"Loop 3 does not read non-Loop carbohydrate entries from Apple Health, as previous versions did. It still writes to Apple Health. Some experienced loopers want to modify the code to enable Loop to read carbohydrate records from Apple Health with the full understanding of how that works. The instructions for this code customization option, using a flag set in the LoopConfigOverride.xcconfig file, see the Customize: Build-Time Features section.
Users who build Loop 3 over Loop 2.2.x, may find a permission switch to give Loop permission to read carb data from health, but without making the customization mentioned above, changing permission does not change the behavior of Loop.
"},{"location":"loop-3/services/","title":"Optional: Services","text":"## Loop Services
Near the bottom of your Loop settings screen is a section called \"Services\".
Sevices are Optional
The services are added by tapping on the + sign and choosing the service from the list. Services are shown alphabetically. The most common services are Nightscout and Tidepool.
"},{"location":"loop-3/services/#nightscout","title":"Nightscout","text":"There is a whole section in LoopDocs about Nightscout. Please follow this link to the Using Nightscout with Loop section of LoopDocs. That also has the links you might need to the official Nightscout Documentation (different website).
If you have an existing Nightscout site, it's still a good idea to review that section, but here's the quick summary of how to add your Site URL and API_SECRET to have your Loop data transmitted to your Nightscout site. If you can\u2019t remember your API_SECRET, it can be found under Settings, Reveal Config Vars for Heroku sites (or Application Settings, Connection Strings for Azure sites).
The two most common errors in filling out this section are:
https://
in the site URL. If you use http://
(see how that doesn't have the \"s\" at the end?), you will get an error message about an App Transport Security policy.More Tips about Nightscout
With Loop 3.2.x and newer versions, data can be directly uploaded from Loop to Tidepool.
User Beware
Don't use the Loop Tidepool uploader yet unless you want to help the developers work through some known issues. The Tidepool Mobile app still works to upload some of your Loop data from Health.
Please refer to the LoopTips: Data: Tidepool page for more information about Tidepool. The Tidepool display browser is undergoing some updates; the information on these pages will be updated after changes happen.
The Tidepool Mobile app serves 2 purposes:
With the new Loop Service to upload to Tidepool, additional information that is not stored in Health can be made available to Tidepool. However, this is a work in progress.
At the current time:
When you add the Tidepool Service to Loop, be sure to disable Tidepool Mobile ability to read from Apple Health.
You can still use the note taking feature with Tidepool Mobile when Health is not connected, although you must have internet connectivity for this to work.
Tidepool Support is available to help troubleshoot issues or answer questions about using Tidepool. Contact them via email at support@tidepool.org.
"},{"location":"loop-3/services/#loggly","title":"Loggly","text":"Loggly is a free logging service. If you sign up for an account, you'll need to go under Source Setup and then Customer Tokens. Copy and paste your customer token into your Loop App settings for Loggly.
"},{"location":"loop-3/services/#amplitude","title":"Amplitude","text":"Amplitude is a remote event monitoring service and can be used to quickly identify errors and events with Loop. Amplitude stores the events and allows you to view those events as points in time. To retrieve the details of the events you will need to look at corresponding mLab data entries to get a complete picture of the issues. If you sign up for a free account with Amplitude, you will be given an API Key that you can enter here to have Loop integration setup.
"},{"location":"loop-3/services/#next-step-loop-displays","title":"Next Step: Loop Displays","text":"Great job, almost finished! Now that you have completed your services, let's move onto understanding your Loop Displays.
Loop displays is a valuable tool for understanding your Loop and a great page to review when troubleshooting.
"},{"location":"loop-3/settings/","title":"Settings","text":""},{"location":"loop-3/settings/#loop-settings-screen","title":"Loop Settings Screen","text":"The Settings screen, shown in the graphic below, is reached by tapping the gear icon in the Toolbar on the Main Loop Screen.
Each section and row on the Settings screen is described below.
"},{"location":"loop-3/settings/#closed-loop","title":"Closed Loop","text":"The user can select closed loop or open loop using this slider. When you first start Loop, we encourage you to leave this slider disabled and become familiar with the app using Open Loop mode.
As soon as Closed Loop is enabled, Loop will begin automatic adjustment of insulin dosing. Please ensure the settings you entered are appropriate for the Loop algorithm.
No automatic (closed loop) adjustment of insulin will occur and the slider will be disabled under the following conditions.
With every loop cycle - typically every 5 minutes - Loop updates the glucose prediction using
Based on this prediction, Loop calculates a modification to insulin dosing to bring the user into the desired correction range. This can be a reduction in basal to raise the glucose prediction or a recommended bolus, subject to Delivery Limits, to lower the prediction. The glucose prediction is shown in the Glucose Chart along with the measured glucose values.
If you find this confusing, read how to Think Like a Loop on the LoopTips website.
"},{"location":"loop-3/settings/#dosing-strategy","title":"Dosing Strategy","text":"This row gives you the ability to select Dosing Strategy. The Dosing Strategy only affects the method by which the recommended bolus - if any - is delivered. The current selection is noted underneath the Dosing Strategy label. The default (initial) value for this setting is Temp Basal Only. Tap on the arrow to the right to modify your selection.
Words in Graphic
Temp Basal Only: Loop will set temporary basal rates to increase and decrease insulin delivery.
Automatic Bolus: Loop will automatically bolus when insulin needs are above scheduled basal, and will use temporary basal rates when needed to reduce insulin delivery below scheduled basal.
Regardless of the Dosing Strategy selected, when glucose is below target or predicted to go below target, Loop decreases basal insulin using Temporary Basal.
Temp Basal Only: Subject to your Delivery Limits, Loop will deliver the Recommended Bolus over 30 minutes using positive temp basals (i.e., increase over your scheduled basal rate) to increase your IOB.
Automatic Bolus: Subject to your Delivery Limits, you receive 40% of the Recommended Bolus at every loop cycle.
"},{"location":"loop-3/settings/#automatic-bolus","title":"Automatic Bolus","text":"When you first start Loop, we encourage you to leave Dosing Strategy set to Temp Basal Only until you are sure your settings are dialed in.
The Automatic Bolus selection causes Loop to provide 40% of the recommended dose as a bolus at the beginning of each Loop cycle (when a CGM reading comes in). This is a faster method of getting the recommended insulin delivered. When Loop delivers extra insulin, the scheduled basal rate continues unchanged.
As with all Loop versions, you can manually bolus at any time by pressing the Bolus icon in the center of Loop's Main Screen. Any bolus recommendation that you see when you press the Bolus icon will be 100% of the Recommended Bolus.
"},{"location":"loop-3/settings/#configuration","title":"Configuration","text":"The Configuration section allows entry to the following screens:
"},{"location":"loop-3/settings/#therapy-settings","title":"Therapy Settings","text":"There's a LoopDocs page devoted to therapy settings. Click on the link to get to that page: Therapy Settings.
"},{"location":"loop-3/settings/#add-pump-for-therapy-settings","title":"Add Pump for Therapy Settings","text":"But I don't see Therapy Settings!
Therapy Settings is only accessible in the Settings screen when you have a pump connected to Loop.
If you add an Omnipod (requires RileyLink) or Omnipod DASH up to the Pair Pod
screen and then cancel, Loop will use the common Omnipod details to allow you to modify your Therapy Settings.
If you need to modify Therapy Settings before connecting to a Medtronic pump:
If you want to use Loop in parallel with your current method of dosing insulin.
iOS 15
If you are running an iOS 15 device, this screen is shown in German regardless of the language you choose for Loop. That is an accident that will be fixed by the next release. The English version is shown below.
You can review and modify your preference for Usage Data Sharing as shown in the graphic below:
If you change the check mark, it is immediately modified. Tap on Settings in upper left to return to the main Settings screen.
If you choose to share usage data, it is collected anonymously. The choices are:
The information about the pump section is detailed on several different pages. Follow the links below:
The information about the CGM is found on the Add or Modify CGM page.
"},{"location":"loop-3/settings/#services","title":"Services","text":"The Services section allows additions of other services such Nightscout, Tidepool, Loggly and Amplitude.
Please refer to the Optional: Service page.
"},{"location":"loop-3/settings/#support","title":"Support","text":"The Support section enables the user to provide output data (Loop Report and/or Critical Logs) about the app. This information can be very helpful to folks trying to assist with problem reports.
The graphic below shows the screen provided when you tap on the Support row at the bottom of the Settings screen.
"},{"location":"loop-3/settings/#issue-report","title":"Issue Report
","text":"Tap on the Issue Report
row, on the graphic above, to create a Loop Report text file with a lot of useful information for the mentors or developers if they need to assist you in solving a problem. This covers 84-hours (to enable a full pod history for users of Omnipod or Omnipod DASH). When you tap that row, you'll see a message that the file is loading. That message never goes away but the rest of the page fills in fairly quickly. After that happens, use the up arrow to see various options to save the report.
Issue vs Issue Report
Be aware:
Issue Report
is an action in Loop app to provide information you may need when you ask for help: refer to How to Find HelpIt's a good idea to use the Issue Report
button and save it along with a screenshot if you think you will ask for help. You can always discard these if you resolve the problem on your own.
Pro Tip
The Loop Reports can be saved in the Files section on your iPhone. I have a folder on my phone Files named Loop Reports.
You can upload them to zulipchat from your phone (new feature) using the paperclip in the zulipchat app. (Don't see a paperclip - update your app.)
"},{"location":"loop-3/settings/#submit-bug-report","title":"Submit Bug Report","text":"Tap on the Submit Bug Report
row to bring up one of the two views shown in the graphic below. The left view is if you do not have a github account (or the phone is not signed in to your account). The right view is if your github credentials are available.
In either case, the first action should be to add a term or phrase to the search box (red rectangle) to see if your issue has already been reported and to read the status if it has been reported. Please refer to the GitHub Issues section for more information.
Not for Build or Settings Help
Submit Bug Report should be used when you believe there is an error in the code.
The last row under Support creates a zip (compressed file) with detailed app information over a 7-day period. It is stored in a different format from the Loop Report and provides critical information to the developers when troubleshooting. Once the compressed file is created, you can save it and later share it with the developers if they request it. You can always discard these if you resolve the problem on your own.
Pro Tip
The Critical Logs zip file can be saved in the Files section on your iPhone. I have a folder on my phone Files named Critical Logs.
You can upload them to zulipchat from your phone (new feature) using the paperclip in the zulipchat app. (Don't see a paperclip - update your app.)
"},{"location":"loop-3/settings/#critical-log-format","title":"Critical Log Format","text":"The critical logs use a JSON (JavaScript Object Notation) format.
Each day (in user's local time) has the following files:
The JSON file for each day are zipped into one file for that day and then the zip files are again zipped into a single file that you can save. The current day (up to the current time) is combined with the previous day's data.
The time stamps within the JSON files use UTC.
"},{"location":"loop-3/settings/#app-profile","title":"App Profile","text":"The Profile Expiration is reported at the bottom of the Settings display along with the number of days remaining before Loop stops working.
The link for How to update (LoopDocs)
is provided for build with Mac.
In fine print, the exact date and time of the expiration is reported in your local time zone.
The Profile Expiration is different for GitHub Browser Build method. A feature request is in place (but not yet added to the code) to report the TestFlight expiration for that build method.
"},{"location":"loop-3/therapy-settings/","title":"Therapy Settings","text":""},{"location":"loop-3/therapy-settings/#loop-therapy-settings","title":"Loop Therapy Settings","text":"During Onboarding, all of your therapy settings were entered.
After onboarding, the Therapy Settings screen is reached by going through the Loop Settings screen after a pump has been added.
When building Loop 3 over Loop 2.2.x, the existing values from Loop 2.2.x are kept where possible and presented to the user as the \"default\" value when moving through each screen.
This page provides more details about each of your Therapy Settings.
"},{"location":"loop-3/therapy-settings/#authorization-required","title":"Authorization Required","text":"All the settings configured under Therapy Settings are protected by the same authorization method (FaceID, Fingerprint or Passcode) used to enable the app to issue a manual bolus.
"},{"location":"loop-3/therapy-settings/#details-for-therapy-settings","title":"Details for Therapy Settings","text":"Loop 3 has Guardrails for some Therapy Settings. These are grouped in the Guardrails for Settings section of this page.
New Loopers
New Loopers may prefer settings that show up outside the \"typical\" range.
For example, choosing a Correction Range that is higher than \"typical\" when starting to learn Loop is fine. Once you are comfortable with how the system works, the range can be adjusted if desired - entirely up to you in consulatation with your health care professional.
Therapy Settings are used for automated insulin delivery when Loop is in Closed-Loop mode.
Some screens displayed on this page were acquired during Onboarding.
Loop will deliver basal and recommend bolus insulin only if your glucose is predicted to be above the Glucose Safety Limit for the next three hours.
The graphic below shows the information screen presented during onboarding or when user taps the information icon, \u24d8.
The GIF below shows two screens for Glucose Safety Limit.
If you feel more comfortable with a higher limit, do not let the yellow font influence you. Once you've used Loop for a while, you can revisit this setting.
Note
The value you select for Glucose Safety Limit will dictate the lowest value on the glucose picker that is available for Correction Range and Pre-Meal Range. Those cannot be lower than the Glucose Safety Limit.
Guardrails for Glucose Safety Limit
"},{"location":"loop-3/therapy-settings/#correction-range","title":"Correction Range","text":"Your Correction Range is the glucose value (or range of values) that you want Loop to aim for in adjusting your basal insulin and helping you calculate your boluses.
The graphic below shows the information screen presented during onboarding or when user taps the information icon, \u24d8.
The GIF below shows four screens when first adding and selecting a correction range. The red box indicates where the user taps.
Do not let the yellow font discourage you if you want to have a \"higher than typical\" range to start with. Once you've used Loop for a while, you can revisit this setting.
Guardrails for Correction Range
"},{"location":"loop-3/therapy-settings/#manual-vs-automated-dosing","title":"Manual vs Automated Dosing","text":"Loop estimates future glucose over the next 6 hours (DIA) and, when in closed loop, adjusts insulin dosing. Loop uses or recommends the smallest amount of insulin that will bring you to your target (Correction Range midpoint) over the whole forecast.
If you ask Loop for a manual Bolus recommendation while your current glucose is below the bottom of the correction range and above the glucose safety limit, Loop will recommend a value that should keep your glucose above the safety limit.
Your Pre-Meal Range is used to temporarily lower your glucose target before a meal to impact post-meal glucose spikes.
The graphic below shows the information screen presented during onboarding or when user taps the information icon, \u24d8.
The GIF below shows three screens from various scenarios. The red box indicates where the user taps. If the user chooses to leave Pre-Meal not set, the Pre-Meal icon in the tool bar is disabled. Some users prefer this.
Note
Guardrails for Pre-Meal Range
"},{"location":"loop-3/therapy-settings/#carb-ratios","title":"Carb Ratios","text":"Your Carb Ratio is the number of grams of carbohydrates covered by one unit of insulin.
Guardrails for Carb Ratios
"},{"location":"loop-3/therapy-settings/#basal-rates","title":"Basal Rates","text":"Your Basal Rate of insulin is the number of units per hour that you want to use to cover your background insulin needs.
Guardrails for Basal Rates
"},{"location":"loop-3/therapy-settings/#delivery-limits","title":"Delivery Limits","text":"Delivery Limits are safety guardrails for your insulin delivery.
Save
button activeSave
Maximum Basal Rate is the maximum automatically adjusted basal rate that Loop is allowed to enact to help reach your correction range. Some users choose a value 2, 3, or 4 times their highest scheduled basal rate. Work with your healthcare provider to choose a value that is higher than your highest scheduled basal rate, but as conservative or aggressive as is comfortable.
If the Dosing Strategy is configured to Temp Basal Only, then the maximum basal rate can be used to limit how much extra insulin can be supplied automatically.
Guardrails for Maximum Basal Rate
"},{"location":"loop-3/therapy-settings/#maximum-bolus","title":"Maximum Bolus","text":"Maximum Bolus is the highest bolus amount that you will allow Loop to recommend at one time to cover carbs or bring down high glucose. The value the user selects for Maximum Bolus is also used to set a maximum level of IOB for automated dosing.
If you manually enter a value in the Bolus screen that is greater than the Maximum Bolus setting and press Deliver
, Loop will show a warning message and refuse to bolus that amount.
For safety, don't set a maximum bolus limit any higher than your typical large meal bolus. Many people like to set a value less than 10 U, for example, 9 or 9.9 U, to avoid accidentally typing in a bolus of 10 instead of 1.0 U.
If the Dosing Strategy is configured to Automatic Bolus, then the maximum bolus that is automatically supplied is 40% of the maximum bolus, but this can be applied at 5-minute intervals. Automatic dosing is limited to keep the user's IOB less than two times the Maximum Bolus setting.
Guardrails for Maximum Bolus
"},{"location":"loop-3/therapy-settings/#insulin-sensitivities","title":"Insulin Sensitivities","text":"Your Insulin Sensitivities refer to the drop in glucose expected from one unit of insulin over the full duration of the insulin action time. You may have also seen the term Correction Factor or Insulin Sensitivity Factor (ISF). These are all referring to the same setting.
Guardrails for Insulin Sensitivities
"},{"location":"loop-3/therapy-settings/#guardrails-for-settings","title":"Guardrails for Settings","text":"Loop has guardrails for Therapy Settings.
Experienced Loopers
The guardrails for each therapy setting used by Loop can be modified with Code Customization.
mmol/L
People using mmol/L should avoid the red (the min or max end points) glucose values for their settings. They sometimes cause a crash.
The font color in the value picker has the following meaning:
Mobile Device
Glucose Safety Limit Info
Top value available on the picker limited by lowest of:
Correction Range Info
Bottom value available on the picker limited by highest of:
Pre-Meal Range Info
Bottom value available on the picker limited by highest of:
The maximum bolus is limited by your pump, but it is a good idea to limit it to the maximum you use for a common \"big\" meal. This limits the bolus for a single manual dose.
This setting also limits how much automated dosing is allowed. Loop will not automatically increase the user's IOB above two times the Maximum Bolus. This is true with Dosing Strategy
of Temp Basal Only
or Automatic Bolus
.
Remember, CR goes in the denominator when calculating insulin dose for carbs. So the min - max values in the table below correspond to stronger - weaker values for CR.
Units limit min max limit g/U 2.0 4.0 28.0 150.0"},{"location":"loop-3/therapy-settings/#guardrails-for-insulin-sensitivities","title":"Guardrails for Insulin Sensitivities","text":"Remember, ISF goes in the denominator when calculating insulin dose for a correction. So the min - max values in the table below correspond to stronger - weaker values for ISF.
Units limit min max limit mg/dL/U 10 16 399 500 mmol/L/U 0.6 0.9 22.1 27.8"},{"location":"nightscout/loop-caregiver/","title":"Loop Caregiver","text":""},{"location":"nightscout/loop-caregiver/#the-loop-caregiver-app","title":"The Loop Caregiver App","text":"The Loop Caregiver app is under development to make remote commands easier to implement and monitor.
"},{"location":"nightscout/loop-caregiver/#minimum-requirements","title":"Minimum Requirements:","text":"Older Nightscout Versions
If you ignore this minimum version requirement - what happens:
master
Classic Liquorice
If you use Loop Caregiver, please join Loop Caregiver App Zulipchat stream.
As with all development code, monitor Zulipchat for announcements, report any problems you experience, be prepared to build frequently, and pay attention.
"},{"location":"nightscout/loop-caregiver/#build-the-loop-caregiver-app","title":"Build the Loop Caregiver App","text":"You can build the Loop Caregiver app using the Build with Browser method or the Build with Mac method.
"},{"location":"nightscout/loop-caregiver/#build-with-browser","title":"Build with Browser","text":"The Build with Browser method is documented on the Build Other Apps with Browser page.
"},{"location":"nightscout/loop-caregiver/#build-with-mac","title":"Build with Mac","text":"A build script is available to assist in building Loop Caregiver. This should be straightforward for anyone who has previously built \u00a0Loop 3\u00a0 using the script.
/bin/bash
Copy to Clipboard
when you hover the mouse over it). Once clicked, a confirmation message that says Copied to Clipboard
will appear on your screen. Copy and Paste to start the BuildLoopCaregiver script/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/BuildLoopCaregiver.sh)\"\n
Paste
from the menu Edit => Paste
(i.e. click the Edit
menu at the top of the Mac screen then click Paste
).Read Carefully
The output you see in the Terminal may look very similar to when you build the Loop app from a script.
It is pulling down a clone from a different location (LoopKit/LoopCaregiver
). It uses some modules from Loop
. The target and scheme are automatically selected for Loop Caregiver
and if you follow directions for a paid Developer account, the signing is automatic.
Some limited directions for using the Loop Caregiver app are provided - please also read the Zulipchat stream to stay up-to-date with improvements - especially if you are using a development branch of \u00a0Loop.
"},{"location":"nightscout/loop-caregiver/#add-looper-to-the-loop-caregiver-app","title":"Add Looper to the Loop Caregiver App","text":"You must add a Looper to continue with the Loop Caregiver app as shown in the graphic below.
On the\u00a0Loop\u00a0phone:
Loop -> Settings -> Services -> Nightscout
One-Time-Password
row to see the QR code Pro-tip
Take a screenshot of the QR code and store it on your computer.
You can then add the QR code to Loop Caregiver without bothering your Looper.
On the Loop Caregiver phone:
Settings
API_SECRET
You can add additional more people under settings. (*Loop Caregiver * can monitor more than one Looper).
"},{"location":"nightscout/loop-caregiver/#main-screen-of-the-loop-caregiver-app","title":"Main Screen of the Loop Caregiver App","text":"The Timeline:
Show Prediction
for Timeline is turned off in the graphic below.You can also use the Loop Caregiver -> Settings
screen to modify:
mg/dL
or mmol/L
Show Prediction
is turned off in the graphic above)You issue override, carb, and bolus commands using a toolbar similar to the one seen on\u00a0Loop. In the example graphic above, the carb and bolus entries visible were issued remotely.
Carb and bolus commands each require authorization before they are accepted. The authorization (FaceID, Fingerprint, or passcode) matches that required to unlock the Loop Caregiver 's phone.
The use of Loop Caregiver makes remote commands much easier and more reliable.
Go back and review the details about Remote Commands before using the app.
"},{"location":"nightscout/loop-caregiver/#troubleshooting","title":"Troubleshooting","text":"Troubleshooting steps are found on the Remote Errors page.
"},{"location":"nightscout/new-user/","title":"New Nightscout","text":""},{"location":"nightscout/new-user/#why-nightscout","title":"Why Nightscout?","text":"Nightscout is not required, but is recommended for Loop
Please visit Nightscout: Documentation to read about Nightscout. There are several options, mentioned in that documentation, for setting up your Nightscout site.
Once your Nightscout site is operational and you've read the information about using your site, return to LoopDocs to follow the directions on the LoopDocs: Nightscout with Loop page.
Comments
Most of the free DIY methods provide sufficient storage for a single Loop user, but will require you to delete older data after a year or two of use. The one exception is the Google Cloud method which includes multiple GB of storage.
If there are multiple Loopers in your family and you want to stay in the \"free\" tier, each will need their own site to stay under the monthly usage limitations. That means an account for each user under different email addresses for each user.
\"Free\" sites might potentially stop being \"free\" in the future.
One of the Nightscout as a Service providers will not allow you to put in your own Apple Push Notification variables, you must use theirs. If you have no plans to use remote commands via Nightscout, this will not affect you. If you decide to use remote commands, you may need to switch to a different service or get Loop through that same provider for an extra monthly fee.
"},{"location":"nightscout/new-user/#configure-nightscout-to-use-with-loop","title":"Configure Nightscout to use with Loop","text":"There are a few Loop-specific variables you should configure to get the most out of your Nightscout site. Follow the instructions on the LoopDocs: Nightscout with Loop page.
"},{"location":"nightscout/new-user/#add-nightscout-to-loop","title":"Add Nightscout to Loop","text":"Once you finish setting up your new Nightscout site, don't forget to enter your website URL and API_SECRET into your Loop settings, LoopDocs: Services - Nightscout. This way Loop will have access to your Nightscout site to upload all the wonderful data.
"},{"location":"nightscout/new-user/#nightscout-troubleshooting","title":"Nightscout Troubleshooting","text":"If your Nightscout site is not showing CGM (and Loop, if you are Looping) data within about 10 minutes of finishing your setup, then please follow the steps on the Nightscout: Troubleshooting page.
"},{"location":"nightscout/ns-crossref/","title":"Nightscout Cross Ref","text":""},{"location":"nightscout/ns-crossref/#nightscout-documentation","title":"Nightscout Documentation","text":"A number of pages that used to be in LoopDocs have been moved to the Nightscout documentation. To prevent duplication and inconsistency, those pages have been removed from LoopDocs. A cross-reference to the Nightscout pages is provided below.
While the Loop app sends notifications locally on the Loop user's iPhone, parents and caregivers may want those messages on their phones, too. We can achieve this functionality through a combination of Nightscout, IFTTT, Google, and Pushover.
Loop Follow was created by Jon Fawcett who took ideas from multiple other apps to create a single app to assist in his caregiving role. It is popular with Loopers who like the display and notifications as well as Loop caregivers. It can work with just the Dexcom Share credentials and/or the Nightscout URL and allows for easy customization of alerts and alarms. Jon handed over maintenance of this app to the Loop and Learn team.
LoopDocs had a page specifically about the Pebble Watchface called SkyLoop Predict
, which is no longer being supported. The Nightscout Documentation provides information about many methods for displaying your Nightscout data on a variety of wearable devices.
Nightscout offers some fantastic data-crunching report tools.
Nightscout is an excellent tool for remotely viewing Loop actions. Nightscout can act as a stand-alone tool or be integrated with Loop. (Nightscout also integrates with other open-source hybrid closed loop systems such as OpenAPS, AndroidAPS and iAPS. LoopDocs focuses on Loop.)
When integrated with Loop, Nightscout provides monitoring of Loop activities such as viewing history of glucose, carbs, boluses, temp basals and overrides; troubleshooting Loop errors; and provides extensive reports for analyzing data trends and patterns. These reports assist when Loop Therapy Settings need to be adjusted.
For caregivers, Nightscout enables remote monitoring and even the ability to issue remote commands through Nightscout when both Loop and Nightscout are properly configured. There are several pages starting at LoopDocs: Remote Overview that provide documentation on this feature. If you are a caregiver, this summary of remote capabilities may encourage you to look into Nightscout.
Remote Commands
If you plan to use remote commanding with Nightscout, please read these links with additional information:
Nightscout is useful for many who use Loop. Adults who take care of themselves find the reports and analysis methods from Nightscout provide effective tools to monitor their settings and provide reports for their health care provider. It also stores Loop configurations so they can be reviewed. With Loop 3, the saved Nightscout profiles can be downloaded to a new Loop installation or a new phone for quick onboarding, should you ever need to start fresh.
Setting up a Nightscout site is described in a separate web site: Nightscout: Documentation.
There are Nightscout apps in your iPhone App Store that allow you to view the Nightscout site after you've configured it, or you can use a web browser to view the data. The app alone is not enough - you need to follow the steps to configure your own Nightscout site and obtain your specific Nightscout URL.
There used to be a lot of Nightscout information found only in LoopDocs, but that was transferred and subsequently updated in Nightscout: Documentation. The information that remains in LoopDocs about Nightscout is Loop specific. So you may be jumping back and forth between the two sets of documents.
This page provides a general discussion about the Nightscout display, as well as some Loop-specific display information. Over time, interactions between Loop and Nightscout were improved. The information on this page has been updated for Loop 3 and Nightscout version 14.2.6 (or later). Older versions may exhibit some differences in the display of Loop information on the Nightscout site.
"},{"location":"nightscout/overview/#loop-uploads-to-nightscout","title":"Loop Uploads to Nightscout","text":"The Nightscout display updates when the Loop phone is connected to the internet via WiFi or cellular service. When the uploads stop, the Loop pill becomes \"stale\" (cannot open it) after 15 minutes.
Pills are the little information boxes. They are Nightscout: Plugins that must be enabled with configuration variables and then the display for each pill can be turned on or off within your Nightscout site.
If upload to Nightscout is interrupted, Loop 3 stores up to 7 days of Nightscout information in a local buffer on the phone, and will attempt to upload later when access is restored. Once access is restored, a stale Loop Pill may require 15 minutes before it will open to display additional Loop information.
The Carb pill on the Nightscout site is populated by Loop when Loop is actively uploading to Nightscout - but it may lag the value displayed in the Loop pill by one loop cycle and it will display 0 COB within 5 to 10 minutes if the upload is interrupted. In other words, if the COB pill shows 0 unexpectedly and Loop pill is active, you can believe the value shown in the Loop pill.
"},{"location":"nightscout/overview/#loop-2-red-loop-warning","title":"Loop 2 Red Loop Warning","text":"With Loop 2.2.9 and earlier versions, when a Nightscout site is selected in Loop Services and is unable to upload messages to that site, Loop keeps trying to upload the buffer of stored messages. This could lead to sluggish behavior in Loop or even cause a \u00a0Red Loop. This can happen if the Nightscout site is not accessible (no WiFi or cellular coverage) or if the database is full and not accepting messages.
Step 1: Remove Nightscout URL from Loop Services
Step 2: Figure out why the Nightscout site is not accepting uploads from Loop and fix that problem.
Step 3: Add Nightscout URL to Loop Services
Note - the method used by Loop 3 is not subject to this same problem.
Do you want to know more? (Click to open)For those who want to know more:
There is a big architectural change between Loop 2 and Loop 3 for remote data services like Nightscout.
It used to be that Loop would keep trying to upload data to Nightscout. If a site could not be reached or would not accept data, that could cause large backlogs. Loop 2 could slow down by trying to keep uploading the backlog. The new system does not allow for this. Uploaders individually keep track of where they are in the upload stream via a lightweight \u201cquery handle\u201d, and if the data in Loop data store expires before upload, that data will be missing in Nightscout.
Loop 3 saves 7 days of information in the data store.
"},{"location":"nightscout/overview/#nightscout-dashboard","title":"Nightscout Dashboard","text":""},{"location":"nightscout/overview/#blood-glucose","title":"Blood Glucose","text":"Glucose readings from the CGM are shown in green, yellow, or red in the main Dashboard of Nightscout. (The graphic above was generated with Colors enabled in Nightscout; there are other display options.) You can adjust your high and low glucose alarm thresholds in Nightscout by modifying configuration variables. This is optional - defaults are provided if you do not set them. The alarm thresholds affect the color of the displayed CGM data points and, if enabled, determine when an audible and visible alarm sounds. The Nightscout alarm thresholds will not affect Loop performance. Loop only uses the glucose correction ranges in the Loop app settings.
The main dashboard (upper section) for Nightscout displays the time duration you have selected (in the example above, 12 hours). The bottom of the screen shows the last 48-hours of glucose trends. You can scan backward by dragging the bottom timeline to the left, if you want to review specific Loop actions or data in the last two days.
"},{"location":"nightscout/overview/#sage-cage-bage","title":"SAGE, CAGE, BAGE","text":"The SAGE, CAGE, and BAGE pills are for Sensor Age, Cannula Age, and (pump) Battery Age. These optional pills track the time since your CGM sensor, Pump site, and Pump battery were last changed. You can set up custom alerts to remind you when it is time to change the devices, or simply use the visuals to keep track of your particular timing for site/sensor changes. When these items do not auto-upload, you can use the Nightscout Careportal to input the changes.
Carbs are automatically uploaded to Nightscout by the Loop app. The amount of carbs on board (active carbs or COB) can be seen by clicking the Loop pill. The size of a white carb dot on the graph is proportional to the amount of carbs entered...bigger meals get bigger dots. Loop does not read carbs from Nightscout for use in looping calculations, it only uploads carbs to Nightscout that have been entered in the Loop app.
"},{"location":"nightscout/overview/#boluses","title":"Boluses","text":"Insulin boluses are automatically uploaded to Nightscout by the Loop app. The bolus is shown as a filled-in blue lower-half of the dot, and the specific amount of the bolus is also shown. There may be a separation between the bolus and the carb entry, especially if the user preboluses a meal.
The bolus is uploaded to Nightscout as soon as it starts and Insulin on board (active insulin or IOB) is updated in the Loop pill. Should the bolus be interrupted, the Nightscout information is updated when the Loop information updates (assuming internet access is active).
"},{"location":"nightscout/overview/#temp-basals","title":"Temp Basals","text":"Your current basal profile is automatically updated to Nightscout whenever it is changed by Loop. The dashed blue line represents the scheduled basal profile. The solid blue lines indicate the actual basal amounts set for a given time...so as Loop sets temp basals higher or lower than your scheduled basal rate. If the graph and Loop pill do not agree, you should believe the Loop pill.
"},{"location":"nightscout/overview/#predicted-glucose","title":"Predicted Glucose","text":"The purple line to the right of the glucose is Loop predicted glucose. Watching the behavior of that purple line can help you understand why Loop is making decisions regarding high or low temps. You can read more on that topic in the LoopDocs: Algorithm section of these docs. If you don't see the prediction (and all other Nightscout and Loop settings are configured), tap on the 3 dots to the right of the 24 to reveal the choice to display AR2 prediction or Loop prediction. Adjust the check boxes to show just the Loop prediction.
"},{"location":"nightscout/overview/#loop-pill","title":"Loop Pill","text":"The Loop pill is the little display box which, when hovered over or clicked, will provide additional information about recent Loop activities and status. Information included is the last time Loop ran, the temp basal set, IOB, and COB. Looking at the Loop pill is a quick method for assessing if your loop is currently active, as well.
Loop Pill status indicator symbols
X Error in Loop
\u03d5 Recommending basal or bolus, but not enacting (open loop or pump suspended)
\u2301 Enacted a new temp basal
\u21bb Loop is continuing with last temp basal, no change
\u26a0 Warning indicating Loop is either red or has failed to upload to Nightscout for a longer period of time.
Mouse over or touch the Loop pill to view a tooltip containing one or more of the latest status messages. The most up-to-date Nightscout also includes information in the Loop pill for the minimum and maximum predicted glucose, eventual and predicted glucose.
"},{"location":"nightscout/remote-commands/","title":"Remote Commands","text":""},{"location":"nightscout/remote-commands/#requirements","title":"Requirements","text":"All remote commands require the configuration steps from Remote Configuration.
Do I have to use Loop Caregiver ?
There are a number of methods for using remote commands.
Things everyone needs to know are covered on this page, so you should read it regardless of how you plan to issue remote commands.
If you decide on Loop Caregiver , review both this page and \u00a0Loop Caregiver page.
"},{"location":"nightscout/remote-commands/#qr-code","title":"QR Code","text":"On the\u00a0Loop\u00a0phone, Nightscout must be included under the Loop
-> Settings -> Services section. Navigate to Services and select Nightscout. Tap on the One-Time Password row to view the QR code.
When you need to configure your authentication method, you can either use a saved QR screenshot or scan the QR on the\u00a0Loop\u00a0phone.
Options:
While you are on the Settings -> Services -> NightScout screen, notice that the 6-digit number on the One-Time Password row updates every 30 seconds.
"},{"location":"nightscout/remote-commands/#set-up-an-authentication-app","title":"Set up an Authentication App","text":"You need to set up an authentication app to generate one-time-passwords for remote bolus and carbs.
One of the nice features of Loop Caregiver is that it handles the one-time password (OTP) requirements for you.
But even if you choose to use Loop Caregiver , you should configure an authentication app for cases where you don't have access to your Loop Caregiver phone.
There are several authentication apps that support one-time passwords.
"},{"location":"nightscout/remote-commands/#apple-keychain","title":"Apple Keychain","text":"If you are using an iPhone or a Mac to issue remote commands through a browser or Nightscout app, you can use the \u00a0Apple Keychain\u00a0 which has native support to store passwords and generate one-time passwords.
To set up your Nightscout credentials in \u00a0Apple Keychain:
On the Caregivers device (iPhone or Mac):
Tap the + Button up top to add a new Password
You will enter your Nightscout credentials
Verification Code
Autofill Passwords
and check Keychain
There are other Authentication apps available. Here are a few options that you can download from your phone\u2019s app store:
If I have multiple Nightscout sites because I support multiple people with T1D looping, do I need multiple APNs Keys? Answer: No. If you support multiple people, you can use the one APNs key in each of their Nightscout sites.
How can I tell if it worked? Answer: You should see your override pill in Nightscout, with the NEXT Loop\u00a0cycle, reflecting that the desired remote action took place. If you are near the\u00a0Loop\u00a0phone, you should see the new override within less than 30 seconds or so.
Don't forget to read Loopdocs: Overrides.
For remote overrides in particular:
Can I set a different override in Nighscout than I have programmed into\u00a0Loop\u00a0app? Answer: No. You will only be able to enact override presets already programmed into the Loop app.
If I didn't start the override in Nightscout (it was started in\u00a0Loop\u00a0itself), can I still use Nightscout to cancel it? Answer: Yes. You can cancel an override set in\u00a0Loop\u00a0with a Nightscout-set cancel \"temporary override\" command in the careportal.
Can I replace an override set in\u00a0Loop\u00a0with an override set in Nightscout? Answer: Yes.
Can I see on Nightscout when a temporary override has been set using the looper\u2019s phone? Answer: Yes. There will be a grey bar with the name of the override noted and the Loop pill will display the targets and duration. Remember, there is a KNOWN issue with the grey bars, so use the pill as your best guide.
Can a looper cancel a remote override? Answer: Yes. They can tap the heart icon in\u00a0Loop\u00a0so that it is no longer highlighted. This turns off the override, regardless of where it was initiated.
I set a remote override in Nightscout but the Looper tapped the heart symbol in the Loop app, so the override turned off. Will the override get reinstated the next time\u00a0Loop\u00a0completes with internet access? Answer: No. The APN is only sent once. You can set the remote override again if need be.
Can I schedule a remote override ahead of time using Nightscout? Answer: No. When you set a remote override in Nightscout, it starts immediately and lasts for the duration programmed for that override in the Loop app. You can only set an override in advance using the Loop app.
Remote Commands to deliver a bolus or add a carb entry require a \u00a0One Time Passcode\u00a0 (OTP).
Minimum Versions: Loop 3\u00a0 and \u00a0Nightscout 14.2.6
If your Nightscout version does not meet that minimum requirement, remote commands might be accepted but if they are, the time for the commands is always the current time. In other words, Carbs in the Past or Future might be accepted, but would be entered at the current time on the\u00a0loop\u00a0phone.
"},{"location":"nightscout/remote-commands/#warnings-on-remote-commands","title":"Warnings on Remote Commands","text":"Duplicate Delivery Risk
We want to highlight a very important risk before you get started.
For safety, always assume a previous remote carbs/bolus was delivered. For motivation think of the following example:
You can see the danger of sending duplicate bolus/carbs so be careful. If a remote bolus/carb entry doesn\u2019t show in Nightscout, use your own judgment on whether enough time has passed to try again.
"},{"location":"nightscout/remote-commands/#remote-bolus-then-remote-carb","title":"Remote Bolus, Then Remote Carb","text":"If sending both, choose Bolus then Carbs
If you plan to send a carb command remotely and later decide to issue a bolus command - STOP and consider.
There are 2 scenarios of concern that could lead to too much insulin:
Typically, sending a remote carb entry alone is sufficient for\u00a0Loop\u00a0to know about the carbs and begin to dose for them.
If you really want to both bolus for carbs and enter carbs, then do it in that order.
\u2757\ufe0f Remember - you should pause at least 60 seconds between remote commands or the One-Time-Password (OTP) will be rejected as having already been used.
"},{"location":"nightscout/remote-commands/#use-unique-times-for-remote-carbohydrate-entries","title":"Use Unique Times for Remote Carbohydrate Entries","text":"Use unique times for remote carbohydrate entries
Instead of adding a second remote carbohydrate entry at an identical time, add one minute to the second entry.
This ensures that Nightscout keeps both entries.
Any Caregiver entering remote carbohydrates needs to be aware of how Nightscout decides what carbohydrates treatments are unique. If two entries have the same hour:minute:second time, Nightscout keeps only one of the entries.
One example scenario:
Second example scenario:
The LoopCaregiver app was recently modified to use the seconds from when the new entry was created, instead of using hour:minute:00. This change makes it less likely that two entries with the same timestamp will collide. (One chance in 60.)
Any remote carbohydrate entry from the Nightscout careportal using the same hour:minute time, however, will be entered with 0 seconds.
For more information, see:
There are four ways you can trigger your commands remotely; \u00a0Loop Caregiver (link takes you to a new page), Nightscout Careportal, Shortcuts, and IFTTT.
"},{"location":"nightscout/remote-commands/#loop-caregiver","title":"Loop Caregiver","text":"Click the link above to read more about Loop Caregiver .
"},{"location":"nightscout/remote-commands/#nightscout-careportal","title":"Nightscout Careportal","text":"To use remote commands in the \u00a0Careportal, you must configure Nightscout site according to the directions here in \u00a0Loopdocs\u00a0 in addition to setting up the Remote Configuration.
Pay particular attention to these entries in the ENABLE
line: override
careportal
Loop
. The order of the words in the ENABLE
line is not important.
You'll also need to have your site authenticated so that your \u00a0Careportal\u00a0 is active to send remote overrides .
Once authenticated by entering your API_SECRET
, there is a plus sign () in the upper right corner of your site. That is your Careportal. Tap the Careportal plus sign () and then scroll down in the event type
menu to find Temporary Override
. Within there, you will find all your\u00a0Loop\u00a0override presets already loaded for you.
The Looper will see a banner notification that a remote command has been sent with details about that command and whether it succeeded (or not).
Canceling an override through Nightscout careportal is as simple as selecting the event type Temporary Override Cancel
and submitting.
Open your Nightscout site in a browser or app.
event type
dropdown menu to find Remote Carb Entry
or Remote Bolus Entry
Note that Loop will honor both the current OTP code and the one that just expired.
If the Looper is with you, you can see the notification on their phone. You can see the entry on the\u00a0Loop\u00a0carbohydrate or the insulin displays to see if it went through.
If the Looper is not with you, you should see the result in the Nightscout dashboard within 5 minutes.
"},{"location":"nightscout/remote-commands/#shortcuts","title":"Shortcuts","text":"If you want to make your life SUPER AMAZING, check out using the iPhone's Shortcuts app. The Shortcuts app is for making little automations (like mini apps) that can integrate parts of your life. In this case, we've written a couple of shortcuts for you that integrate\u00a0Loop\u00a0overrides with Nightscout.
Important Note
Before you click on the download file below...save yourself some trouble.
Click these links on your iPhone and you'll be prompted to download the premade shortcuts (assuming you open the links in Safari browser on iPhone):
Comprehensive\u00a0Loop\u00a0Shortcut includes Set Remote Override, Cancel Override, Loop Troubleshooting Tips, Quick Text options, Manual BG entry, Bookmarks to websites, etc.
And if you want to save one click to get to these one functions more directly: these shortcuts are simplified to offer only one function:
Set Remote Override only shortcut
Cancel Override\u00a0 only shortcut
A couple notes about these shortcuts:
You need to open those links in the Safari browser on your iPhone. A confirmation will show to initiate the download.
After the download finishes, tap the button marked AA
near your Safari address bar and tap Downloads
(downloads) to find and open the downloaded Shortcut.
Wait a bit, and the shortcut's inner guts will be there...scroll ALL the way down to the bottom to click the button to save the untrusted shortcut
URL
field\u00a0 of the\u00a0Loop\u00a0shortcut setup, make sure you don't include a \u00a0trailing /
, or the API calls to Heroku will error out.ok
message displayed. If there is an error, you'll see an error message. Most errors will be that you have an API_SECRET
wrong (make sure there isn't a space at the end of your API_SECRET
that you don't see) or you failed to do the steps to setup Nightscout and update your\u00a0Loop\u00a0app as described in steps 1-3 above.If you want to walk uphill both ways in the snow carrying bags of uneven groceries, you can also set overrides remotely by using If This, Then That (IFTTT) integration. By using IFTTT, you can have single button presses on your phone that will set an override, log a cannula change, log a sensor change and much more.
Page Summary
Apple Push Notifications service (APNs)
You can use the Nightscout site to remotely set and cancel override presets remotely in the Loop app.
With \u00a0Loop 3, you can also send remote commands to add carbs and command a bolus. Remote bolus/carb commands have a minimum requirement of \u00a0Nightscout 14.2.6. If your Looper's Nightscout version does not meet that minimum requirement, remote commands might be accepted, but the time for the commands is always the current time. In other words, Carbs in the Past or Future might be accepted, but would be entered at the current time on the\u00a0Loop\u00a0phone.
After you complete the configuration, read the entire Remote Commands page - pay attention to the warnings and caveats. Test this while your Looper is sitting next to you so you can watch their phone.
Remote Nightscout Interface Caveats
Loop remote carbs/bolus
row: subscription refers to a monthly feeThere are several options to pay for a turn-key Nightscout service.
The rest of this page assumes that you built your Loop app and you have full access to the configuration variables for your Nightscout site.
"},{"location":"nightscout/remote-config/#step-1-update-the-loopers-iphone-settings","title":"Step 1: Update the Looper's iPhone settings","text":"For remote commands to successfully deploy to a Looper's iPhone when the phone is locked, they must have Background App Refresh enabled.
iPhone -> Settings -> General -> Background App Refresh -> Loop
must be enabledConsequence if Looper's phone is not configured correctly:
Keep Notifications Turned on for Looper's Phone
Typically, the Looper's phone has Notifications enabled for \u00a0Loop. In fact, if they don't, a red warning bar is prominently displayed.
There may be times when you really need\u00a0Loop\u00a0to be quiet, so you can turn off Notifications. The remote commands still go through but the Looper does not see a notification that this happened.
Best practice is to keep\u00a0Loop\u00a0Notifications enabled.
"},{"location":"nightscout/remote-config/#step-2-apple-push-notifications","title":"Step 2: Apple Push Notifications","text":"The step is required for the Loop app to give permissions to your Nightscout site to remotely interact with it. To enable this, you need to create a key and grant it access to the \u00a0Apple Push Notification Service (APNS).
Reminder
This only works with the paid Apple Developer ID.
Keys
section under Apple Developer's Certificates, Identifiers & Profiles
and login with the Apple ID associated with your developer team that you used to build the Loop app.Keys
(located in the left-hand column). Create a new key
button OR the plus button () to add a new key. Apple Push Notifications service (APNs)
Nightscout
(you can name it however you want, just make sure you know what the key is for by the name you choose).Continue
button in the upper right of the screen. Register
button. Download
button. This step will download a file with a name that starts with AuthKey
and ends with .p8
. AuthKey
downloaded file in your downloads folder. Double-click to open it and you will be presented a message asking how you'd like to open it. The graphic and instructions below are for a Mac. Make sure your editor does not change any characters in your APN key; use a text-only editor like NotePad (PC) or TextEdit (Mac). Click on Choose Application...
and then select TextEdit
as your application to open it with.
When the file opens, it will look similar to the screenshot below. In a few minutes, after we do a few other steps first, we will need to highlight ALL OF THE CONTENTS of that file and copy it because we will be pasting it in Heroku or whichever Nightscout provider you are using. Yes, allllll of the contents. So, the easiest way is to:
You don't have to do it right now...just keep that window open in the background for now until we need it a little further down. Then we will copy all that text.
You'll need to make sure your Nightscout site version is version 13.0.1
or newer for remote overrides and version 14.2.6
or newer for access to all the remote command features.
What is my Nightscout Version Number?
To find your Nightscout version number:
\u2630
) the hamburger button (3 horizontal lines stacked on each other) at the upper right, near the authentication button.About
section after the Settings
section, (below the Save
button).This link should be used if you want to Nightscout: Update your Nightscout site.
Note for Google Cloud Users
The Nightscout with Google Cloud instructions include information about updating your site. Scroll down to the line (on that page) that says Update Nightscout
.
In order to use remote overrides, you must add a couple of new variables. If you don't know how to update your Nightscout configuration, review Nightscout: Setup Variables and then come back.
The instructions in this section show Heroku images. If you are using a different method, you should be able to \"translate\" the steps.
Go to the Settings
tab near the top of the screen on your Heroku app and then click on Reveal Config Vars
.
Scroll down the bottom of the Config Vars
lines until you find the last blank one. You are going to add three new rows of config vars for remote overrides as shown below:
LOOP_APNS_KEY
Enter the ENTIRE contents of the downloaded .p8
file including the BEGIN
and END
lines. Here's where you can use the Cmd+A and Cmd+C to highlight and copy all the text in that file so you can paste it into Heroku here for this new variable you are creating. LOOP_APNS_KEY_ID
String of characters on the .p8
download file immediately following the underscore (_
) and not including the file extension (.p8
), or you can get it from your saved key in your developer account as shown next step, too. This is a part of the downloaded filename located after the underscore (_
) and before the file extension (.p8
). LOOP_DEVELOPER_TEAM_ID
Get this value from the Loop app signing or in your \u00a0Apple Developer\u00a0 account's top right corner under your name LOOP_PUSH_SERVER_ENVIRONMENT
(optional) Set this to production
if you installed\u00a0Loop\u00a0remotely such as with TestFlight, Diawi, AppCenter, or an IPA. If you built directly to your phone in XCode with your phone plugged into to your computer, do not include this variable."},{"location":"nightscout/remote-config/#remote-build-config-var-requirement","title":"Remote Build Config Var Requirement","text":"That last row of the table above is needed if you are using a remote build option such as LoopDocs: GitHub Build Actions or downloaded an archived file via Loop and Learn: Remote Build with Diawi. If you later return to a direct Xcode build to your phone, you must remove that config var or remote commands will not work.
When executed properly, you should have something that looks like this for the three (or four) new variables that you added:
"},{"location":"nightscout/remote-config/#baddevicetoken","title":"BadDeviceToken","text":"When the Nightscout config var LOOP_PUSH_SERVER_ENVIRONMENT does not match the Loop app build method; the error message contains the phrase APNs delivery failed: BadDeviceToken
.
LOOP_PUSH_SERVER_ENVIRONMENT
set to production
LOOP_PUSH_SERVER_ENVIRONMENT
as one of your Nightscout config varsAPI Key vs APN Key
If you build with the Build with Browser, you may notice \u00a0the \u00a0Application Programming Interface (API)\u00a0 key\u00a0 has the same type of format as \u00a0the \u00a0Apple Push Notification (APN)\u00a0 key. The keys for both purposes are of type p8
, but should not be confused.
The Secrets for building with GitHub use the API Key.
The config vars for Nightscout use the APN Key.
LOOP_PUSH_SERVER_ENVIRONMENT
with a value of production
to your Nightscout site or the remote commands will not work.LOOP_PUSH_SERVER_ENVIRONMENT
entered - remove it if it is present.If remote overrides do not function, remote commands for delivering a bolus or adding a carb entry will not work either.
After you finish setting up your Nightscout site:
This section is for people who were using remote commands and they suddenly stopped working.
If you are using LoopCaregiver, try the remote command directly from Nightscout to see if they work there. If they are not working there as well, check out your account status first before attempting the fixes on the rest of this page.
Ensure your Nightscout version is at least version 14.2.6.
Verify that you performed all the Remote Configuration steps for the Nightscout site including sending an override from the\u00a0Loop\u00a0phone to Nightscout.
"},{"location":"nightscout/remote-errors/#baddevicetoken","title":"BadDeviceToken","text":"When the Nightscout config var LOOP_PUSH_SERVER_ENVIRONMENT does not match the\u00a0Loop\u00a0app build method; the error message contains the phrase APNs delivery failed: BadDeviceToken
.
LOOP_PUSH_SERVER_ENVIRONMENT
set to production
LOOP_PUSH_SERVER_ENVIRONMENT
as one of your Nightscout config varsIf you attempt to issue a command from Nightscout Careportal; after you hit submit and then OK, you will see the error message:
Error: APNs delivery failed: BadDeviceToken\n
If you attempt to issue a command using Loop Caregiver ; after you authenticate the command, you will see the error message listed below and shown in the screenshot.
HTTP Error\nStatus Code: 500\nbody: APNs delivery failed: BadDeviceToken\n
"},{"location":"nightscout/remote-errors/#loop-remote_overrides_disabled","title":"Loop REMOTE_OVERRIDES_DISABLED
","text":"You can build Loop with Build-Time Features as part of code customization.
If you added this Build-Time Flag: REMOTE_OVERRIDES_DISABLED
You will not see any errors, but nothing will happen when you issue any kind of remote command.
Solution: Remove REMOTE_OVERRIDES_DISABLED
from LoopConfigOverride.xcconfig
file and rebuild the\u00a0Loop\u00a0app.
The references to Caregiver below is the person sending the commands. There are specific Loop Caregiver app insructions that you modify for your authenticator. You must have the\u00a0Loop\u00a0phone with you to troubleshoot this problem.
Reload
Apple Push Notifications will often not make it to an app, either due to your settings or intentional limitations by Apple. This error can appear in various forms:
While\u00a0Loop\u00a0does not have control over Push Notification timely delivery, there are things that can be done to mitigate these issues. Note that rebuilding\u00a0Loop, Loop Caregiver or Nightscout is generally not going to help.
Check these settings on the Looper\u2019s device, not the Caregivers. Several of these are related to Apple suppressing notifications.
Some other things to try on the Looper\u2019s phone:
This is helpful information to share when requested by helpers. If you are not using Loop Caregiver, review the response seen on the Nightscout site.
Mention which troubleshooting steps you have completed so we know whether to ask about these again.
"},{"location":"nightscout/remote-errors/#other-errors","title":"Other Errors","text":"Once you've set up remote commands, you may encounter errors when trying to run them via Nightscout or iOS Shortcuts. Below are the most common and typical solutions.
Error: Loop notification failed: Could not find deviceToken in loopSettings
You might see this in either Nightscout or Shortcuts. The error is most commonly caused by\u00a0Loop\u00a0not pointing to the right Nightscout instance or you haven't yet run an override locally (with the\u00a0Loop app) before trying to run one remotely. Solution: Confirm the Loop app is pointing to the right Nightscout site (and there are no extra spaces or a slash (/
) at the end, and always run an override for a few seconds in the Loop app before you try to run one remotely.Error: cannot POST/api/v2/notifications/loop
You might see this in iOS Shortcuts. This means Nightscout is not updated correctly and you are running a version of Nightscout that doesn't yet support remote overrides. Solution: Follow the Remote Configuration documentation.Error: {\u201cstatus\u201d:401,\u201dmessage\u201d:\u201dUnauthorized\u201d,\u201ddescription\u201d:Invalid\\\\/Missing\u201d}
You might see this in iOS Shortcuts. This is caused by having an incorrect API_SECRET
in the shortcut. Solution: Double check the API_SECRET
is correct and that there are no spaces at the end.Error: APNs delivery failed: InvalidProviderToken
You might see this in either Nightscout or Shortcuts. This is caused because your LOOP_APNS_KEY_ID
and LOOP_DEVELOPER_TEAM_ID
are swapped in Heroku. Solution: Double check what's listed in your Apple Developer Account and compare it to the config variables in Heroku. Your Team_ID
is next to your name in the top right corner. The other code is your Key_ID
. Get the IDs in the correct location in Heroku to resolve the error.With\u00a0Loop\u00a03, a caregiver can provide remote commands to assist in diabetes care, including modifying overrides, issuing remote bolus commands and adding remote carb entries. With\u00a0Loop\u00a02, only overrides can be turned on or off remotely.
Remote commands to the\u00a0Loop\u00a0phone go through their Nightscout site. For security, any command to deliver a bolus or add a carb entry requires a one-time-password (OTP) to be used with each remote command. These codes are unique to your combined\u00a0Loop\u00a0and Nightscout configuration. An authentication app needs to be installed on the device sending the remote boluses/carbs. The Loop Caregiver app can be used. It handles authentication requirements and offers a\u00a0Loop\u00a0-like user interface.
"},{"location":"nightscout/remote-overview/#remote-commanding-requirements","title":"Remote Commanding Requirements:","text":"What about Older Versions?
Caregivers for those using older versions of Loop can modify Overrides
remotely but cannot send remote bolus or carb commands.
If your Nightscout site is an older version, you should limit your remote commands to Overrides
, even with \u00a0Loop 3.
Loop Caregiver
There is a new companion app, \u00a0Loop Caregiver that makes remote commands and reviewing the status of your looper much easier.
"},{"location":"nightscout/remote-overview/#how-does-this-work","title":"How does this work?","text":"Loop\u00a0and Nightscout work using \u00a0Apple Push Notifications\u00a0 (APN).
Nightscout as a service
or Hosted Nightscout
will assist you, if needed, in getting your APN information added to your Nightscout variablesLoop remote carbs/bolus
row: subscription refers to a monthly feeUse unique times for remote carbohydrate entries
Instead of adding a second remote carbohydrate entry at an identical time, add one minute to the second entry.
This ensures that Nightscout keeps both entries.
For more information, see:
There are several steps to follow to set this up. Each page is linked below:
"},{"location":"nightscout/remote-overview/#set-up-remote-for-nightscout","title":"Set Up Remote for Nightscout","text":""},{"location":"nightscout/remote-overview/#using-remote-commands","title":"Using Remote Commands","text":""},{"location":"nightscout/remote-overview/#remote-errors","title":"Remote Errors","text":""},{"location":"nightscout/remote-overview/#loop-caregiver-app","title":"Loop Caregiver App","text":""},{"location":"nightscout/troubleshoot/","title":"Nightscout Troubleshooting","text":""},{"location":"nightscout/troubleshoot/#setup-troubleshooting","title":"Setup Troubleshooting","text":"If you have just tried to set up your Nightscout site and have problems with seeing all your data, please check out the Nightscout: Troubleshooting page.
"},{"location":"nightscout/troubleshoot/#dexcom-data-not-showing","title":"Dexcom data not showing","text":"If you use a Dexcom and get your CGM data into Nightscout using Dexcom Share (bridge in Nightscout) and everything is working but the Dexcom data stops showing, please review Nightscout: Dexcom bridge Troubleshooting.
As part of that troubleshooting, you may need to remove the Nightscout service credentials from Loop. You may need to remove Dexcom credentials from all third-party apps that get data from Dexcom Share. Be sure to add them back after the CGM data to Nightscout is restored.
You do not need to use Share or bridge with Nightscout. You can choose to have Loop update your CGM readings to Nightscout directly. There's a check box in the Loop CGM setting screen to select this. You must select that check box every time you update your transmitter for Dexcom G5 or G6.
"},{"location":"nightscout/troubleshoot/#loop-data-not-showing","title":"Loop data not showing","text":"If your BG data is showing, but Loop data is not (like Loop pill is empty and carbs and boluses are not showing), please delete your Nightscout account in Loop settings area. Enter the information in Loop again. Make sure to use https://
to start the site URL. Make sure there is no trailing slash at the end of the URL. Enter your API_SECRET correctly. Make sure you have loop
on the ENABLE line in Heroku settings.
Many people may already have an existing Nightscout site setup from before adding Loop to their management strategies. In order to make the most of your Looping setup, you will need to modify your existing Nightscout site a bit specifically for Loop. The process is pretty easy and should not take long.
The graphics on this page are from a Heroku implementation for DIY Nightscout. When you read the Nightscout documents, you'll notice there are a lot more options than just Heroku. When Heroku announced that the \"free\" tier for Heroku would be disabled in November 2022, the #WeAreNotWaiting community developed a lot of options - both free DIY, nominal cost DIY and there were already several companies that provide Nightscout as a service. If your site is not with Heroku, you need to translate how to adjust the configuration variables.
"},{"location":"nightscout/update-user/#variables-for-loopers","title":"Variables for Loopers","text":"Once you have created a Nightscout site, there are some Nightscout Config Vars specific to Loop.
First the Config Vars need to be added to the Nightscout site.
For each instance of viewing the Nightscout site (i.e., on broswer or phone app), you can individually select which of those configured items are displayed. This is on a per-view basis. However, Config Vars like the SHOW_PLUGINS
line allow you to preconfigure what will be shown by default.
These instructions are for people using Heroku, because that is the most common choice. If your Nightscout site is not on Heroku, this page provides a guide for the Config Vars used by Loop.
Login to your Heroku account, select the Settings
tab near the top of the screen on your Heroku app.
Click on Reveal Config Vars
. Scroll down the bottom of the Config Vars lines until you find the last blank one. You are going to add several additional lines of config vars for Loop use; the DEVICESTATUS_ADVANCED and ENABLE lines are required, the others just make Nightscout more useful when Looping.
Omnipod Users can skip the Config Vars that begin with PUMP_
. Those are useful for Medtronic users.
Click on Open App
in the top right corner of your Heroku site.
Once you are viewing an instance of your Nightscout site (browser or app), you can adjust what this instance of the display will show.
Click on the \"hamburger\" menu - those three horizontal lines in the upper right corner of the main NS display.
Different sets of documentation call the three horizontal lines in the upper right of the Nightscout display different things such as:
The graphic below shows some of the check boxes you can select. Make sure your basal render is selected to either default or icicle (personal preference for how the temp basals show as blue lines in NS site), adjust alarms (on or off), check the boxes that you\u2019d like display as pills in the SHOW PLUGINS section (usually all of them), and then click save. (You are saving your display preferences, not modifying anything in the NS database.)
Note - Nightscout has been updated since this figure was generated.
"},{"location":"nightscout/update-user/#authenticate-site","title":"Authenticate Site","text":"If the current display of your NS site has been not authenticated, you will not be able to access certain portions of Nightscout such as the careportal, administration tools and remote overrides. There are two ways to authenticate.
Use API_SECRET to access all features of Nightscout
Use Tokens to generate a URL that opens with predefined role(s)
The use of tokens is documented at this link to the security page in the Nightscout documentation.
You can authenticate with your API_SECRET using either of these methods:
Click on the hamburger menu and scroll all the way to the bottom, click on authenticate and add your API_SECRET
Click on the Lock symbol on upper right on main display (requires careportal plugin to be enabled) and add your API_SECRET
An authenticated site, with careportal plugin enabled, will show a + at upper right of the main display instead of a lock symbol. Tapping on the + gives you access to the careportal.
"},{"location":"nightscout/update-user/#nightscout-version-update","title":"Nightscout Version Update","text":"If you are new to Loop and haven\u2019t updated your Nightscout site for a while, check to see if there's an available update. Visit Nightscout: Update Instructions for directions on updating.
"},{"location":"nightscout/update-user/#more-variables-for-loopers","title":"More Variables for Loopers","text":"The list of Variables for Loopers above can be expanded if you want your site to automatically open with specific values and alarm settings.
This Loop and Learn: Nightscout Variables page, created for folks using the Google Cloud method to create a Nightscout site, has a convenient, expanded list.
"},{"location":"operation/overview/","title":"Loop 2 Set Up Overview","text":"This section of LoopDocs will be maintained during the transition to Loop 3. These pages are specific to Loop 2.2.x and some forks based off that older version.
Be aware that older versions and forks will probably not be updated as the Apple environment changes.
With Loop 2.2.x, you must manually step through every Loop setting and fill out the appropriate values. If you miss some, you may get errors in the app. If this happens to you, review every setting carefully.
You need to work through the steps listed in the headings under this page one by one. Please follow along with each page's information to make sure that you don't miss any valuable information about your Loop's settings and function.
You can work through each page completely and click on the link at the bottom of the page to proceed to the next page. Or you can use the back button on your browser to return to this page and click on the link for the page of interest.
"},{"location":"operation/overview/#permissions","title":"Permissions","text":"Make sure that Loop has permission to send you notifications. For example, you will want to know if Loop has stopped working for more than 20 minutes.
Make sure Loop has permission to access Bluetooth devices. You'll need that for your CGM and to connect a pump to Loop.
"},{"location":"operation/overview/#loop-2-health-permissions","title":"Loop 2 Health Permissions","text":"Follow the instructions on the Loop 2 Health Permission page. Note that the Carbohydrate read permission should be turned off after enabling all.
"},{"location":"operation/overview/#loop-2-add-pump","title":"Loop 2 Add Pump","text":"Select and configure your insulin pump. There are separate pages for setting up a Medtronic (MDT) pump or an Omnipod Eros pump (aka \"pods\"). Click on one of the pages to go straight to that page's guide.
Loop 2 Add Medtronic Pump
Loop 2 Add Omnipod Pump
"},{"location":"operation/overview/#loop-2-add-cgm","title":"Loop 2 Add CGM","text":"Follow direction on the Loop 2 Add CGM page. If you are wondering which CGMs are supported natively by Loop, check Compatible CGM.
"},{"location":"operation/overview/#loop-2-configurations","title":"Loop 2 Configurations","text":"Configure Loop's settings. Within this section, you will be entering many settings that you are already familiar with such as basal rates, carb ratios, and insulin sensitivity factor (aka correction factor). There are also several new terms that you may be unfamiliar with like insulin model selection, suspend threshold, and override ranges. Make sure to refer to the Loop 2 Configurations while entering values - DO NOT GUESS.
"},{"location":"operation/overview/#loop-2-services-optional","title":"Loop 2 Services (Optional)","text":"You are not required to use services although many Loopers use Nightscout. If you do not yet have Nightscout configured and want to add it later, just return to the Services page when you are ready. Note that Loop 3 and Loop 2 use the same documentation page for Services. Services can be added at any time.
"},{"location":"operation/overview/#loop-2-displays","title":"Loop 2 Displays","text":"After you are done entering your settings, you should familiarize yourself with the information displays. The Loop 2 Displays page will help you recognize and begin to understand what all the icons, graphs, and data mean.
It is a good idea to remain in Open Loop while becoming familiar with the app.
"},{"location":"operation/overview/#loop-2-pump-settings-screen","title":"Loop 2 Pump Settings Screen","text":"The pump settings screens for Loop 3 were updated. The older interface used by Loop 2 is documented at Loop 2 Pump Settings
"},{"location":"operation/overview/#rileylink-screen","title":"RileyLink Screen","text":"The documentation for Loop 3 and Loop 2 is the same for the RileyLink screen. This screen is only available after configuring a pump that uses a RileyLink Compatible Device.
After a pump that uses a RileyLink is connected to the app, tap on a RileyLink name in the pump settings screen to bring up the displays and commands found on the RileyLink Menu screen.
"},{"location":"operation/algorithm/bolus/","title":"Bolus Recommendations","text":""},{"location":"operation/algorithm/bolus/#loop-manual-bolus","title":"Loop Manual Bolus","text":"Loop will recommend bolus insulin corrections when the eventual blood glucose is greater than the correction target and the active insulin plus any active 30-minute temporary basal will not be sufficient to cover the predicted excursion above correction target.
These recommendations are not proactively sent to the Loop user through any notification or banner alert; the recommendation is only viewable when the user clicks on the bolus tool. Note that Loop never issues a bolus command automatically while using the default Temp Basal Dosing Strategy; all boluses are initiated by the user unless the Automatic Bolus dosing strategy is enabled. With automatic bolus enabled, each automatic bolus is limited to 40% of the recommended amount or the maximum bolus setting, whichever is smaller.
The bolus dose calculation is identical to the dose equation given in the basal recommendations section, with the exception that:
For recently saved carbohydrates where the projected carbohydrate absorption will outlast the insulin activity duration (e.g., very slow-digesting meals like pizza or pasta), Loop\u2019s algorithm will inherently decrease the initial meal bolus \u2014 to prevent hypoglycemia events that often occur after these meals \u2014 by only recommending enough bolus to prevent minimum predicted glucose from going below the suspend threshold. As described above, the Loop algorithm computes the recommended bolus such that predicted glucose will not dip below the suspend threshold. This may result in future blood glucose levels predicted above correction range, but will prevent a hypoglycemia event shortly after the meal (as it sometimes occurs for people giving a \"pizza bolus\" in traditional pump therapy). Loop will then later make corrections by issuing a command to temporarily Increase Basal Rate or provide an automatic bolus. In effect, this algorithm behavior mimics traditional pump therapy of \u201cextended\u201d or \u201cdual wave\u201d bolusing, but with the benefit of added information about actual carbohydrate absorption effects as time goes by.
Finally, Loop checks that the result of the calculations is below the maximum single bolus the Loop user specified in their settings. If the calculated bolus is less than the maximum single bolus setting, then the recommended bolus will be displayed in Loop\u2019s bolus tool.
Bolusing safety feature
If the current blood glucose, or any predicted blood glucose, falls below the suspend threshold, Loop will not return a recommended bolus. When the minimum blood glucose rises above the suspend threshold, the bolus tool will provide a recommended bolus.
"},{"location":"operation/algorithm/bolus/#algorithm-section-menu","title":"Algorithm Section Menu","text":"Loop\u2019s algorithm for adjusting insulin delivery is oriented around making a blood glucose prediction. Every five minutes, triggered by new blood glucose data, it generates a new prediction. Both bolus recommendations and temporary basal rate adjustments are set based on this prediction.
"},{"location":"operation/algorithm/overview/#algorithm-terminology","title":"Algorithm Terminology","text":"This graph and legend illustrates terms commonly used in discussing Loop's algorithm, and shows them in the context of historical and forecasted blood glucose in style similar to the status screen of Loop.
Insulin activity duration The insulin activity duration is the duration of the insulin activity curve, and describes the point at which the delivered insulin dose no longer affects blood glucose. The insulin activity duration is 6 hours for Loop's rapid-acting and ultra-rapid insulin models. Correction range The correction range is the blood glucose range Loop uses to determine corrective actions (e.g., between 90 and 120 mg/dL in the figure). NOTE: Loop\u2019s correction range is a user setting and should not be confused with the target range, typically 70-180 mg/dL, used for the purpose of calculating the percent time in range. Correction minimum The lower or minimum value of the user\u2019s correction range, which is 90 mg/dL in the figure. Correction maximum The upper or maximum value of the user\u2019s correction range, which is 120 mg/dL in the figure. Correction target The correction target is the average value of the correction range. In the overview figure, this is 105 mg/dL given that the correction minimum is 90 mg/dL and the correction maximum is 120 mg/dL. Predicted blood glucose Loop makes a prediction of blood glucose values out for a length of time equal to your insulin action duration. The predicted blood glucose is the basis for how Loop makes its insulin delivery recommendations and actions. Eventual blood glucose The last value of the predicted glucose curve, in other words the very last blood glucose predicted at the end of your insulin action duration. In the figure above, this is 85 mg/dL. Minimum predicted blood glucose The lowest blood glucose value at any point in time within the prediction. In the figure above, this is 77 mg/dL. Delta The delta is the difference between the eventual blood glucose and the correction target. In the overview figure, the eventual blood glucose is 85 mg/dL and the correction target is 105 mg/dL, which means that the delta is -20 mg/dL. Suspend Threshold The suspend threshold is a safety feature of the Loop algorithm. If any predicted blood glucose is below this threshold, the Loop algorithm will issue a temporary basal rate of 0 CGM data Blood glucose readings made by a continuous glucose monitor. Insulin sensitivity factor A configuration value that provides an estimate of how much blood glucose will drop given a unit of insulin. Active insulin Active insulin, often referred to as Insulin-on-Board (IOB), is the remaining amount of insulin activity from boluses and temporary basal rates relative to a user\u2019s scheduled basal rates. More specifically, it is the total amount of insulin activity due to all bolus and basal insulin delivered within the last N hours, where N is determined by the insulin activity duration. The amount of \u201cactive\u201d insulin depends upon the insulin activity curve, and also accounts for the insulin withheld via basal suspensions. As such, it is possible that the active insulin can be negative. Negative active insulin will result in an increase in predicted blood glucose. The active insulin displayed in Loop's main display does not reflect the currently enacted temporary basal rate, as that basal rate may be canceled or modified before completion over the next 30 minutes. In others words, Loop doesn't count chickens before the eggs hatch...insulin delivery must be confirmed before being added to the active insulin reporting."},{"location":"operation/algorithm/overview/#algorithm-section-menu","title":"Algorithm Section Menu","text":"Loop uses an algorithm to maintain blood glucose in a correction range by predicting the contributions from four individual effects (insulin, carbohydrates, retrospective correction, and blood glucose momentum) at any time t to recommend temporary basal rate corrections and boluses.
\\[ BG[t] = Insulin[t] + Carb[t] + RetrospectiveCorrection[t] + Momentum[t] \\]Note that the Momemtum term does not just add to the other effects as implied in the simple formular above; it is blended with the other terms as described in more detail in the Momemtum section below).
You can see the individual contributions of these effects by tapping on the predicted blood glucose chart on Loop's status screen. Loop updates this blood glucose prediction every five minutes when a new CGM value has been received and the pump's status has been updated.
Just a note, this whole section is fairly technical. While perhaps not the most interesting topic for many readers, if you are seeking the detailed view of the Loop algorithm this discussion is quite useful. If you want a more surface understanding, the overview and temporary basal recommendations sections alone are probably sufficient.
"},{"location":"operation/algorithm/prediction/#overview","title":"Overview","text":"Before we delve into each of the four individual effects, a general overview figure may be a helpful start. There are four effects summed together to produce Loop's final predicted blood glucose curve. Each individual effect, along with their combined effect, is illustrated in the figure below. Insulin, from boluses and temporary basals, will have a decreasing effect on the prediction. Carbohydrates will have an increasing effect on the prediction. Blood glucose momentum effect can have a positive or negative effect, depending on how blood glucose is trending in the most recent CGM values. As shown in the example below, blood glucose is trending slightly upwards at the time of the prediction. Therefore, the blood glucose momentum effect\u2019s contribution is pulling up the overall prediction from the other three effects for a short time. Retrospective correction is lowering the prediction, indicating that the recent rise in blood glucose was not as large as had been predicted by Loop in the recent past.
The sections below provide detailed information on each of the four contributions.
"},{"location":"operation/algorithm/prediction/#insulin-effect","title":"Insulin Effect","text":"Most traditional pump users and caregivers are already familiar with the concept of an insulin activity curve, where the insulin\u2019s effect is time-dependent. Insulin takes a little while to affect blood glucose. The insulin effect typically peaks around one hour after giving insulin and then gradually decays.
Loop 2.x provides users with two different classes of insulin models (i.e., an exponential model and the Walsh model). All of the exponential models have an insulin activity duration of 6 hours, whereas the insulin activity duration is customizable for the Walsh model. The rapid-acting and Fiasp insulin activity curves are modeled as exponential curves that match the shape of the insulin activity curves from insulin labeling, and as observed in both adults and children.
Loop 3 drops the Walsh model and, by default, does not include the concept of child versus adult for \"rapid\" acting insulin, i.e., Humalog, Novalog and Apidra. Loop 3 adds the concept of non-pump insulin to account for injections or inhaled insulin. The Afrezza model is added as a non-pump insulin. The Insulin Type is selected in the Pump Settings screen. All insulin types are modeled by selecting parameters in the exponential model. See also Exponential Insulin Curve on the Code Customization page.
"},{"location":"operation/algorithm/prediction/#insulin-effect-remaining","title":"Insulin Effect Remaining","text":"The amount of insulin effect remaining, or percent of remaining active insulin after an insulin bolus is delivered, is modeled mathematically in Loop with an exponential decay curve.
If a user\u2019s insulin sensitivity factor (ISF) is 50 mg/dL per 1 unit of insulin and the user gives 2 units of insulin, then the user\u2019s blood glucose would be expected to drop 100 mg/dL within the 6 hours following the insulin delivery. This insulin effect can be visualized in several different ways: the expected active insulin, expected drop in blood glucose every 5 minutes after delivery, and the expected cumulative drop in blood glucose. The figures below use the Rapid Acting - Adult insulin model in Loop.
"},{"location":"operation/algorithm/prediction/#active-insulin","title":"Active Insulin","text":"This figure shows that 2 units of insulin are given initially, and the corresponding active insulin (i.e., insulin on board IOB) decays according to the curve below.
The active insulin at any time is the product of original insulin delivered and the percent of insulin activity remaining. Knowing the expected active insulin over the next 6 hours, and the insulin sensitivity factor (50 mg/dL, in this case), Loop can calculate the expected drop in blood glucose from that dose of insulin as shown in the figure below.
NOTE: ISF is also a function of time, which means if the user\u2019s scheduled ISF changes during the insulin activity time, it will change the expected drop in blood glucose due to the insulin effect.
"},{"location":"operation/algorithm/prediction/#expected-change-in-blood-glucose","title":"Expected Change in Blood Glucose","text":"Lastly, taking the first derivative (i.e., the rate of change) of the cumulative drop in the blood glucose curve yields the expected change in blood glucose over the insulin activity duration. For each dose of insulin given, Loop calculates the expected discrete drop in blood glucose at each 5-minute period for the insulin activity duration, as shown below.
"},{"location":"operation/algorithm/prediction/#insulin-effect-on-blood-glucose","title":"Insulin Effect on Blood Glucose","text":"For this example, assuming a user\u2019s blood glucose was 205 mg/dL at the time of insulin delivery, Loop would predict a drop in blood glucose due to the two units delivered at 12 pm as shown in the figure below.
"},{"location":"operation/algorithm/prediction/#scheduled-basal-rates","title":"Scheduled Basal Rates","text":"In traditional basal/bolus pump therapy, basal rates are set to accommodate the user's endogenous glucose production (EGP) that causes blood glucose to rise. If a user's basal settings were exactly right in traditional pump therapy, the user would have perfectly flat blood glucose all day, all other factors being equal.
In reality, people with type 1 diabetes, and their caregivers, know that basal settings are never exactly right. Every day is a little different, and a myriad of factors that affect blood glucose (e.g., including stress, hormones, sleep, etc.) may affect insulin needs. Some people have different basal profiles to accommodate these variations. Some people regularly tune and adjust their basal rates, and/or do so at their endocrinology clinic visits.
Since the Loop algorithm assumes that the user-set basal rates are correct, it calculates the effect of insulin relative to scheduled basal rates. If basal rates are not entirely correct, Loop can compensate a bit through the retrospective correction and blood glucose momentum effects, discussed later in this page.
The insulin delivery chart below displays a bar-graph history of the temporary basal rates enacted by Loop. The display is relative to the scheduled basal rates entered in the Loop settings. A rate displayed in this chart as +0 would indicate that no temporary basal rate was set and that the basal rate being delivered was the scheduled basal rate. Positive values indicate a temporary basal rate was set above the scheduled basal rate (i.e., more insulin delivered), and negative values indicate that a temporary basal rate was set below the scheduled basal rate (i.e., less insulin delivered).
For example, if the user\u2019s scheduled basal rate is 1 U/hr, and Loop gives a temporary basal rate of 3 U/hr, then it will calculate the expected drop in blood glucose due to +2 U/hr of insulin.
Similarly if Loop sets a temporary basal rate of 0 U/hr for 1 hour, then the insulin effect will also be relative to the current scheduled basal rate of 1 U/hr, and Loop would predict the user\u2019s blood glucose to increase by the amount of change from -1 U/hr of insulin. If the user\u2019s ISF is 50 mg/dL, then Loop would predict blood glucose to rise 50 mg/dL over the insulin activity duration (6 hours).
Here is a real-world example where Loop is setting many temporary basal rates over the course of the day. The light orange bars are the temporary basal rates delivered and the solid orange line is the active insulin at any given time during the day.
"},{"location":"operation/algorithm/prediction/#total-insulin-effect-combining-boluses-and-temporary-basal-rates","title":"Total Insulin Effect (combining boluses and temporary basal rates)","text":"Loop will combine or stack the active insulin of all the discrete (individual) boluses and temporary basal rates over the past insulin activity duration (6 hours), to predict the active insulin for the next 6 hours. As demonstrated above, using the predicted active insulin Loop can predict the blood glucose drop over the next 6 hours.
Lastly, the combined effect of bolus and basal insulin are visually represented for the user by Loop\u2019s insulin charts:
The insulin effect can be expressed mathematically:
\\[ \\Delta BG_{I}[t] = ISF[t] \\times IA[t] \\]where BG is the expected change in blood glucose with the units (mg/dL/5min), ISF is the insulin sensitivity factor (mg/dL/U) at time t, and IA is the insulin activity (U/5min) at time t. Insulin activity can also be thought of as a velocity or rate of change in blood glucose due to insulin. The insulin activity accounts for the EGP and any active insulin from basals and boluses.
"},{"location":"operation/algorithm/prediction/#carbohydrate-effect","title":"Carbohydrate Effect","text":"Carbohydrates will raise blood glucose, but the speed and degree to which they impact blood glucose are dependent on the type of carbohydrates. High glycemic index (GI) carbohydrates will raise blood glucose quickly over a shorter time, whereas low GI foods will raise blood glucose more slowly over a longer period. Foods like candy, juice, and fruits tend to be high GI foods, while pizza, burritos, and quesadillas are usually lower GI foods. Digestion issues like gastroparesis may also contribute to variations in carbohydrate absorption.
Because carbohydrate absorption can be quite variable, Loop has a model that dynamically adjusts the expected remaining time of carbohydrate absorption. To start with, Loop allows the user to input a rough guess of how long they think the food or drink will take to absorb. The user\u2019s guess is used as a middle of the road estimate, and Loop\u2019s algorithm will shorten or lengthen it based on observed blood glucose change.
For all carbohydrate entries, Loop assumes carbohydrates will not start absorbing for 10 minutes, so there is a 10-minute period of no absorption that is modeled prior to the absorption modeled in the next sections.
"},{"location":"operation/algorithm/prediction/#linear-carbohydrate-absorption","title":"Linear Carbohydrate Absorption","text":"Loop takes a conservative view of how fast the remaining carbohydrates will absorb. Because it is safer to under-deliver insulin for long-duration meals, Loop starts out at a minimum rate of absorption based on extending the entered carbohydrate duration by 50%. Said another way, the minimum carbohydrate absorption rate is the total number of grams of carbohydrates over 150% of the entered duration.
Using this initial minimum absorption rate, the remaining carbohydrates are modeled to absorb linearly. For example, if the user enters a 72g carbohydrate meal, and selects an estimated absorption time of 4 hours, then Loop will forecast a 12g/hr absorption rate for the next 6 hours. This rate can be termed the minimum absorption rate, which can be represented mathematically as:
\\[ MAR[t] = \\frac{CA[t]}{1.5 \\times d} \\]where MAR is the minimum absorption rate (g/hr), CA is the number of carbohydrates (g) and d is the expected duration (hr) it will take the carbohydrates to absorb.
"},{"location":"operation/algorithm/prediction/#dynamic-carbohydrate-absorption","title":"Dynamic Carbohydrate Absorption","text":"The linear model above is modulated by an additional calculation that uses recently observed blood glucose data to estimate how fast carbohydrates have been absorbing. The expected change in blood glucose due to insulin effects alone is compared to the actual observed changes in blood glucose. This difference is termed the insulin counteraction effect (ICE):
\\[ ICE[t] = OA[t] + IA[t] \\]where, ICE (mg/dL/5 min) is the insulin counteraction effect, OA is the observed activity (mg/dL/5min) or observed change in blood glucose at time t, and IA is the insulin activity (mg/dL/5min).
Insulin counteraction effects are caused by more than just carbohydrates, and can include exercise, sensitivity changes, or incorrectly configured insulin delivery settings (e.g., basal rate, ISF, etc.). However, since the effect of carbohydrates is often dominant (after insulin), Loop can still make useful ongoing adjustments to its carbohydrate model by assuming that the increase in blood glucose is mainly carbohydrate absorption in the period following recorded meal entries.
The insulin counteraction effect is converted into an estimated carbohydrate absorption amount by using the current carbohydrate-to-insulin ratio and the insulin sensitivity factor at the time of the recorded meal entry.
\\[ AC[t] = ICE[t] \\times \\frac{CIR[t]}{ISF[t]} \\]where AC is the number of carbohydrates absorbed (g/5min), ICE is the insulin counteraction effect, CIR is the carbohydrate-to-insulin ratio (g/U), and ISF is the insulin sensitivity factor (mg/dL/U) at time t.
If multiple meal entries are active (i.e., still absorbing), the estimated absorption is split between each carbohydrate entry in proportion to each carbohydrate entry\u2019s minimum absorption rate. For example, if 72g carbohydrates with an expected absorption time of 4 hours was consumed at 12 pm, and another 72g of carbohydrates with an expected absorption time of 2 hours was consumed at 3 pm, then the minimum absorption rate (see MAR equation above) would be 12 g/hr and 6 g/hr respectively, or 1 g/5min and 0.5 g/5min.
\\[ MAR[t = 12pm] = \\frac{ 72g }{ 1.5 \\times 4hr } = 12 \\frac{ g }{ hr } = 1 \\frac{ g }{ 5min } \\] \\[ MAR[t = 3pm] = \\frac{ 72g }{ 1.5 \\times 2hr } = 24 \\frac{ g }{ hr } = 2 \\frac{ g }{ 5min } \\]Examining just the simple linear carbohydrate effect of these two meals:
If we further expand this example, by assuming the following at 4pm:
then the estimated amount of carbohydrates absorbed at 4pm would be 3g:
\\[ AC[t = 4pm] = 15 \\frac{mg/dL}{5min} \\times \\frac{10 \\frac{g}{U}}{50 \\frac{mg/dL}{U}} = 3 \\frac{g}{5min} \\]Those 3g of carbohydrates would then be split amongst the meals proportional to their minimum absorption rates:
\\[ \\text{Proportion to Meal1} = \\frac{MAR_{meal1}}{MAR_{meal1} + MAR_{meal2}} = \\frac{12}{12+24}=\\frac{1}{3} = 33.3\\% \\] \\[ \\text{Proportion to Meal2} = \\frac{MAR_{meal2}}{MAR_{meal1} + MAR_{meal2}} = \\frac{24}{12+24}=\\frac{2}{3} = 66.6\\% \\]resulting in 1g of absorption being attributed to Meal 1 and 2g attributed to Meal 2.
"},{"location":"operation/algorithm/prediction/#minimum-carbohydrate-absorption-rate","title":"Minimum Carbohydrate Absorption Rate","text":"If the estimated carbohydrate absorption of a meal entry is less than what would have been absorbed using the minimum absorption rate, then the minimum absorption rate is used instead. This is to ensure that meal entries expire in a reasonable amount of time.
"},{"location":"operation/algorithm/prediction/#modeling-remaining-active-carbohydrates","title":"Modeling Remaining Active Carbohydrates","text":"After the estimated absorbed carbohydrates have been subtracted from each meal entry, the remaining carbohydrates (for each entry) are then forecasted to decay or absorb using the minimum absorption rate. Loop uses this forecast to estimate the effect (active carbohydrates, or carbohydrate activity) of the remaining carbohydrates. The carbohydrate effect can be expressed mathematically using the terms described above:
\\[ \\Delta BG_{C}[t] = MAR[t] \\times \\frac{ISF[t]}{CIR[t]} \\]"},{"location":"operation/algorithm/prediction/#retrospective-correction-effect","title":"Retrospective Correction Effect","text":"The retrospective correction effect allows the Loop algorithm to account for effects that are not modeled with the insulin and carbohydrate effects, by comparing historical predictions to the actual blood glucose.
In addition to the modeled effects of insulin and carbohydrates, there are many other factors that affect blood glucose (e.g., exercise, stress, hormones, etc.). Many of these effects are active for a period of time. By observing its own forecast error, Loop can estimate the magnitude of these effects and, by assuming that they will continue for some short period of time, incorporate them into the forecast to improve forecast accuracy.
To do this, Loop calculates a retrospective forecast with a start time of 30 minutes in the past, ending at the current time. Loop compares the retrospective forecast to the actual observed change in blood glucose, and the difference is used to determine a blood glucose velocity or rate of difference:
\\[ BG_{vel}=\\frac{1}{6} \\times \\left(BG[0] - RF[0]\\right) \\]where BGvel is a velocity term (mg/dL per 5min) that represents the average blood glucose difference between the retrospective forecast (RF) and the actual blood glucose (BG) over the last 30 minutes. This term is applied to the current forecast from the insulin and carb effects with a linear decay over the next hour. For example, the first forecast point (t=5) is 100% of this velocity, the forecast point one-half hour from now is adjusted by approximately 50% of the velocity, and points from one hour or more in the future are not affected by this term.
The retrospective correction effect can be expressed mathematically:
\\[ \\Delta BG_{RC}[t] = BG_{vel} \\times \\left(1-\\frac{t-5}{55}\\right) \\]where BG is the predicted change in blood glucose with the units (mg/dL/5min) at time t over the time range of 5 to 60 minutes, and the other term gives the percentage of BGvel that is applied to this effect.
The retrospective correction effect can be illustrated with an example: if the BGvel over the past 30 minutes was -10 mg/dL per 5min, then the retrospective correction effect over the next 60 minutes would be as follows:
Minutes relative to now (t=0) Percent of \\(BG_{vel}\\) Applied to RC Effect \\(\\Delta BG_{RC}[t]\\) 5 100% -10 10 91% -9.1 15 82% -8.2 20 73% -7.3 25 64% -6.4 30 55% -5.5 35 45% -4.5 40 36% -3.6 45 27% -2.7 50 18% -1.8 55 9% -0.9 60 0% 0The example below that shows the retrospective correction effect when the BGvel over the past 30 minutes was -3 mg/dL/5min.
"},{"location":"operation/algorithm/prediction/#blood-glucose-momentum-effect","title":"Blood Glucose Momentum Effect","text":"The blood glucose momentum effect incorporates a prediction component based on the assumption that recent blood glucose trends tend to persist for a short period of time. In other words, the best predictor of the future is the recent past.
The blood glucose momentum portion of the algorithm gives weight or importance to recent blood glucose to improve the near-future forecast. Loop calculates the slope of the last 3 continuous CGM readings (i.e., the last 15 minutes) using linear regression. Using multiple points helps filter out noise in the CGM data while still responding fast to changing situations. That momentum slope (Mslope) is the approximate or average rate of change over the last 15 minutes, though it is normalized to 5 minutes so that the units are (mg/dL/5min).
The momentum slope is then blended into the next 20 minutes of predicted blood glucose from the other effects (i.e., insulin, carbohydrates, and retrospective correction effects). This, in essence, makes the next 20 minutes of blood glucose prediction more sensitive to recent blood glucose trends. The blending of the recent trend slope into the next 20 minutes is weighted so that the first prediction point (5 minutes into the future) is highly influenced by the slope, and the influence of the slope gradually decays over the 20 minute time period. The momentum effect can be expressed mathematically as:
\\[ \\Delta BG_{M}[t] = M_{slope} \\times \\left( 1 - \\frac{t-5}{15} \\right) \\]NOTE: The term \\(\\left(\\frac{t-5}{15}\\right)\\) is also applied to the combined insulin, carbohydrates, and retrospective correction effects to get the delta blood glucose prediction.
The momentum effect can be illustrated with an example: if the last 3 blood glucose readings were 100, 103, and 106 mg/dL, then the slope would be 3 mg/dL per 5 minutes (0.6 mg/dL per minute). The amount of that recent trend or slope applied to the next 20 minutes of predictions (i.e., the next 4 predictions from the other effects) is roughly 100% (3 mg/dL per 5 min) at 5 minutes, 66% (2 mg/dL per 5 min) at 10 minutes, 33% (1 mg/dL per 5 min) at 15 minutes, and 0% (0 mg/dL per 5 min) at 20 minutes.
Also, if the combined effect from the insulin, carbohydrates, and retrospective correction is assumed to be a constant 6 mg/dL/5min over the next 20 minutes, then the expected overall effect and the predicted blood glucose can be calculated as follows.
Minutes relative to now (t=0) Percent of Slope Applied to Momentum Effect Momentum Effect (3mg/dL/5min) Percent of Other Effects Applied Overall Effect Other Effects (Insulin, Carbohydrate, and Retrospective Correction) Overall Effect (mg/dL/5min) Predicted BG (mg/dL) 5 100% 3 0 6 3 109 10 66.6% 2 33.3%< 6 4 113 15 33.3% 1 66.6% 6 5 118 20 0% 0 100% 6 6 124This example is illustrated in the figure below.
It is also worth noting that Loop will not calculate blood glucose momentum in instances where CGM data is not continuous (i.e., must have at least three continuous CGM readings to draw the best-fit straight line trend). It also will not calculate blood glucose momentum when the last three CGM readings contain any calibration points, as those may not be representative of true blood glucose momentum trends.
"},{"location":"operation/algorithm/prediction/#predicting-glucose","title":"Predicting Glucose","text":"As described in the momentum effect section, the momentum effect is blended with the insulin, carbohydrate, and retrospective correction effects to predict the change in blood glucose:
\\[ \\Delta BG[t] = \\Delta BG_{M}[t] + \\left(\\Delta BG_{I}[t] + \\Delta BG_{C}[t]+ \\Delta BG_{RC}[t] \\right) \\times min\\left(\\frac{t-5}{15}, 1\\right) \\]Lastly, the forecast or predicted blood glucose BG at time t is the current blood glucose BG plus the sum of all blood glucose effects BG over the time interval [t5, t]:
\\[ \\widehat{BG}[t] = BG[t_{o}] + \\sum_{i=5}^{t} \\Delta BG[t_{o+i}] \\]Each individual effect along with the combined effects are illustrated in the figure below. As shown, blood glucose is trending slightly upwards at the time of the prediction. Therefore, the blood glucose momentum effect\u2019s contribution is pulling up the overall prediction from the other three effects for a short time. Retrospective correction is lowering the current prediction, indicating that the recent rise in blood glucose was not as great as had been predicted in the recent past.
"},{"location":"operation/algorithm/prediction/#algorithm-section-menu","title":"Algorithm Section Menu","text":"The Loop algorithm takes one of four actions depending upon the eventual blood glucose, predicted glucose, target range and glucose safety threshold when Closed Loop operation is enabled.
The recommended insulin dose (positive or negative) is calculated first, then the Temp Basal or Automatic Bolus to be enacted is modified based on the recommended dose, dosing strategy, maximum Temp Basal and maximum Bolus settings. The automated dosing (increase or decrease) is updated with every CGM value - typically every 5 minutes.
Dosing Strategy: Temp Basal Only
All temporary basal rate commands are issued for 30 minutes, however they may be updated (re-issued) every 5 minutes. Said another way, Loop may enact a new temporary basal rate every 5 minutes. But, if communication with the pump is lost, the last issued temporary basal rate will last for at most 30 minutes before the pump reverts to the user\u2019s scheduled basal rates.
Dosing Strategy: Automatic Bolus
If the Looper has selected Automatic Bolus Dosing Strategy and an increase in insulin dose is recommended, then the Four Actions discussion below applies to the automatic bolus decision.
"},{"location":"operation/algorithm/temp-basal/#no-automatic-dosing","title":"No Automatic Dosing","text":"If glucose is entirely below the correction range but above glucose safety level, no automatic increase in insulin delivery will be enacted. The Looper can tap on the manual bolus tool and get a recommendation, but no automatic bolus or high temp basal will be issued automatically until the glucose level is higher than the minimum value of the correction range.
The Pre-Meal button or a named override can be configured with a correction range lower than the scheduled correction to assist in getting insulin delivered automatically after meals.
"},{"location":"operation/algorithm/temp-basal/#four-possible-actions","title":"Four Possible Actions","text":"Loop implements one of four possible temporary basal actions: decrease, increase, suspend, or resume a scheduled basal rate.
Automatic Bolus
If you are using an Automatic-Bolus Dosing Strategy in closed Loop mode and Loop predicts you need an increase in insulin; this increase is provided as a percentage of the recommended bolus instead of an increased temporary basal. The default percentage is 40%.
"},{"location":"operation/algorithm/temp-basal/#decrease-basal-rate","title":"Decrease Basal Rate","text":"If the eventual blood glucose is less than the correction range and all of the predicted glucose values are above the suspend threshold, then Loop will issue a temporary basal rate that is lower than the current scheduled basal rate to bring the eventual blood glucose up to the correction target.
"},{"location":"operation/algorithm/temp-basal/#increase-basal-rate","title":"Increase Basal Rate","text":"If the eventual blood glucose is greater than the correction range and all of the predicted glucose values are both above the suspend threshold and equal to or above the correction range, then Loop will issue a temporary basal rate that is higher than the current basal rate to bring the eventual blood glucose down to the correction target.
"},{"location":"operation/algorithm/temp-basal/#suspend-basal-rate","title":"Suspend Basal Rate","text":"If the minimum predicted blood glucose goes below the suspend threshold, then Loop will issue a temporary basal rate of zero units per hour, regardless of the eventual blood glucose.
"},{"location":"operation/algorithm/temp-basal/#resume-basal-rate","title":"Resume Basal Rate","text":"There are three situations where the Loop algorithm will resume the current scheduled basal rate.
If the eventual blood glucose is within the correction range, and all of the predicted glucose values are above the suspend threshold, then Loop will resume the current scheduled basal rate.
If the eventual blood glucose is above the correction range, and the predicted glucose values have a temporary excursion below the correction range but still above the suspend threshold, then Loop will resume the current scheduled basal rate.
If the Loop algorithm does not have ALL of the data it needs to make a prediction, it will let the remaining temporary basal rate run its duration (maximum of 30 minutes), and then the basal rate will default back to the current scheduled basal rate, thus returning to the same therapy pattern that they would receive using a traditional insulin pump.
"},{"location":"operation/algorithm/temp-basal/#determining-the-temporary-basal-rate","title":"Determining the Temporary Basal Rate","text":"To determine the corrective temporary basal rate to implement, Loop calculates a \u201cdose\u201d in the same way doses are calculated in both open-loop and traditional insulin pump therapy. It's also the same math many people on multiple-daily injection therapy use. The benefit of Loop (and all other close-loop algorithms) is that it does this math every 5 minutes, and is far less prone to error than humans doing the math. Loop also does its math based on predicting into the future, which traditional pumps and humans, do not always have the time or inclination to do.
The amount of insulin needed, or dose, is calculated using the desired reduction in blood glucose and the user\u2019s ISF. For the Loop algorithm, the desired reduction in blood glucose is the delta between the eventual blood glucose and the correction target:
\\[ \\mathit{dose} = \\frac{\\mathit{BG_{eventual}} - \\mathit{BG_{target}}}{\\mathit{ISF}} \\]Loop Dose Calculation
A major difference between traditional pump therapy and how the Loop calculates dose is that in pump therapy the current blood glucose is used to estimate the dose, whereas in the Loop algorithm the eventual and minimum blood glucose predictions are also used in determining dosing decisions.
Loop then converts the dose into a basal rate using the Loop\u2019s temporary basal rate duration of 30 minutes:
\\[ \\mathit{BR_correction} = \\frac{\\mathit{dose}}{30 \\mathrm{min}} = \\frac{\\mathit{dose}}{\\frac{1}{2} \\mathrm{hr}} = \\frac{2 \\times \\mathit{dose}}{\\mathrm{hr}} \\]where \\(\\mathit{BR_correction}\\) is the basal rate ( \\(\\mathrm{\\frac{U}{hr}}\\) ), which is the amount of insulin needed over the next 30 minutes to bring the eventual blood glucose to the correction target. The basal rate, however, is the amount of basal rate needed beyond the user\u2019s scheduled basal rate. As such, the required basal rate can be determined by:
\\[ \\mathit{BR_required} = \\mathit{BR_scheduled} + \\mathit{BR_correction} \\]Finally, Loop compares the \\(BR_{required}\\) with the user-specified maximum temporary basal rate \\(BR_{max}\\) setting to determine the temporary basal to issue:
\\[ \\mathit{BR_temp} = \\max(\\min( \\mathit{BR_required}, \\mathit{BR_max} ), 0) \\]After running the temporary basal calculation described above, Loop checks whether there is already an appropriate basal running with at least 10 minutes remaining. If so, Loop will not reissue the temporary basal. However, if the recommended temporary basal differs from the currently running temporary basal \u2014 or the current scheduled basal if no temporary is running \u2014 then Loop will replace the current basal rate with the recommended temporary basal rate.
As mentioned at the beginning of this section, the process of determining whether a temporary basal should be issued is repeated every 5 minutes.
"},{"location":"operation/algorithm/temp-basal/#temporary-basal-rate-calculation-example","title":"Temporary Basal Rate Calculation Example","text":"To illustrate how the Loop calculates the temporary basal rate to issue, consider the calculation for the following scenario:
First, calculate the dose:
\\[ dose = \\frac{\\mathit{BG_eventual} - \\mathit{BG_target}}{\\mathit{ISF}} = \\frac{200 \\mathrm{\\frac{mg}{dL}} - 100 \\mathrm{\\frac{mg}{dL}}}{50 \\mathrm{\\frac{\\frac{mg}{dL}}{U}}} = 2 \\mathrm{U} \\]Then, convert the dose into a basal rate to be issued for the next 30 minutes:
\\[ \\mathit{BR_correction} = \\frac{2 \\times \\mathit{dose}}{\\mathrm{hr}} = \\frac{2 \\times 2 \\mathrm{U}}{\\mathrm{hr}} = 4 \\mathrm{\\frac{U}{hr}} \\]Next, calculate the required basal rate:
\\[ \\mathit{BR_required} = \\mathit{BR_scheduled} + \\mathit{BR_correction} = 1 \\mathrm{\\frac{U}{hr}} + 4 \\mathrm{\\frac{U}{hr}} = 5 \\mathrm{\\frac{U}{hr}} \\]Lastly, compare the required basal rate to the maximum temporary basal rate, and find that Loop will enact a temporary basal rate of \\(5 \\mathrm{\\frac{U}{hr}}\\) for 30 minutes since this temporary basal rate is below the maximum temporary basal rate of \\(6 \\mathrm{\\frac{U}{hr}}\\), which was set by the user in Loop app settings.
\\[ \\mathit{BR_{temp}} = \\max(\\min( \\mathit{BR_{required}}, \\mathit{BR_max}), 0) = \\max(\\min( 5 \\mathrm{\\frac{U}{hr}}, 6 \\mathrm{\\frac{U}{hr}} ), 0) = 5 \\mathrm{\\frac{U}{hr}}\\]"},{"location":"operation/algorithm/temp-basal/#more-examples","title":"More Examples","text":"Consider the following values as fixed values for our calculation:
The table below shows the \\(\\mathit{BR_temp}\\) for different \\(\\mathit{BG_eventual}\\). \\(\\mathit{BR_temp}\\) should never turn negative and should never be greater than \\(\\mathit{BR_max}\\).
\\(\\mathit{BG_eventual}\\) \\(\\mathrm{(\\frac{mg}{dL}})\\) \\(\\mathit{dose}\\) \\(\\mathrm{(U)}\\) \\(\\mathit{BR_correction}\\) \\(\\mathrm{(\\frac{U}{hr}})\\) \\(\\mathit{BR_required}\\) \\(\\mathrm{(\\frac{U}{hr}})\\) \\(\\mathit{BR_temp}\\) \\(\\mathrm{(\\frac{U}{hr})}\\) 300 4.0 8.0 9.0 6.0 200 2.0 4.0 5.0 5.0 100 0.0 0.0 1.0 1.0 90 -0.2 -0.4 0.6 0.6 75 -0.5 -1.0 0.0 0.0 50 -1.0 -2.0 -1.0 0.0"},{"location":"operation/algorithm/temp-basal/#algorithm-section-menu","title":"Algorithm Section Menu","text":"One common confusion point for new Loop users is how to interpret their pump's battery levels and whether they need to change their pump batteries based on which pieces of information.
"},{"location":"operation/features/battery/#discharge-curves","title":"Discharge Curves","text":"There are generally two different types of AAA batteries that we use in these Medtronic pumps; alkaline or lithium.
To understand pump battery levels, you first need to know a little about battery discharge curves. It's not a hard concept...basically how a battery dies over time as it is used or sits in a drawer. More technically said, a battery discharge curve is the measure of volts that a battery puts out over time. Batteries start at a higher voltage output and slowly that voltage output degrades over time (or use) until the battery no longer provides enough \"ummph\" to keep the electronic gadget going. BUT, alkaline batteries and lithium batteries have different discharge curves due to the chemistry inside them, and the curves can be slightly different depending on the environment (temperature) and battery manufacturer.
Alkaline batteries have a relatively steady voltage drop over time, as shown below. Notice the shape of the curve has a significant amount of time in the 1.3 to 1.2 volts range, and a relatively smooth decline to about 1.2 volts.
Lithium batteries have a much steadier voltage output over time, as shown below. Notice how the shape of the curve is relatively flat for a large portion of the battery life before suddenly off around 1.3 volts.
What does the above information mean in terms of Looping? A lithium battery at 1.3v is going to have a much quicker time to death than an alkaline battery sitting at 1.3v. You might only get a couple of hours of looping left when a lithium battery is at 1.3v, but an alkaline battery at 1.3v might go for several more days. So when we talk about setting alarm levels in either system, your battery type is an important consideration.
"},{"location":"operation/features/battery/#medtronic-pump-battery-level-indicator","title":"Medtronic Pump Battery Level Indicator","text":"If you read Medtronic's literature, it will tell you to use Energizer alkaline batteries in their pumps. Why would that be? Hint: the answer doesn't mean that Duracell batteries are inherently worse than Energizer or that lithium batteries won't work in Medtronic pumps.
The answer is all about the accuracy of their little pump battery level indicator on their pump's screen. Medtronic calibrated their pump battery level indicator to:
In other words, Medtronic ran experiments to see exactly how long an Energizer alkaline battery will last in normal pump use and made their own discharge curve. They programmed their pump battery level indicator to change from 4 bars to 3 bars to 2 bars to 1 bar based on that particular discharge curve.
However, Loop users are slightly more demanding on the pump's battery/voltage than simply delivering insulin. We are also asking for the pump to perform radio communications, in addition to delivering insulin. Those radio communications need a slightly higher voltage than the typical \"normal\" pump use. So while a non-Looper might be ok running their pump until a voltage of about 1.12 for insulin delivery, radio communications might stop at a voltage output of about 1.17. If you experiment with your Looping pump, you'll find Loop will turn red from failed pump comms before the pump actually fails at insulin delivery. This difference between \"failure\" voltages needs to be considered when determining how much useful battery life is left for a pump battery.
In summary, that little pump battery indicator on the Medtronic pump screen is ONLY useful if you are:
Loop users should not rely on their Medtronic pump screen's pump battery indicator, and instead use the Loop's pump battery level indicator.
"},{"location":"operation/features/battery/#loops-pump-battery-level-indicator","title":"Loop's Pump Battery Level Indicator","text":"Keeping the information about battery discharge curves in mind, Loop developers tested various battery brands and types to develop discharge curves for Loop users. These discharge curves form the basis of the pump battery level indicator found in the top right of the Loop's main display screen and the pump battery notifications provided by the Loop app. The pump battery level indicator will also report in %.
Based on the battery type selected and the pump model being used, the Loop's pump battery level notifications are designed to give the user about 8 hours of notice before pump communications are likely to fail. The Loop user should have some additional time after pump comms fail before actual insulin delivery would stop.
"},{"location":"operation/features/battery/#nightscout-pump-battery-display","title":"Nightscout Pump Battery Display","text":"The Nightscout information regarding pump battery levels will depend on pump model being used.
Read Pump Status
command.The Nightscout alarms are based on the Heroku settings that you have input specifically. If you don't specifically set them, Nightscout will use the default settings for pump battery alerts as shown below:
Nightscout pump battery levels, if you leave things at default installation, will not trigger alarms. If however you add a setting of PUMP_ENABLE_ALERTS
to true
, you will receive pump battery notifications according to the levels shown in the parenthesis above. For example, your x23 pump is reporting its levels in percent, therefore you'd receive a yellow warning alarm at 30% and an urgent red alarm at 20%. Your x22 pump however is reporting its levels at voltage readings, therefore you'd receive a warning yellow alarm at 1.35v and an urgent red alarm at 1.30v.
Are the default NS alarm levels going to work for you? The answer depends on what type of battery level you are using, what model pump you are using, and how much advance notification you want to receive before needing to change a pump battery. There is a bit of personal preference and experimentation to finding what works for you.
For x22 or x15 pump users, the NS alert settings that may need to be adjusted are the ones based on voltage.
Generally speaking, for a x22 or x15 pump using alkaline batteries, the default NS alarm levels will be too early to be useful and lead you to change out your battery too frequently. Alkaline batteries can go to low 1.2s or high 1.1s before Looping starts to have communication problems. How much lower than the default voltage 1.35/1.30 alarm levels you want to go will depend on how far in advance you want to be warned about an upcoming battery change.
If however, you are using a x22 or x15 pump with lithium batteries, the default 1.35v/1.30v alarm levels may be completely appropriate. Remember how the lithium battery curves at the start of this discussion died off quickly around 1.3v? You won't get hardly any heads-up notice for a lithium battery if you set the alarm below 1.3v.
For x23 or x54 pump users, the NS alert settings that may need to be adjusted are the ones based on percentage settings.
Alkaline and lithium batteries should have automatically had their percentage-remaining based on the correct battery type in your Loop settings. So, generally speaking the default NS alert levels don't generally need adjusting. However, if you are using lithium batteries, the drop off between 75% to 25% can be quite dramatic and not be easy to anticipate (especially if the drop happens overnight).
As an alternative method of tracking pump battery changes, you could use the insulin age (IAGE) plug-in to anticipate your pump battery changes as well. For example, after tracking pump battery life on my 723 using energizer batteries lithium batteries for the last several months, I know that we get about 15 days plus a handful of hours. The amount of hours more beyond 15 days varies depending on how much we've interacted with the pump buttons directly, whether we've looped the full 15-days solid, and if the pump has been in extreme weather (cold weather can sap pump battery life). By tracking the pump battery changes with NS's careportal \"insulin cartridge change\", I can see in advance if we are nearing an overnight on a 15 day battery and decide to change batteries before overnight to prevent any middle-of-night battery issues.
This page was updated with information for Loop 3.
"},{"location":"operation/features/bolus/#loop-2-and-3-differences","title":"Loop 2 and 3 Differences","text":"Most of the information is the same for Loop 2.2.x and Loop 3.
Loop 2 and 3 differences:
Maximum Bolus
amountThe Meal Bolus screen is entered following a carb entry or edit action, the active button might be Save and Bolus or, if no bolus was recommended, Save without Bolusing.
The Save refers to saving the Carb entry or Carb edit that led to this screen in addition to saving the amount that might be bolused. It can also refer to saving a fingerstick value entered in the Meal Bolus screen (Loop 3 only).
You can review the carb information at the Meal Entry link.
Carbs are Saved in Meal Bolus Screen
Carbs are saved when the Save and Bolus
or Save without Bolusing
button is tapped in Meal Bolus Screen. When the button is tapped, carbs are saved even if the bolus does not go through to the pump.
If you see a Bolus Issue
notification (Bolus in progress, etc) after saving a carb entry, check the state of Loop carb entries.
Do not just add the carbs again.
"},{"location":"operation/features/bolus/#accept-recommendation","title":"Accept Recommendation","text":"The graphic below shows the Meal Bolus screen after the user entered carbs and tapped continue:
If a CGM entry arrives while in this screen, a Bolus Recommendation Updated modal message will be displayed and must be acknowledged.
"},{"location":"operation/features/bolus/#modify-bolus","title":"Modify Bolus","text":"This section is a continuation of the information presented in the Accept Recommendation section above. In the graphic below, the user overrides the recommended bolus.
To start a bolus entry, tap on the double orange triangles (circled below) in the toolbar at the bottom of the Loop status screen.
The Loop app will open to the Bolus screen. This looks similar to the Meal Bolus screen without the Carb Entry row. Loop considers the Glucose Safety Limit and Predicted Glucose when determining the recommended bolus.
In the graphic below, the current glucose is under the Correction Range. Loop allows you to dip below the correction range but its recommended bolus will be limited by the glucose prediction and the Glucose Safety Limit. Check back once your glucose starts to rise and there will probably be a bigger recommendation.
This screen behaves differently for Loop 2.2.x and Loop 3. The graphics and instructions on this page are for Loop 3 version. Click on the Loop 2.2.x link above to view the Loop 2 version.
When the Bolus screen is entered directly from the toolbar, the button choices are Enter Bolus if none is recommended, Deliver if a value is on the Bolus row or Cancel using the button on the upper left. The user can also tap on the value on the Bolus row to bring up a keyboard to modify that amount. When doing that, the value is automatically set to zero.
The two graphics below are examples of manual bolus screens.
Loop updates the glucose prediction every time a new glucose reading is detected, typically every 5 minutes. If Loop predicts your glucose will be above the high end of your Correction Range at the end of the Duration of Insulin Activity (DIA) and the predicted glucose is above the Glucose Safety Threshold, it will provide a Recommended Bolus. Loop will not give an alert when a bolus is being recommended, the bolus entry tool must be clicked to check for one. The Loop pill in Nightscout will display when Loop is recommending a bolus.
If your Dosing Strategy is set to Temp Basal (default)
If your Dosing Strategy is set to Automatic Bolus
Lock Phone During Bolus
Once the bolus has started, you should lock your phone to avoid inadvertently cancelling a bolus.
When the phone is in portrait mode, a bolus status line will appear below the Heads Up Display when Loop has a bolus in progress. The \"starting bolus\" indicator is shown in the left screenshot above - this is when Loop is communicating with the RileyLink. Once the message has been sent to the RilyLink, even if a response from the pump did not make it back to Loop, the bolused xx of yy with the circle display begins, as shown in the right screenshot above. If you change your mind, just click on the bolus status line while the bolus is in progress to cancel your bolus, as shown in the screenshot below. (Newer versions of Loop explicitly state: Tap to Stop on this line.) The amount bolused shown in this display is based on time. Loop reconciles the bolus amount with messages received from the pump once the bolus completes.
If you see a 'pump is suspended notice' in the bolus status line after cancelling your bolus, just tap on it to resume pump operations.
"},{"location":"operation/features/bolus/#bolus-failure-notifications","title":"Bolus Failure Notifications","text":"On occasion, you will receive a notification that a bolus may have failed. If your Dosing Strategy is set to Automatic Bolus, this can happen when an automatic bolus is in progress. In some of these cases, the bolus was delivered. On a Medtronic pump, you should check the pump screen to verify the bolus status before attempting to redeliver a failed bolus. Omnipod users can hear the clicks if the room is quiet enough.
If you get an uncertain delivery message, you may still see the \"bolused xx of yy\" display continue for as long as it would have taken to actually deliver the bolus. This display is driven by a timer and logic on the phone. (Loop is not asking the pump repeatedly - \"are you done yet?\"). You may want to interrupt an uncertain bolus if it is large, evaluate status and then resume with a fresh bolus. Loop should update the status the next time it contacts the pump. It can determine whether that bolus actually went through or not and will update the screen. Look at the Event History screen (accessed by tapping the Active Insulin or Insulin Delivery plots). Turn your phone to landscape orientation and you should see either \"Certain\" or \"Uncertain\" at the end of each Bolus record. (If you tap on the specific record, even more detail is displayed.)
If an \"uncertain\" delivery is not resolved:
If that does not resolve the issue, please tap on Loop Settings, Issue Report and email it to yourself. Then post on Facebook or Zulipchat, explain what happened and say you have an Issue Report. Someone should reach out to you.
There are other alert messages that might be displayed if the pump or CGM is not active. Those are found on the Loop 3 Displays page.
"},{"location":"operation/features/bolus/#loop-2-bolus-screen","title":"Loop 2 Bolus Screen","text":"Loop 2.2.x shows the recommended bolus but the bolus row is initially set to 0
This page was updated with information for Loop 3.
"},{"location":"operation/features/carbs/#loop-3-updates","title":"Loop 3 Updates:","text":"To start a new meal entry, tap on the green plate icon (circled below) in the toolbar at the bottom of the Loop status screen. Your Loop app will open to the Add Carb Entry screen.
Loop assumes carbs saved will be absorbed and Loop will adjust recommended insulin, and, when Closed Loop is enabled, Loop will adjust automated dosing based on those carbs.
Beginner's Tip
The steps and graphics in this section are for users of Loop 3. To view the version used by Loop 2.2.x, click on this link.
Tap the meal entry icon on the toolbar to open the Add Carb Entry screen:
The carbs are not saved until the Meal Bolus screen is completed.
Carbs are Saved in Meal Bolus Screen
Carbs are saved when the Save and Bolus
or Save without Bolusing
button is tapped in Meal Bolus Screen. When the button is tapped, carbs are saved even if the bolus does not go through to the pump.
If you see a Bolus Issue
notification (Bolus in progress, etc) after saving a carb entry, check the state of Loop carb entries.
Do not just add the carbs again.
By tapping on the Active Carbohydrates chart on the main Loop display, previously entered carbs can be edited, refer to Edit Meals.
"},{"location":"operation/features/carbs/#meal-entry-row-by-row","title":"Meal Entry Row by Row","text":"Do you want to know more? This section discusses each row in turn.
"},{"location":"operation/features/carbs/#amount-consumed","title":"Amount Consumed","text":"When entering the Add Carb Entry screen, the number keypad is deployed and when you start typing, that value is entered into the Amount Consumed row.
Tapping on any other row dismisses the number keypad. It can be restored by tapping on the Amount Consumed row.
Some value must be entered into the Amount Consumed row to continue.
Many Loopers increase the carbohydrate amount to cover the expected effect of protein and fat in their meal entry. For simplicity, the rest of this page only refers to carbs because all the figures show carbs or carbohydrates in the menus. You should consider the whole meal, including fat and protein, especially if you eat lower carb.
Loopers who consume mostly carbs in a given meal, might do better entering just the carbs.
"},{"location":"operation/features/carbs/#time","title":"Time","text":"Modifying the Time for a new meal entry from the default value of \"now\" is optional.
The 15 minute increments, which are also available on the watch interface, can be handy if the Looper chooses to prebolus.
Reasons to modify the time when entering a meal:
Limits for time entry of when meal was consumed:
Food Type entries are optional.
The information about the next row: Absorption Time is also important when discussing Food Type entries.
Pro Tip
Loop 3 Absorption Times
If you switched to Loop 3 from Loop 2.2.x, please be aware that absorption times for the Lollipop, Taco, Pizza icons have been updated.
Beware using Lollipop for Complex meals
If you select the Lollipop icon for a large complex meal with Loop 3, you tell Loop to expect glucose to rise rapidly (30 min absorption). When that rapid rise does not materialize, Loop may predict an unexpectedly low glucose because the algorithm assumes something must be affecting glucose downward in a strong way.
If this happens to you, edit the carb entry to have a longer absorption time and Loop will recalculate the prediction.
\ud83c\udf6d (Fast) is for simple foods often used for low treatments. Some Loopers use it for coffee.
"},{"location":"operation/features/carbs/#absorption-time","title":"Absorption Time","text":"Modifying the Absorption Time from the default value of 3 hours is optional.
Loop uses the absorption time for the carbs, along with your glucose readings, ISF and CR to recommend insulin dosing and to estimate over time the carbs absorbed and carbs expected. See Algorithm: Prediction for more details.
Loop assumes a specific model for how those carbs will be absorbed that is spread out over an interval that is 150% of the selected time. This allows for variations in actual absorption. More information about this model is found in the prediction link above.
Many meals can be entered with the medium (3 hour) default absorption time. Learn by experimenting and modify going forward. Evaluate the CR setting, as well as the entries for Amount Consumed and Absorption Time for adjusting meal entries. The amount of up-front insulin recommended is typically similar up through 3 hours absorption and then begins to decrease as absorption time is increased.
Experiment for yourself - how much does Loop recommend compared to a straight Carbs/CR value? Try this at different times; especially when glucose is nominal and flat compared to low and dropping or high and rising.
Carbs are not saved in the Add Carb Entry screen until the Continue button is pressed and the user saves those carbs in the Meal Bolus screen, follow the link for details.
"},{"location":"operation/features/carbs/#large-meal-warning","title":"Large Meal Warning","text":"If the Amount Consumed
row exceeds 99 grams when the Continue button is tapped, the user is provided with a modal alert from which they can proceed to the Meal Bolus screen, or return to edit Amount Consumed
if that was not the intended amount.
If you have an override active with insulin sensitivity value set to anything other than 100%, a warning message appears at the top of the Add Carb Entry screen.
"},{"location":"operation/features/carbs/#automatic-bolus","title":"Automatic Bolus","text":"Loopers who are using the Automatic Bolus Dosing Strategy should still prebolus and/or bolus for meals. The amount of Recommended
insulin that will appear in the Meal Bolus screen will be the full amount of the bolus Loop recommends (not the 40% partial bolus delivered automatically). As discussed above, you can accept this recommendation or enter a different amount, however, and this is very important, if your Dosing Strategy is set to Automatic Bolus, by entering less than the recommended amount and tapping Deliver
or tapping Save Without Bolusing
, you are telling Loop to deliver the remaining recommended insulin in the future using 40% of the recommended bolus at each successive Loop interval.
Carb Entry Leads to Insulin Delivery
Note that this same automatic delivery of insulin in response to entered carbs occurs when Dosing Strategy is set to Temp Basal, but the delivery via temporary basal rates is slower, providing more time for an error to be noticed. By the same token, the Automatic Bolus Dosing Strategy responds more quickly to increases in blood glucose, helping to minimize food spikes.
"},{"location":"operation/features/carbs/#edit-meals","title":"Edit Meals","text":"Adjusting a meal entry can be a particularly useful tool when:
From the main Loop screen, tap on the Active Carbohydrates chart to view the Carbohydrates screen (see graphic below).
To adjust an entry, simply tap on it (do not tap the Edit
button at the top of the screen). You can change the time, modify carb amounts, or adjust absorption times (even mid-meal). To delete an entry, you first tap Edit
and tap on the red circle to the left of the entry that you would like to delete. It is a little counterintuitive, but the Edit
button lets you delete, but not edit an entry.
For more information on some of the details reported on this screen, review Dynamic Carb Absorption
"},{"location":"operation/features/carbs/#review-carb-absorption","title":"Review Carb Absorption","text":"New Loopers, and even experienced Loopers with an unfamiliar meal or activity, should review how Loop reports absorption for the carbs you entered for a meal. If you have perfect dosing for your meal (the mythical flat line), then the carb absorption will match the model perfectly. But sometimes, there might be COB on the Active Carbohydrates Chart Loop 3 / Loop 2 that doesn't reflect your current situation, and you might need to make an adjustment. Note that while Loop is pretty forgiving on exact values and absorption time, you need to learn what works for you. Some common things to consider are listed below.
You can Edit previously saved carbs so Loop has a better idea of how to adjust predicted glucose moving forward. This can head off a low or a high.
"},{"location":"operation/features/carbs/#check-cob-before-adding-more","title":"Check COB Before Adding More","text":"Loop works better when informed that carbs are coming, but if you have a lot of left-over carbs from an earlier entry - wait before adding more carbs for that next snack. If Loop thinks more carbs are expected, it will dose extra insulin to accommodate. Maybe set a timer and check back in half-an-hour or an hour to see if you really need to add more carbs.
Dosing at a Party
Example - at a party where Looper is eating small amounts at a time, get some carbs entered to get some insulin up front, but pay attention when clicking add carbs (especially when using the watch and accepting recommended dosing).
"},{"location":"operation/features/carbs/#avoid-double-meal-entries","title":"Avoid Double Meal Entries","text":"Be Aware
If you have accidentally made duplicate entries for the same meal, click on the Active Carbohydrates chart in the main Loop screen and tap Edit
to delete the redundant entries. Deleting the meal entry will not impact the insulin that has already been delivered, but it will alert Loop to adjust your BG projection for purposes of calculating future insulin delivery.
Loop observes the blood glucose impact of the meal within the 150% absorption time window. Loop calculates how many carbs have been absorbed (regardless of how many you entered) based on your BG pattern and your settings.
You can watch the progression of Loop's observations of your meal by tapping on the Active Carbohydrates chart at the bottom of Loop's main screen and watching the insulin counteraction effects (ICE) on the Carbohydrates screen. An example of the screen is on the left side of the figure below. An explanation of the dual lines for each entry and the color coding scheme is explained below the figure. Click on the ICE link for more details and an in-real-life example.
The information available on the Carbohydrates screen disappears for any meals older than 12 hours, so if you're looking for details as to how a particular meal absorbed, you may need to screenshot or otherwise capture this information within that window. Previous entries can be modified or deleted through this screen.
"},{"location":"operation/features/carbs/#medtronic-warning","title":"Medtronic Warning","text":"With Loop 3, a caregiver can add remote carbs and perform remote bolus through Nightscout, but that requires set-up between the caregiver and Loopers phone and use of the Remote Carb and Remote Bolus entries in the Careportal.
If you enter carbs (not remote carbs) into the Careportal, they are not read by Loop and will not be reflected in COB.
This is relevant for Loop 2.2.x versions. Loop 3 does not read carbs from Apple Health unless you modified the code.
Please see Loop 2 Permissions.
"},{"location":"operation/features/carbs/#carb-absorption-model","title":"Carb Absorption Model","text":"For more information about the way Loop models the effects of carbs, insulin, etc., see the algorithm page.
"},{"location":"operation/features/carbs/#loop-2-fast-meal-entry","title":"Loop 2 - Fast Meal Entry","text":"This section is for users of Loop 2.2.x.
Tap meal entry icon on toolbar
The carbs are not saved until the Meal Bolus screen is completed.
By tapping on the Active Carbohydrates chart on the main Loop display, previously entered carbs can be edited, refer to Edit Meals.
"},{"location":"operation/features/ice/","title":"Meal Review","text":"When on Loop main screen, tapping on the \"Active Carbohydrates\" graph will open up the \"Carbohydrates\" details page that tracks your carb entries for the last 12 hours and how they are absorbed. It can be helpful to review your meals when monitoring settings, troubleshooting past meal entries, and planning future meal entries.
"},{"location":"operation/features/ice/#insulin-counteraction-effects","title":"Insulin Counteraction Effects","text":"What are Insulin Counteraction Effects (ICE for short)?
Consider the possible effects that counteract insulin (in other words, make glucose levels go up):
As we all know, this list can be long; but on \"normal\" days, food is the primary reason glucose levels go up. By \"normal\", we mean basal rates and settings are close to correct, illness is not an issue, and the site is good. We depend on the Loop dynamic carb absorption and other prediction effects to keep glucose in our desired range.
When you have carbs on board, Loop always\u00a0assigns ICE to carbs, not just on a normal day. This is how Loop looks at it. Keep in mind that in situations where you have other positive ICE, like insulin resistance, and carbs on board, Loop will attribute all the positive ICE to carbs until all the entered carbs are considered absorbed. At that point, ICE will start driving RC upward.
Insulin Counteraction Effect (ICE) as explained in Dynamic Carbohydrate Aborption is one very important part of carb absorption as well as a foundational part of Loop Predictions.
"},{"location":"operation/features/ice/#glucose-change-display","title":"Glucose Change Display","text":"The graph at the top of your \"Carbohydrates\" details page shows the effect Loop expects carbs to have on your glucose (gray bars) compared to the actual effect, or ICE. The units on the graph are mg/dL/5-min or mmol/L/5-min
\ud83d\udfe9: As a meal is tracked by Loop, you'll see green bars of observed carb absorption (including ICE).
How Loop thinks about carbs
ICE is just one important component of how Loop thinks about carbs. The other parts are the user-entered data (amount of carbs, and absorption speed).
Sometimes Loop falls back to a default absorption model when ICE is less than the minimum absorption rate.
In the graphic below, early in the meal timeline, the green bars are below the grey bars. Loop uses the minimum absorption instead of estimating absorption from glucose change. For example, if a pre-bolus was \"perfect\" leading to a constant glucose after a meal, the ideal grey bars will be used by Loop throughout.
When not to Use Glucose Change Display to Understand Meal Absorption?
If you know that other non-carb effects are affecting your insulin sensitivity significantly (sickness, exercise, etc), all the info about carb absorption should be considered skewed, and not be used for trying to understand meal absorption.
"},{"location":"operation/features/ice/#practical-use","title":"Practical use","text":"Some practical use of the ICE screen is provided in the Meal Entries: Review Carb Absorption section.
Many ways to successfully use Loop
You should choose what works for you.
The rest of this page was written by Katie DiSimone before the non-linear carb model was added to Loop in 2019. You may also want to review her blog post from 2017: Loop: Dynamic Carb Absorption.
A lot of the information is still relevant although some of the Loop carb modeling and prediction details have been updated over the years.
Let's take a look at an example day using the screenshot below.
When you make a food entry originally, Loop will save your entry as you've made it. On the line below your original entry, Loop will also start tracking your food entry assuming a 1.5 times longer carb absorption time. This helps Loop track carbs that may actually be absorbing longer than you expected (part of that whole dynamic carb absorption modeling). Loop will be updating that value of \"observed\" carb absorption time as well as absorbed carbs as your meal goes on.
So how can we use this information to make our Looping experience better? The answer is probably best illustrated using a real-world example. Chinese food...in fact, this Chinese dish. General Tso's chicken. As you can see in the recipe, loads of fast carbs with ingredients like hoisin sauce, brown sugar, and cornstarch. But also slower carbs like chicken. Rice can be a difficult one because, for us, it acts fast but also seems to have a long tail.
It was a busy day and I really didn't want to count carbs. Ok, even on the slow days I don't want to count carbs. I just eyeballed the bowl of food and guessed. As I entered the food in originally, I was still trying to come up with a good guess on the ratio of fast:slow carbs but kid was in a hurry to eat. My initial guess around 3:30 pm was 70g of carbs at 5 hours absorption (note: it gets edited to 80g in a little bit), we bolused for that and she started to eat. About 10 minutes later, I decided to add 10g of fast-acting carbs at 1-hour absorption to help with the sauce's speedy carbs.
Watching what was going on a little later...glucose levels were rising at a decent clip and I had a feeling I really didn't cover things super well...so I edited the original 70g entry, adding 10g and making it 80g instead. (That's why there is a 2U bolus around 4:20 pm.) And of course, around 5:40 pm there was a little bit of nibbling on the leftovers as we put them into the fridge. We gave 10g for that. Glucose levels climbed a bit more, not surprising given how we were underestimating fast carbs at this point...but still not so bad at 180 peak glucose. (Anna gave 2 units of correction at the peak because there was dessert coming later that night and she wanted to be ready for it without too much pre-bolus.)
So, how can I use the \"Glucose Change\" graph to make this meal better? I can look at the observed carb information and the observed carb entry Loop has recorded to adjust my insulin bolusing the next time we eat this meal.
For example, the biggest weakness I had in this (and suspected it even as I did the initial bolus) was that I underestimated the sauce's fast carbs. I can see this in the observed carb absorption graph having the early green peaks after the meal, and in the way that the observed carb distribution was more like 7:2 vs my original guess of 8:1 (slow:fast carbs). Overall, it appears that I guess on overall carb content pretty closely (90g vs. 89g observed). Next time we have General Tso's chicken, I will likely bolus it as 70g at 5 hours and 20g at 2 hours.
Check Carbohydrates Page
Remember to check your Carbohydrates page at the end of a meal's absorption. By checking in on the meal's observed behaviors, you'll have a good starting point to fine-tuning any new or unknown carb breakdown.
Note
Remember this conversation is assuming you have basals fairly well set and are not sick. If other factors could be significantly causing your glucose levels to swing that Loop doesn't know about (bad sites, illness, or basal rates that need to be adjusted), they may be attributed in part to ICE when they really aren't food-related. In those cases, address the underlying cause and then use the Carbohydrates page when you've come back to \"normal\".
"},{"location":"operation/features/notifications/","title":"Loop Notifications","text":""},{"location":"operation/features/notifications/#loop-notifications","title":"Loop Notifications","text":"Loop provides discrete notifications on the iPhone and Watch which will appear on the (locked) screen and vibrate, depending on your notification settings of Loop.
"},{"location":"operation/features/notifications/#loop-alert-unable-to-reach-pump","title":"Loop Alert - Unable to Reach Pump","text":"With Loop 3, there is a new modal alert that halts all Loop activity until pump communication can be restored.
When you tap on the Learn More button, another screen appears. The only option allowed on the second screen is to give up and discard the pump (or pod) or continue to wait - tap the Back button. The second screen is there if you need to tell Loop you will not be able to restore communication and it should treat the last attempt to send a command as uncertain. Loop will then allow you to add a new pod or new Medtronic pump or switch to a different insulin delivery device.
Only do this if bringing your phone and pump into close proximity, waiting a few minutes and then trying the Reset Loop-to-Pump Communications suggestions are not successful.
Why Stop all Activity?
When communication is interrupted at a critical moment in the communication cycle, Loop cannot provide a reliable calculation for IOB. When that happens a warning screen similar to the graphic above appears on your device. You cannot do anything but wait for Loop to restore communications or give up on that device.
"},{"location":"operation/features/notifications/#loop-app-expiration-notification","title":"Loop App Expiration Notification","text":"Profile expiration notification was added with Loop 2.2.5.
More Info
button of the notification to go directly to the LoopDocs Updating page.The expiration notification pattern is the same as for the Paid Loop App. You may want to add an Expiration Notification Customization to modify the first appearance and frequency of the notification.
"},{"location":"operation/features/notifications/#loop-app-expiration-date","title":"Loop App Expiration Date","text":""},{"location":"operation/features/notifications/#for-loop-32x-and-newer-versions","title":"For Loop 3.2.x and newer versions","text":"The expiration date is found in the App Profile section at the bottom of the Loop Settings screen.
"},{"location":"operation/features/notifications/#for-loop-225-through-loop-30","title":"For Loop 2.2.5 through Loop 3.0","text":"If you want to see the expiration date at any time:
The expiration date is near the top of the report (to the right of profileExpiration
). If you don't see that, time to rebuild to get that feature. Once you've viewed the expiration date, tap Settings to back out of the Issue Report display. The time uses UTC, so adjust to your time zone if you procrastinated until the last minute.
Most pod beep alarms are disabled for a more discrete use of pods than is available with the PDM. Only the following audible acknowledgments or alarms are used. Some can be configured in Omnipod: Notification Settings:
You can customize the way notifications of Loop are behaving in the Settings App of the iPhone:
Loop 3 Notifications Settings:
Mark Loop 3 notifications as time-sensitive and ask for immediate delivery:
Immediate Delivery
so that notifications are delivered right awayTimeSensistive Notifications
checkbox Notification Delivery
You will see the Notification Delivery
section only if you previously toggled on Settings / Notifications / Scheduled Summary
in order to receive a summary of notifications at a certain time of the day. If this is not what you want, simply ignore it.
Announce Notifications
The Announce Notifications
section is displayed only if you previously turned on the toggle Settings / Notifications / Announce Notifications
. Use it if you want Siri to read Loop's notifications out loud on CarPlay, and AirPods...
Make sure Loop notifications are allowed in your Focus mode. Edit the focus mode to:
Loop
to the list of apps with allowed notificationsTime Sensitive Notifications
toggle buttonIf you want to take a break from using Loop but want to keep the app on your phone, you'll want to disable Loop Notifications while you are not using Loop. Otherwise, the Loop Failure messages will drive you crazy.
When you are ready to resume using Loop, the main screen will remind you to turn those notifications back on.
Another time you might want to disable notifications is if you are testing with a simulated pump. When the app is closed or phone is locked, the simulated pump is inactive and you would get the Loop Failure notifications.
"},{"location":"operation/features/notifications/#loop-failure","title":"Loop Failure","text":"At 20, 40, 60, and 120 minutes, there is a Loop Failure notification. This mostly happens when the connection is lost for a longer period of time between the CGM or the Rileylink and Loop.
"},{"location":"operation/features/notifications/#bolus-failure","title":"Bolus Failure","text":"If Loop detects that a bolus was not able to be delivered, it will provide a notification. Bolus failures are usually due to stale pump data. Try fetching recent history from the RileyLink menu to update pump data. Loop will also notify of partial bolus deliveries.
"},{"location":"operation/features/notifications/#low-reservoir","title":"Low Reservoir","text":"Medtronic At 20% and 10% remaining reservoir volume, there is a Low Reservoir notification.
Omnipod Select your desired notification level for low reservoir Omnipod: Notification Settings
"},{"location":"operation/features/notifications/#empty-reservoir","title":"Empty Reservoir","text":"Omnipod After the reservoir reports 0 U, the pod attempts to deliver insulin when requested.
Loop will notify when battery levels have approximately 8-10 hours of battery life remaining.
"},{"location":"operation/features/notifications/#remote-notifications","title":"Remote Notifications","text":"Loop does not have a remote notification to other devices. If you are a remotely monitoring parent, you will want to read here about setting up pushover alerts using your Nightscout site if you want proactive notifications of looping related information.
"},{"location":"operation/features/notifications/#loop-follow","title":"Loop Follow","text":"Many people use additional apps to assist in following a loved one or to support a loved one who needs help waking up to alarms. One of the more popular options is Loop Follow, written by a parent of a Looper. There are several features to assist in remote monitoring with a variety of options for the source of data.
For more information, please read the Loop Follow documentation. You can build Loop Follow using the same Build Select Script you used to build the Loop app or using the GitHub Browser Build Method.
"},{"location":"operation/features/overrides/","title":"Overrides","text":""},{"location":"operation/features/overrides/#new-loopers-please-read","title":"New Loopers - Please Read","text":"Please do not use this feature until you understand it.
Many new Loopers interpret Loop Overrides as a one-for-one replacement for manual pump options where a temporary basal was applied for a particular activity. Although Loop Overrides can help in a situation where you previously used a temporary basal rate, overrides are more powerful.
Changing Overall Insulin Needs is NOT like Manual Pump Temp Basal Change
Loop Overrides are not the same as adjusting temporary basal on a manual pump. The easiest way to restrict basal rates with an automated system is to raise your correction target temporarily. In some cases, you may need to also adjust insulin needs, but begin just by changing that target.
When you modify insulin needs, you are affecting basal rates, carb ratios, and insulin sensitivity factors (ISF) for the duration of the override.
A common mistake is to think selecting an override with 10% Overall Insulin Needs is like selecting 10% basal rate with a manual pump. With Loop, that selection modifies all your normal settings by a factor of 10!
"},{"location":"operation/features/overrides/#manual-temp-basal","title":"Manual Temp Basal","text":"Sometimes you need to set a manual temp basal and you need it to keep working whether you are near your gear. There's a function for that with Loop 3.
Overrides let Loop know selected settings are modified for the duration of the override. The override can change either the correction range or the overall insulin needs or both. When you set an override on insulin needs, the override adjusts basal schedule, ISF, and CR together. Examples where this can be helpful include hormone cycles, steroid medications, and/or exercise.
Override presets are (1) optional and (2) can be configured within Loop's workout icon (the little blue heart icon in the Loop toolbar). Once override presets are created, they can be turned on/off by using the workout icon as well.
"},{"location":"operation/features/overrides/#features-of-an-override","title":"Features of an Override","text":"Overrides allow you to specify:
The override only works when your Loop gear is with you. For example, if Loop sets a zero temporary basal rate based on an override and then you leave your gear behind; at the end of half an hour, your pump will resume scheduled insulin delivery.
The target range replaces the correction range target for the duration of the override.
The overall insulin needs is applied to your basal rates, insulin sensitivities and carb ratios for the duration of the override.
For an override to be accepted:
When an override is scheduled to start in the future, it can have an effect earlier than you might think. The closed loop automated insulin increase or restriction at each cycle is calculated to map your predicted glucose to the desired target range over the duration of insulin action (6 hours). If the future override has a higher target, that higher target is factored into the Loop calculations.
Example:
Overrides will work while you are Looping. Sounds obvious, right? But, the thing to remember is that the adjustments (multipliers) that overrides make are not saved back to your Medtronic pump or Omnipod. They only exist in the Loop app.
If you walk away from iPhone and/or RileyLink...
If you stop Looping (i.e., walk away from your gear or your glucose reading is stale), your existing temp basal will complete the remainder of whatever is left of its original 30 minutes and you will return to scheduled basal rates in your Therapy Settings. Your adjusted needs as set-up in any override will not continue if your Loop is not running properly. So you cannot set a 50% override and then hop in the ocean for a 2-mile swim without your iPhone and RileyLink and expect decreased basals of 50%. Just be aware that in situations where you need prolonged lower basals while away from Looping gear, you will need to edit your scheduled basals or use a Manual Temp Basal setting.
"},{"location":"operation/features/overrides/#avoid-extreme-insulin-needs-setting","title":"Avoid Extreme Insulin Needs Setting","text":"There have been users who select a 10% overall insulin need. This is NOT the same as choosing a 10% temporary basal with the PDM. This changes your basal rates, ISF and CR by a factor of 10!
Scenario for 10% Insulin Need
Instead of selecting 10%, raise your correction range with a moderate needs adjustment. Loop tends to suspend insulin delivery via temp basals with the next CGM reading.
With Loop 3, there is now a warning message in the meal entry screen when an override is active with an overall insulin needs value other than 100%. The user can decide whether to proceed with the meal entry with the override active.
If you feel the need to immediately halt insulin delivery, consider a Manual Temp Basal or suspend command to the pump. If you choose to suspend, be sure to pay attention to the reminder to resume insulin delivery later.
Extreme Athletes
There are athletes who do need those extreme overall insulin need changes and know how to use them appropriately. This typically involves extreme or prolonged exercise.
"},{"location":"operation/features/overrides/#create-an-override-preset","title":"Create an Override Preset","text":"To create an override preset, tap on the workout icon. Then click the + sign in the upper right corner to start a new preset entry.
You must select an emoji, name the preset and modify either the overall insulin needs or target range or both to save your new preset
When you've made your selections, save the preset using the \"Save\" button in the upper right corner.
"},{"location":"operation/features/overrides/#select-1-insulin-needs","title":"Select 1% Insulin Needs","text":"Available with Loop 3.
The selectable Overall Insulin Needs values are not limited by the default picker values of 10%.
To enact your override preset, tap on the workout icon toolbar and select an override from your list of saved presets, create a new one or use the custom override for one-time use.
The heart will be highlighted in a blue square while active and the HUD Status Row will indicate the active override name. The Glucose Chart will show a darker blue bar indicating the active target range and duration.
"},{"location":"operation/features/overrides/#schedule-an-override","title":"Schedule an Override","text":"You can set up a future start time when selecting a saved override by tapping on the calendar icon to the right of the override. Adjust the \"Start time\" row. Tap the \"Enable\" button in the top right corner.
A Future Override can be very helpful, for example, to set an exercise override the night before your workout. You'll wake up with less insulin on board and at your desired exercise targets.
"},{"location":"operation/features/overrides/#deactivating-an-override","title":"Deactivating an Override","text":"Tap the heart icon to turn off your override at any time. This happens without confirmation, so be sure to lock your phone when you have an override running to avoid accidentally turning it off.
Override presets with a finite duration will automatically deactivate when the duration is over.
"},{"location":"operation/features/overrides/#apple-watch","title":"Apple Watch","text":"Saved overrides can be turned on and off by tapping on the blue heart icon on your watch.
"},{"location":"operation/features/overrides/#editing-an-active-override","title":"Editing an Active Override","text":"Tap on the active override in the HUD Status Row with the phone in portrait orientation. This brings up a screen to edit the override currently running.
This only affects this override during the current period. It is not saved to that named override. For example, you can extend the duration or modify the needs value or target value based on a temporary situation.
Higher Priority Messages
If the HUD Status Row is displaying a higher priority message, you must wait for that message to complete before you'll be able to edit an active override. If you want to edit an active override, you can choose to cancel an active bolus and edit the override immediately. The edited override will then be in effect for the next Loop cycle or manual recommendation.
HUD Status Row messages with higher priority:
You can also use your Nightscout site to activate/deactivate your Loop's override presets. To accomplish this, you will need to do some legwork as outlined on this page for how to set up Remote Overrides in Nightscout and you will need to be using a paid Apple developer account. Remote overrides require Apple Push Notifications service, and that is only available on paid accounts.
"},{"location":"operation/features/premeal/","title":"Pre-Meal Target","text":""},{"location":"operation/features/premeal/#pre-meal-range","title":"Pre-Meal Range","text":"The Loop toolbar's second icon from the left is a small clock with a knife and fork on the sides. This is the pre-meal tool. The tool will be colored grey until you define a glucose range in Loop settings. Once a pre-meal range is available in Loop Settings, the icon will be colored green and available for use. The background coloring of the Pre-Meal Range icon will turn green when active and there will be a dark blue line on the glucose chart indicating the pre-meal range.
The pre-meal range can be used as an easy way to get a small amount of insulin delivered before a meal in order to help control post-meal blood glucose spikes. It's not designed to replace a traditional pre-bolus, but rather as a more gentle way to build up some pre-meal insulin activity.
If your normal target is 100-110 mg/dL and pre-meal range is 80-80 mg/dL, for example, Loop will give you an extra push to get you to the lower target number before the meal. This early insulin brings you into the meal with a mini-prebolus. The pre-meal range, when activated by pressing on the icon, will stay active for one hour, until carbs are entered, or until it is manually canceled... whichever comes first. Setting an override will also cancel pre-meal range.
Loop will adjust any insulin bolus as needed based on the extra insulin provided during this pre-meal time.
Other Uses
Some people prefer to use this as an easy way to raise the correction range for an hour.
"},{"location":"operation/features/premeal/#how-to-adjust-pre-meal-range","title":"How to Adjust Pre-Meal Range","text":"Loop 3:
Loop 2.2.x:
The intent of the pre-meal icon on the toolbar is to provide an eating-soon mode in Loop. Do not set pre-meal limits to any hypoglycemic ranges that may require treatment.
To mitigate the impact of unintentional pre-meal activation:
Custom Pre-Meal Overrides
Some loopers set up a custom override to use instead of the pre-meal icon. This allows enabling the override remotely with Nightscout, permits specifying a custom duration, and will keep the override enabled after carbs are announced.
"},{"location":"operation/features/watch/","title":"Apple Watch","text":""},{"location":"operation/features/watch/#loop-with-apple-watch","title":"Loop with Apple Watch","text":"The Loop user can directly enter carbs and boluses and turn on or off premeal or override settings from the watch, without needing to pull their iPhone out. There are some caveats when iPhone is not within Bluetooth range - the action requested by the watch will not be enacted until iPhone reconnects.
There are two screens in the Loop watch app, shown in the bottom half of the graphic above. By swiping left or right, the other screen is displayed. The eventual (predicted) glucose feature, shown on both screens in the graphic can be turned off as a feature in Loop 3, but requires the user to rebuild. It is on by default.
The screen on the left side of the graphic shows Loop status, current glucose, trend arrow and eventual glucose with icons to enable carb entry, bolus entry, pre-meal and override selection. If necessary, use the crown (or swipe up and down) to see the full display.
"},{"location":"operation/features/watch/#watch-carb-bolus-overview","title":"Watch Carb / Bolus Overview","text":"After tapping on the carb or bolus icons, you can adjust the entries using the crown to dial in more/less. See Meal Entry on Watch for more details.
If you swipe the Apple Watch Loop screen from right-to-left, a second screen, as displayed on the right side of the graphic above, is available. This second screen displays a graph of recent glucose and predicted glucose data. The display can be scrolled with a finger swipe or turn of the crown to display Active Insulin, Active Carbs, Net Basal Rate (with respect to scheduled rate) and in some cases Reservoir Units. (A recently changed pod may show the reservoir level from the prior pod - just ignore that. It goes away within 24 hours.)
The windows for history and prediction available on the watch can be modified to suit your preference. The windows can be modified from 2 hours to 12 hours.
The selection for the window remains as selected until you change it.
"},{"location":"operation/features/watch/#loop-complication","title":"Loop Complication","text":"A loop complication exists to show glucose on the watch face but the update rate is limited by Apple. If you have a Loop complication installed in the watch face, you can simply tap the complication to open the Loop watch app.
In some positions and with some watch faces, the complication includes a graph.
To prevent an accidental bolus from your Watch app, don't let your kids hold your watch. Just kidding, we've added an even better solution. After requesting a bolus or accepting a meal entry recommended bolus, the watch face displays a graphic like the one below. As you spin the digital crown, the two triangles will begin to merge. Once they merge, the bolus is confirmed through a little haptic and a white checkmark will appear on the watch screen.
"},{"location":"operation/features/watch/#bolus-cancel-or-spin-fail","title":"Bolus Cancel or Spin Fail","text":"At this point if you hit cancel, or fail to merge the two triangles, the bolus will not be delivered. You will feel a haptic and may hear a notification when Loop stops waiting. The watch display restores to the nominal screen.
"},{"location":"operation/features/watch/#meal-entry-on-watch","title":"Meal Entry on Watch","text":"Tap on the Meal entry icon on the watch to view the watch carb entry screen as show in the graphic below.
The watch carb entry screen allows you to choose the amount and absorption time, using the standard icons, and adjust the time the carbs were or are planned to be consumed.
After tapping the Continue button on the carb screen, the meal bolus screen is displayed - carbs are only saved after selecting Save or Save & Bolus on the meal bolus screen.
"},{"location":"operation/features/watch/#carb-entry-no-bolus","title":"Carb Entry, No Bolus","text":"If you enter carbs from the watch and no bolus is recommended or selected, you will see a screen like the graphic below where the Save button is offered. You can choose to Save the carbs, or cancel the entry.
If you choose to modify the zero bolus recommendation, the display changes to the option shown in the graphic in the following section.
If your phone is in communication with your watch, then when you hit the Save button, the carbs will be immediately saved to your phone record as well as your watch.
If your phone is not in range of your watch, then when they are brought into communication later, the carbs will appear on the phone.
"},{"location":"operation/features/watch/#carb-entry-with-bolus","title":"Carb Entry, With Bolus","text":"If you enter carbs from the watch and a bolus is recommended or selected, you will see a screen like the graphic below where the Save & Bolus button is offered.
You may choose to leave that bolus at the recommended level, tap on the + or - buttons to add or subtract 0.5 U per tap or use the digital crown to adjust the value. Should the value go to zero, then the Save button appears as shown in the graphic in the previous section; but remember, Loop will begin adjusting automatic insulin delivery based on those newly entered carbs, even if you choose not to bolus.
If your phone is in communication with your watch
If your phone is not in range of your watch
You can review the recent carb entries on the Apple Watch. Simply swipe left to see the blood glucose graph screen on the watch. Scroll down with your finger or the digital crown to the Active Carbs row beneath the graph, and tap that row. You can see the list of recent carb entries.
If you enter carbs on your watch while not connected to the phone, they will appear on this display and, when the phone reconnects, will be transferred to the phone.
Be Cautious - Avoid Double Entry
If the phone and watch are not connected, someone could add entries to the phone manually or via remote commanding and the watch will not know about them. So be careful and check the phone carb record when the phone and watch reconnect. This is especially important if more than one caregiver is involved.
"},{"location":"operation/features/watch/#eventual-glucose-on-watch","title":"Eventual Glucose on Watch","text":"One feature on the Watch app that can be turned on and off with Loop 3 is the eventual glucose display on the watch. That display is shown on the graphic above with current glucose on left, trend arrow beside it and eventual (from prediction) glucose on the right.
If this is a feature you want turned off, please follow the directions on the Code Customization page (found under the Version tab): Build Time Features.
"},{"location":"operation/features/watch/#adding-a-watch-to-existing-loop","title":"Adding a Watch to Existing Loop","text":"If you add an Apple Watch after building Loop using Xcode on a computer, you will need to pair your watch to your iPhone and then rebuild Loop to enable the Loop watch app to show up as an available watch app.
If you use the new, Loop 3 only, Build Loop using GitHub Actions process that enables building without needing a Mac, the watch app should work so long as you have the watch paired to your phone when you install from TestFlight.
"},{"location":"operation/features/watch/#watch-hardware-and-os-requirements","title":"Watch Hardware and OS Requirements","text":"Loop 2.2.9 and FreeAPS is currently supported with all released versions of the Apple Watch and Apple watchOS 4.1 and newer.
Loop 3 requires newer versions of the watch and requires watchOS 8 as a minimum.
The compatibility list below is copied from Apple. Note that some version of iOS require specific versions of watchOS. That level of detail is not captured here. Please review LoopDocs: Wikipedia Chart for Apple Versions.
"},{"location":"operation/features/watch/#watchos-8-compatibility","title":"watchOS 8 Compatibility:","text":"watchOS 8 requires iPhone 6s or later with iOS 15 or later and one of the following Apple Watch models:
watchOS 9 requires iPhone 8 or later with iOS 16 or later and one of the following Apple Watch models:
Loop 3 uses the new-style widget is in process. There are a lot of updates with widgets. With the advent of iOS 16, you can add widgets that show up on the lock screen without need to swipe to view. There is work in progress on this - please be patient.
"},{"location":"operation/features/widget/#old-style-loop-widget","title":"Old-Style Loop Widget","text":"Loop 2.2.x and FreeAPS both include an old-style widget.
With older versions of iOS, the widget is available in the Today view of your iPhone. Swipe right on your iPhone home screen and your widgets will be available. The Loop widget may be at the bottom of your widget list. Scroll down to the bottom of the screen and press the edit
button. That opens an \"Add Widgets\" screen. If you hold and drag the three horizontal lines on the Loop widget row, you can drag it up to the order you'd like it to appear on your widget list.
With newer version of iOS, the old-style widgets cannot be moved to the top of the screen. The example graphic below shows the new-style Dexcom G6 widget above the old-style Loop 3 widget.
New to Loop or never added a widget before
Experienced Looper who already had a widget should not need to modify anything to see it.
"},{"location":"operation/loop/close-loop/","title":"Closed Loop","text":""},{"location":"operation/loop/close-loop/#closed-loop","title":"Closed-Loop","text":"After you learn what you need from open-loop, this page provides suggestions to smooth the transition to closed loop.
"},{"location":"operation/loop/close-loop/#timing","title":"Timing","text":"Consider transitioning in steps. Some loopers start closed-loop when there are fewer distractions, possibly on weekends. It can be easier to transition at a time that does not involve food, possibly overnight.
"},{"location":"operation/loop/close-loop/#maximum-basal-rate","title":"Maximum Basal Rate","text":"When starting closed-loop, it is important to be conservative. Start with the \"Temp Basal Only\" dosing strategy and limit the maximum basal rate. If your Meal Entries or Therapy Settings (basal rates, CR, ISF) are incorrect, this approach limits the risk of getting too much insulin. Typically, experienced loopers set their max closed-loop basal rate at no more than 3-4 times their average basal rate. Wait until you are comfortable with the slower corrections in \"Temp Basal Only\" before transitioning to \"Automatic Bolus\".
Temp Basal Only vs Automatic Bolus
Both Dosing Strategy methods update the prediction with each CGM or glucose reading, typically every 5 minutes, and use the updated prediction to generate a recommended bolus or recommended dosing restriction.
If your basal, ISF, or carb ratios are not correct, Loop may give you more insulin than you need to reach the correction you selected. Setting the correction range slightly higher at first helps prevent unexpected low glucose as you adjust your settings.
"},{"location":"operation/loop/close-loop/#watch-the-iob","title":"Watch the IOB","text":"Watch whether Loop accumulates positive or negative IOB while holding your glucose steady when no food is present. If you consistently have positive or negative IOB, review whether to adjust your basal rate or ISF.
Expert Tip
In the absence of food, glucose trends should flatten out when positive or negative IOB trends to zero.
The ISF is also important, but basal should be evaluated first.
"},{"location":"operation/loop/close-loop/#meals","title":"Meals","text":"Start with meals that you know well. If Loop suggests less or more insulin than expected as a bolus before the meal - consider why this may be true.
This is definitely an area where YDMV (your diabetes may vary), so don't expect or accept that what works for others will work for you. Test, observe, and adjust as needed.
"},{"location":"operation/loop/close-loop/#automated-dosing","title":"Automated Dosing","text":"Loop calculates a predicted glucose curve based on your programmed settings for carb ratio (CR) and insulin sensitivity factor (ISF), using your glucose, insulin and carb history.
Two scenarios are given below to help illustrate the closed-loop automatic actions of Loop. A more typical scenario is to enter carbs and then use Loop's recommendation for an appropriate bolus.
If you enter a bolus without entering carbs, the prediction will be for your glucose to go low. (The Loop model calculates a negative number for recommended bolus.) For this case, Loop issues a Temp Basal to prevent the low, typically 0.0 U/hr but always less than your scheduled basal rate.
COB and IOB
COB
is the carbohydrates (g) that Loop expects to be absorbedIOB
is the current active insulin (above or below the scheduled basal rate)If you enter carbs and select Save without bolusing
, you have COB without associated IOB. In that case, Loop predicts your glucose will start rising and updates the recommended bolus, which includes consideration of your Glucose Safety Limit
, Correction Range
and Maximum Bolus
. If that recommended bolus is positive, Loop might deliver some part of that bolus automatically - the exact percentage and timing of that delivery depends on your Dosing Strategy
. At each loop cycle (new glucose reading), Loop updates the prediction and calculates a new recommended bolus. When you enter carbs without bolusing, Loop may start delivering some insulin, but if your glucose doesn't start rising as Loop expects, it revises the recommended bolus with each new glucose value.
Automatic dosing only happens when Closed Loop
is enabled in the settings screen.
The Loop app generates a glucose prediction over the next 6 hours (the duration of insulin action), which is why the predicted glucose plot is included on the bolus screen. The Loop app considers glucose prediction with respect to your scheduled Correction Range
over the full DIA, weighting closer predictions more than later predictions, when calculating Recommended Bolus.
It is actually easier to answer when Loop will not automatically increase insulin delivery.
In the situations listed below, the prediction at the end of the DIA can be significantly higher than your Correction Range
but no automatic increase in insulin delivery will occur:
Glucose Safety Limit
, Temp Basal
is immediately set to 0.0 U/hr and recommended bolus is set 0 UCorrection Range
, there is no automatic increase over scheduled basalCorrection Range
, there is no automatic increase over scheduled basalMaximum Bolus
setting, there is no automatic increase over scheduled basalEven in cases where Loop does not automatically increase insulin delivery, the recommended bolus might be positive, which you see if you tap on the bolus icon manually.
"},{"location":"operation/loop/looptips/","title":"Loop Tips","text":""},{"location":"operation/loop/looptips/#loop-tips","title":"Loop Tips","text":"These docs are a great resource for the technical aspects of building your Loop app. However, they don't really cover in detail a lot of the frequently asked questions about USING Loop.
Things such as:
All of those usability questions and more are addressed over in the companion site called LoopTips.
Please head over to Looptips in order to read some really helpful tips to make your Looping easier.
"},{"location":"operation/loop/open-loop/","title":"Open Loop","text":""},{"location":"operation/loop/open-loop/#open-loop-introduction","title":"Open Loop
Introduction","text":"Open Loop
is the best place to start with Loop.
Closed Loop
disabled.The Loop app is built around the concept of Closed Loop
performance.
If you use a Medtronic pump and want to use a feature not found in the Loop app, simply disable Closed Loop
and control delivery with your Medtronic Controller.
If you use an Omnipod pump, keep reading:
There may be a feature, like extended bolus, that you used with an Omnipod Personal Device Manager (PDM) that is not in the Loop app.
Please refer to Extended Bolus.
Practice with Simulators (Click to learn more)You can build the Loop app without connecting it to any hardware.
Pay attention to the prediction in the Glucose Chart. Practice with the user interface while you manually control your insulin delivery. Compare the recommended insulin after entering carbs for a familiar meal. Be sure you understand the predictions and recommendations before you enable Closed Loop
. You may need to adjust settings or learn more about how the app works. The Loop app tries to keep predicted glucose in the Correction Range and, more importantly, above your Glucose Safety Limit.
There's a lot to learn and understand. New loopers may need to adjust the following Therapy Settings, typically in this order:
Using an algorithm that updates glucose predictions and adjusts insulin delivery every 5 minutes requires accurate settings. Entering carbs and absorption time is a new skill that takes time to master.
"},{"location":"operation/loop/open-loop/#eventual-glucose","title":"Eventual Glucose","text":"Watch the eventual glucose, current glucose and prediction curve in the Glucose Chart to understand recommendations for insulin delivery adjustment. The Loop app is looking at current glucose, glucose momentum, carbs on board, insulin on board, and retrospective trends to predict an eventual glucose. Its current decisions are based on actual, predicted and eventual glucose. Predictions for the first three hours of insulin duration of activity are given more emphasis than later predictions when deciding how much insulin should be recommended or withheld from basal.
If there is a dip in the predicted glucose below the Glucose Safety Limit, the Loop app will not recommend insulin even if the eventual glucose is above your Correction Range.
Closed Loop
mode, the Loop app automatically decreases insulin delivery using a temp basal of 0 U/hr until the predicted glucose exceeds the Glucose Safety LimitClosed Loop
mode, the Loop app automatically increases insulin delivery only after predicted glucose is above the bottom of the Correction RangeIf the Loop predictions don't match your experience, your settings may need to be adjusted.
If you want to issue a manual temp basal, this is done on the pump for Medtronic or using the Manual Temp Basal feature for Omnipod.
"},{"location":"operation/loop/open-loop/#testing","title":"Testing","text":"Open Loop
mode shows you glucose trends without the influence of temporary basal or automatic bolus. This is particularly helpful if you haven't used Medtronic sites/pumps or Omnipod before. You may find that your basal rates and carb ratios can change significantly coming from other brands of pumps or from multiple daily injections (MDI).
The suggestions below work for most people. You need to adjust for your own situation.
Take the time to establish a good basal profile while in Open Loop
mode using the pump you plan to use for the Loop app. When using an algorithm, your basal rates needs to be neutral; in other words your glucose, in the absence of food and exercise, should be stable. (When you do basal testing, you should aim to stay at a glucose that is steady within 35 mg/dL (2 mmol/L).)
If you previously ran a high basal rate during the day to cover meals, you may need to adjust your CR (to a smaller value) after your basal rate is adjusted to be neutral.
Test your insulin sensitivity factor (ISF) during Open Loop
after your basal rates are established. The Loop app uses your ISF every 5 minutes to update predictions, so it's worth testing before turning on automated insulin dosing with Closed Loop
mode. You may need a different, probably higher value, than what you used as a correction factor with manual pumping or MDI.
The algorithm uses the ratio of ISF/CR as part of the prediction while meals are being absorbed. That ratio is approximately how much a single gram of carbohydrate raises your glucose. Experiment by taking a small fast-acting \"low treatment\" when stable with no other food or exercise.
Assume ISF is 75 mg/dL and CR is 15 g/U. When a 4 g glucose tablet is consumed, you expect to see a sharp rise in glucose by about 20 mg/dL over the next half hour to an hour. (Your ISF/CR ratio times the grams eaten should be within a factor of two of how much rise you see in glucose.)
"},{"location":"operation/loop/open-loop/#meal-entry","title":"Meal Entry","text":"Loop recommends increased insulin dosing as soon as you save carbs.
Meal Entry is an important concept - there's a whole page devoted to it later in the docs - but here's a quick summary. You tap on the plate icon in the Toolbar before you meal to show the Add Carb Entry screen.
Loop uses carb absorption as a component to every meal entry. Most people are successful with the default absorption time of 3 hours. Remember the Loop app updates the prediction every 5 minutes and will adjust if you get the amount or absorption time wrong, as long as you are close.
The Active Carbohydrate chart displays how the app thinks your meal is being aborbed. This is affected by your basal rates, ISF and CR. If it looks wrong, examine your settings.
Depending on the type of food you eat, you may increase the carb entry to include some protein or fat.
"},{"location":"operation/loop/open-loop/#manual-or-correction-bolus","title":"Manual (or Correction) Bolus","text":"At any time, you can enter a bolus using the Bolus (double orange triangles) icon in the Toolbar. The Loop app offers a recommendation if the glucose prediction supports one. Review the Eventual Glucose section above to understand when the app will recommend a bolus. The Loop recommendation can be modified by editing the Bolus amount.
If you tap on the Bolus button (on the Toolbar), does the app recommend more insulin?
Ask if this is the same decision you would make. This effort will help smooth the transition to Closed Loop
.
If you use a RileyLink, determine how far the link can be from your phone and pump, and plan where to carry the link. DASH Omnipod users do not need the RileyLink but should determine how far their phone can be from the pod without communication problems.
Learn to troubleshoot Red Loops and the cause of potential loop issues. You'll be less frustrated starting on closed loop if you know how to address these issues.
Familiarize yourself with the Bolus Failure Notifications.
"},{"location":"operation/loop/open-loop/#caregiver-training","title":"Caregiver training","text":"Caregivers for Loopers should learn how to use the Loop app. School staff or your child need to know how to handle a site change or CGM failure at school. Consider preparing an individualized quick info sheet for your child.
Learn to observe the Nightscout site while your child is with you and you can look at their phone. This will help you help your child if they have problems when they are not with you.
For more reading, there's a whole set of pages on using Nightscout with the Loop app and setting up a secure method for you to provide bolus or carb entries via remote commands.
"},{"location":"operation/loop/open-loop/#apple-health-in-open-loop","title":"Apple Health inOpen Loop
","text":"If you are using the Apple Health app to examine insulin given while in Open Loop
, basal delivery is not recorded in the Health app promptly. You can force an update from the Loop app to Health by suspending and then resuming the pump. If you do this, keep watching the app to make sure delivery did resume.
A menu item to set an extended bolus is not a feature provided by the Loop app at this time. You can make your own extended bolus using the Manual Temp Basal
feature with Omnipod.
During the time the Manual Temp Basal
command is running, the Loop app will make no automated changes to dosing even if the Closed Loop
slider is selected as enabled.
This section was added at user request. Once you switch to Closed Loop
mode, you should not need this. But before you are ready for that step, you may want to use a tested method for a known meal.
Consider a desired total bolus \\((BolusTotal)\\) given over an extended time with a prompt amount \\((PromptAmount)\\) now and the balance \\((Balance)\\) delivered over the next \\((H)\\) hours with a current scheduled basal rate \\((BR)\\).
First the equations to calculate the desired rate \\((MTB)\\) to enter into the Manual Temp Basal
menu and then an example.
Manual Temp Basal
to value of \\(MTB\\) units/hour for \\(H\\) hoursThe order is important. Sending the Manual Temp Basal
request to the pod is a single command and then the Loop app is available for the next command to be entered. The Loop app (and pod) will not respond to any pod commands until the bolus finishes delivering; this takes about 40 seconds per unit requested.
For this example:
You have your choice of rounding \\(MTB\\) up or down to the nearest \\(0.05 U/hr\\). For this example, the quantity of \\((2/1.5)=1.333\\) was rounded up to \\(1.35 U/hr\\).
Why isn't there a menu item? (Click to see more)Each item provided by the Loop app needs a volunteer to decide it is important and develop a method to provide that item. If a volunteer steps up to do this work, there is a long process of discussion and code review before such a modification is considered for the development branch.
Most Loopers go to Closed Loop
quickly and this feature is not an option at this time.
Now we need to add a CGM source so that Loop has glucose data. From the Loop settings screen, select Add CGM
.
The standard selections are:
If you added a compatible Medtronic pump earlier in the setup process, then you will also see an option for the compatible Medtronic sensor that works with that same pump. If you are using a compatible MDT sensor, select that option and the CGM data will be uploaded to Loop when pump status is updated.
"},{"location":"operation/loop-settings/cgm/#about-dexcom-share-credentials","title":"About Dexcom Share credentials","text":"You do NOT need your Share account info listed in Loop settings if you are using a G4, G5, or G6 system. The transmitter ID is sufficient. In fact, the recommendation is that you leave your Share account empty so that you don't accidentally become internet-dependent for CGM data when you forget to update your transmitter ID when you start a new transmitter. Just leave the Share credentials blank.
If you need to use Dexcom Share
If the dexcom is on another phone and you choose to use Share (not advised), here is some information.
For all selections, the Dexcom Share credentials (in other words, account login) is the same as what you used to log in to the active Dexcom app on your iPhone. Dexcom Share account is not always the same login info as your Dexcom Clarity account. For G4 users, the Share account is found in the account tab on the app. For G5/G6 users, unfortunately, there is no information in the app displaying what your account name is. The information is entered when you first log in to the app and then is never displayed again, nor visible under any information screens. If you have forgotten your G5/G6 account info, you can delete the Dexcom app and redownload it to try logging in again. This will not cause a restart of any sensor sessions in progress.
If you do not enter your Share credentials correctly, you will get an error when Loop tries to access your Share account to backfill CGM data. That error message will look like below. If you see that message, delete your Share account from Loop settings and try again...or just leave it out and depend on your transmitter ID.
"},{"location":"operation/loop-settings/cgm/#dexcom-g5-g6-one","title":"Dexcom G5, G6, ONE","text":"The Dexcom G5 and G6 options only require the addition of the active transmitter ID, and the matching Dexcom app to be running on the Loop iPhone. Use the G6 options if you are using a Dexcom ONE CGM.
When you change transmitters, you will need to select the Delete CGM
button at the very bottom of the CGM info page in Loop. Then you will select your Dexcom system again and add the new transmitter ID. You cannot just tap on your old transmitter ID to update it.
If you don't update your transmitter ID when you change active transmitters, your Loop will not get CGM data from the Dexcom app.
If you did add Share credential, Loop will get data from your Dexcom Share server and will not work without cell or wifi connection. When Loop is using data from Dexcom Share servers, a small cloud will appear above the glucose reading in Loop and should tip you off that maybe you forgot to update your transmitter ID.
"},{"location":"operation/loop-settings/cgm/#dexcom-g4","title":"Dexcom G4","text":"Dexcom G4 users will need the Dexcom G4 Share2 app active on their iPhone and paired to their Dexcom G4 Share receiver.
"},{"location":"operation/loop-settings/cgm/#dexcom-share","title":"Dexcom Share","text":"The Dexcom Share selection is primarily for people who wish to test Loop function without a local CGM source and who are not running the Dexcom app on their Loop iPhone. This selection will require login access to a Dexcom Share account with live data and active internet connection in order to work.
Dexcom Share is not available for Dexcom ONE CGM.
"},{"location":"operation/loop-settings/cgm/#libre-and-other-cgm","title":"Libre and Other CGM","text":"Loop 2 does not natively support Libre CGM.
If you switch to Loop 3, there are additional CGM options:
If you choose to build Loop-dev, Libre support has been added.
If you can upload your CGM to Nightscout, Loop 3 offers the option to use Nightscout as a CGM source.
You can choose to download the Loop with patches option when building with the script.
Now that you have added your CGM source, we need to complete the configuration and settings in your Loop. Please head over to the Loop 2 Configuration page for guidance with this important part of Loop's setup.
"},{"location":"operation/loop-settings/configurations/","title":"Loop 2 Configuration","text":""},{"location":"operation/loop-settings/configurations/#configuration","title":"Configuration","text":"This page will cover two general parts of the Loop app settings for Loop 2.2.x versions. The sections documented are circled in red in the screenshot below. The headings will match the flow of the screen, top to bottom.
The first circled section covers closed/open loop status and how to issue a Loop Report.
The second circled section is the configuration section. This section contains a lot of really important settings that control how your Loop will calculate your predicted glucose curve. Given the importance of your predicted glucose curve to Loop's actions, please make sure you read over this page carefully to know how to navigate the selections and entries.
The user can select closed loop or open loop using this slider. When you first start Loop, we encourage you to leave this slider disabled and become familiar with the app using Open Loop mode.
As soon as Closed Loop is enabled, Loop will begin automatic adjustment of insulin dosing. Please ensure the settings you entered are appropriate for the Loop algorithm.
"},{"location":"operation/loop-settings/configurations/#open-loop-mode","title":"Open Loop Mode","text":"When the Closed Loop switch is in the (Off) position, Loop WILL NOT modify insulin dosing automatically.
"},{"location":"operation/loop-settings/configurations/#closed-loop-mode","title":"Closed Loop Mode","text":"When the Closed Loop switch is in the (On) position, Loop WILL automatically modify insulin dosing on the configured insulin pump. This is known as closed loop. Typically, Loop will show the recommended temp basal or automatic bolus just above the blood glucose graph prior to automatically enacting it. It may take a few seconds for Loop to connect to the pump to enact the modified dose.
"},{"location":"operation/loop-settings/configurations/#issue-report","title":"Issue Report
","text":"If you run into problems or errors with your Loop, a Loop Report, generated by tapping on the Issue Report
row can be used to help identify where the problem is occurring. The Loop Report can be sent to yourself via text or email. You can then post it on Zulipchat to ask for help.
Frequently, if you seek help with a technical problem, a Loop Report will provide insight for the developers and troubleshooters. Please email yourself a Loop Report anytime you are questioning Loop actions or displays. Acquiring a screenshot of the phone is also useful. You can use the report and graphics later to ask for help or discard them if you figure it out on your own.
"},{"location":"operation/loop-settings/configurations/#select-glucose-units","title":"Select Glucose Units","text":"Before you continue further, a word about glucose units
Entries into the configuration section will be available in mg/dL or mmol/L automatically, based upon how your blood glucose values are received. By default they are set to mg/dL, however once CGM values arrive in mmol/L these Loop settings can be entered in mmol/L. If you are planning to use mmol/L, be sure to wait to set your entries until after you have started to receive CGM values in Loop. If you do these in the wrong order, then your charts and entries may have incorrect units.
"},{"location":"operation/loop-settings/configurations/#correction-range","title":"Correction Range","text":"The correction range is your blood glucose range that you would like Loop to correct to. Correction range is not necessarily the same target blood glucose range that you have discussed with your endocrinologist; generally the doctor's range may be much wider. For example, you may keep a correction target of 100-110 for Loop to aim to, but use a desired glucose target range of 80-180 when discussing things with your endo about \"time in range\".
Click the + in the upper right corner to add correction glucose range(s). You can have multiple ranges based on time of day, but the first setting of the day needs to begin at midnight.
Correction ranges can be a single number, such as 100-100 mg/dL, or a range such as 100-120 mg/dL. Generally speaking, if you choose to use a range, keeping the range between about 10-30 mg/dL between the lowest and highest value is a good starting place.
"},{"location":"operation/loop-settings/configurations/#pre-meal-range","title":"Pre-Meal Range","text":"Below the Correction Range entry is a section called \"Overrides\" with a Pre-Meal setting. While active, the pre-meal targets will replace the usual correction range for Loop's temp basal recommendations. If a pre-meal range is not entered in this section, the icon will remain grey and unusable on the main screen's toolbar.
The pre-meal override target can be used as an easy way to get a small amount of insulin delivered before a meal in order to help control post-meal blood glucose spikes.
If your normal target is 100-110 mg/dL and pre-meal target is 80-80 mg/dL, for example, Loop will give you an extra push to get you to the lower target number before the meal. This early insulin brings you into the meal with a mini-prebolus. The pre-meal target, when activated by pressing on the icon, will stay active for one hour, until carbs are entered, or until it is manually cancelled...whichever comes first.
Loop will adjust any insulin bolus as needed based on the extra insulin provided during this pre-meal time.
"},{"location":"operation/loop-settings/configurations/#suspend-threshold","title":"Suspend Threshold","text":"The suspend threshold must be set up for successful configuration of Loop. Your Loop will not turn green without setting this value. This value affects both bolus and basal recommendations by Loop.
"},{"location":"operation/loop-settings/configurations/#bolus","title":"Bolus","text":"Reasonable settings for suspend threshold will depend on user preference, but recommended not set lower than 65 mg/dL.
"},{"location":"operation/loop-settings/configurations/#basal-rates","title":"Basal Rates","text":"Note: You cannot enter basal rates until you first add a pump in Loop settings. Your basal rates will be initially populated when you walk through the Add Pump
part of the setup at the beginning of this setup guide.
Only one basal schedule may be set in each Loop app. The basal increments are available according to the increments of the particular pump/pod you are using. Not all pumps provide the same increments for basal deliveries. Basal schedule must start at midnight and cannot contain rates of 0 U/hr.
To edit a line in your basal schedule, tap the line and adjust the time and/or amount. To remove a line, select Edit in the top right and delete it. If tapping the line doesn't work, try closing and re-opening the app. When finished editing, click on the Save to Pump...
or Sync With Pod
button, depending on which pump you are using.
If you make any basal edits and use the Cancel
button to go back to the menu without successfully saving/syncing to pump/pod, the changes you made will not be saved. Loop makes saving/syncing to pump a mandatory step to successfully editing basal rates. If you get an error message while trying to save/sync the edited basal rates, please retry until successful.
The maximum basal rate and maximum bolus settings are collectively referred to as Delivery Limits. This section will have been initially populated when you finished the Add Pump
part of the setup previously. For safety, similar to basal schedule, you must keep these values the same on both the Loop app and within the pump/pod settings. If you edit these settings in Loop app, always use the Save to Pump...
or Sync With Pod
button, depending on which pump you are using.
Maximum basal rate will cap the maximum temporary basal rate that the Loop is allowed to enact to meet your correction range. Typically, Loop users set their maximum basal rate around 3-4 times their highest scheduled basal rate. When you are first beginning to use Loop, it is wise to start conservative (low) in setting your maximum basal rate. If your settings are incorrect in other areas (basal rates, insulin sensitivity, carb ratio, etc), you may need time to identify where settings need to be adjusted. This process is easier if Loop is given less latitude to set high basal rates. Gradually increase your maximum basal rate as your comfort and confidence in Loop increases. If you need help with your settings adjustment, head over to LoopTips for some initial settings help
"},{"location":"operation/loop-settings/configurations/#maximum-bolus","title":"Maximum Bolus","text":"Enter your desired single bolus maximum here. For safety, don't set a maximum bolus limit any higher than your typical large meal bolus.
"},{"location":"operation/loop-settings/configurations/#insulin-model","title":"Insulin Model","text":"There are four insulin models to choose from with Loop 2.x; Walsh, Rapid-Acting Adults, Rapid-Acting Children, and Fiasp. If you want to read the nitty-gritty discussion that went into the development of the Rapid-Acting and Fiasp curves (collectively called \"exponential insulin models\"), you can see that in GitHub here.
Loop 3 Insulin Type
Loop 3 drops the Walsh model and, by default, does not include the concept of child versus adult for \"rapid\" acting insulin, i.e., Humalog, Novalog and Apidra.
We highly recommend selecting one of the exponential insulin models for Loop 2.2.x (in other words, not the Walsh model).
A common new Loop user error is to select Walsh model in order to easily shorten their insulin duration (DIA) to one like they used prior to Looping. This almost invariably leads to insulin stacking. If you would like to read more about why the duration of insulin action is important in Loop vs how you've traditionally used it, please click here to read a blog post about the subject. In summary, choosing Walsh curve just to shorten your DIA will lead to insulin stacking and less than desired bolusing recommendations.
You can click on each model and see what each model's insulin activity curve looks like, active one selected in blue.
The differences between the three exponential models (two Rapid-Acting and Fiasp) models has to do with the timing of the peak insulin activity timing. Not surprising, since Fiasp is marketed as the \"faster acting\" insulin. Currently all the exponential models are defaulted to an insulin duration of 6 hours, but the peak activity of the curves differs:
This configuration setting gives you the ability to select the Dosing Strategy. (If you do not see this setting, then you are running Loop v2.2.4 or older.) If you tap on that Dosing Strategy, it reveals a selection screen, shown in the graphic below, with some explanation. Note that this Dosing Strategy feature was available for more than a year in the automatic-bolus branch. Users who have been using the automatic-bolus feature should update as soon as possible to get the other improvements recently added, Loop Releases.
The Automatic Bolus selection causes Loop to provide 40% of the recommended dose as a bolus at the beginning of each Loop cycle (when a CGM reading comes in). This is a faster method of getting the recommended insulin delivered. When Loop delivers extra insulin, the scheduled basal rate continues unchanged.
Both Temp Basal Only and Automatic Bolus strategies restrict basal rates to reduce the amount of insulin delivered when appropriate.
"},{"location":"operation/loop-settings/configurations/#temp-basal-only","title":"Temp Basal Only","text":"You can manually bolus at any time by pressing the Bolus icon in the center of Loop\u2019s Main Screen.
"},{"location":"operation/loop-settings/configurations/#automatic-bolus","title":"Automatic Bolus","text":"When you are first starting Loop, we encourage you to leave automatic boluses disabled until you are sure your settings are dialed in. To enable automatic boluses, click on Settings \u2013 Dosing Strategy \u2013 Automatic Bolus. This Automatic Bolus checkbox turns-off positive temporary basal so that:
As with all Loop versions, you can manually bolus at any time by pressing the Bolus icon in the center of Loop's Main Screen. Any bolus recommendation that you see when you press the Bolus icon will be 100% of the Recommended Bolus.
"},{"location":"operation/loop-settings/configurations/#carb-ratios","title":"Carb Ratios","text":"Click the + in the upper right to add carb ratios for various times of day. Loop works best if you have tested and optimized your carb ratio settings for accuracy.
Beware of other apps writing carbs to Health app
If you are using a third-party app (such as Spike or MyFitness) that can write carbohydrates to the phone's Health app, you will need to double-check permissions to make sure Loop doesn't read those carb entries. Confirm Loop permissions in Health to only write
and not read
carbs. See see Loop Permissions.
Insulin Sensitivity Factor (ISF) is the same term as Correction Factor used in some clinics and endocrinology offices. ISF represents the drop in blood glucose levels expected from one unit of insulin. Click the + in the upper right to add insulin sensitivities for various times of day. Loop works best if you have tested and optimized your ISF settings for accuracy. Insulin sensitivities can change for many reasons including waiting too long to change your infusion set. Loop will not auto-detect changes in ISF.
Incorrectly set ISF is the most common cause of roller coaster glucose for new Loop users. You will need to raise (increase) your ISF value/number to help smooth a roller coaster glucose trend. You can read about that topic more over in LoopTips here.
"},{"location":"operation/loop-settings/configurations/#loop-2-services-optional","title":"Loop 2 Services (Optional)","text":"You are not required to use services, although many Loopers use Nightscout. If you do not yet have Nightscout configured and want to add it later, just return to this page when you are ready. This can be added at any time. The same is true for the other services. For more details, click on Loop 2 Services.
"},{"location":"operation/loop-settings/configurations/#next-step-loop-2-displays","title":"Next Step: Loop 2 Displays","text":"Proceed to the Loop 2 Displays page. Understanding the Loop displays can be a valuable tool to understanding your Loop's actions, and also for troubleshooting, if you are having issues.
"},{"location":"operation/loop-settings/displays/","title":"Loop 2 Displays","text":""},{"location":"operation/loop-settings/displays/#loop-displays","title":"Loop Displays","text":"This section of the docs describes the Loop displays available and what information they offer. Information about Loop's actions (or inactions) can often be found simply by looking at the visuals presented in the app. (Page last updated for Loop v2.2.4.) For Loop 3, refer to Loop 3 Displays.
"},{"location":"operation/loop-settings/displays/#status-screen","title":"Status Screen","text":"The Status Screen is the main root navigation screen in Loop. It is broken up into 3 main display areas; Heads Up Display (HUD), Charts, and Toolbar. The HUD is the top area of the screen. This shows the status of the last time loop ran, current BG Reading, current temp basal, and current pump information. The next area is the charting area. This includes, glucose trend and prediction, Active Insulin, Insulin Delivery, and Carbohydrates. The final display area is the toolbar which has buttons for Carbs, Pre-Meal, Bolus, Overrides, and Settings.
"},{"location":"operation/loop-settings/displays/#heads-up-display","title":"Heads Up Display","text":"The Heads Up Display (HUD) is a very useful quick reference guide to your Loop's status. Every 5 minutes, Loop updates CGM and pump/pod data. Loop timestamps the HUD data with the last data point that came in. If a timestamp goes older than 5 minutes old, that is a valuable indicator to where your Loop is failing to get the needed information. The HUD's first three icons, from left to right, are the same no matter whether you are using a Medtronic pump or Omnipod; status of the last time loop ran, current BG Reading, and current relative temp basal. The last two icons will change depending on what type of pump you are using.
Medtronic users: The last two icons are the most recent (1) pump/reservoir status and (2) pump percentage battery remaining. Details below
Omnipod users: The last two icons are the most recent (1) pod status and (2) hours of pod use. Details below
"},{"location":"operation/loop-settings/displays/#loop-status","title":"Loop Status","text":"The Loop Status is the colored circle in the upper left corner of the main Loop display. There are four colors that are typically displayed.
A grey circle indicates the Loop is warming up and hasn\u2019t yet completed its initial loop. When the Loop is first activated, it may take about 15-20 minutes to complete the first Loop, and the grey circle will be displayed. It needs CGM data to be gathered, so be patient. When it finally completes its first loop, the circle will turn green. If you can't get your grey loop to turn green, please see the Yellow and Red Loop troubleshooting page for tips. A green circle indicates the Loop has been successfully completed within the last 5 minutes. The time since the loop last completed will be displayed under the circle. A yellow circle indicates the Loop has not completed in the last 5-15 minutes. It is not unusual to have a few instances of yellow circles throughout a day of looping. They can be caused by temporarily getting too far away from RileyLink or iPhone (more than about 3-10 feet depending on conditions), CGM failing to read or being in ???, radio frequency \u201cnoise\u201d interference, and such. Generally, most yellow circles will self-resolve without needing any special troubleshooting. A red circle indicates the Loop has not completed in over 15 minutes. This is not a typical state, and you should troubleshoot why Loop is not completing. Please review the Yellow and Red Loop troubleshooting page for tips on how to get your green Loop back. Clicking on the red circle will also pop-up the last error message to help guide your troubleshooting. When the circle is notched and not complete, that means the Loop is operating in \u201copen-loop\u201d mode. When the \u201cclosed-loop\u201d setting is turned on, the loop status will show a completed circle.Fun Fact
The loop status icon will pulse slightly when Loop is communicating with the pump. The pulsing will stop when the communication has completed (green loop) or given up (yellow or red loop).
"},{"location":"operation/loop-settings/displays/#glucose","title":"Glucose","text":"The current BG reading from the CGM will display, including trending arrow and time the reading was taken. If the BG is being read straight from the G5/G6 transmitter or G4 receiver, no special symbols will appear. If the BG is being read from the Dexcom Share Servers, a small cloud icon will be in the corner of the BG reading. Internet access is required to run in this mode. When you first start Loop, there may be a small yellow alert next to the BG. This should go away within a short period of time (around 5 minutes or less). If the yellow alert remains, something may be wrong with fetching BG data. You can try restarting the Loop app (double tap home button, up-swipe on the app to close it) to see if BG data will resume. Special note for Dexcom G5/G6 users>, a yellow alert will appear when calibration is needed. The alert will clear once the calibration is given, but typically Loop will work IF the yellow alert is only for a needed G5/G6 calibration."},{"location":"operation/loop-settings/displays/#temp-basal","title":"Temp Basal","text":"The temp basal will display the enacted temp basal change relative to the scheduled basal. So if the scheduled basal was 1.0 units per hour and Loop has set a temp basal of 0.2 units per hour, the temp basal icon will display -0.8 U, as shown in the graphic to the left."},{"location":"operation/loop-settings/displays/#reservoir-medtronic-users","title":"Reservoir (Medtronic Users)","text":"The reservoir icon will remain grey and plain until insulin volume decreases. At 25% reservoir volume remaining, the reservoir icon will turn yellow. At 10% reservoir volume remaining, the reservoir icon will turn red. The remaining units will be displayed when it gets to these lower thresholds."},{"location":"operation/loop-settings/displays/#battery-medtronic-users","title":"Battery (Medtronic Users)","text":"For x54 pumps, the battery icon will show 100/75/50/25% increments just as the pump does. As the battery level decreases, the icon will turn from grey to yellow to red. For x22, x23 pumps, the battery icon will read discrete % values. The warning colors/levels on Loop's battery indicator work in conjunction with the type of battery selected. If you change battery types, please make sure to update your battery selection in the Loop app settings. The pump's on-screen battery indicator is not a good indicator of remaining battery life for the purposes of looping. Loop's pump communications will fail from low battery levels sooner than the insulin delivery will fail. The Loop's battery level warnings are designed to give you approximately 8 hours of notice before the pump battery will need changing."},{"location":"operation/loop-settings/displays/#reservoir-omnipod-users","title":"Reservoir (Omnipod Users)","text":"The pod icon will remain grey and plain until insulin volume decreases. At 50 units or less insulin remaining, the reservoir icon will turn yellow. At 20 units or less remaining, the reservoir icon will turn red. The remaining units will be displayed when it gets to these lower thresholds. When the reading is 0 units, there may be up to 4 units of insulin available but don't count on it. If the pod senses insulin can no longer be delivered, the pod will have a sustained audible alarm (the scream). Tapping Replace Pod in Loop->Pod->Settings should silence the alarm."},{"location":"operation/loop-settings/displays/#pod-age-omnipod-users","title":"Pod Age (Omnipod Users)","text":"The pod's age, typically a 3-day lifespan, is represented by three equal segments of the pod age icon. As the pod ages, the segments are converted to a darker grey color. At 54 hours old, the pod age icon will turn yellow. At 72 hours old, the pod age icon will turn red, the pod will begin the periodic warning beep, and the pod age icon will show a \"replace pod\" message in the HUD. When you reach 80 hours of pod use, the pod will have a sustained audible alarm (the scream) and stops all insulin delivery. Tapping Replace Pod in Loop->Pod->Settings should silence the alarm."},{"location":"operation/loop-settings/displays/#charts","title":"Charts","text":"There are several charts that help you navigate your Loop actions. Clicking on each of the charts will also open up additional information.
"},{"location":"operation/loop-settings/displays/#glucose-chart","title":"Glucose Chart","text":"The glucose chart displays BG values in your preferred units. (If not, quit and restart Loop app on your phone.) The vertical scale of the chart is calculated on the fly by Loop to be as useful as possible while including the highest and lowest readings in the chart.
The horizontal axis is set to go forward from the current time until your DIA (insulin duration) forward (so you can see what Loop thinks BG will be eventually). It then goes back in time as far as it can, based upon the width in pixels of your screen. Note, if you turn your device to landscape mode you will have more screen real estate and thus will be able to see further back in time.
The BG correction range is shown as a blue bar on the glucose chart. Single-value range BG range (such as 100-100 mg/dL), will have a narrower blue range. When a temporary override range is enabled, a darker blue bar where the overrides are set will be displayed, as well as the normal correction range in lighter blue.
If you have a crazy negative prediction - it is likely that you set an override with a tiny Overall Insulin Needs setting. Don't do that again. Best approach: Do not panic - this is a prediction only; not reality. Open the loop until the prediction settles down. In future, do not choose a tiny Overall Insulin Needs setting to force less insulin, simply increase the correction range in your override - Loop will reduce your basal rate at the next cycle (within 5 minutes).
The eventual BG displayed on the right side of the chart does NOT take into account a recently enacted temp basal. In other words, if you are above BG range and Loop just enacted a high temp basal to help, the eventual BG does not reflect the expected lowering of BGs that would result from that recently enacted temp basal. Loop waits until the insulin has actually been delivered before it \"uses\" the insulin in its calculations for BG impacts. If you suspended your pump or had a \"no delivery\" alarm shortly after the temp basal was started, you would want that accurately reflected in the insulin on board and associated eventual BG.
If you tap on the Glucose Chart itself, it will open the Predicted Glucose chart described below.
"},{"location":"operation/loop-settings/displays/#predicted-glucose-chart","title":"Predicted Glucose Chart","text":"The predicted glucose view is a great way to gain insight into the various components\u2019 importance in Loop\u2019s prediction of eventual BG.
The graph at the top of this view will match your Glucose Chart. Below this chart you will see a very detailed explanation of all of the variables that Loop takes into account in predicting your future BG value. Each of those effects (including Carbohydrates, Insulin, Glucose Momentum and Retrospective Correction) includes details of the calculation used. You can tap on any of the entries to turn them off and on for visualization. The resulting changes can be viewed by the changes in the dashed lines.
Note - these elements are not turned on and off in the Loop predictions. They just modify the graph so you can view the relative effects.
"},{"location":"operation/loop-settings/displays/#active-insulin-chart","title":"Active Insulin Chart","text":"The Active Insulin chart displays the total insulin contribution from both temp basals and boluses. Active IOB can be either positive and negative IOB. Negative IOB results from the suspension of normally scheduled basals. The active insulin displayed in the upper right corner of the chart does NOT include insulin contributions from a recently enacted temp basal or bolus until the (for Medtronic) pump\u2019s reservoir volume is read and confirms a drop in reservoir volume (confirming the insulin has actually been delivered). The opposite is true for Omnipods. If a message is sent from Loop, it assumes the pod got the message and enacted it - even if the acknowledgement is not received. Later, when communication is restored, if a command was not enacted by the pod, the Event History is updated.
Medtronic Only: So long as you have Event History as the Preferred Data Source in Loop settings, primed insulin deliveries (e.g., cannula fills or manual primes) will not be counted towards IOB.
"},{"location":"operation/loop-settings/displays/#insulin-delivery-chart","title":"Insulin Delivery Chart","text":"The Insulin Delivery chart displays a history of the temp basals enacted by Loop. The display is relative to the scheduled basal rates entered in the Loop settings. So, a rate displayed in this chart as +0 units
would indicate no temp basal was set, and Loop defaulted to the scheduled basal rate. Individual boluses are indicated by an orange triangle on the chart (shown in the graphic above, near the left-most time). The total insulin delivered since midnight, including all basals and boluses AND (Medtronic Only) priming insulin, is given in the upper right corner of the graph.
Please be patient for a bolus delivery to appear. There is a lag time from when you press the \u201cdeliver\u201d bolus button to when the orange triangle is drawn sometimes. The insulin has to be delivered and then the (Medtronic Only) pump reservoir needs to be read to confirm delivery, before the triangle will appear and IOB will be added. Occasionally, the bolus may be temporarily rendered (drawn) as a very high temp basal rate vs. a (triangle) discrete bolus event. This does NOT mean that the Loop actually enacted a high temp basal rate...only that the bolus is being drawn on the chart in the equivalent of a high temp basal rate.
"},{"location":"operation/loop-settings/displays/#reservoir-and-event-history","title":"Reservoir and Event History","text":"Clicking on either the Active Insulin or Insulin Delivery charts will open your Insulin Delivery history. The top of the screen will display the current IOB and the total insulin delivered for the day since midnight (or since the time the loop became active if you started Loop after midnight). There are two viewing options; Reservoir or Event History.
Reservoir: Omnipod users should not worry about the reservoir display. Pods do not report or track insulin remaining until their reservoirs get below 50 units remaining. If your pod has more insulin than that - you'll see the reservoir history from the previous pod - ignore that. Medtronic users will have reservoir history displayed in 5-minute increments, unless Loop has been having communication issues.
Event History: Event history is a detailed accounting of all pump/pod actions. Both Medtronic and Omnipod users will have a detailed record of event history. If you tap on an event, you get more detail. Turn your phone to landscape to improve readability.
The Carbohydrate chart displays the carbs used by Loop to predict BG changes. The active COB is displayed in the upper right corner of the chart. Clicking on the chart will open the Carb Entries history and you can edit/delete any previous entries through that screen. Please read the Carb Entry page for more information about editing carb entries.
For more information about the Insulin Counteraction Effects information found in the Carb History, please see here.
"},{"location":"operation/loop-settings/displays/#tool-bar","title":"Tool Bar","text":"The toolbar is where your inputs to the Loop behavior take place. The individual components of the toolbar are, left to right:
Carb entry tool- click on this tool to enter carbs into the Loop app. Loop will not read carb entries from a Medtronic pump or Nightscout, so you must use the carb entry tool in Loop app in order to have carbs accounted for by the Loop. Detailed info regarding how to enter, save, and edit carb entries can be found in the Carb Entry page.
Pre-meal range - click this tool to set the Pre-Meal temporary override range. (If you have not configured a pre-meal range under Loop Settings, this icon will be inactive - some people prefer this to avoid accidently tapping it.) This range will remain in effect (1) for 60 minutes, (2) until a carb entry is saved, or (3) until the range is toggled off manually or by tapping on the override icon, whichever comes first. The background coloring of the Pre-Meal range will turn green when active and there will be a dark blue line on the BG chart indicating where the override range is enabled.
Bolus tool - click on this tool to bring up the bolus tool. Normally, this screen will automatically open on its own and function as a bolus wizard when a meal is saved on the carb entry tool screen. But you can click on this icon anytime to manually bolus. During rapidly rising BGs, where Loop doesn't have an adequate temp basal rate to cover the pace at which BGs are rising, you may try clicking on the bolus tool to see if Loop is recommending a correction bolus to help control the BG spike. Or if you want to trade bolus now for basal later (super bolus), you can enter a bolus greater than Loop recommends - Loop will set zero Temp Basal next cycle. For more information about the Bolus tool features and use, see the Bolus page.
Overrides - click this tool to set an Override.
Loop Settings - click on this tool to make changes to any of your Loop settings.
The pump attached to Loop has a screen to display status and command options. For Loop 2, these are documented in Loop 2 Pump Settings.
"},{"location":"operation/loop-settings/mdt-pump/","title":"Loop 2 Add Medtronic","text":""},{"location":"operation/loop-settings/mdt-pump/#medtronic-pump-users","title":"Medtronic Pump Users","text":"Your Loop app will have a lot of blank spots until you input some basic settings. The beginning step is to add a pump to your Loop app. If you are using an Medtronic pump, you can follow along for the rest of this page. If you are using an Omnipod pump, please head over to Loop 2 Add Omnipod instead.
"},{"location":"operation/loop-settings/mdt-pump/#prepare-medtronic-pump","title":"Prepare Medtronic Pump","text":"Before you begin the rest of the setup process, there are several steps on your Medtronic pump that you will need to complete prior to moving on with Loop setup. DO NOT SKIP THESE STEPS OR YOUR LOOP WILL NOT WORK.
Temp Basal Type
to Insulin Rate (U/hr)
. Do NOT use percentage. Your Loop will not run unless your temp basal type is set to units/hour.ON
and enter any random ID (010101 will work - avoid using all zeros). This setting is found in the pump's Utilities menu (for x23 continue to Connect Devices, Remotes) and turn ON
the Remote Options.Let\u2019s start by clicking on the Loop Settings button in the tool bar at the bottom of your Loop app. It looks like a little sprocket. On the settings screen that opens, click on Add Pump
and select the Medtronic pump option that appears.
New RileyLink compatible devices won't have a name listed next to their slider at first. The name will only be displayed after connecting the device to Loop for the first time. So, if all you see in the device list is a little toggle and no \"RileyLink\" name...go ahead and switch that toggle. The default device name will appear after that toggle is green.
You can later personalize the default device name once it is connected to Loop.
Continue with these steps to connect your Medtronic pump to Loop.
CM
instead of CA
for the region code. Just select CA
in the dropdown menu.Continue
button to finish the addition of your pump. For x23 and x54 Medtronic pump users only
For x23 and x54 Medtronic pump users, there is a packet of information special to those pumps called MySentry messages. If you have never setup this part of the pump previously, you may see a screen, called \"Pump Broadcasts\", at this point in the setup process.Follow the directions on the screen. They will require you to take some manual steps on your pump to \"pair\" it with your Loop app.Basically, you will need to go to your pump's main menu, scroll down to Utilities, then Connect Devices, then Other Devices, turn that setting On, and then select Find Device. Once you do that, click on theContinue
button in Loop app and the pairing will take place. This will allow those MySentry packets of information to flow to Loop app.This step does not apply for x22 or x15 pump users, since those pumps do not have MySentry capabilities. Now that your pump is paired with Loop, you will be finishing these steps:
Event History must be selected for Nightscout to display temp basals, carbs, and boluses from Loop. Event History must also be selected in order for prime events to be detected and NOT contribute to IOB during site changes. Please just leave the Preferred Data Source on Event History.
"},{"location":"operation/loop-settings/mdt-pump/#change-time-zone","title":"Change Time Zone","text":"Loop automatically prompts you to set your pump time using the Loop app as part of initial Loop setup. There will be other times you need to change the time - traveling or daylight savings time start and end. It is important that you use Loop to change time on your pump; do not adjust time on your pump directly once it is attached to Loop.
If you are traveling through time zones, Loop continues to work - just be aware that your basal rate and other configuration settings will be in the original time zone. To change time zones, please follow the Change Time Zone instructions.
Always use the Loop -> Pump -> Change Time command to change pump time. Do not use the Medtronic pump menus to change your pump's time when Looping.
"},{"location":"operation/loop-settings/mdt-pump/#next-step-add-cgm","title":"Next Step: Add CGM","text":"Congrats! You've added your Medtronic pump to your Loop app. Now, click on the settings button in the upper left corner to take you back to Loop's settings menu. Your next step is to Loop 2 Add CGM to your Loop app. After all, without CGM data, your Loop won't loop.
"},{"location":"operation/loop-settings/omnipod-pump/","title":"Loop 2 Add Omnipod","text":""},{"location":"operation/loop-settings/omnipod-pump/#omnipod-users","title":"Omnipod Users","text":"Your Loop app will have a lot of blank spots until you input some basic settings. The beginning step is to add a pump to your Loop app. If you are using an Omnipod pump, you can follow along for the rest of this page. If you are using a Medtronic pump, please head over to Loop 2 Add Medtronic Pump page instead.
"},{"location":"operation/loop-settings/omnipod-pump/#select-pump-type","title":"Select Pump Type","text":"Let\u2019s start by clicking on the Loop Settings button in the toolbar at the bottom of your Loop app. It looks like a little gear. On the settings screen that opens, click on Add Pump
and select the Omnipod option.
New RileyLink compatible devices won't have a name listed next to their slider at first. The name will only be displayed after connecting the device to Loop for the first time. So, if all you see in the device list is a little toggle and no \"RileyLink\" name...go ahead and switch that toggle. The default device name will appear after that toggle is green.
You can later personalize the default device name once it is connected to Loop.
A list of all RileyLink compatible devices in the nearby area will display in the RileyLink Setup screen. Select your RileyLink by sliding the toggle to display green and then press the blue Continue
button at the bottom of the screen. If your RileyLink does not appear, make sure it is charged and turned on: slide the recessed switch toward the case's keyring.
The next screen will offer two areas where you will need to enter information:
Delivery Limits: Tapping on Delivery Limits presents a screen where you enter your Maximum Basal Rate and your Maximum Bolus.
Basal Rates: Enter your scheduled basal rates, beginning at midnight. Consistent with Omnipod use, the scheduled basal rates have a maximum of 24 entries, no 0 u/hr entries are allowed, and the rate increments are 0.05 u/hr.
Back
button at the upper left.Sync to Pod
instead of Back
to save your basal rates - you only see Back
when no pod is paired.Edit
on upper right and then use standard Apple gestures (for your phone iOS) to delete or move rows.When you finish entering these values, press the blue Continue
button on the bottom of the Pod Settings screen to continue with the next steps of Pod setup.
Max Fill is 200 Units
When you fill the Pod do not exceed 200 units.
If you overfill the pods, you may get a pod fault right after priming.
Pod Filling and Insertion
The Pod filling and insertion instructions are the same with the Loop app as they are for the PDM. These videos: Filling a Pod with Insulin and Inserting the Cannula, may be useful. You will use your phone and RileyLink compatible device instead of the PDM. Be sure to keep the phone and RileyLink close during pairing and insertion because the Pod uses a low-power mode during these activities.
Pair
buttonContinue
button when the blue checkmark confirms priming is completecancel
in the upper right corner of the screen and try a new Pod. (Report this issue to Insulet; it is a Pod problem.)Insert Cannula
button.Finish the setup using the default expiration reminder time (2 hours before a full 3-days of usage). You can modify that expiration reminder at any time, see Expiration Reminder. The notification will come from Loop; your Pod will not beep at this time. Setup is complete and your Pod is ready for use when you press the Continue
button.
Range
Now that the priming and insertion steps are complete, the Pod is in normal power mode, so the range between the Pod and RileyLink compatible device is increased.
"},{"location":"operation/loop-settings/omnipod-pump/#pod-settings","title":"Pod Settings","text":"After the Pod setup is complete, you will be on the Pod Settings screen. The information on this screen is described in Omnipod Pump Commands.
"},{"location":"operation/loop-settings/omnipod-pump/#next-step-add-cgm","title":"Next Step: Add CGM","text":"Congrats! You've added your Pod to your Loop app. Now, click on the Done
button in the upper right corner of your Pump Settings screen to take you back to Loop Settings. Your next step is to Loop 2 Add CGM to your Loop app. After all, without CGM data, your Loop app won't loop.
To bring up the Pod/Pump Settings display, tap on the reservoir icon in the Heads Up Display or the image of the pump in the Loop settings screen.
Omnipod Eros vs DASH
With the addition of DASH pods with Loop 3, you will notice all reference to Eros pods continue to say Omnipod in both the documentation and the code.
Documentation and screens in the app indicate DASH explicitly.
"},{"location":"operation/loop-settings/pump-commands/#change-time-zone","title":"Change Time Zone","text":"The schedules for the basal rates, correction ranges, insulin sensitivity factors and carb ratios stay at the pump time even if the user and their phone change time zones or when daylight savings time occurs. To bring the pump into the same time zone as the phone, use this command in Loop. (Medtronic users - do NOT adjust time on your pump - always go through Loop.)
Select the Pod/Pump Settings display, scroll down to the Change Time Zone line, example shown in the graphic below. You can leave the time zone offset unchanged or touch it to change to the current time zone. Note that the 24 hour configuration pattern for basal rates, insulin sensitivity factor, carb ratio and correction range are aligned with the time zone shown on this line.
Once the Change Time Zone command is tapped, Loop no longer shifts the 24 hour configuration pattern to the old time zone. Some behavior depends on whether the pump is an Omnipod or Medtronic.
"},{"location":"operation/loop-settings/pump-commands/#omnipod-commands","title":"Omnipod Commands","text":"To bring up the Pod Settings display, tap on the Pod Age icon on the Heads Up Display or the image of the Omnipod in the Loop settings display to reach the Pod Settings display.
This screen provides important information about your Pod and allows you to issue some commands to the Pod through Loop. There were some recent modifications made to the layout and underlying information for some of the rows.
Enable/Disable Confirmation Beeps: moved up to the Configuration section; beeps for all manual pod operations; uses a more efficient implementation
Suspend/Resume: Pod will beep every 5 minutes when suspended; the beeps can be silenced by tapping on the Alarms line
The first section has the (72 hour) Pod expiration date/time and how long the Pod has been active. These are determined when the Pod is activated by injecting insulin into the reservoir and uses pod active time.
"},{"location":"operation/loop-settings/pump-commands/#bolus-delivery","title":"Bolus Delivery","text":"This line reports the % progress of any ongoing bolus. This line reports None
unless a bolus is actively being delivered when you enter Pod Settings. This line may not update until you tap on the refresh symbol to the right of the Pod image, or exit and re-enter the Pod Settings screen.
This line reports
This line displays Alerts or Alarms; tapping on it, or on the accompanying banner displayed in the HUD, acknowledges the alert
Pods do not report the volume of insulin remaining in the reservoir until there are less than 50 units remaining. So, typically you will see \"50+ U\" in this line for quite a while with a new Pod.
"},{"location":"operation/loop-settings/pump-commands/#insulin-delivered","title":"Insulin Delivered","text":"This line is the basal and bolus insulin delivered by the Pod since the cannula was inserted. It is obtained by taking the reported Pod insulin delivery and subtracting the amount used to prime the Pod and fill the cannula upon insertion (about 3\u00a0U).
"},{"location":"operation/loop-settings/pump-commands/#pod-commands","title":"Pod Commands","text":"This section contains commands the typical user will use.
"},{"location":"operation/loop-settings/pump-commands/#suspend-delivery","title":"Suspend Delivery","text":"This command will suspend all insulin delivery; basals, temp basals, and boluses in progress. When you press suspend delivery, all insulin delivery stops indefinitely and the display changes to say Resume Delivery
. (If the display does not update, tap the refresh screen icon at the top of the screen to the right of the Pod image.)
A banner notice will appear on the Loop's main screen when phone is in portrait mode when insulin delivery is suspended. Unless you are running v2.2.4 or earlier, a pod beep is initiated with a frequency of every 5 minutes. This can be silenced by acknowledging the alarm.
You will need to press Tap to Resume
in the banner or the Resume Delivery
button in the Pod Settings to resume your scheduled basal rate and let Loop get back to action. If a bolus delivery was interrupted by the Suspend Pod command, it will not be resumed.
When you resume delivery, the 24 hour Pod basal rate schedule is sent to the Pod. Be sure the Phone, RileyLink and Pod stay close until the message exchange is complete.
"},{"location":"operation/loop-settings/pump-commands/#enable-confirmation-beeps","title":"Enable Confirmation Beeps","text":"This turns confirmation beeps on for the Pod. The Pod beeps when you enable this, but is silent when you disable it.
With the Expiration Reminder you can set a convenient time to get a notification to replace your Pod. Loop sets the default to 70 hours, i.e., two hours before the full 3 days that Insulet guarantees. The allowed range of values is between 1 hour and 24 hours prior to the Pod expiration at 72 hours of Pod life. If you select a date/time outside this range, Loop will modify your selection to the closest allowed value.
As with the PDM, Loop allows the Pod to continue operating after expiration until it reaches the maximum allowed 80 hours of life, at which time, the Pod shuts down and alarms. Loop detects this message the next time it tries to communicate with the Pod. In the event your Pod runs out of insulin before that time, then you will get a \"Pod empty\" notification.
The glitch in setting the Expiration Reminder in v2.2.4 is now fixed.
Loop v2.2.4 has a \"glitch\" in setting the Expiration Reminder. Tap on the line (can't change time), scroll the entire display up or down until the line no longer is visible and then scroll it back. The Expiration Reminder display should now look like the graphic below. The expiration reminder time can now be selected.
"},{"location":"operation/loop-settings/pump-commands/#change-time-zone_1","title":"Change Time Zone","text":"Use the Change Time Zone
command to align your configuration settings with the current time zone. Note that this updates your basal schedule on your Pod. If you start a new Pod session without modifying the time zone here, the original time zone will be used for the new Pod. Please wait until you see Succeeded
appear on the page to ensure the command has successfully been received by the Pod.
Make sure the phone, RileyLink compatible device and Pod are kept in close proximity until this command has completed. The time zone is updated by Loop issuing the 24-hour basal rate schedule to the Pod based on the current time.
"},{"location":"operation/loop-settings/pump-commands/#replace-pod","title":"Replace Pod","text":"This command deactivates a Pod prior to replacing it. Once you tap Replace Pod
, another screen appears for you to confirm that you mean it.
This allows access to the RileyLink screen for each connected RileyLink compatible device.
"},{"location":"operation/loop-settings/pump-commands/#pod-diagnostics","title":"Pod Diagnostics","text":"This section is labeled Diagnostics, but many Pod users make use of this section.
"},{"location":"operation/loop-settings/pump-commands/#read-pod-status","title":"Read Pod Status","text":"This command requests the status of the Pod and reports some of the returned information.
The line labeled Pulses
reports the total number of pulses of insulin delivered by that Pod since activation (adding insulin to the reservoir). To convert this to units of insulin, multiply by 0.05 units/pulse. If you compare this report (for your Pod) to the Insulin Delivered
line in Pod settings, for your Pod at the same time, the difference is the insulin used to prime the Pod and fill the cannula at insertion.
The line label RSSI
reports the Received Signal Strength Indicator (RSSI) between the RileyLink compatible device and the Pod. The RSSI is a positive number with a larger number indicating a stronger signal strength detected by the Pod.
This command requests the Pod emit a beep pattern. If you hear it, you know the commands are getting to the Pod. A message appears on your screen to indicate Loop got or did not get an acknowledgment from the Pod.
"},{"location":"operation/loop-settings/pump-commands/#read-pulse-log","title":"Read Pulse Log","text":"This command reads the pulse log (diagnostic), displays it on the screen and saves the result in the log file. It takes some time, so keep your gear close until command completes. This can be extracted by sending the pulse log to yourself using the send-to icon at the top right of the screen. It is also included in the Issue Report. If you are having communication issues, you can provide this report to an expert who may be able to provide assistance. Post for help in either zulipchat or a Facebook group to request assistance and you'll get information about how to get that log file submitted.
"},{"location":"operation/loop-settings/pump-commands/#test-command","title":"Test Command","text":"This verifies communication with the Pod. Loop reports success or failure. Use Get Pod Status if you want to see the some of the information returned from the Pod.
"},{"location":"operation/loop-settings/pump-commands/#pod-details","title":"Pod Details","text":"This section provides some Pod identifying information. The Lot number and TID number are the tiny number stamped on the Pod that Insulet might ask you to report if you happen to call in this Pod for an appropriate failure.
"},{"location":"operation/loop-settings/pump-commands/#medtronic-commands","title":"Medtronic Commands","text":"Medtronic commands are found in the Pump Settings screen shown in the graphic below. The top section is configured at the time the pump is connected to Loop and can only be modified by deleting the pump and adding a pump. This screen is the same as for earlier versions with the addition of the Use MySentry
row.
This command will suspend all insulin delivery; basals, temp basals, and boluses in progress. When you press suspend delivery, all insulin delivery stops indefinitely and the display changes to say Resume Delivery
.
A banner notice will appear on the Loop's main screen when phone is in portrait mode when insulin delivery is suspended.
You will need to press Tap to Resume
in the banner or the Resume Delivery
button in Pump Settings to resume your scheduled basal rate and let Loop get back to action. If a bolus delivery was interrupted by the Suspend Pod command, it will not be resumed.
During normal operation, Loop automatically keeps phone time and pump time aligned. In the case of time-zone or daylight savings time changes, Loop allows the differences to persist until the user chooses to Change Time Zone
and accounts for time zones when performing insulin delivery accounting.
The type of battery used in the Medtronic pump affects how Loop interprets the battery level for the pump.
"},{"location":"operation/loop-settings/pump-commands/#preferred-data-source","title":"Preferred Data Source","text":"Leave the Preferred Data Source set to on Event History for proper functioning of Loop.
Event History must be selected for Nightscout to display temp basals, carbs, and boluses from Loop. Event History must also be selected in order for prime events to be detected and NOT contribute to IOB during site changes. Please just leave the Preferred Data Source on Event History.
"},{"location":"operation/loop-settings/pump-commands/#use-mysentry","title":"Use MySentry","text":"This is a new option. If you don't see this row, consider updating your Loop app. Using the MySentry feature on some Medtronic pumps when using an OrangeLink causes the batteries to die quickly. This option allows you to turn off MySentry within the Loop app.
"},{"location":"operation/loop-settings/pump-commands/#devices_1","title":"Devices","text":"This allows access to the RileyLink screen for each connected RileyLink compatible device.
"},{"location":"operation/loop-settings/rileylink/","title":"RileyLink Display","text":""},{"location":"operation/loop-settings/rileylink/#rileylink","title":"RileyLink","text":"The RileyLink (or compatible device) screen is accessed by clicking on the image of your connected pump in Loop settings or the pump icon in the Heads Up Display to bring up the associated pump screen. From that screen, scroll down to the section labeled DEVICES
to view the list of connected RileyLink compatible device(s) and tap on the name with a green slider that you want to display. An example is shown in the graphic below.
If there is a problem communicating with that RileyLink compatible device, tapping on the line will show out-of-date or missing information. Go to Troubleshoot: Red Loop: Reset Loop-to-Pump Communications for suggestions.
With Loop 3
Tapping on a name with a green slider takes you to the RileyLink Status and Commands screen for that device.
The name at the top center is whatever you named your RileyLink compatible device. The RileyLink screen is the same regardless of the pump you are using.
Patch Required for Loop 2.2.x
Some devices have features not available with other devices. With Loop 2.2.6 some features were added to the OrangeLink, but there is a mismatch of reported hardware for some versions of OrangeLink firmware which prevents the Find Device row from showing up for OL Pro. The EmaLink extra features did not make it into the Loop v2.2.6 release.
The lines under the Device section provide information on the device. The two most important lines are the Connection Status and Signal Strength.
The Connections Status should say connected
if the device is connected to the iPhone's Bluetooth. If the status says connecting
or disconnected
then you should toggle the iPhone's BT and/or power cycle the device to help reconnect.
The Signal Strength is the strength of the Bluetooth signal between the iPhone and the device. It is not the signal strength of the radio communications with the pump/pod.
The phone to device Signal Strenth is reported as a negative number so a -50\u00a0dB signal is stronger than -80\u00a0dB. As you move the device and iPhone closer/farther apart, you will be able to see the signal strength change. In a pinch, this can be used to help locate a lost device in the house or at the park after dark.
As soon as you connect the RileyLink compatible device initially - it is strongly encouraged that you rename it from the default name for that device, e.g., RileyLink or OrangeLink or EmaLink.
Once you display the RileyLink Status and Commands screen:
Near the bottom of your Loop settings screen is a section called \"Services\".
Sevices are Optional
For Loop 2.2.x, the services listed in the graphic below can be added by clicking on the Tap to set
arrow.
Click for Loop 3 Services
There is a whole section in LoopDocs about Nightscout. Please follow this link to the Using Nightscout with Loop section of LoopDocs. That also has the links you might need to the official Nightscout Documentation (different website).
If you have an existing Nightscout site, it's still a good idea to review that section, but here's a quick summary of how to add your Site URL and API_SECRET to have your Loop data transmitted to your Nightscout site. If you can\u2019t remember your API_SECRET, it can be found under Settings, Reveal Config Vars for Heroku sites (or Application Settings, Connection Strings for Azure sites).
The two most common errors in filling out this section are:
https://
in the site URL. If you use http://
(see how that doesn't have the \"s\" at the end?), you will get an error message about an App Transport Security policy.More Tips about Nightscout
Loggly is a free logging service. If you sign up for an account, you'll need to go under Source Setup and then Customer Tokens. Copy and paste your customer token into your Loop App settings for Loggly.
"},{"location":"operation/loop-settings/services-v2/#amplitude","title":"Amplitude","text":"Amplitude is a remote event monitoring service and can be used to quickly identify errors and events with Loop. Amplitude stores the events and allows you to view those events as points in time. To retrieve the details of the events you will need to look at corresponding mLab data entries to get a complete picture of the issues. If you sign up for a free account with Amplitude, you will be given an API Key that you can enter here to have Loop integration setup.
"},{"location":"operation/loop-settings/services-v2/#next-step-loop-displays","title":"Next Step: Loop Displays","text":"Great job, almost finished! Now that you have completed your services, let's move onto understanding your Loop Displays.
Loop 2.2.x - click on this link for Displays
Loop 3 - click on this link for Displays.
Loop displays is a valuable tool for understanding your Loop and a great page to review when troubleshooting.
"},{"location":"troubleshooting/loop-crashing/","title":"Loop App Crashes","text":""},{"location":"troubleshooting/loop-crashing/#loop-crashes-upon-opening","title":"Loop Crashes Upon Opening","text":"If your Loop app crashes immediately upon opening, you have a problem that needs to be fixed. What do I mean by \"crashes\"? Your Loop app immediately turns to a white (light mode) or black (dark mode) screen and then shuts itself down, landing you back at your iPhone's main screen. No amount of tapping will let you keep your Loop app open.
The most likely reason is Your Loop App Expired. But there can be other reasons.
Your Loop app has an expiration date. The expiration date will depend on the build method and may also depend on the type of developer account that signed the app.
With the current version, 3.2.3, you unfortunately do not get prior warning that the app is about to expire, although you can look in the TestFlight app and it will tell you. An in-app warning will be added to the next release.
Please follow these steps to ensure you can build the app again. How to Update or Rebuild
"},{"location":"troubleshooting/loop-crashing/#mac-using-a-paid-account-1-year","title":"Mac using a Paid account (1 year)","text":"When your app expires after a year, you need to follow the steps on the Build Updating page. Your phone will probably have a new iOS that may require an updated version of Xcode that may require an updated Mac operating system. All this is explained in the link above. Give yourself time before expiration to prepare yourself.
To make it easy to build when you have to, practice building every 3 to 6 months. This makes the process much lower stress. Also, each time you build, when you follow the link above, you give yourself another full year before rebuilding is required. Please review the Updating FAQS.
"},{"location":"troubleshooting/loop-crashing/#mac-using-personal-team-7-day","title":"Mac using Personal Team (7 day)","text":"When your app expires, you simply need to open Xcode, reopen the project: File->Open Recent, plug your phone back into the computer and select it in Xcode and press the play button on your project again. This will rebuild. If you want to change to a paid signing team before rebuilding, please make sure to double-check which signing team is selected before building again.
"},{"location":"troubleshooting/loop-crashing/#switching-from-free-to-paid","title":"Switching From Free to Paid","text":"If you started with a free account and switched to a paid account:
Many people accidentally build with their old free account
(Personal Team)
listed after your name in the signing teamRemember that switching from free to paid changes the developer name incorporated into your Loop App
If you experience a crash for any other reason, please gather all the information you can about what was happening before the crash and report it to your favorite Loop Social Media help site - you will need to get some personalized help. Please - choose one site for your post and wait for someone to get back to you. While you are waiting, search on any of the sites and, if on Facebook, read all the announcements.
"},{"location":"troubleshooting/loop-crashing/#save-and-submit-your-crash-logs","title":"Save and Submit your Crash Logs","text":"If you have continuous crashes, please save the crash logs so the developers can look at it. If you can, log into Zulipchat and post it directly.
DateTime
.ips for crash reportsPod faults are typically noticed by hearing a high-pitched continuous tone coming from the pod.
Loop will pick up the fault the next time it exchanges messages with the pod:
Once Loop detects the fault, you will get a Critical Pod Error modal message on the screen that you must acknowlege along with a Pod Error
indicator shown in the HUD:
Normal High-Pitched Tone
There are 2 cases in which you hear the high-pitched continuous tone that are not Faults.
Empty Reservoir
, Pod icon displays No Insulin
Pod Expired
, Pod icon displays Pod Expired
The first action people want to take is to make that noise stop.
Replace Pod
row and deactivate the podReplace Pod
row is highlighted in red in the graphic belowPrevious Pod Information
row, highlighted in dashed-blue in the graphic belowFaults should be reported to Insulet. They may not give you a replacement, but it is important they be informed so they can determine if certain lots are having more failures than others. This helps them improve the quality of the pods.
Lot number
(Eros found on the screen, DASH is different)Sequence number
(also on the pod in tiny print)Active time
(how long you wore the pod)Ref code
- for the example above, the Ref code is: 19-00805-00551-064Extra Information
The extra information, e.g., Fault Event Code 0x40: Encoder count too high
, is only useful for the curious or the developers. Do not report that to Insulet.
The 0x40
is the hex version of the -064
decimal value found at the end of the Ref code.
The sole exception to reporting to Insulet is if you get a fault ending in 049
in the Ref code or with the notation Fault Event Code 0x31: Incorrect pod state for command
. That particular fault is only seen if there is a mistake in Loop. This happened rarely in earlier versions but should be fixed by the time version 3.4.0 is released. If you do get an 0x31 (049) fault - report that to the Loop developers and include a Loop Report (Loop, Settings, Support, Issue Report).
The currently known pod faults are listed here on the openomni wiki page: Pod Fault codes
"},{"location":"troubleshooting/omnipod-faults/#ways-to-reduce-likelihood-of-a-fault","title":"Ways to Reduce Likelihood of a Fault","text":"The Loop app will put a higher battery load on a pod than the PDM due to its regular and repeated communications. A pod with lower battery level appears to be more likely to fault for conditions like static electricity and occlusions/pump issues the Loop app is not directly causing, like decimal fault codes 052, 061, 064 and 066. Pods always perform safety checks and if a potential problem is found, the pod will end itself by screaming and halt all insulin delivery.
DASH pods have additional Fault Codes associated with the pod Bluetooth communications. The 0xCB
, -203
decimal, seems to be pretty common. These should be reported to Insulet for their records.
None of the ways listed here are guaranteed to prevent a screaming pod, but they could be worth considering.
Help Insulet Improve their Quality Control
Insulet is aware that pods are used by the DIY community. You can be honest about your use and might receive replacement pods. If your pod fails early, it is worth informing Insulet for their troubleshooting records even if you do not get a replacement.
You can always call Insulet tech support if a pod has a clear failure on the pod, such as:
If the pod fails during use with Loop, a replacement might still be possible. The software which communicates with the pod isn't developed or supported by Insulet. Generally speaking, asking for replacement for failed pods on the third day of pod life is a bit of a reach for the DIY community. We acknowledge that Looping may be a contributor in certain faults, especially by the third day.
"},{"location":"troubleshooting/overview/","title":"Troubleshooting Overview","text":"After you have been using Loop for a while, there's a potential that you will run across a behavior or issue that you wonder if it is normal or intended. When that happens, there are a few things that we'd recommend doing to resolve the issue.
"},{"location":"troubleshooting/overview/#use-automatic-time-on-loop-phone","title":"Use Automatic Time on Loop Phone","text":"If you have modified the Loop time (not changed time zone, but turned off automatic time and manually changed the time), please read: Loop Phone Must be on Automatic Time.
"},{"location":"troubleshooting/overview/#gather-information","title":"Gather information","text":""},{"location":"troubleshooting/overview/#screenshots","title":"Screenshots","text":"Take a screenshot of your Loop main display screen, or other screens such as the display when you touch a red loop icon that may help you or troubleshooters better understand your issue. A lot of times a picture is worth a thousand words. Being able to see recent Loop basal adjustments, predicted BG curve and carb entries really help fill in the full story of the current Loop status. If you didn't manage to get a screenshot when the issue was happening, you can also go to Nightscout and scroll back over the previous 48 hours to obtain much of the same information. Try to capture a Nightscout screen from the time period in question.
"},{"location":"troubleshooting/overview/#check-the-docs","title":"Check the Docs","text":"Loop docs are updated regularly. If you built your Loop app awhile ago, chances are good that more information has been updated and changed since you last read them. Please use the search tool - if there's an error message - search for it. Scan the topics in the Troubleshoot
tab of LoopDocs and look for a page that may be applicable. The FAQs pages are definitely worth reviewing too.
Issue Report
","text":"Use the Issue Report
Loop 3 / Loop 2 command under Loop Settings to generate a Loop Report. This has a lot of detailed information that may help you or a mentor understand your problem.
The Loop Report (a text file) contains important information about actions and status that can be very useful for troubleshooters...particularly with unexplained behaviors. The upper right corner of the Loop Report includes a button so that you can email the Loop Report to yourself (or others).
"},{"location":"troubleshooting/overview/#check-resources","title":"Check Resources","text":""},{"location":"troubleshooting/overview/#github-issues","title":"GitHub Issues","text":"Check the current list of GitHub Loop Issues for known issues. Many times other users have noticed the same issue previously and opened an Issue so that more information can be added to help develop a solution. If you see the same issue has already been reported, please add it to the open issue instead of creating a new one.
There is a nice search feature on GitHub issues - type a keyword into the box next to Filters: where it says \"is:issue is:open\" in the graphic and the display will show just those open issues that contain the keyword in the title.
"},{"location":"troubleshooting/overview/#zulipchat-and-facebook","title":"Zulipchat and Facebook","text":"Search in Zulipchat, Looped Facebook Group or LoopandLearn Facebook Group. Quite possibly someone else has already posted about the same issue and perhaps a resolution has already been provided.
"},{"location":"troubleshooting/overview/#ask-for-help","title":"Ask for Help","text":"If you can't find any information in LoopDocs, GitHub Issues, Zulipchat, or Facebook...PLEASE post and ask for help. GitHub Issues list is an EXCELLENT place to post issues of unexpected Loop behavior (that you believe are errant or need improvement). However, if you are just seeking clarifications on Loop, but don't necessarily expect that there's a problem with the underlying code, then Facebook and Zulipchat are a better place. For example, Zulipchat and Facebook are great for asking about bolus strategies or exercise target use...those aren't really code issues.
When you post, provide a description along with any screenshots of the issue you are having and include the version of Loop you are running and the iOS on your device. (Tap on Loop-Settings and look at the top of the screen to get the Loop version number). You don't necessarily have to tag any particular person, the community is fairly active in replying to messages.
Post in only one place - the same volunteers monitor various sites.
"},{"location":"troubleshooting/pod-pairing/","title":"Pod Pairing Failures","text":""},{"location":"troubleshooting/pod-pairing/#pod-not-found","title":"Pod Not Found","text":"Have you seen an error message during the pairing process for a new pod? The most common message is No pods found
, as shown below. Make sure no other active pods are anywhere near the phone. Reposition the pod and the phone and if using one, the RileyLink, and then try again.
The instructions in the graphic say fill with U-100 insulin. That is the strength of your insulin, 100 U per mL of solution. The Insulet directions say to inject between 85 and 200 U of insulin. In other words, between 0.85 and 2.0 mL of fluid.
There have been a large number of fixes and improvements to reduce various pairing problems and to automatically recover from them when they do occur.
Update regularly to take advantage of improvements
Make sure you stay on top of Loop updates to take advantage of these code improvements. It is strongly recommended to update to a modern stable version (i.e., the current Loop release).
"},{"location":"troubleshooting/pod-pairing/#the-app-crashed-after-pairing-started-and-before-cannula-insertion","title":"The app crashed after pairing started and before cannula insertion","text":"Sometimes the app will crash while the pod is priming. This is rare but can happen.
When the pod is paired to a new device, the pod is using low-power mode. That's one reason why placement is important. And you can only have one pod that is not yet paired in the room. Try to get your new pod working before giving up and trying a new one.
Sometimes it is the pod, so if you do need to try a new one, move the one that did not pair far away from your phone.
Move Logically
Let's walk through the pod pairing/replacement process from the very beginning to make sure that we have all the important steps clearly identified even before you attempt to press that Pair button.
"},{"location":"troubleshooting/pod-pairing/#step-0-check-your-loop-version","title":"Step 0: Check your Loop version","text":"You can check which version of Loop you are running by pressing the gear icon (\u2699\ufe0f) in the bottom right-hand corner of the Loop home screen and then looking at the line under the header.
Upgrade Loop if version prior to v3.2.x
If you are running a version of Loop prior to v3.2.x, it is recommended to update to the current Loop release.
"},{"location":"troubleshooting/pod-pairing/#step-1-verify-the-rileylink-eros-pods-only","title":"Step 1: Verify the RileyLink (Eros Pods Only)","text":"For DASH pods, skip ahead to Deactivate old Pod.
For Eros pods, let's make sure everything is ok as far as the RileyLink goes:
Make sure old pod was deactivated. If you cannot communicate with the old pod in order to deactivate it, try the steps in Reset Loop to Pump Communications.
If you were not able to deactivate the old pod, you need to Discard the old pod. After several failures to deactivate, Loop offers to Discard the pod. This just tells Loop that the pod is no longer connected to the app.
You must still get that pod (that would not deactivate) away from your vicinity. Put it in a microwave or throw it over the fence into the neighbor's backyard (kidding, obviously...but outside trashcan is a good idea).
Eros Pods Only: If you had issues deactivating your pod, review Step 1.
"},{"location":"troubleshooting/pod-pairing/#step-3-start-new-pairing-process","title":"Step 3: Start new pairing process","text":"You've deactivated your old pod successfully...great! As the first part of pairing a new pod, Loop will prompt you to fill the new pod with insulin. Once a new pod is powered-up by the insertion of at least 85 units of insulin, the pod will emit reminder beeps every 5 or 10 minutes until the entire pod pairing process has completed. This pairing process must be completed within 60 minutes of beeps starting, or the pod will give up and never pair. These activation reminder beeps do not actually indicate that any pod communication is being attempted, just that the activation has not yet been completed and your 60 minute timer is counting down.
Max Pod fill is 200 U
If you put more than 200 U in a pod, you will probably get a pod fault during priming.
Hopefully, your pod pairing continues uneventfully at this point. You'll press the Pair
button and the pod pairs, primes, and the cannula insertion is successful. BUT, if not...you'll want to keep reading Steps 4-5 to find out how to recover.
One beeping pod at a time, please
It is very important to not have two pods giving reminder beeps at the same time as this can cause even more confusion for you and for Loop. Continue to work with a single pod at a time, retrying the Pair
attempts multiple times if needed as described in Step 4.
If you cannot get the pairing to complete with the single beeping pod (after trying the procedures described below a few times with multiple Pair
attempts during each try), then you should completely abandon that pod before attempting to use another pod. \"Completely abandon\" means move that failed-to-pair-no-matter-what-you-tried pod far, far away from you or put it in a not-turned-on-but-door-is-closed microwave. You do not want that beeping-but-not-pairing pod to be able to plague your next pod's communications with Loop during the fresh pairing process.
Pod pairing failed?
Ok, so you've pressed that Pair button and received an error message like shown at the top of the web page? It's time to start the stepwise process of seeing if we can get it to recover successfully.
"},{"location":"troubleshooting/pod-pairing/#dash","title":"DASH","text":"The DASH pod can be left in the tray and placed right next to the phone. If the first attempt to pair shows the \"No pods found\" message, place the tray on top of the phone or move the pod a little further away from the phone, then try again.
If you see the Pairing exception message as shown in the graphic below, you need to toggle Bluetooth on the phone:
Still not working, reboot the phone and try again.
If none of those steps work, it may be the pod. But try everything one more time before giving up.
"},{"location":"troubleshooting/pod-pairing/#eros-with-rileylink","title":"Eros with RileyLink","text":"The placement of the pod and the RileyLink relative to each other is a critical variable because the pod operates in a low-power radio mode during pairing which can lead to a number of potential faulty and half-paired pod situations, particularly with earlier versions of Loop.
How close should they be? Most people assume \"the closer the better\", but it has been measured that if the RileyLink and pod are too close together, the RileyLink may not be able to pick up the pairing response. The current recommendation is for the RileyLink to be placed a few inches to the side of the pod being paired.
If Pair fails, move a bit and RETRY
When you have a pod that continues to appear non-responsive after several retried Pair attempts, it may be possible to recover by forcing Loop to start the pairing process from the beginning.
This section is for Eros pods
To start we will have to press the Cancel button in the upper right corner of the pairing screen. Depending on which state the pod is stuck at in the pairing process...you'll see one of two screens after you select the Cancel button. Follow the directions (Step 5A vs Step 5B) for whichever screen corresponds to what you see after pressing Cancel.
Switch from Omnipod Pumps
\": You press Cancel
and Loop will send you back to the Pod Settings screen to do the \"Switch from Omnipod Pumps
\" methodCancel
and Loop will display a screen giving the option to \"Deactivate
\"If you press the Cancel
button and see a screen like below, you're going to select Switch from Omnipod Pumps in red. While this appears to confirm that you want to stop using the Omnipod, we will be adding pods back soon. Don't worry.
Don't fret. None of your Loop settings including the basal schedule and delivery limits, will be lost deleting the Omnipod pump. Select Delete Omnipod
to proceed which will take you back to the Loop home screen. From here, select the gear icon at the bottom right to go to the Loop \u2699\ufe0f Settings
page. Then select Add Pump
in blue and then select Omnipod
from the Add Pump
list displayed.
Verify that the green LED on the RileyLink goes on and off as you touch the switch for RileyLink you are using indicating a successful Bluetooth connection between the RileyLink and your iPhone. Leave the RileyLink enabled with its green LED and slider turned on, and then touch the Continue button on the bottom. The Pod Settings screen should have the previous Basal Rates and Delivery Limits in effect from your previous run which can be verified at this time. Once ready, select Continue
at the bottom of the screen.
Finally, you will be back to the Pod Pairing
screen.
Instead of filling a new pod with insulin, attempt to pair again using the original pod which was previously filled but unable to complete the pairing process successfully. That pod should still be occasionally giving reminder beeps. Place the RileyLink a few inches to the side of the pod and press the Pair
button at the bottom of the screen and hopefully, Loop will be able to successfully pair this time after starting from a fresh slate. If this pairing attempt is still unsuccessful, remember to still exhaust repositioning and Step 4 options before giving up on that pod. If it really won't pair after all that...then mark that loser pod with a Sharpie-drawn sad face and follow the directions in Step 3's colored box so that you don't end up with multiple beeping pods around accidentally.
If you press the Cancel button and see an option for \"Deactivate pod
\", we're going to do a little differently than Step 5A.
You might lose your pod by attempting this procedure
This is a point of no return for certain pod pairing situations and it is possible that the pod will be lost by attempting this procedure depending on the pod state. Some will recover fine, others may not. Since you can't know in advance if you might lose the pod, it is important to have already exhausted other possibilities described above in Steps 1-4 to try pairing. Specifically, (1) attempting to pair several times using varied relative positions of the RileyLink and pod (2) trying the pairing again but in a different room/location that might have less wireless interference, and (3) verifying your RileyLink is connected and functioning correctly.
For this next part, we want to make sure that the pod doesn't accidentally receive the deactivation command we are about to use. We want Loop to do the command...we just really don't want the pod to hear it. There are two ways we can keep the pod from hearing it, either (1) prevent the RileyLink from hearing Loop's command (and thus the command cannot reach the pod) or (2) prevent the pod from hearing the command from RileyLink. To accomplish our keep-the-pod-ignorant goal, you can try either option like so:
Ok. Have the pod nice and ignorant? Good. Now press the \"Deactivate Pod
\" button. It will take a few attempts, and you will see some failure messages about how the deactivation failed (of course it did...we hid the pod!) Eventually, you'll be given a \"Continue
\" button that you'll want to use.
Press the \"Continue
\" button. The instructions start with \"fill a new pod with insulin
\"...BUT DO NOT! Instead, bring that beeping pod back to the hearing range. Turn that RileyLink back on if you turned it off. Once you get the RileyLink on and the pod back in range, you'll just press the Pair button and hopefully you'll find success with the process. If this pairing attempt is still unsuccessful, remember to still exhaust repositioning and Step 4 options before giving up on that pod. If it really won't pair after all that...then mark that loser pod with a Sharpie-drawn sad face and follow the directions in Step 3's colored box so that you don't end up with multiple beeping pods around accidentally.
To help fix pairing bugs, some improvements have also been made in our ability to save the communications between the pods and Loop app during the pairing process. So, please help us leverage these new improvements and better squash bugs.
If you run into any pairing problems, which required Step 5A or Step 5B to be able to pair, or you had a pod that had to be abandoned, it would be helpful to generate an \"Issue Report\" after you finally get a pod paired (whether it was the original pod or if a different pod) and then post the resulting \"Loop Report\" on Zulipchat here with a short explanation of what happened.
"},{"location":"troubleshooting/pod-pairing/#what-about-other-pod-start-up-failures","title":"What about other pod start-up failures?","text":"If you have a pod that has already started the priming operation and then has problems either finishing the priming operation or the cannula insertion, review the app crashed after pairing started and before cannula insertion to see if you can save the pod.
If a pod begins to alarm (has a fault) during priming or cannula insertion, the pod is no good and it should be deactivated and disposed of properly.
"},{"location":"troubleshooting/pod-pairing/#what-about-that-insulin","title":"What about that insulin?","text":"If you have the misfortune of losing a pod during pairing, you can opt to not waste the insulin in that pod. Simply use the same syringe and same fill port on the pod to suck the insulin OUT of the loser pod.
If you do that, good practice is to make sure that you get that loser pod far away from the process as you go forward. Mark a big \"X\" on the failed pod and put it in a microwave, or very far away from you, so that it can't interfere with subsequent pod pairing attempts.
"},{"location":"troubleshooting/pump-errors/","title":"MDT Pump Errors","text":""},{"location":"troubleshooting/pump-errors/#medtronic-pump-errors","title":"Medtronic Pump Errors","text":"The Medtronic pumps are used and typically not under warranty. Use this section at your own risk. However, that said, some of the most common pump errors are repairable, or not actually a real problem.
"},{"location":"troubleshooting/pump-errors/#a21-error","title":"A21 error","text":"This error message is common when a pump has been stored for some time without a battery. Most pumps will show an A21 error when you first purchase them on the used market. Not a big deal. Press the down arrow (it also has the symbol of a light bulb on it) and the pump screen message will scroll down to let you know how to clear that error message (press ESC then ACT). If the message is coming up on a pump that hasn't been in storage, pull the battery out and replace it with a fresh, new battery. Chances are your battery or battery cap is old. Look for signs of dirt or rust in the battery cap, give it a little cleaning.
Display Tip
When the pump screen has a little black/white bar on the right side, that is a scroll bar. Use the arrow keys on the right of the pump screen to scroll and see the additional information.
"},{"location":"troubleshooting/pump-errors/#batt-out-limit","title":"Batt Out Limit","text":"This error message \"battery out of limits\" has to do with the internal pump battery, not the AAA battery you replace. The internal battery cannot be replaced, and unfortunately also has a finite lifespan. The error message is more of an annoyance than a true problem. You can try to change the AAA battery faster. But, the worst-case scenario is that you'll have to re-enter the time and date when you get this message more often. (Don't forget to use RileyLink to set the time after you get this message.)
"},{"location":"troubleshooting/pump-errors/#button-error","title":"Button Error","text":"The Button Error message usually happens from water, moisture, or dust getting under the pump's button pad and causing button(s) to fail. The fix luckily is quite straight-forward and takes less than 30 minutes. Check out the fix here for a YouTube video or here for photo gallery. There is also a detailed page in the OpenAPS docs.
The solution involves simply prying up the button pad's sticker face to expose the layers beneath.
You can see some evidence of crud/rust on the underside of this button pad which caused the button error.
After you finish your fix, another excellent idea is to make sure you add a length of clear packing tape across the front face of the pump to prevent errant water or dirt from having easy access to the button pad seams.
"},{"location":"troubleshooting/pump-errors/#crackmissing-piece-repairs","title":"Crack/Missing Piece Repairs","text":"Another common issue on these Medtronic pumps are cracks and/or missing bits of plastic near the battery cap or reservoir sleeve. You can repair these fairly easily. For filling small cracks, Testor's plastic cement or Gorilla epoxy are good choices.
For more extensive repairs to replace missing chunks of plastic, Gorilla epoxy or Sugru are excellent choices.
You can use teflon thread tape on the battery cap to make sure the epoxy or Sugru don't stick to the battery cap, but still recreate the threads. The first photos are of a Sugru repair and second set of photos are Gorilla epoxy repair.
"},{"location":"troubleshooting/pump-errors/#motor-error","title":"Motor error","text":"Often a motor error is the result of a poorly seated reservoir or tubing cap. If you get a motor error, the first thing you should do is detach from your infusion site. Remove and reseat the reservoir, prime again, and see if the motor error resolves. If it does not, try replacing the tubing cap on the reservoir (new tubing). If that does not resolve the motor error, also replace the entire reservoir.
"},{"location":"troubleshooting/pump-errors/#a33-error","title":"A33 error","text":"Safety warning
If you get this error, DO NOT push on the bulged-out end cap. Always detach your tubing from your infusion set before addressing this error message. If you push on the end cap in an attempt to get it back flush, you may deliver a dangerous amount of insulin mistakenly.
This error is a bit more involved to repair. The problem is that there is a loose drive support cap. Most of the time this error message will appear during a priming event as the end cap of the drive will slip, releasing the ability of the reservoir plunger to get pressure to deliver insulin. The pump senses the lack of pressure and delivers the A33 error.
The solution is to UNHOOK from your site. See the warning above. Remove the reservoir and put your finger inside the reservoir sleeve. Push on the drive so that the end cap is pushed out the most possible. This will give you the most surface area possible to place the super glue GEL that you will use. (don't use regular super glue...it must be gel.) Remove the sticker that covers the end cap, and save it for later because you can reattach it when the repair is completed.
With the end cap pushed out, take some glue gel with the toothpick and apply it on the outside of the popped-out cap. Be generous cause you can do this only once. Once you are done take a napkin and press hard the cap toward the pump so it can go back inside and keep it pressed for a few seconds. Then remove all the small parts of the napkin that has glued to the pump. Leave the pump to dry for about 10-15 minutes.
Now to test whether the pump was glued well. You have already waited about 10-15 minutes so put your finger back in and press hard the plunger. If you glued it well, the end cap will not move. If the cap goes out again, you have to glue it one more time. If all looks well, put some glue back on top of the pump cap and reattach the sticker that was removed to start.
"},{"location":"troubleshooting/pump-errors/#a32-and-e22-error-loop","title":"A32 and E22 error loop","text":"From what we know, this set of error codes seems like a pump killer. A call to Medtronic support gave this less-than-hopeful information:
A32 - failure of flash memory E22 - software re-installation is necessary
We don't have any reports of a good fix for these error codes. When seen, usually the E22 error comes up and as soon as it is cleared, the A32 error comes up. And the loop continues with a pump restart.
"},{"location":"troubleshooting/red-loop/","title":"Red Loop","text":""},{"location":"troubleshooting/red-loop/#red-loop-overview","title":"Red Loop Overview","text":"This page provides help if your Loop icon is red and Loop is not working or only working sometimes.
With Loop 3 - clicking on the Loop icon on the main screen tells you the last time Loop completed, but you need to look at the Pump Status Icon and the Glucose Status Icon for more information. For example, when Glucose is stale (more than 15 minutes old), the Glucose icon shows \"- - -\". For example, when the Pump is having a communication issue, you will see a No Signal icon.
With Loop 2.2.x - clicking on the Loop icon on the main screen provides an error message. If you understand it, great...that should help you fix the problem. If not, grab a screenshot so you can ask for help from a mentor.
Omnipod Users
Do not pull a pod when there is a red loop.
There are a few times when it is the pod - but try all the steps on this page first.
Medtronic Users
You must select Insulin Type on your pump settings screen after updating from Loop 2 to Loop 3 and completing the onboarding. Without an insulin type, closed loop will not work.
A Red Loop icon means that Loop has not completed a cycle for 15-minutes or more and this is normally because of a communication break-down with one of the systems listed below.
"},{"location":"troubleshooting/red-loop/#typical-causes-for-red-loop","title":"Typical Causes for Red Loop","text":"Some of the reasons listed below cause Loop to go Red and stay Red until you fix it. Others will cause intermittent Red Loops that come and go.
We think this was fixed with Loop 3. If you are running Loop 2.2.x or FreeAPS:
Be Careful with Phone Reboots with Loop 2 or FreeAPS
If you are using an Omnipod, then before rebooting the phone, make sure it is absolutely necessary - try all other methods first. Be prepared to check that the pod is still communicating with Loop following the reboot. If this rare event happens to you, please report it, save and post a Loop Report and be prepared to put on a new pod and possibly re-enter your CGM information.
This could happen to someone using a Medtronic pump, but the consequence is less of a concern because the pump information is not modified as frequently as for Omnipod users.
"},{"location":"troubleshooting/red-loop/#reset-loop-to-pump-communications","title":"Reset Loop-to-Pump Communications","text":"If the indication is one of these (or something similar), it can probably be fixed by resetting the Loop-to-Pump communication. For DASH, this is Bluetooth only. For Eros or Medtronic, it is a combination of Bluetooth and the RileyLink compatible device.
Unable to Reach Pump
modal screen is visibleDo these steps until one of them fixes the issue:
Eros or Medtronic: Turn your RileyLink off/on at its physical power switch located on the side of the RileyLink.
This should restore a green Loop within 5 minutes. If you're impatient and are using pods, you can tap on Play Beeps. With Medtronic, you can attempt to suspend/resume the pump. If this is successful, you've established communication again.
Last thing to try is:
"},{"location":"troubleshooting/red-loop/#power-cycle-your-phone","title":"Power cycle your phone.","text":"If this was not successful, check out the Pump is Not Responding section.
"},{"location":"troubleshooting/red-loop/#cgm-values-are-not-being-collected-by-loop","title":"CGM Values Are Not Being Collected by Loop","text":""},{"location":"troubleshooting/red-loop/#new-transmitter","title":"New Transmitter","text":"If you recently changed a transmitter, you need to also update your Loop settings to reflect the new transmitter ID. Go to the CGM section of Loop settings and Delete CGM
(it's a button on the bottom of that page). Then use the Add CGM
in Loop settings to include the new transmitter ID.
If you fail to update your Transmitter ID in Loop and you also left Share Credentials in Loop (not recommended), you will see messages such as: Failed to decode SGV
when the Share server cannot be reached. That's your notice to update the Transmitter ID (or if you think you already did - check for typos in data entry).
Finally, we see a lot of errors reported because people have problems with their Share server information in Loop app. Please delete your Share account information from within Loop settings. In other words, the credentials portion of the Share account info, as shown in the screenshot below, should say Tap to Set
and not have your account info. It is unnecessary to have this portion filled out as local, non-internet spying of a transmitter is the preferred CGM source anyways. In fact, by leaving this information out, it will help you remember to change your transmitter ID when you change transmitters because CGM data won't appear in Loop. By not including Share account in Loop, you will prevent yourself from accidentally becoming internet dependent.
Leaving this in for historical interest only. It illustrates the need to keep Loop up-to-date. Who knows what the next hardware change will be. Enough time has passed that everyone's Loop code should be newer.
In July 2019, we started to see a new style of Dexcom G6 transmitters on the market. These new transmitters required a rework of some of the Loop's code to continue to \"spy\" on the transmitter. Without that update, your Loop can not get CGM data unless it is pulling from Share servers (which is not a recommended mode of operation). So, download fresh code for your Loop app if you have a new transmitter type and haven't downloaded since July 2019.
"},{"location":"troubleshooting/red-loop/#apple-health","title":"Apple Health","text":"Make sure both the Loop app and the Dexcom app have permission to write to Apple Health by checking the Apple Health Permissions
In the early days of iOS 14, there were problems with the Apple HealthKit. The consequence is that some people's database was corrupted. If you tap on the Heart Icon on your phone to go to Apple Health and display data and it is very slow to respond - or never responds, you probably need to get rid of a corrupted database and start fresh. Be sure to go Open Loop if this is needed. Please get help from your favorite Loop Social Media group or from Apple support in this case.
"},{"location":"troubleshooting/red-loop/#background-app-refresh","title":"Background App Refresh","text":"If you have not enabled background app refresh on your phone, then Loop is likely to stop communicating as soon as the phone is locked.
For iOS 15, there is a new feature described by Dexcom
If you added your Nightscout URL to Loop and are uploading information to Nightscout, make sure the communication is working properly. For short-term interruptions, Loop will store information to upload to Nightscout later. But if too much information builds up, Loop can slow down and in some cases have a Red Loop.
If you opted for the free DIY Nightscout, you will need to clean your database once or twice a year. Follow the Nightscout Database cleanup steps. Make sure you are periodically checking your database size (and that the dbsize keyword is in your ENABLE list and cleaning it.
"},{"location":"troubleshooting/red-loop/#phone-storage-is-full","title":"Phone Storage is Full","text":"This was reported by a user in November 2021. His phone storage was almost full and the reported error messages for Loop was:
Sqlite Error: A Sqlite Error Occurred: (13) Database or Disk is Full
The error message from Dexcom was not as helpful. If you see this, check your phone storage:
The Dexcom G6 app has stopped working. Please delete the app from your device and redownload it from the App Store
Solution: clear up space on your phone.
"},{"location":"troubleshooting/red-loop/#other-reasons-for-red-loop","title":"Other Reasons for Red Loop","text":""},{"location":"troubleshooting/red-loop/#pump-is-not-responding","title":"Pump is Not Responding","text":"The first step is to make sure the phone and if needed, the RileyLink compatible device, is not so far away from the pump or pod that they cannot communicate. Assuming you've addressed this, then you can move on to other steps.
Omnipod Loopers:
If the pod is screaming, it should still be able to communicate with Loop, but sometimes you need to restore communication so you can deactivate the pod and quiet it. Follow the steps below, just do it with the added \"noise\".
The Reset Loop-to-Pump Communications steps almost always fix the issue. It is possible that the pod really had stopped communicating, but try everything else before burning another pod.
Medtronic Loopers: If the pump is not responding with \"decoding\" errors or various other messages about pump responses. Try the following:
Change Time
command in the pump menu to update the pump's clock. If you've accidentally changed the pump's time in the pump itself or if the pump time has drifted, this will get the Loop app and pump time back in sync.Here's some things to check if you have frequent red loops:
Try deleting your Nightscout account from Loop settings and see if your Loop stops having red loops. If it does, then you'll need to assess what's going wrong in your Nightscout site and fix it. Most of the time, your database is getting too big and cleanup is required.
Is your RileyLink battery plugged in all the way on the board? One Looper recently posted that her RileyLink battery connection needed to be reseated after several years of service.
Has your RL been fully charged? Try charging your RL for an hour or two, make sure the red light comes on while charging. Try a new charger or cable.
Oddly, some people have found that turning off Siri integrations for Loop and Dexcom apps in your iPhone settings has helped. This may be coincidental, but if you're still having trouble, you might want to try it.
Check for sources of wireless interference. If you have a certain environment that seems to have more drops than others, it is likely that there is a source of wireless communication interfering with your Loop. Lots of Medtronic Loopers in a room together will often interfere with each other and get \"cross-talk\" red loop error messages. If it is a bedroom at night causing problems, try moving other wireless devices such as routers or baby monitors farther away from where you and your RileyLink compatible device.
In some cases, you may need to clean out Apple Health, or even reset your phone to factory defaults and reload all your personal information and then rebuild the Loop app. Before you do this, you may want to Post for Help (next section).
Before you post on Looped group for help with a red loop, please make sure you've reset the RileyLink / Phone.
Before you post for help, please also check your Nightscout status including database size. This step is often overlooked and yet solves a lot of problems.
When posting for help, include two screenshots of Loop's main screen; one with the red loop's error message and the other just the plain Loop main screen. Include a detailed description of what you have tried doing from the troubleshooting list above. For example, state if you've double checked the transmitter ID, deleted the Share account info from Loop settings so that we can rule out some of the causes of CGM issues.
"},{"location":"troubleshooting/red-loop/#what-else","title":"What Else?","text":"There are a few other things to consider:
How can you tell if your RileyLink has a problem? The answer is mostly within the LED lights that display on the board. Some information is listed below, but also review the FAQs at getrileylink.org.
If you have a different RileyLink compatible device, please check the appropriate site for troubleshooting help.
Red light: comes on during charging and will turn off/on periodically, while still plugged in, after charge is complete.
Green light: Indicates an active BT connection with the phone. You want the green light to stay on all the time on the RileyLink. If the green light is not on, then make sure your iPhone's bluetooth is still switched on.
Blue light: The blue light will flash off/on periodically when the RileyLink and pump are actively communicating...it should NOT be always on. If your blue light is stuck on, that is an indication of a problem on the board. Try looking for signs of damage or debris that may be causing a short on the board. Clean the board with rubbing alcohol (unplug the battery first). If you still can't get the blue light off, then contact GetRileyLink for help or check out RileyLink Compatible Devices for replacement options.
"},{"location":"troubleshooting/red-loop/#battery-has-failed","title":"Battery has Failed","text":"Both RileyLink and EmaLink use LiPo batteries. If they stop holding charge for as long as they used to, or if they swell (often first noticed as bowing of the case), stop using the battery and replace it as soon as possible.
OrangeLink uses regular batteries, so just change them out.
"},{"location":"troubleshooting/red-loop/#orangelink-firmware","title":"OrangeLink Firmware","text":"One version of the OrangeLine firmware did not communicate well with Loop (or Android APS).
If you have FW 2.6 on your OrangeLink or OrangeLink Pro, please upgrade to FW 3.2 as soon as possible.
"},{"location":"version/build-dev/","title":"Build Dev","text":""},{"location":"version/build-dev/#building-development-code","title":"Building Development Code","text":"No matter the method used to build Loop-dev: GitHub actions or git commands, you are testing development code. Please read this link now before continuing.
dev branch
There are several methods to build Loop-dev. First review the general information on this page then choose the link for the method of your choice:
"},{"location":"version/build-dev/#update-frequently","title":"Update Frequently","text":"While Loop-dev is under active development, you should monitor zulipchat and update frequently. Sometimes the dev
branch is quiet for a month or more and other times it gets updated daily. Please pay attention.
Checking for updates every week is a good idea. Also - subscribe to all the streams on Loop Zulipchat to make sure you don't miss critical information.
"},{"location":"version/build-dev/#loop-dev-version","title":"Loop-dev Version","text":"The version of code that shows up under the Loop Settings screen does not change when the dev branch
is modified.
If you need help with your app, the mentors need more information. Please issue a Loop Report when asking for help. Refer to Support for how to issue a Loop Report. If you want to keep track yourself, refer to Identify Loop-dev Version
Loop
Version NumberingThe version of code that shows up under the Loop Settings screen will remain fixed until Loop-dev is released. In order to identify which version of dev you have on your phone, you need the commit.
The commit is identified by a 7-digit alphanumeric code. That code was also appended to the folder name of the downloaded code under Downloads/BuildLoop as shown in the graphic above. You can use finder to view the folder name after the script completes. It also appears in the Loop Report, refer to Support for instructions on issuing a Loop Report. After you issue the Loop Report, look at the workspaceGitRevision number near the beginning of the report.
"},{"location":"version/build-dev/#build-loop-dev","title":"BuildLoop
dev
","text":"Build-time features are not available with Loop 2.2.x.
With Loop 3, some features are enabled or disabled by default but can be modified by adding a \"flag\" in the LoopConfigOverride.xcconfig file.
If you use Build with Browser, these build-time features can be added to your copy of the LoopConfigOverride.xcconfig file. Use the pencil icon in that file on your copy of LoopWorkspace and then commit the change.
If you use the Build with Mac Method, this is the same file used to automatically sign all your targets. You can edit the version in your LoopWorkspace folder (it shows up as the top item in the Xcode folder view) - or - if you use the build script, you can edit the copy found in ~/Downloads/BuildLoop after the first time you use the script. For that second case, the \"flags\" you add in ~/Downloads/BuildLoop/LoopConfigOverride.xcconfig are applied to all downloads created with the script.
These flags are always upper case with underscore separating words for clarity, for example MY_EXAMPLE_FLAG
. If you have more than one flag, they are separated by a space. Do not enter a line break between selections; in other words, do not hit return or enter. Xcode will automatically word-wrap the line for clarity. All values need to be on a single line.
New Instructions
The instructions are more robust than earlier instructions that had you editing a line instead of adding new ones.
Copy the text below, add it to the end of your LoopConfigOverride.xcconfig file and then insert the desired flags in place of MY_EXAMPLE_FLAG
. If you want more than one flag, separate them by a space.
// Add Build-Time features to compilation conditions\nSWIFT_ACTIVE_COMPILATION_CONDITIONS = $(SWIFT_ACTIVE_COMPILATION_CONDITIONS) MY_EXAMPLE_FLAG\n
Code Before Modification
// Put your team id here for signing\n//LOOP_DEVELOPMENT_TEAM = UY678SP37Q\n
The example below is for someone who is using a Free Developer ID - which does not support Siri.
Code After Modification
// Put your team id here for signing\n//LOOP_DEVELOPMENT_TEAM = UY678SP37Q\n\n// Add Build-Time features to compilation conditions\nSWIFT_ACTIVE_COMPILATION_CONDITIONS = $(SWIFT_ACTIVE_COMPILATION_CONDITIONS) SIRI_DISABLED\n
List of some flags and what they do:
FLAG PURPOSE SIRI_DISABLED Required to build Loop from Xcode with a free developer account ADULT_CHILD_INSULIN_MODEL_SELECTION_ENABLED The choice for Child Model is enabled in Therapy Settings. Please read Enable Child Model. REMOTE_OVERRIDES_DISABLED Remote commands: override, carbs or boluses will not be accepted even if all the Remote Command requirements are configuredIf you do configure this and later try to set up remote commands, they will not work and there is no error message. Remote Errors: Loop REMOTE_OVERRIDES_DISABLED OBSERVE_HEALTH_KIT_CARB_SAMPLES_FROM_OTHER_APPS_ENABLED Turns on ability for Loop to read third party carb entries. You must also make sure Health permissions allow Loop to read carbs from Health. Be vigilant if you select this; added carbs lead to added insulin dosing when closed loop is enabled SHOW_EVENTUAL_BLOOD_GLUCOSE_ON_WATCH_DISABLED The Apple Watch screens show current glucose, trend arrow and eventual glucose by default. This flag disables the display of eventual glucose on the watch if you find the display distracting. PREDICTED_GLUCOSE_CHART_CLAMP_ENABLED Chart Clamp ALLOW_ALGORITHM_EXPERIMENTS dev branch onlyThis is enabled by default to show Algorithm Experiments below the Therapy Settings row. This enables the user to separately enable or disable Glucose Based Partial Application and Integral Retrospective Correction"},{"location":"version/build-time-flag/#chart-clamp","title":"Chart Clamp","text":"What the heck is a chart clamp? It means the range displayed will not be smaller than the clamp but it can be bigger.
Loop automatically scales the glucose charts based on the history shown. Some people don't like to see the vertical axis changing, so they turn on the \"clamp\".
When the PREDICTED_GLUCOSE_CHART_CLAMP_ENABLED
build time flag is added:
glucoseChartDefaultDisplayBoundClamped
When you do not add that build time flag:
glucoseChartDefaultDisplayBound
If glucose within the display history is outside of the bound, the graph range expands to include that glucose level. This prevents glucose readings from being \"hidden\".
You can customize chart display settings if you want. The original lines of code are shown below. You will need to read the rest of this page to figure out how to modify these to meet what you prefer. If you can't figure this out - reach out for help.
// MARK - Display settings\n\n static let minimumChartWidthPerHour: CGFloat = 50\n\n static let statusChartMinimumHistoryDisplay: TimeInterval = .hours(1)\n\n static let glucoseChartDefaultDisplayBound =\n HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 100)...HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 175)\n\n static let glucoseChartDefaultDisplayRangeWide =\n HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 60)...HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 200)\n\n static let glucoseChartDefaultDisplayBoundClamped =\n HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 80)...HKQuantity(unit: .milligramsPerDeciliter, doubleValue: 240)\n
"},{"location":"version/build-time-flag/#enable-child-model","title":"Enable Child Model","text":"Loop 3, by default, does not include the concept of child versus adult for rapid-acting insulin, i.e., Humalog, Novalog and Apidra.
For new Loopers, please build the code before you make any changes. Start with Open Loop and familiarize yourself with the interface. Later, you can make the customization(s) you desire and build again. The second build will be much easier than your first build.
These customizations require you modify the Loop app code and then build the app after making these customizations. This page supports version 3 and greater for the Loop app.
"},{"location":"version/code-custom-edits/#customization-options","title":"Customization Options","text":"Read about the customizations on this page before applying them.
You take responsibility
You are responsible when you decide to use customizations.
Be sure to report what changes you made if you need to ask for assistance with your app.
Some customizations are the same for everyone and have been prepared for easy use. Refer to the build method that you use for information about applying these prepared changes - the same set is available for both build methods.
Other customizations require that you create your own personalized version.
LoopConfigOverride.xcconfig
file.The instructions on this page identify the module, Key_Phrase
or file and line numbers required to locate the code you need to modify.
Why do I have to jump between pages?
Line numbers may change
Every effort will be made to update the line numbers as the code is updated, but there may be times where the screenshots and line numbers differ from the current version of Loop code.
You may notice some customizations list line numbers for different branches
If you cannot identify a line that looks exactly like the example - do not guess - go to your favorite social media group and ask for help
Sometimes there is a bigger change than just line numbers. The git software is really good about finding the \"right\" code that is just at a different line number. When you see the notation Stable: Changed on date
, that means you must select the correct version when making your personal customization depending on which version you are modifying.
This page is broken into two halves:
Custom Edits Required:
Custom Edits Optional:
For each customization, you will be given landmarks to find the correct location in the code. You can choose to search using the Key_Phrase
or navigate to the file in the folder structure and look for the line number.
use the copy button at right, paste into search\nThe copy button for this exampe is just for practice\nDo not paste the result anywhere\n
To search using the Key_Phrase
(see graphic above for an example):
Key_Phrase
; click on it to copy the phrase into your paste bufferStability Information Added
If a customization needs to be modified to work with the dev
branch, that will be noted. This means a change that is more than a line number. Instead it is a change that requires a new customization.
For those using the Browser Build method for main
branch, this means you will need to use Create branch
if needed to create a special branch to prepare a new version of this customization. If you already created a personal customization earlier (before the date noted), you can keep using that customization with main
.
For your convenience, see Not Stable List.
Each customization provides the Module, Folder and File bullet below the key phrase.
The customizations below show the original line of code that you will be changing.
There may be a figure illustrating the change.
Below the figure, the original, and in some cases, the modified code will be displayed as text.
This list indicates personalized customization that differ between main
and dev
Loop\u2019s default carb absorption times are based on the high, medium, and low glycemic index absorption curves presented in Think Like A Pancreas by Gary Scheiner. In prior versions of the Loop app, for example version 2.2.x, the lollipop (fast) icon was set for 2 hours, taco (medium) icon for 3 hours, and pizza (slow) icon for 4 hours. This is modified for Loop 3
to 30 minutes, 3 hours and 5 hours respectively. Some people prefer different values.
The developers did this because they expect fast to only be used for rapid-acting low treatments. The medium and fast values are for moderate and higher-fat or large meals.
Key_PhrasedefaultCarbAbsorptionTimes: CarbStore.DefaultAbsorptionTimes\n
For example, if you wanted to change fast
to be slightly longer, the edit would be as follows:
_Code Before Modification
public static let defaultCarbAbsorptionTimes: CarbStore.DefaultAbsorptionTimes = (fast: .minutes(30), medium: .hours(3), slow: .hours(5))\n
_Code After Modification
public static let defaultCarbAbsorptionTimes: CarbStore.DefaultAbsorptionTimes = (fast: .hours(1.5), medium: .hours(3), slow: .hours(5))\n
Note that if you change fast
from 30 minutes to 1.5 hours, you must also change the indication before the parentheses.
With version 3.2.0, a new safety feature was added. This limits automatic dosing so IOB is no more than two times the \\(\\mathit{maximumBolus}\\) set in your Delivery Limits. (The term automatic dosing refers to insulin the app automatically delivers above your scheduled basal rate.) Manual Bolus, where you initiate the bolus yourself, is not subject to this limit. Please read How do Delivery Limits Affect Automatic Dosing? for detailed information on how this safety feature works.
The default value (\\(\\mathit{2*maximumBolus}\\)) used for this feature is good for the majority of people who use the app. However, there are some individuals who might need to limit the size of any single bolus independent from the maximum IOB they want to set for their app. This is particularly true for those who find large boluses give rise to tunneling and the insulin leaks out along the cannula.
Key_PhraseautomaticDosingIOBLimit = maxBolus\n
The following example is for someone who limits a single bolus to 5 U but frequently needs to achieve an IOB of 15 U for meals. They want that level of IOB to be reached with automatic bolusing. In that case, they may want to modify the factor used to calculate \\(\\mathit{automaticDosingIOBLimit}\\).
Original Code:
let automaticDosingIOBLimit = maxBolus! * 2.0\n
Modified Code Example:
let automaticDosingIOBLimit = maxBolus! * 3.0\n
Because the automatic bolus amount is also limited by the partial application factor, it still takes a few cycles to reach the higher IOB of \\(\\mathit{3*maximumBolus}\\); but they can get there without manual intervention.
"},{"location":"version/code-custom-edits/#adjust-percent-bolus-for-automatic-bolus","title":"Adjust Percent Bolus for Automatic Bolus","text":"If you are mostly happy with the Dosing Strategy of Automatic Bolus but wish it delivered more or less insulin during every Loop interval, then this customization is for you.
This customization changes the percent of the recommended bolus used for automatic delivery. The method for calculating that recommendation is not changed by this modification. The default value is 40% (0.4). It is recommended you take small changes of 0.1 at a time. Once you modify it once and try it out for a while, it\u2019s easy to go back and change it again.
Change just the number and double check that the value is less than 1.
Key_Phraselet bolusPartialApplicationFactor\n
Code Before Modification
static let bolusPartialApplicationFactor = 0.4\n
Code After Modification to 50% of recommended insulin
static let bolusPartialApplicationFactor = 0.5\n
Do not exceed 1.0
This number should never be bigger than 1 (you\u2019d be getting more than Loop recommends). If you think you need more than 1, consider your settings and meal entries.
"},{"location":"version/code-custom-edits/#pods-add-extra-insulin-on-insertion","title":"Pods: Add Extra Insulin on Insertion","text":"The default value is 0.0 U of extra insulin. If you use this customization, start with a small number and work your way up. If you are coming from manual podding and routinely gave yourself an extra bolus with your PDM at pod change time, you may not need nearly as much with Loop - be conservative.
Note that Loop does not include the amount of insulin in the prime or insertion steps in your IOB. The pod reports every pulse that it delivers to Loop. If you look in the Pod Settings insulin delivered row, that is the total delivered by the pod minus the (prime plus insertion) amounts. The only way to know that you successfully made this change is to count the clicks. Normal insertion is 0.5 U (0.5 U / 0.05 U per click = 10 clicks). So if you add 0.35 U to the \"extra\" value, you should get 0.35 / 0.05 = 7 extra clicks. In other words, 17 total clicks after you press insert.
This code change is found in one location for Eros Pods (called Omnipod throughout the app) and DASH Pods (called Omnipod Dash throughout the app). I tend to change both files, but if you're only using one kind of pod, that is really not necessary.
Key_Phraselet cannulaInsertionUnitsExtra\n
Code Before Modification
public static let cannulaInsertionUnitsExtra = 0.0 // edit to add a fixed additional amount of insulin during cannula insertion\n
Code After Modification to add 0.35 U
public static let cannulaInsertionUnitsExtra = 0.35 // edit to add a fixed additional amount of insulin during cannula insertion\n
"},{"location":"version/code-custom-edits/#modify-the-guardrails","title":"Modify the Guardrails","text":"The Therapy Setting Guardrails are for Loop 3 only.
"},{"location":"version/code-custom-edits/#glucose-guardrails","title":"Glucose Guardrails","text":"If you build Loop 3 over a version of Loop 2.2.x or FreeAPS where the Correction Range is lower than the default value of 87 mg/dL (4.8 mmol/L), your app requires you to satisfy the new guardrail before you can save that Therapy Setting when you onboard.
Key_PhraseGuardrail(absoluteBounds:\n
Code Before Modification
static let suspendThreshold = Guardrail(absoluteBounds: 67...110, recommendedBounds: 74...80, unit: .milligramsPerDeciliter, startingSuggestion: 80)\n
and
static let correctionRange = Guardrail(absoluteBounds: 87...180, recommendedBounds: 100...115, unit: .milligramsPerDeciliter, startingSuggestion: 100)\n
Modify the absoluteBounds to change the allowed ranges or the recommendedBounds to change the color of the numbers on the picker wheel.
Loop automatically converts from mg/dL to mmol/L. So you must enter values reasonable for mg/dL (18 times higher than for mmol/L).
"},{"location":"version/code-custom-edits/#version-after-update","title":"Version after Update","text":"This update, merged into dev
on 2024 Feb 19 was part of a larger fix to a problem when glucose units were mmol/L. The user could not select two values (min and max) that were the same and equal to the reported absolute range. This was a rounding problem going between mmol/L and mg/dL that has now been resolved. Part of the resolution was to modify the mg/dL absolute ranges to preserve the previously reported mmol/L absolute ranges.
Code Before Modification
static let suspendThreshold = Guardrail(absoluteBounds: (66.1)...(110.9), recommendedBounds: (73.1)...(80.9), unit: .milligramsPerDeciliter, startingSuggestion: 80)\n
and
static let correctionRange = Guardrail(absoluteBounds: (86.1)...(180.5), recommendedBounds: (99.1)...(115.9), unit: .milligramsPerDeciliter, startingSuggestion: 100)\n
Modify the absoluteBounds to change the allowed ranges or the recommendedBounds to change the color of the numbers on the picker wheel.
Loop automatically converts from mg/dL to mmol/L. So you must enter values reasonable for mg/dL (18 times higher than for mmol/L).
"},{"location":"version/code-custom-edits/#modify-guardrails-for-insulin-sensitivity-factor-isf","title":"Modify Guardrails for Insulin Sensitivity Factor (ISF)","text":"Similar to the instructions for glucose guardrails above, but use this Key_Phrase
and modify the absoluteBounds row, next line.
static let insulinSensitivity = Guardrail(\n
Similar to the instructions for glucose guardrails above, but use this Key_Phrase
and modify the absoluteBounds row, next line.
static let carbRatio = Guardrail(\n
Loop 3 limits to 1 hours the amount of time in the future that carbs can be entered.
The customization varies depending on whether you are building dev
or main
.
The main
branch:
The dev
branch:
The changes required for this customization have changed several time for dev
. The code provided in Version after Update is for the latest dev
code, as of 2023 Aug 20.
cell.datePicker.maximumDate = date.addingTimeInterval\n
Default shown below (for maximum and minimum):
Code Before Modification
cell.datePicker.maximumDate = date.addingTimeInterval(.hours(1))\ncell.datePicker.minimumDate = date.addingTimeInterval(.hours(-12))\n
Change the maximumDate to the number of hours in the future you desire. Remember that Loop may increase insulin dosing for future carbs - make sure that they actually arrive.
The minimumDate is how far back in the past you can modify time. The default is 12 hours in the past.
"},{"location":"version/code-custom-edits/#version-after-update_1","title":"Version after Update","text":"Key_Phrasestatic let maxCarbEntryFutureTime\n
Default shown below:
Code Before Modification
static let maxCarbEntryFutureTime = TimeInterval(hours: 1)\n
Change the maxCarbEntryFutureTime to the number of hours in the future you desire. Remember that Loop may increase insulin dosing for future carbs - make sure that they actually arrive.
"},{"location":"version/code-custom-edits/#adjust-the-watch-crown-sensitivity","title":"Adjust the Watch Crown Sensitivity","text":"The rate of change of the carb and bolus entry pickers when using the digital crown can be altered as can the rotation required to confirm a bolus on the watch. If you are running an older series watch - you may want to make these customizations. When I switched from Series 3 to Series 7 watch - it was amazing. I got a graph on the main watch screen I didn't even know existed and the bolus acceptance was a breeze!
These are new instructions and the user should take care - and please report back if you have problems.
First - try it with no customization. Then make small changes.
This key phrase will indicate three different files in the same folder as shown in the graphic below - you can adjust each in turn as you desire. When you click on the line, the quantity you change is a few lines below where you find the Key_Phrase
, except for the CarbAndDateInput file.
.digitalCrownRotation\n
scalingRotationBy
is 4rotationsPerIncrement
is 1/24rotationsPerIncrement
is 1/24An expiration notification feature has been added to Loop. You get a notification when you open the Loop app to alert you that the expiration is approaching.
If you prefer a different notification time and frequency, there are two lines you can modify:
expirationAlertWindow: TimeInterval\n
Key_Phrase minimumTimeBetweenAlerts: TimeInterval\n
Default code for line 16:
static let expirationAlertWindow: TimeInterval = .days(20)\n
Example modifications to First Notification:
.days(20)
to .days(30)
.days(20)
to .hours(12)
Default code for line 28:
let minimumTimeBetweenAlerts: TimeInterval = timeUntilExpiration > .hours(24) ? .days(2) : .hours(1)\n
Modify Frequency of Repeated Notifications (Three Values):
> .hours(24) ? .days(2) : .hours(1)
> Time_A ? Frequency_A : Frequency_B
, means:You can enter Time or Frequency as .days(value)
, .hours(value)
or .minutes(value)
.
Free App Users:
An example change that a Free Loop App user (who has to build once a week) might choose is:
> .hours(4) ? .days(10) : .hours(2)\n
Combined with an .hours(12)
on line 16, they would get notified at 12 hours, 4 hours and 2 hours before expiration on the day of expiration and only when the app is opened. Since you'll be building once a week, you can play around with these values until you are happy."},{"location":"version/code-custom-edits/#enable-child-model","title":"Enable Child Model","text":"Please see the Build-Time Flag page for this customization.
"},{"location":"version/code-custom-edits/#insulin-model-customization","title":"Insulin Model Customization","text":"Each exponential model has 3 parameters that can be adjusted:
Please read the nitty-gritty discussion that went into the development of the \"exponential insulin models\" in this Comment.
If you wish to customize these values, please make sure you know what you are doing. This is not a modification recommended for Loop novices.
Key_PhraseMARK: - Model generation\n
This Loop 3 table of default values is provided for convenience. The times are all in minutes.
Model DIA Peak Delay rapidActingAdult 360 75 10 rapidActingChild 360 65 10 fiasp 360 55 10 lyumjev 360 55 10 afrezza 300 29 10"},{"location":"version/code-custom-edits/#loop-logo","title":"Loop Logo","text":"Mac Instructions
This can be done with Build with Browser but the instructions might need to be adjusted for that case.
If you want an app logo other than the default green circle for your Loop app, you can easily customize this. To make it easy to generate the correct sizes of icons, you can use a site like appicon.build or appicon.co and just drag and drop your source image. The source image needs to be 1024 pixels x 1024 pixels. The site will email you a zip file or automatically download a set of files. Highlight and copy the contents of the Appicon.appiconset that you are sent, including the Contents.json file
You may see a yellow warning that there are \u201cunassigned children\u201d depending on the images the app icon generator tool produced. The unassigned children alert will not prevent your app from building, it\u2019s simply because there are more sizes of images than Loop app uses. You can just leave the unassigned children alone (wow...how often do you get to say that phrase?).
And now you'll be the proud new owner of a custom Loop icon.
"},{"location":"version/code-custom-edits/#custom-edits-optional","title":"Custom Edits Optional","text":""},{"location":"version/code-custom-edits/#disable-authentication-for-bolusing","title":"Disable Authentication for Bolusing","text":"Depending on your iPhone Settings and model, you may have Face ID or Touch ID enabled. Those security features will also be used to authenticate bolus delivery in Loop. You can choose to disable authentication (i.e., not require Face ID, Touch ID, or passcode for bolusing) through the following code customization.
Safety Measure
If you disable this, you are removing an important safety feature.
In addition to authenticating every manual bolus, this helps to protect against sleep bolusing and pocket bolusing.
For Loop 3, this controls the authorization requirement to modify Therapy Settings as well as to confirm bolus delivery.
Key_PhrasecanEvaluatePolicy(.deviceOwnerAuthentication\n
Code Before Modification
if context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) {\n
Code After Modification
if false && context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) {\n
"},{"location":"version/code-custom-edits/#modify-override-insulin-needs-picker","title":"Modify Override Insulin Needs Picker","text":"Some people want finer settings on the override insulin needs picker (5% instead of 10%) and may want to limit the overall range for overrides \u2013 especially for children.
1% Settings Available without Customization
With the advent of Loop 3, the Override Insulin Needs values are not limited by the default picker values of 10%.
Any override more than a factor of 2 from 100% can cause Loop predictions to be wrong \u2013 especially if a carb count is entered. (An override is NOT the same as a manual temp basal - it changes insulin sensitivity factor and carb ratio in addition to the basal rate needed for zero change in IOB for the duration of the override.)
A Sensitivity of 0% is NOT Valid
Do not set the lower level of the sensitivity range to be 0%.
If you configure to allow that and someone chooses it, they will be telling Loop to divide by zero in some of the calculations. They will see NaN (not a number) in Loop predictions until that override is removed and will continue to see that for the full duration of insulin action (6 hours).
This example customization changes the lower bound for sensitivity to 50% (factor of 2 smaller than 100%) and provides 5% steps. This is the same as the prepared customization offered by the Loop and Learn team.
Key_Phraselet allScaleFactorPercentages\n
Code Before Modification
private let allScaleFactorPercentages = Array(stride(from: 10, through: 200, by: 10))\n
Code After Modification to 50% to 200% by steps of 5%
private let allScaleFactorPercentages = Array(stride(from: 50, through: 200, by: 5))\n
"},{"location":"version/code-custom-edits/#modify-maximum-and-warning-carb-entry","title":"Modify Maximum and Warning Carb Entry","text":"Version 3.x of the Loop app has both a maxCarbEntryQuantity
and a warningCarbEntryQuantity
, found adjacent to each other in the code. The warning value is the level at which you are asked if you really meant to enter that amount:
let maxCarbEntryQuantity =\n
Code Before Modification
static let maxCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 250) // cannot exceed this value\n\nstatic let warningCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 99) // user is warned above this value\n
"},{"location":"version/code-custom-edits/#low_carb_limit","title":"\"low_carb_limit\"
","text":"This first example might be used by a parent for a child with very small carb entries. It is provided as one of the prepared customizations supplied by the Loop and Learn Customization as \"low_carb_limit
\".
Code After Modification to enable the warning at lower levels and limit maximum
static let maxCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 99) // cannot exceed this value\n\nstatic let warningCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 49) // user is warned above this value\n
"},{"location":"version/code-custom-edits/#high_carb_limit","title":"\"high_carb_limit\"
","text":"This second example might be used by a person who routinely enters large meals and does not want to be warned with every meal. It is provided as one of the prepared customizations supplied by the Loop and Learn Customization as \"high_carb_limit
\".
Code After Modification to warn if entry is between 201 and 300g
static let maxCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 300) // cannot exceed this value\n\nstatic let warningCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 200) // user is warned above this value\n
"},{"location":"version/development/","title":"Loop Development","text":""},{"location":"version/development/#overview","title":"Overview","text":"The early history of the Loop app was touched on in the introductory LoopDocs Overview: Development History section.
The Loop Releases page lists releases since version 2.0 in reverse chronological order.
The next version of the Loop app is developed using branch(es), independent of the released Loop version, which is found in the main
branch. The dev
branch is used by the developers to push out changes for users to test. You should only test a development branch if you are willing to be both an active participant with the developers to monitor announcements and provide feedback and to build frequently to obtain the latest feature or bug-fix that is being tested. If you are willing to help out - this is the way the next release of Loop is improved.
If you choose to use dev
, you accept that this code is not released.
Please read this entire page before using any version of Loop other than the released code.
"},{"location":"version/development/#updates-in-dev","title":"Updates in dev","text":"This section is an early look at what has been added to dev
since Loop 3.2.x\u00a0and will probably be in the next release. After the release, some of the content and graphics in this section will move to the Releases page or the appropriate documentation section.
Libre
Sensors","text":"LibreTransmitter support was merged into the dev
branch in July 2023.
If you are using the GitHub / Browser Build method, please review:
The simulators for the Pump and CGM, for the dev
branch show a new format when first selected. The initial view is a demonstration screen showing a typical CGM or Pump display. In order to view behind the scenes, modify settings, and delete the simulator, you must press and hold (long-press) on the top of the display. Anywhere in the top third works for the long-press, but I like to touch the card as shown in the pump example below. If you've counted to 10 and the display has not updated yet, then return to the main screen, go back to the simulator screen, and try again.
Two algorithm experiments have been added to dev
. These are \u00a0Glucose Based Partial Application\u00a0 and \u00a0Integral Retrospective Correction. They can be viewed on the Loop Settings screen just below Therapy Settings and Usage Data Sharing as shown in the graphic below:
GBPA
):","text":"Automatic Bolus
(AB) is selected for Dosing Strategy
When AB
is selected and GBPA
is enabled, the percentage of the recommended dose delivered per cycle of \u00a0Loop\u00a0 ranges from 20% to 80% based on glucose level and user-selected correction range. (Without GBPA
enabled, AB
uses a fixed 40% percentage regardless of glucose level.)
Partial Application
= 20% when glucose is at or below the users correction range lower value (including overrides) plus 10 mg/dL (0.6 mmol/L)Partial Application
increases linearly from 20% to 80% up to a glucose level of 200 mg/dL (11.1 mmol/L)Partial Application
is 80% when the glucose level is above 200 mg/dL (11.1 mmol/L)GBPA
","text":"Loop makes a prediction and recommends an insulin dose based on your settings and your glucose, insulin and carb history. The selected Dosing Strategy
(Automatic Bolus
with or without GBPA
or Temp Basal Only
) only changes how quickly that recommended dose is delivered.
This example assumes Loop recommends 1 U (at time 0) and future glucose values match Loop's prediction for each successive 5-minute update. In other words, over half an hour, Loop provides about 1 U of insulin above that delivered by the scheduled basal rate.
The tables below show Automatic Bolus
patterns, using a pump minimum bolus increment of 0.05 U, for several application factors. When using GBPA
, the application factor can vary with glucose, but that is ignored for this simplified example.
The first table shows the bolus delivered each Loop cycle for several application factors. Higher application factors start with higher boluses, but go to zero (indicated by a dash) more quickly.
Incremental Dose for several application factors when initial recommendation is 1 U
Minutes 20% 40% 60% 80% 0 0.20 0.40 0.60 0.80 5 0.15 0.25 0.25 0.15 10 0.15 0.15 0.10 0.05 15 0.10 0.10 0.05 - 20 0.10 0.05 - - 25 0.05 - - - 30 0.05 - - -The second table shows the cumulative delivery. A dash shows recommended dose was delivered. Remember, this is a simplified example.
Cumulative Dose for several application factors when initial recommendation is 1 U
Minutes 20% 40% 60% 80% 0 0.20 0.40 0.60 0.80 5 0.35 0.65 0.85 0.95 10 0.50 0.80 0.95 1.00 15 0.60 0.90 1.00 - 20 0.70 0.95 - - 25 0.75 0.95 - - 30 0.80 0.95 - -The 20% and 40% application factor columns did not reach 1 U in 30 minutes because the requested dose is smaller than this pump will deliver. The 60% application factor only reached 1 U because tiny doses down to 0.03 U were rounded up to 0.05 U.
The Temp Basal Only
Dosing Strategy
provides about 17% of the recommended bolus each 5-minute interval. The minimum GBPA
application factor of 20% was selected to be similar to that rate for lower glucose values. Initially, an application factor of 20% delivers insulin more quickly than Temp Basal Only
, but by the end of 30 minutes, the basal program inside the pump keeps track of how much is delivered to reach the rate requested, achieving the full 1 U (for this example).
IRC
):","text":"forks
but not included into dev
until recentlyIRC
with Glucose Momentum
: Loop PR 2028Dosing Strategies
: Temp Basal
or Automatic Bolus
Referring to the Algorithm: Prediction
page:
IRC
is disabled (default), the equation used to predict glucose continues to be:IRC
is enabled that equation changes to:Note that the Momentum\u200b term does not just add to the other effects; it is actually more complicated (and also more challenging to describe in simple math terms).
The Retrospective Correction
section of the Predicted Glucose Chart is updated when IRC
is enabled, as shown in the graphic below. The Integral effect
, inside the lower blue rectangle, is the difference between the IRC
and RC
calculations.
The IRC
term is described in this (updated) comment including plots and equations. Some of the information in that comment is repeated below: Important points about IRC
.
If you want to look at the code, the version (as of 14-Aug-2023) is found in LoopKit/LoopKit
:
RetrospectiveCorrection
code: StandardRetrospectiveCorrection.swift
IntegralRetrospectiveCorrection
code: IntegralRetrospectiveCorrection.swift
IRC
","text":"Known risk factors compared to standard Loop:
IRC
turned on, Loop will likely increase insulin corrections in response to persistent discrepancies between observed and predicted glucose motion, which may increase the risks of hypoglycemiaIRC
may also lead to increased oscillations (\"roller-coaster\") in glucose responsesISF
setting value tends to mitigate these risks but it is impossible to offer any guarantees for anything around T1DCompared to standard RC
, IRC
is more likely to improve glucose control in the following scenarios:
In some scenarios IRC
does not differ from standard Loop RC
Please do not expect immediate or very substantial improvements in blood glucose control. A one-time success after turning IRC
on does not really mean that IRC
\"works\" - this could just as well be a temporal coincidence. Some ways to decide if IRC
could be safe and effective for you include:
Loop
; at the wake-up time blood glucose should, in general, be closer to the correction range.This feature allows you to save Favorite Foods.
A new row on the\u00a0Loop\u00a0app Settings screen, see graphic below, provides access to create and edit your \u00a0Favorite Foods.
In the example meal entry shown below:
At this point the meal can be saved by tapping the Continue button, or the user can modify the time (typical) or any other of the carb entry rows before tapping Continue.
"},{"location":"version/development/#testflight-expiration-warning","title":"TestFlight Expiration Warning","text":"The\u00a0Loop\u00a0app has been updated to detect whether the build was uploaded through TestFlight, which implies a 90-day limit until the app expires.
The usual\u00a0Loop\u00a0expiration notification system alerts the user when within 20 days of expiration. In addition to that modal alert, the user can examine the bottom of the Settings screen at any time to see the expected expiration date and time.
"},{"location":"version/development/#github-browser-build-updates","title":"GitHub Browser Build\u00a0 Updates","text":"The dev
branch has several updates merged that make it easier to find errors in configuration and that make the \u00a0GitHub Browser Build\u00a0 automatic.
Note that the automatic build feature is opt-out. In other words, unless you take specific steps, the \u00a0GitHub Browser Build\u00a0 for\u00a0Loop\u00a0will:
It is suggested that all users of the released code (main branch), maintain this automatic schedule so they are never without a valid and up-to-date\u00a0Loop\u00a0in their TestFlight app.
For users of the dev
branch, it is not uncommon to disable the automatic update portion so they can choose when to update their development version, but should probably keep the monthly build portion of the process.
In addition to the easier to read error messages found with these updates, these additional simplifications include:
repo, workflow
permission, a prominent message is displayed with each Action completedThese sections are still useful for version 3.3.0 dev
users:
dev
branchFixed with PR 16: Fix parsing of age field of message
The code that feeds Loop data to remote services like Tidepool and Nightscout have been improved to be more robust.
"},{"location":"version/development/#what-are-git-branches","title":"What are Git Branches?","text":"There is a lot of discussion about branches with Loop but the concept is simple. Basically, they are all slightly different versions of Loop...kind of like different edits of the same book.
To really understand what branches are, we should probably explain a little more about the software and how development works. You can watch a 30-minute long, classic Katie DiSimone video explanation about branches created when Loop Version 2.0 was newly released. Keep in mind while watching the video that master
was the old name for the main
branch. The information in this video is still generally useful with the last half focused on automatic-bolus - the automatic-bolus dosing strategy has now been incorporated into Loop main
branch. Loop has moved on to using only one stable branch (main
), with dev
suggested for developers/testers.
Loop
GitHub Information","text":"Loop developers own an account in GitHub called LoopKit. Within that account, the developers have several repositories
that support Loop in particular. A repository\u200b is like a book...let's think of it like a cookbook for now. Within the LoopKit
account, there are repositories
for Loop\u200b itself, LoopDocs, and various other supporting \"frameworks\" that are helper \u200brepositories\u200b for Loop to build correctly. For example, Loop's \u200brepository\u200b has a lot of info about the app itself; the outward-facing things that you interact with. How information is put to you and taken in from you...that's in Loop repository
code. But, there's more than just a user interface for Loop. Loop has to do a lot of complex work like Bluetooth communications, algorithm math, pump communications, etc. The Loop app has help from frameworks to do those other parts. CGMBLEkit
\u00a0 for some of the transmitter parts of Loop, RileyLink_ios
for the pump managers (talking to the pumps and decoding their information), LoopKit
for the algorithm about carbs and insulin curves, etc.
When you build Loop, in the background, Loop pulls those other frameworks (7 in total) into the build process using Carthage
. Carthage
\u00a0 is like a personal shopper. You give it a shopping list (the cart file in Loop code is that shopping list) and it goes and fetches that for you during the build process. Sometimes your computer has an old shopping list...and that can cause build errors. Hence the carthage update
fix in the Build Errors page...that command updates the shopping list to get the right versions of those frameworks.
Anyways...so now you know about the general structure of Loop and LoopKit in GitHub. Now we can discuss Loop itself a little deeper.
So let's imagine Loop as a cookbook. The developers are the authors/chefs of the recipes (code) in the cookbook. The authors spend countless hours testing new recipes, taste testing, and documenting improvements. They send the drafts to the editor, who makes suggestions and eventually, the cookbook is finalized. There are no grammar issues, and no typos, the photos are beautiful and the recipes are yummy. They publish the book and you see a gorgeous final product on the shelves. That is called a release\u200b, and it is the main
branch. This book has been well-tested and is super stable. Every time you cook with those recipes, you know exactly what you're getting and lots of people have had a chance before you to make sure that it all tastes good. The main
branch is stable and tested.
But then...the chefs/developers go on a trip. They are inspired by new cuisine and want to add new recipes to the old cookbook. (Things like Omnipod\u200b support and the overrides are new \"recipes\" that were developed since the last main
release, for example.) But, the process of developing a recipe is arduous. There was a lot of trial and error involved. Lots of tweaking ingredients (code). The editors try out the new recipes and offer feedback (similar to the Issues List on GitHub). While the recipes are being developed, they have a version of the old cookbook that gets marked up...edited in pencil a lot. Scribbles and notes in the side. Revisions happen frequently because that's what testing new recipes is all about. These marked-up versions of the cookbook are called the dev
branch. Short for \"development\" branch. Like the name sounds...this is where new developments are happening, new recipes, and tweaks.
After much testing and tweaking, eventually, the recipes get the flavors right (bugs in code are squashed) and enough people have provided feedback and careful observations of results...that the book goes to the publishing house for the next printing. The cookbook is republished with an updated edition number and new recipes are highlighted. When this happens in Loop, Loop's main
branch is updated with the new features coming from dev
(aka, the dev
branch is merged into the main
branch). When that happens, the main
branch gets another release
version. At this point, dev
and main
are identical. They remain so until the development team for Loop\u00a0 starts working on the next batch of improvements, which could be in the next hour or even days later, but then the cycle starts again. The developers will start editing the code again and dropping those edits in the dev
branch for further development.
dev
branch?","text":"The dev
branch, currently v3.3.0, is where the next version of Loop is being developed and tested.
If you choose to build Loop using a dev
branch, you need to be aware that the dev
branch may update code frequently and unannounced in the traditional sense that most users in the Looped group or Instagram would see. Developers are not helped by people being in a dev
branch if those users mistakenly think of it as a stable main
branch with lots of detailed docs to go with it. People should only use a dev
branch build if they EDUCATE themselves on the expectations and how to properly manage dev
information and updates. People using the dev
branch should also have regular access to a computer to be able to rebuild quickly if a new bug/fix is identified.
If you choose to use a dev
build, you can stay abreast of developments in a number of ways...but they will all require you to do some legwork and keep yourself informed. This is not a situation where you should expect a fancy Loopdocs page updated regularly with current \"dev
updates\"...that's just not the way the dev
branch works (at least normally).
Use Zulipchat forums for Loop. This forum has several streams of conversations (streams
) depending on interest. I highly recommend following all the streams so you do not miss conversations. You can select by stream and by topic within a stream to focus on a given conversation.
Zulip Chat Streams
You can also go directly to the git commit history for each of the branches if you'd like.
Loop
main
branch: git commit historyLoop
dev
branch: git commit historyIf you click on the commit, you can see exactly what changes to the code were made. It's an interesting learning experience. In red is the old code, and in green is the updated code. The line numbers and file names of the edited code are also there to help.
I don't expect many of you would understand exactly what the edits mean, or how the new code might function. However, I bring up the topic of git commit history so that you can use that to realize just how often the dev
branch is updated. Go ahead and look at the number and frequency of commits in that branch. That's why no one would want to maintain a documentation list of the changes in the dev
branch. It's just too much of a moving target.
Loop Repository
and Issues List
","text":"Open the Loop repository
and subscribe to the Issues
.
You can choose to watch the repository
so that you get emails when new Issues
are reported. This is a good way to find out if other people are reporting odd behavior that you are wondering about. If you use dev
and wonder about something you are seeing in Loop, you can check Issues
list to see if others are noticing the same. If so, you can help by capturing information and reporting it. Not super helpful to just say \"Yeah, me too...\" but better if you can attach screenshots, Issue Reports
from Loop settings, and a thorough description of the problem you are seeing. Be a part of the solution by thoughtfully providing information to help debug.
Looped
group","text":"Keep watching The Looped Group
on Facebook. Major concerns/issues are brought up there...so it doesn't hurt to scroll through and see what's going on there.
Another useful thing if you'll be on dev
branches undergoing a lot of active change...know how Loop works and where to look for additional information about what you are seeing. For example, if you see an IOB value that looks odd, you should know to look at the insulin deliveries stored in the Health app.
Know how to generate an Issue Report
when you see a problem so you can provide that if asked. An Issue Report
is a log file generated by the Loop app that has a lot of information the developers can parse to figure out what Loop was doing when you were having a problem.
Loop Settings -> Issue Report
Loop Settings -> Support -> Issue Report
Do not confuse this with reporting an issue with Loop. That is done by logging into GitHub and going to the Issue
page to report a new issue. You can read about existing issues without logging in, but to report a new one, you must log in to GitHub.
This 6-minute long, classic Katie DiSimone video shows how to capture debugging logs. If you are testing a new branch, this is a valuable skill to assist developers in identifying problems. In addition to showing you how to generate and save the debug text information, the video explains how to create a gist
with the debug information using your GitHub account and file an official Issue on the Loop GitHub repository
. This may be required in some cases. But start by chatting directly on Zulipchat with the developer. What you are experiencing may already be known. If the developers need you to open a new Issue
, they will say so on Zulipchat.
Repositories
and Code","text":"If you're a developer looking for direct links to the code and documentation in GitHub:
Loop
LoopDocs
For more information on how to contribute code to the Loop project, please review:
If you want to contribute code improvements, please join Loop Zulipchat and be sure to subscribe to all the channels. Meet the developers and testers who make this app, and learn about what is coming next.
"},{"location":"version/loopworkspace/","title":"LoopWorkspace","text":""},{"location":"version/loopworkspace/#loop-workspace","title":"Loop Workspace","text":"This page is for the advanced user. It is a short introduction for folks interested in testing code before it is released, or contributing to that code.
If you wandered over here meaning to build the latest Loop release, the rest of this page might be interesting but you should not follow any of the steps. Head back over to Build Loop App when you are ready to build the app.
LoopWorkspace is now used for all Loop Builds
The typical user who wants to build Loop does not need to know the level of detail on the rest of this page.
"},{"location":"version/loopworkspace/#new-way-to-sign","title":"New Way to Sign","text":"One of the recent changes to LoopWorkspace is the addition of the file: LoopConfigOverride.xcconfig
to the LoopWorkspace folder. The contents of this file are shown in the graphic below.
There are several ways to use this to sign the targets automatically.
//
) from the beginning of the line and replace the indicated TeamID (UY678SP37Q) with your own Team IDLoopConfigOverride.xcconfig
exists up two levels from the current LoopWorkspace folder, it will be includedLoopConfigOverride.xcconfig
in the ~/Downloads/ManualClones folder (from any LoopWorkspace folder) and edit that version with your TeamIDLoopConfigOverride.xcconfig
in the ~/Downloads/BuildLoop folder the first time the script is run, guides the user into adding their TeamID and then, in subsequent downloads, uses that previously created fileYour Apple Developer ID is the 10-character Team ID found on the Membership page after logging into your account at: https://developer.apple.com/account/#!/membership.
"},{"location":"version/loopworkspace/#what-is-git","title":"What is git?","text":"Git is a system of \"distributed version control\" that allows remotely (as in not located in the same place) collaborating people to work on one project and still track their changes to the same place. For example, if I sent 5 people one document to proof-read at the same time...it is quite possible that the edits I will get back from those 5 people would conflict with each other. Bob may have entirely deleted a sentence while Mary would have added words to that sentence. Git lets these remotely collaborating people deal with \"resolving conflict\" between versions more easily and merging suggestions (pull requests) into a coordinated space.
So, in using git, we can do things with \"git commands\". Like \"Hey git...make me an exact copy of that guy's work over there.\" or \"Hey git, I'd like to compare my version of this page with Joe's version of the same page.\" Or using my old cookbook analogy...\"Hey git, I'd like to start a new cookbook called Italian Desserts.\"
But yes, git commands take awhile to properly use. And they are not plain English-friendly.
"},{"location":"version/loopworkspace/#what-is-loopworkspace","title":"What is LoopWorkspace?","text":"There is more information in Loop Development that is not repeated here.
The important fact for this discussion on LoopWorkspace is that Loop developers own an account in GitHub called LoopKit
. Within that account, the developers have several repositories
that support Loop in particular. A repository
is like a book...let's think of it like a cookbook for now. Within the LoopKit
account, there are repositories for Loop itself, LoopDocs, and various other supporting \"frameworks\" that are helper repositories for Loop to build correctly. For example, Loop's repo has a lot of info about the app itself; and the outward-facing things that you interact with. How information is put to you and taken in from you...that's in Loop repository
code. But, there's more than just a user interface for Loop. Loop has to do a lot of complex work like Bluetooth communications, algorithm math, pump communications, etc. The Loop app has help from frameworks to do those other parts. CGMBLEkit
for some of the transmitter parts of Loop, RileyLink_ios
for the pump managers (talking to the pumps and decoding their information), LoopKit for the algorithm about carbs and insulin curves, etc.
When you build Loop from LoopWorkspace
, each of those repositories is downloaded to your computer. This is slower than the old zip-download as far as downloading Loop - but it is much faster when you build Loop because all the files are already on your computer.
LoopWorkspace
uses submodules to define how the frameworks are coordinated for building. The graphic below shows the dev branch at a particular point in time. The precise version, or commit, of each submodule is defined by 7-character hexadecimal codes (look up SHA-1) with the repository for each submodule defined in a text file called .gitmodules
.
git
and other operating system commands will be provided later to assist youThe commit identifier for each submodule is important because that repository can be modified after things are set up and working with Loop. When you download the code from that repository you want the exact version that was tested.
git branch
for a given submodule(HEAD detached at #)
#
is the commit
identifier for the submoduleThe commit
for the LoopKit
submodule is highlighted by the red rectangle in the graphic below. Advanced users testing the dev branch (or other branches or forks) need to know how to tell if their current download is up-to-date.
To get that LoopWorkspace
code to your computer, first open a terminal. Make sure your current path name does not have any embedded spaces. If it does, you will get errors on your build.
If you don't know how to open a terminal and navigate to a directory, reconsider whether you are ready for this page.
You need to use a git clone
command LIKE THIS (but not exactly the same...you're going to edit the branch-name
part in there):
git clone --branch=branch-name --recurse-submodules https://github.com/LoopKit/LoopWorkspace
Now...look carefully and notice two things...that command (1) is getting the version of LoopWorkspace
found in the LoopKit
repository and (2) selects the branch you want to start working with when the clone is done.
So, you will need to edit that branch-name
before using the command so that you are getting started with the branch you want. If you want to clone from a different fork
, the LoopKit
will be replaced with the name of the GitHub site for the fork
. For example, to test the dev
branch (which is under development and has some cool new architecture and features), you would copy/paste:
git clone --branch=dev --recurse-submodules https://github.com/LoopKit/LoopWorkspace\n
"},{"location":"version/loopworkspace/#start-xcode-using-command-line","title":"Start Xcode using command line","text":"If you want to start the build from the command line, enter the following 2 lines into the terminal.
cd LoopWorkspace\nxed .\n
Remember the warning - if you build the dev
branch on your phone from Loop main
, it should work fine. Going backward, please delete the app from your phone and enter all your settings again to return to main
.
The cloned version of the LoopWorkspace
will go into the current directory in the Terminal app when you execute the command. Terminal app opens in your User account home directory by default when you first open it. Unless you changed to a different directory, check your home directory for the LoopWorkspace
folder.
How can you find your home directory?
Terminal
, if you use cd
that will take you there automatically.Finder
, Shift+Cmd+H will open your home folder.There are a lot of cloned things in this home directory that involve Loop. You may have fewer...but be aware, you can always delete and reclone if you are in doubt or confused. You can also set up a special directory to hold the cloned code - just make sure there are no embedded spaces in the full path name.
For this graphic, the cloned LoopWorkspace
is in the home directory.
Loop to LoopWorkspace
in dev
Note that the directory Loop.xcworkspace
has been renamed to LoopWorkspace.xcworkspace
in the dev
branch. This change makes LoopWorkspace
the default target to simplify the build process.
The words will be updated with the next release. It may take more time for the figures to be updated.
Finder
and navigate to the location that has LoopWorkspace
LoopWorkspace
folderLoopWorkspace.xcworkspace
folder - this automatically opens the Workspace in Xcode
LoopConfigOverride.xcconfig
file that now appears in the top of the folder list (not shown in this graphic)dev
branchLoopWorkspace
","text":"When it's time to update the copy of LoopWorkspace
on your computer - you have choices. You can use the method below or redo the whole cloning process.
Be sure your terminal is in the correct location using Open a Terminal in LoopWorkspace
Folder
git branch\n
dev
, then issue this git command (suitably modified for the desired branch) git checkout dev\n
git fetch\ngit pull --recurse\n
If you are testing the LoopKit dev branch, you need to be on zulipchat and subscribe to at least the #development and #github streams. (It's a good idea to subscribe to all the streams.) When you see repository updates similar to the graphic below, there may also be an announcement in the #development channel that LoopWorkspace is updated and ready to test. If not you can check the commits in LoopWorkspace and see if they've been updated. It's a good idea to wait 24 hours. My procedure is to build dev to my backup phone and then put it on my \"real\" phone. Otherwise, wait for someone else to do it and give the all-clear in zulipchat.
"},{"location":"version/loopworkspace/#updating-loop-to-a-specific-loopworkspace-commit","title":"Updating Loop to a Specific LoopWorkspace commit","text":"Sometimes, you know a feature you want was added at a specific commit number; however, you know there are other changes later than that commit which you do not want to test. There is a solution.
Be sure your terminal is in the correct location using Open a Terminal in LoopWorkspace Folder. First you have to bring down all the latest dev commits. Then you will back up to the one you want.
git branch\n
dev
, then issue this git command (suitably modified for the desired branch) git checkout dev\n
git fetch\ngit pull --recurse\n
Now you want to \"backup\" to the desired commit:
git checkout <desired commit here>\n
git submodule update\n
Assuming there were no errors, see Local Modifications Conflict, in the process above, you can now build that commit.
Sometimes there is a change to the Workspace scheme in Xcode that interferes with building following an update to your local clone. In those cases, these steps typically work. Try the first one, and if that doesn't work, try the first two, etc. Only after trying all three should you post asking for help on zulipchat.
This command deletes derived data stored across all workspaces and projects by Xcode on your computer. If you have multiple clones locally, it deletes derived data from all of them. The derived data will be regenerated next time you build with Xcode using that clone.
Copy and paste this command into a terminal window.
Copy and Paste to Delete Derived Datarm -rf ~/Library/Developer/Xcode/DerivedData\n
"},{"location":"version/loopworkspace/#compare-your-local-clone-to-loopworkspace","title":"Compare your local clone to LoopWorkspace","text":"In an ideal world, LoopWorkspace has the most recent compatible submodule identifiers revised at the same time the submodules are updated. You will notice the commit identifiers for the updated submodules are different from the ones you have locally.
You can check your current submodules with the git submodule status
command in the LoopWorkspace folder of your terminal:
What are those super-long numbers? Those are the actual SHA-1 (remember - look it up) for the commits. But the first 7 characters are sufficient to uniquely identify the commit you need for the repository and branch identified in .gitmodules
. So compare the first 7 characters to the LoopKit / LoopWorkspace number and you know whether you need to update or not.
To determine the commit for a single submodule on your computer, use the following commands in the LoopWorkspace folder:
cd <submodule-name>; git branch; cd ..\n
The response will be similar to this exchange:
cd rileylink_ios; git branch; cd ..\n
* (HEAD detached at 2541c1c)\n dev\n
The asterick indicates the branch that is currently checked out (active).
The phrase * (HEAD detached at #)
allows you to compare your local version with the commit identifier on github.
What happens if you update (git pull --recurse
) and there are no changes at the LoopWorkspace repository? There will be no change to your current clone on your computer.
Fetching submodule submodule-name
for each submodule-nameAlready up to date.
What happens if you update (git pull --recurse
) and there are changes at the LoopWorkspace repository? The changes will be brought down to your clone on your computer.
You'll need to build Loop again to get these changes incorporated in the app on your phone.
Fetching submodule submodule-name
for each submodule-nameSubmodule path submodule-name: checked out
new SHA-1It has happened that you notice changes in one or more repository (in the #github stream) followed by an announcement in the #development stream that changes have been committed and please test. But you get the response shown in the LoopWorkspace Unchanged scenario. You can make a comment in zulipchat, saying please update LoopWorkspace and then wait, or you can download the appropriate commit. If you are a new tester - you probably want to wait.
If you want to go on and test, you can update to the correct commit without waiting for LoopWorkspace to get updated.
First, in zulipchat, in the #github stream of the commit, click on the word pushed
and that will take you to the commit. For example, clicking on pushed in zulipchat from the graphic shown above, goes to this website:
https://github.com/ps2/rileylink_ios/compare/8ff4bca2bc5f...2541c1c899a9
This indicates the final commit of that push for rileylink_ios is identified as 2541c1c
.
At this point, the commands to get that commit locally on your computer are as follows, starting from the LoopWorkspace folder:
cd rileylink_ios; git fetch; git checkout 2541c1c; cd ..
If you got an error message the # you requested did not match any file(s) known to git
, you either typed it incorrectly or you forgot the git fetch
command. The fetch command brings down information from github to your computer but doesn't make changes to what you have checked out.
If you have modified anything in a submodule folder on your computer, it might be in conflict with the latest commit.
If you get a message such as this:
error: Your local changes to the following files would be overwritten by checkout:\n Loop/Models/LoopConstants.swift\n Please commit your changes or stash them before you switch branches.\n Aborting\n
The easiest fix is to type commands similar to the following, where you modify Loop to be whichever folder(s) had the conflict. If more than one folder had a conflict, then issue the stash for each folder. The submodule update command will continue to show errors until you stash all local changes that interfere with the new code:
cd Loop; git stash; cd ..\n git submodule update\n
After stashing and updating with no errors, you can try to restore your changes:
cd Loop; git stash pop; cd ..\n
If you see errors indicating you cannot use pop
, that means you need to manually add your customizations back.
You will need to repeat this for each submodule that has a conflict. Use the lines above (for Loop submodule) as a template to resolve conflict(s) other submodule(s).
"},{"location":"version/loopworkspace/#checking-out-different-branches-within-a-loopworkspace","title":"Checking out different branches within a LoopWorkspace","text":"More advanced users...I'm not going to explain this in quite so much detail, but yes, you can individually change the branches in a LoopWorkspace.
There are 2 main ways to do this.
If you're already familiar with git, the easiest way is to cd
into the appropriate repository (like cd rileylink_ios
) and checkout
the desired branch.
If you're not as familiar with git, if you edit your .gitmodules directory in LoopWorkspace, you can specify other repos to use (and add a line to specify branches, too). Then if you do a git submodule sync
the workspace will sync to new submodules. Then git submodule update --init --recursive --remote
will update all the submodules to the right branches and get HEADs detached correctly, etc. Note that the HEADs will be detached at the top of the branch (most recent commit) based off of .gitmodules
.
This tutorial is pretty nice.
Git Tutorial
When I first started using git, my adult son answered all my questions very politely and then started sending me links to this tutorial instead.
There's a section called Main
that goes over commands in your local copy (clone) of the code. There's a section called Remote
that goes over fetching, pulling, and pushing to remote copies.
For Open Source Software, you might fetch and pull from the LoopKit repositories, but you will only push to your fork.
git remote add <name> <your-fork-repo>
and git push --set-upstream <name> <branch>
to your vocabulary.Average Loopers can skip this whole section...it's for Developers mostly
This whole section about non-LoopKit workspace clones is something almost every Looper can totally skip over. I'm only writing up this section for people who are interested in dabbling in code collaborations/customizations that they would want to maintain separately from LoopKit proper.
Scenario: You have a friend named DeveloperBob who has his own version of LoopWorkspace that he's customized. DeveloperBob wants you to look at his code customizations and collaborate with him. You need to change the \"git clone\" command to get DeveloperBob's version, not LoopKit's version. And, you'd want to make sure you specify the branch that the new feature is on, too. DeveloperBob should usually include the branch name when he posts/shares. So, the command line might be edited to something like:
git clone --branch=new-features --recurse-submodules https://github.com/DeveloperBob/LoopWorkspace
So...if you are trying to grab someone's LoopWorkspace to use it, you'll need to make sure you get the command correct if they don't specify it for you. You can't clone multiple \"LoopWorkspaces\" into the exact same home directory (because they will have the same name), so you may want to create a subdirectory to put them in. Like you could make a folder called \"DeveloperBob\" and then move into that directory in Terminal before you clone DeveloperBob's LoopWorkspace.
How would you do that? Simple cd && mkdir DeveloperBob
would make the new folder in your home directory. And then cd DeveloperBob
would move your Terminal app to be working inside the new DeveloperBob folder. So if you wanted to clone DeveloperBob's LoopWorkspace, that would be a good way to keep track of where the code came from.
If you ever get in doubt and can't remember where your code was cloned from, you can cd LoopWorkspace
to get into the directory and then use git remote -v
to tell you where it came from.
So you've got a great idea for a new feature, made those changes to your LoopWorkspace, and want to get them into GitHub. Awesome!
To understand how to do this, we'll need to understand a bit more about how git keeps track of changes. In git, developers can have different \"branches\" (see What are Git Branches? on the Loop Development page for more details about what a branch is). There are two different types of branches: remote and local. If you were to fork Loop on GitHub, then the branches that you can see on GitHub are \"remote\" branches - they're hosted on the GitHub server. On the other hand, you can also create \"local\" branches that are stored directly on your computer by \"checking out\" the remote branch. You'll need to \"commit\" your changes to the local branch, and then \"push\" those changes to the remote branch in order to be able to see them in GitHub. There are specific commands that you can type into the command line to do all of these actions, but I'm not going to go into detail because there are different ways and everyone has their own preference.
It's a little easier to think about this with an analogy. Let's say you're working at a company that's creating a cookbook. There's a centralized, production-ready version of the cookbook on their website that all the employees can view. Think of the website version of this cookbook as being like the remote branch. You're assigned to change the pancake recipe in the cookbook. Since the company doesn't want employees to make changes directly to the version of the cookbook that the customers see, you need to make a copy of it on your computer so you can make your changes to the pancake recipe. When you make the personal copy on your computer, it's like \"checking out\" the remote branch. Your copy is like the local branch - you can make whatever changes you want without having to worry about customers accidentally seeing them. When you make an important change to the recipe (like adding a photo or changing the ingredients), you might want to make a note in the edit history so that you can go back to that version of the recipe in case you accidentally make unintended changes - those notes you make would be \"commits\". Once you're happy with the recipe, you'll add it back into the production version of the cookbook on the website, which is similar to what you're doing when you \"push\" your changes.
Where do the submodules fit in? Each submodule is actually a branch, so when you make changes to multiple submodules, you'll need to commit those changes to their respective branches. Let's say you've made changes to Loop and LoopKit. You'll need to go into Loop and commit and push the changes, then go into LoopKit and commit and push the changes.
There are a few different ways to keep track of all these different branches. Some people like using the command line (which is what you're using when you do commands like git clone
) because it's very customizable and has the largest variety of commands. Others like to use graphical Git editors, which make it easier to see changes and be able to do a variety of common actions (like cloning, committing, and pushing) with the push of a button. Everyone has their own preferences, but some methods that Loop contributors have used in the past include the command line, Gitkraken, and SourceTree.
The Version tab of LoopDocs contains information about releases (versions), code customization and development.
Map to this section:
The new features added with each Loop release (starting with Loop version 2.0) are provided for reference.
"},{"location":"version/releases/#loop-3-compatibility","title":"Loop 3 Compatibility","text":"Be aware that Loop 3 is forward compatible:
Loop 3 is NOT backwards compatible.\u00a0Once you build Loop 3 or later on your phone, you cannot return to Loop 2.2.x or FreeAPS without some additional work.
The current released version for the Loop app is 3.2.3. The dates and contents for releases are summarized below in reverse chronological order (so newest release information comes first).
"},{"location":"version/releases/#what-version-do-i-have","title":"What Version Do I Have?","text":"Tap on the Settings icon at the toolbar of the Loop app and look at the version information at upper left. This graphic was generated with an older version.
"},{"location":"version/releases/#is-the-released-version-newer","title":"Is the Released Version Newer?","text":"Release information is always found on the GitHub LoopKit/Loop\u00a0release page.
Additional information including links is found here, but be aware that updates to\u00a0LoopDocs\u00a0may take some time after a new release comes out.
"},{"location":"version/releases/#loop-version-numbering","title":"Loop
Version Numbering","text":"With the release of Loop 3
, there is a new pattern for identifying the releases as distinct from the development work.
Each release uses 3 numbers: Major.Minor.Patch
Loop 2.2.9
to Loop 3.0.0
To prevent confusion between versions used for development and versions used for release (main
branch
), the Minor values are even for released code. The Minor value for the development branch
(dev
) is incremented as part of the release process and is always odd.
For example:
Loop 3.0.0
was the first released version of Loop 3
Loop 3.1.0
was the development version before Loop 3.2.0
was releasedLoop 3.2.0
was the next released versionLoop 3.2.1, 3.2.2 and 3.2.3
are patches to Loop 3.2.0
without changes to the features of Loop 3.2.x
Loop 3.3.0
is the current development versionLoop v3.2.3 was released on September 19, 2023.
This patch release was required for those who build using the Mac method.
Loop v3.2.2 was released on April 24, 2023.
This is a patch release to fix archiving with Xcode 14.3.
"},{"location":"version/releases/#loop-v321","title":"Loop v3.2.1","text":"Loop v3.2.1 was released on March 20, 2023.
This is a patch release primarily dealing with localization updates.
Loop v3.2.0 was released on March 17, 2023.
There are some important bug fixes and new features, so please rebuild to this version as soon as possible.
Pete's announcment:
Loop 3.2 Is released! This contains some very important bug fixes for everyone. If you are running latest dev, you do not need to update, but everyone else running older 3.x versions of Loop should consider upgrading as soon as you can.
https://github.com/LoopKit/Loop/releases/tag/v3.2.0
Bug Fixes (Please update ASAP):
Updates and new Features:
After several years of development and a lot of testing, Loop 3 is here!
Loop v3.0.0 was released on January 14, 2023.
Link to release notes for Loop 3.0
Use Script not Zip
If you follow that link above, there is an Assets
section with a zip link
Branch Name Change
The branch name associated with the latest Loop release is main
.
repositories
on GitHub will be named main
instead of master
starting October 1, 2020repositories
to use mainThe storage of data with Loop 3 is not backward compatible. In other words, if you attempt to build Loop 2.2.x (or FreeAPS) on a phone which has been upgraded to Loop 3, you will not be able to run that app. You can successfully build the app, which will overwrite Loop 3 on the phone, but the app will crash and you will not be able to Loop.
At this point, you can restore your Loop 3 build on your phone and continue using Loop 3 or you delete all apps on your phone with a shared app group. This list includes Loop, FreeAPS, FreeAPS X, xDrip4iOS, Glucose-Direct, and the g5 Transmitter Reset app.
If you tried to delete \"all\" the apps and still have something causing an issue; you can follow the directions to Review Provisioning Profiles and then delete the profiles for all the apps by using the - sign.
You do not need to delete Loop Follow, so if you use Loop Follow - do not delete that provisioning profile.
"},{"location":"version/releases/#loop-2-version-history","title":"Loop 2 Version History","text":""},{"location":"version/releases/#loop-v229","title":"Loop v2.2.9","text":"This release updates Loop to handle Dexcom Share server changes for how glucose trend is parsed. Dexcom used to provide integers that mapped to the meaning for the arrows. They changed that to strings, like \"Flat\" or \"FortyFiveUp\".
Loop v2.2.9 was released on April 4, 2022.
"},{"location":"version/releases/#loop-v228","title":"Loop v2.2.8","text":"This is a hotfix (no features were modified in the Loop app) to enable the app to be built with Xcode 13.3.
Loop v2.2.8 was released on March 16, 2022.
"},{"location":"version/releases/#loop-v227","title":"Loop v2.2.7","text":"This is a fix (no features were modified in the Loop app) to enable the app to be distributed via TestFlight.
Loop v2.2.7 was released on Jan 11, 2022.
"},{"location":"version/releases/#loop-v226","title":"Loop v2.2.6","text":"Several users reported issues with IOB accounting in Loop v2.2.5, where IOB was being under-reported, which could cause Loop to continue recommending increases in insulin delivery. A fix was made and provided as Loop v2.2.6.
This is a serious issue, so updating to this release is strongly recommended for anyone currently running v2.2.5. If you tap on Loop Settings and look at the top, and see LOOP V2.2.5, then rebuild ASAP. The time window when you would have built v2.2.5 is from Aug 22 through Sep 6, 2021.
The issue appears to be the result of a failure to write to Apple HealthKit, which may occur if the Health app on your phone is having problems, or if you have turned off Loop's ability to write Insulin data to HealthKit. The fix involves reverting a change made in v2.2.5. This change was an attempt to reduce overlaps of Reservoir and Pump Event reconciliation which intermittently over estimate insulin delivery. Instead, that issue will be fixed in the next major release of Loop.
Thanks to all who helped with reporting, digging, and testing this quickly. It's great to have such a strong community of people eager to help.
Loop v2.2.6 was released on September 6, 2021.
"},{"location":"version/releases/#loop-v225","title":"Loop v2.2.5","text":"This is an interim release as we prepare for the major changes currently in development. If you are running an older version of Loop, such as v2.2.4 (master or automatic-bolus branch) or an older version, it is recommended that you update to v2.2.6 to get all these new features. A summary of modifications with respect to Loop v2.2.4 is listed below.
Loop v2.2.5 was released on August 22, 2021.
"},{"location":"version/releases/#new-features","title":"New Features:","text":"Automatic Bolus (Experimental) Dosing Strategy
Provisioning Profile Expiration Notifications:
RileyLink Compatible Devices:
Omnipod Features:
Omnipod Code Fixes:
(REMOVED) Insulin Accounting:
Dexcom Non-US Share:
For community support, please use one of the Loop Social Media help sites.
"},{"location":"version/releases/#loop-v224","title":"Loop v2.2.4","text":"Released October 3, 2020 with \"fixes\" introduced without renumbering the version number. Last change was on January 19, 2021.
Released September 25, 2020
Warning - Rebuild ASAP for Pods
Released August 9, 2020
Released April 17, 2020
Released December 31, 2019.
For Reference Only
Enough time has passed that this version should no longer be on anyone's phones (the one-year expiration time should take care of that).
There is a lot more detail provided in the Loop v2.0 section because it constituted a significant change to parts of Loop from prior releases. This section and the Omnipod-Testing branch sections are left here for historical interest.
"},{"location":"version/releases/#what-was-new-in-loop-v20","title":"What was new in Loop v2.0?","text":"This is a highlights reel comparing Loop v2.0 to v1.9.6.
"},{"location":"version/releases/#uploading-of-bgs-to-nightscout","title":"Uploading of BGs to Nightscout","text":"Loop v2.0 has an option to upload your BG data to Nightscout directly. It is a new slider under the CGM configuration section for Dexcom users. After you add your CGM transmitter ID, go back into the CGM info and you'll see a new slider called \"Upload Readings.\" Technically, Loop's dev branch had that feature for a hot minute before Loop v2.0 was released...but for almost everyone this will be a brand new feature they haven't had before. This feature can help if/when Dexcom's Share servers ever go through another large outage like we had before. If that happens, you can turn on the \"Upload Readings\" switch and your CGM data will now be in Nightscout even without Share servers working properly. Good practice would be to temporarily disable your Share bridge in Nightscout while Loop is responsible for CGM uploading so that you don't get duplicate data. You can disable Share bridge by logging into your Heroku account, going to the Settings tab, clicking on \"reveal config vars\" and then deleting the word \"bridge\" from the ENABLE line.
"},{"location":"version/releases/#a-fix-for-settings-loss","title":"A fix for settings loss","text":"iOS 13 brought about a quirky little bug where you could suddenly lose settings in Loop. But, it wasn't just limited to Loop, sometimes people lost Dexcom app settings too. The issue is most common when the phone goes through a power cycle, but it has happened at other times, too. There's a fix for that new bug in Loop now...so that's a good reason to update. (If you encounter that bug before you have a chance to update your Loop app, simply restart the Loop app and your settings should reappear.)
"},{"location":"version/releases/#confirmation-beeps-expanded","title":"Confirmation beeps expanded","text":"Confirmation beeps have been expanded based on user feedback...we heard parents and school nurses really appreciate hearing a beep for not just boluses, but also for suspend/resume commands and editing basal schedule (so you are sure it saved properly). So, confirmation beeps are now for boluses, suspend/resume, and basal schedule edit saves.
"},{"location":"version/releases/#read-pod-status-added","title":"Read Pod Status added","text":"There's a new command in the RileyLink menu for \"Read Pod Status\" that is analogous to the existing command for Medtronic users. You can query your Pod for its current status info using that command.
"},{"location":"version/releases/#nightscout-profile-uploading-introduced","title":"Nightscout profile uploading introduced","text":"Loop will upload your basal schedule, ISFs, carb ratios, and override presets from Loop settings to your Nightscout profile. If you ever lose your phone and need to setup Loop brand new...your settings will be easy to find in Nightscout now.
"},{"location":"version/releases/#non-linear-carb-model-introduced-as-default","title":"Non-linear carb model introduced as default","text":"All branches (master and dev) now use a \"non-linear\" carb model, so let's give some info about the change.
Previously, the carb model Loop used had a linear absorption predicted with dynamic carbs adjustments. What this means is that food absorption was modeled as a flat, even effect (like the straight grey graph that you'll see in the Insulin Counteraction Effects chart after you added a carb entry. But looking at large groups of meals' datasets (and supported by personal, anecdotal experiences), food really has a bit more of a non-linear absorption. Meaning, we usually see more of a food impact up-front than the old carb model in Loop predicted.
What did that mismatch mean for us if the model predicts a linear absorption, but the meal actually behaves differently?
With a non-linear absorption model, the carb absorption will more closely match observed blood glucose impacts we've seen after meals. And when the model is more closely matching actual experience, that means the predicted blood glucose curves will do a better job at providing more upfront bolus and not having the tendency to have overly conservative temp basals soon after a meal.
"},{"location":"version/releases/#overrides-introduced","title":"Overrides Introduced","text":"Loop v2.0 marks the first time Loop master branch has overrides included. Additionally, this release moves overrides setup from the configurations area of Loop settings to the workout icon in the Loop toolbar. There has also been bug squashing in dev branch for overrides over the recent past, so updating is a good idea even if you already have overrides on your current build. Want to learn more about overrides? Read about them here.
"},{"location":"version/releases/#retrospective-correction-always-on","title":"Retrospective Correction always on","text":"Retrospective correction used to be an optional toggle in the algorithm. It is now on by default all the time. It is an important part of the algorithm (helps Loop look at how good/bad its recent prediction curve has been vs reality), and leaving it on made sense anyways.
"},{"location":"version/releases/#omnipod-support-in-released-code","title":"Omnipod support in Released Code","text":"Yes, most of you are already using Omnipod with your Loop...but this is the first time that Loop master branch supports Omnipod users. Please update if you have been using Omnipod-testing branch especially...it's time to get all the bug fixes that we've done in Loop.
"},{"location":"version/simulator/","title":"Simulator Build","text":""},{"location":"version/simulator/#simulator-build","title":"Simulator Build","text":"There are 2 main types of simulators users may want to build. Each of these require less up-front acquisition of hardware and may be desirable as a first step towards becoming a Looper.
Please, review all the Intro and Build pages, even if you will not complete them yet.
"},{"location":"version/simulator/#simulator-using-browser-build","title":"Simulator using Browser Build:","text":"Follow the normal instructions to build with browser, install the app on a compatible phone and explore the app using the Pump Simulator, CGM Simulator or both.
"},{"location":"version/simulator/#simulator-using-build-with-mac","title":"Simulator using Build with Mac:","text":"This simulator requires access to a Mac or virtual computer, see Compatible Computer
Add Apple ID
sectionYou don't need to do anything special when you build the app using the Build with Browser instructions. Install the app on your phone from TestFlight. Then select the CGM and/or Pump simulator desired. You must have a paid developer account.
"},{"location":"version/simulator/#build-to-a-compatible-phone-using-mac-build","title":"Build to a Compatible Phone using Mac Build","text":"When building to a real phone using a Mac, you must have access to a Compatible Computer and a Compatible Phone.
Add Apple ID
step and follow the normal build directionsAdd Apple ID
sectionLocked Phone or App in Background
Loop will not work in the background without either a real CGM or a real pump to \"wake\" it up.
The app will only work in the background in these special cases:
In all other cases, the phone must be open and unlocked for you to test the app.
These CGM and pump options work to provide glucose readings or accept pump commands while the app is open, but will not \"wake\" the app when in the background or phone is locked:
Disable Notifications
When you have the Loop app on your phone to test as a simulator, you may want to disable notifications when you are not actively using it. Even if you quit the app, you will get Loop not Looping notifications while the app is on your phone.
To Disable Notifications:
Allow Notifications
The Loop app, when open, will be quite aggressive at warning you that you have disabled Notifications, so you can reverse those directions to enable notifications when actually using the app.
"}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 390d63c4f9e..86d6588eaeb 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ