# Omnipod Looping

**URL:** <https://forum.fudiabetes.org/t/omnipod-looping/8012>\
**Category:** Type 1 & LADA\
**Tags:** dexcom, omnipod\
**Created:** [July 30, 2019, 4:26pm UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012 "2019-07-30T16:26:34Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)\
**Post date:** [July 31, 2019, 12:11am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/21 "2019-07-31T00:11:06Z")

</div>

@Eric, here is another screenshot taken a short while after the previous one. Notice, the prediction has gone down and will hopefully go down further as carbs are absorbed, until it reaches target. But you can see how Loop does the temp basals. I actually had activated my Post-Run Override (which gives ZB for BG \< 110) for about 30 minutes to stop Loop from giving me those high temps shown in the Insulin Delivery around 7 PM.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fudiabetes/original/2X/9/9ff0a5390b6b63ca5060328e839ca92fa7dc4c35.jpeg)

---

<div class="post-metadata">

**Author:** ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)\
**Post date:** [July 31, 2019, 12:15am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/22 "2019-07-31T00:15:38Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/158):
>
> lack of data the only think I am missing by being in Open? Is there any other place that data is available?

I am very surprised to learn Loop is not writing to Health in open mode, not sure why. Let me look into that a bit first (later tonight). Insulin data should also be available in Tidepool and via Nightscout.

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/158):
>
> I am shopping watches now.

Apple watch is the only choice that would allow you to bolus from it. But, you’d really need to try to see if it would work for you during running. I think it would, but no way to tell without you trying. Maybe we could take a video of how bolus from watch works.

---

<div class="post-metadata">

**Author:** ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)\
**Post date:** [July 31, 2019, 12:21am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/23 "2019-07-31T00:21:19Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/158):
>
> But I think the only reason for me to stay in Closed is to be able to get my basal and bolus totals, right?
> 
> I mean, I can switch back and forth between Open and Closed to get my programmed basals or not, but is the lack of data the only think I am missing by being in Open? Is there any other place that data is available?

I think it would be easier or I should say fewer actions to just stay in Closed Loop, rather than switching back and forth. If @dm61 could add support for the temp basal, I think I would try that. I would certainly like to see that as an option myself.🙂 This may help with bolusing on the watch, too, if you are in Closed Loop using an Override. Of course, I’d also like to see a simple, Temp Basal (ZB or other) Override, which does not include ISF, and IC, too 🙂

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)\
**Post date:** [July 31, 2019, 12:24am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/24 "2019-07-31T00:24:09Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/160):
>
> Maybe we could take a video of how bolus from watch works.

I have seen some videos on it. But the people are always standing there or sitting down. :😀

I really need to try it myself. The PDM allows me to do it with one hand, and the watch requires two. It’s kind of an awkward motion to reach across your body while you are running. So I really need to try it and see how easy it is.

The other thing is how easy it would be to see the numbers. Sometimes it’s kind of hard to do that while running.

---

<div class="post-metadata">

**Author:** ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)\
**Post date:** [July 31, 2019, 12:25am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/25 "2019-07-31T00:25:19Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/158):
>
> I am shopping watches now. Ultimately, the make-or-break deal for me is if I can bolus easier when running.

I think Apple has a return policy of 15 days even if you use the watch. I was tempted to return my watch initially but after installing the app I was hooked. It is very basic, but so much more convenient than pulling out the iPhone, especially if it is packed away in a zip locked baggy!

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)\
**Post date:** [July 31, 2019, 12:25am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/26 "2019-07-31T00:25:26Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/161):
>
> Of course, I’d also like to see a simple, Temp Basal (ZB or other) Override, which does not include ISF, and IC, too 🙂

Definitely. I would love a ZB without exceptions! Not 10% or any carb numbers or targets!!

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)\
**Post date:** [July 31, 2019, 12:26am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/27 "2019-07-31T00:26:29Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/163):
>
> It is very basic, but so much more convenient than pulling out the iPhone, especially if it is packed away in a zip locked baggy!

Yep, that would be a huge advantage, not having to take the PDM out of the running pouch like I do now!

---

<div class="post-metadata">

**Author:** ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)\
**Post date:** [July 31, 2019, 1:03am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/28 "2019-07-31T01:03:26Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/161):
>
> add support for the temp basal,

There are two somewhat different solutions to what I think you and @Eric are looking for:

1. A version of temp override that would only adjust basal but would not alter ISF or CR, otherwise Loop would continue to do its closed-loop as usual, or

2. PDM-style command to the pod to do a certain temp basal for a certain amount of time, during which Loop would not make any further alterations.

Approach 1 would likely be easier to code, and I think I might be able to give it a try - will let you know if I make any progress. Approach 2 is more complicated because it would require going down to the pod driver code (which I would not be able to do, since it is more complicated, and I do not even use pods, so could not do any testing). But, there is an [open Loop issue](https://github.com/LoopKit/Loop/issues/937) that has lots of interested users, so maybe Pete or someone else will have it included to Loop at some point.

---

<div class="post-metadata">

**Author:** ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)\
**Post date:** [July 31, 2019, 1:38am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/29 "2019-07-31T01:38:24Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/166):
>
> Approach 1 would likely be easier to code, and I think I might be able to give it a try - will let you know if I make any progress.

This would be awesome if you could take a look. Just looking at the high interest in solution 2 means that many would be interested in solution 1, too, which might be more readily coded??

Thank you for looking into this.

---

<div class="post-metadata">

**Author:** ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)\
**Post date:** [July 31, 2019, 1:42am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/30 "2019-07-31T01:42:15Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/147):
>
> All I really wanted to see were the insulin deliveries from Loop today.

@Eric, please go to Health app, tap on Sources and check if Loop has permissions to write Insulin Delivery. The screen should look like this:

 ![IMG_9281](https://canada1.discourse-cdn.com/flex030/uploads/fudiabetes/original/2X/d/da146949b8ac5ddbdd10ea9b14a933c93fb36506.jpeg)

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)\
**Post date:** [July 31, 2019, 2:41am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/31 "2019-07-31T02:41:31Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/168):
>
> please go to Health app, tap on Sources and check if Loop has permissions to write Insulin Delivery.

Yes it does have permission.

I should be more specific about the problem. When in Open mode, Health **does** show bolus, but it does **NOT** show basal.

Logically that makes sense. When Open, the pod is just doing its pre-programmed basal routine. So loop is out of the picture. All of that basal program is stored on the pod.

So yes I see bolus, but not basal. Does all that make sense?

Here is a good picture of it in Health. You can see I was in Closed all night, and Open all day, and the picture shows it just like that. You can still see bolus in the day, but not basal during the day.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fudiabetes/original/2X/9/9f7056a53b23988e8f1a16d22668300a159edcf7.png)

---

<div class="post-metadata">

**Author:** ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)\
**Post date:** [July 31, 2019, 3:01am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/32 "2019-07-31T03:01:47Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/169):
>
> So yes I see bolus, but not basal. Does all that make sense?

Yes, makes sense, and yes, I can see why Loop is not writing basals in open-loop mode (as it should). Thanks for clarifying the nature of the problem. I think this should be fixed - Loop knows what programmed basal is, and should be able to write this to Health irrespective of open or closed mode. I may post this on Zulip and see what people say.

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)\
**Post date:** [July 31, 2019, 3:12am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/33 "2019-07-31T03:12:28Z")

</div>

@Trying,  
I just ordered these. They are thicker than the normal kitchen type ziplock bags, and I think these would be the perfect size to put the RileyLink in. It would help protect it a little bit if it was dropped, and would keep it dry for running. The 2x3 seems like the perfect size.

I’ll let you know what I think. Should be arriving in a few days.

> **[Amazon.com: 【Thicker】 2" x 3", 100 Count Small Clear Resealable Zipper Poly Bags...](https://www.amazon.com/gp/product/B07BTPGPKP/)**

---

<div class="post-metadata">

**Author:** ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)\
**Post date:** [July 31, 2019, 3:18am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/34 "2019-07-31T03:18:48Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/167):
>
> This would be awesome if you could take a look.

I think I have found how to fix the division by zero if a 0% override is selected. First, as you have already found, change from 10 to from 0 in LoopKit/LoopKitUI/Views/InsulinSensitivityScalingTableViewCell.swift

Then, change [this line](https://github.com/Kdisimone/LoopKit/blob/42d3afac724aab4d9b5ff17bead2f3cef68c30ba/LoopKit/TemporaryScheduleOverrideSettings.swift#L21) to this:

return insulinNeedsScaleFactor.map { 1.0 / ($0 == 0 ? 1.0 : $0) }

and [this line](https://github.com/Kdisimone/LoopKit/blob/42d3afac724aab4d9b5ff17bead2f3cef68c30ba/LoopKit/TemporaryScheduleOverrideSettings.swift#L25) to this:

return insulinNeedsScaleFactor.map { 1.0 / ($0 == 0 ? 1.0 : $0) }

There are two problems, however. First, this is really a quick-and-dirty fix. Second, and worse, the changes required are in LoopKit, not Loop. So, you can’t just change the code in checkouts and recompile. You’d need to make a private copy of Loop and LoopKit from Katie to your own repository and then make changes in a number of places so that Loop code knows that you are using a different LoopKit. Are you familiar with github and git by any chance?

---

<div class="post-metadata">

**Author:** ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)\
**Post date:** [July 31, 2019, 10:58am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/35 "2019-07-31T10:58:01Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/171):
>
> They are thicker than the normal kitchen type ziplock bags, and I think these would be the perfect size to put the RileyLink

Good find! That extra thickness should be helpful. I’ll try them, too.

---

<div class="post-metadata">

**Author:** ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)\
**Post date:** [July 31, 2019, 11:12am UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/36 "2019-07-31T11:12:18Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/172):
>
> Are you familiar with github and git by any chance?

Thanks! Yes, I already use git/github for Loop so I can track the changes, but not for any of the checkout frameworks. Would the carthage file need to be changed to access the local Loopkit repo?

I guess this fix still includes the ISF, and IC in the Override effect, right? You mentioned that they could be decoupled from the basal, but that it would be more complicated. I think if we just want ZB, then they aren’t important but would be for non ZB, right? Except if we bolus?

---

<div class="post-metadata">

**Author:** ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)\
**Post date:** [July 31, 2019, 1:00pm UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/37 "2019-07-31T13:00:20Z")

</div>

You would need to create your own repositories of essentially all checked out frameworks, make changes in LoopKit, and then make sure that cartfiles for all frameworks point to your own frameworks. It’s a bit tedious, but not too difficult. Start by cloning jojo Loop or whatever branch you are using. Then look through the cartfile and clone all dependent frameworks that are different from standard Loop. Then make appropriate edits in your LoopKit and cartfile’s of Loop, as well as carfiles of all other relevant dependencies. For such small changes, you can do all that on github from a browser, no need to use Xcode at all. In the end, you download and install your Loop as usual. The best guide is the jojo branch itself - just do whatever Katie had to do to create a branch that points to her private version of LoopKit.

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/174):
>
> this fix still includes the ISF, and IC in the Override effect, right

The fix only changes the override for 0%, to avoid division by zero. The part of the code: 1.0 / ($0 == 0 ? 1.0 : $0) means: divide by 1.0 if the percent-override is 0, otherwise divide by the percent-override. So, you’ll have a very special zero % override that produces ZB, but keeps ISF and CR untouched. If you wish to have some other ISF or CR scale factor for 0 override, just change 1.0 to whatever number you like, e.g. 1.0 / ($0 == 0 ? 0.5 : $0) would bump ISF by a factor of 2. Makes sense?

---

<div class="post-metadata">

**Author:** ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)\
**Post date:** [July 31, 2019, 1:29pm UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/38 "2019-07-31T13:29:20Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/175):
>
> make sure that cartfiles for all frameworks point to your own frameworks

Ok, thanks for the details. That was what I thought would be needed! I did check Katie’s Jojo cartfile and noticed it was pointing to her repo! 🙂

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/175):
>
> Makes sense?

Yes, makes sense.

Another question re: code both @Eric and I had re: BOLUS increments on the watch. Do you know how we can make a change so that the BOLUS increment is 0.1U? If I tap the ‘+’ or ‘-’ on the watch Bolus screen, it currently defaults to 0.25U, much too large. Thank you!

---

<div class="post-metadata">

**Author:** ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)\
**Post date:** [July 31, 2019, 2:27pm UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/39 "2019-07-31T14:27:43Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/176):
>
> currently defaults to 0.25U, much too large

You may just use the crown for 0.025U increments. I think the crown is much more convenient than +/- taps anyway.

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)\
**Post date:** [July 31, 2019, 4:58pm UTC](https://forum.fudiabetes.org/t/omnipod-looping/8012/40 "2019-07-31T16:58:11Z")

</div>

> [@Running with OmniLoop](https://forum.fudiabetes.org/t/running-with-omniloop/7533/177):
>
> You may just use the crown for 0.025U increments.

Is there a way to set it for 0.05, since pods can’t deliver 0.025?

I wasn’t sure if I could modify the let rotationsPerValue: Double = 1/12 line to be other values. I assume it has to be an increment of 12. Or would increments of 6 work? Maybe 18 gets me closer?

[Previous page](https://forum.fudiabetes.org/t/omnipod-looping/8012.md?page=1)

[Next page](https://forum.fudiabetes.org/t/omnipod-looping/8012.md?page=3)
