OpenAPS and UAM

Now that we’ve had some time with SMBs enabled, I was ready to consider trying the other new feature called UAM (unannounced meals).  I wasn’t previously interested in this feature much, because (I’m lucky) Anna has only forgotten about 2 boluses in her 2+ years of mostly independent bolusing.  So meals generally don’t go unannounced.  I didn’t imagine there would be much value in a feature named “unannounced meals”.

But, then on some random school mornings…I am reminded that I should keep my options open.  School “nutrition” break is at 10:10am.  By 10:15am, I see a bolus come in on Nightscout.  And I think to myself “Huh, I wonder what that will be because I know she didn’t pack a snack today.”  By 10:30am, I see the BGs starting to climb and I wonder how it will go.

Nutrition break is never about quality food.  The things sold by the school for nutrition break usually involve chip bags, mini donuts, twizzlers, and the like.  These snacks are problematic because  (1) we don’t have a lot of practice for these foods because we don’t generally have lots of these particular foods around the house and (2) they are being eaten at a time where she doesn’t have a lot of time or interest in babysitting her BGs or IOB.  Also problematic is that pesky independence that Anna is really quite interested in.  She doesn’t want to tell me what she’s eating, nor does she want to have me telling her how to bolus things much these days.  She will tend to still ask me for input on new food boluses when it’s just the family around…but when she’s around her high school buddies at school?  Forget about it.  So, iteratively improving her bolus techniques for these foods is hard to do given the lack of communication on these snacks.

Anyways, I turned on UAM on Sunday late night with the thought that maybe Anna and I would have some help during those nutrition snacks.  My theory wasn’t that she isn’t bolusing or entering carbs…but that perhaps the carb counting on those snacks was particularly difficult and our desire to keep her independent probably wasn’t going to allow for much improvement on proper carb count/bolus techniques for the snacks. I really do value her growing self-confidence and want to cultivate it by not hovering on every new food and new bolus…but those nutrition snacks test those limits.

I didn’t tell Anna about the new feature, but she must have had that sixth sense because on Monday’s nutrition break…she decided to test it.  My pebble started to alert me around 10:45pm that her BGs had climbed above 130.  When I pulled up NS, there was 50g of bolused carbs entered.  BGs were climbing, but SMBs were started.  I sat patiently as I could.  But, eventually the curiosity got to me when she got to about 180 mg/dl.

Screen Shot 2017-05-22 at 11.16.08 AM
IMG_3399

So nice of her to be testing the new feature with exactly the part that I thought it might help with…some random new food that she was completely guessing the carb count on (without me involved).

Things went awesome…I was so impressed.  Somehow the rapid rise from that mini-McMuffin was halted pretty well and the decline back to target was looking smooth.

Screen Shot 2017-05-22 at 11.51.51 AMSadly though…that experiment would have to end early.  Her rig’s battery came loose and looping stopped.  She couldn’t see that the wire had come loose so we just lived out the rest of the day old-school…no looping. (but look at how well those BGs slid in close to target of 90 even after 43 minutes of no looping.  UAM/SMBs sure did estimate that needed amount of suspension pretty accurately from a fair bit ahead of time)

Screen Shot 2017-05-22 at 12.33.42 PM

When she came home on Monday and I suggested that maybe she could run the experiment again…she was more than happy to oblige.  So, today she got the mini McMuffin again and did the same bolus and same carb entry.  Started the meal looking pretty similar to Monday.

IMG_3414

The UAM/SMBs worked together to control that peak BG as best as possible…looked good.  I like how even though clearly the sandwich may have been a little different carb count (or her prebolus time was a little longer today?), the loop was reacting well to the BG behavior rather than simply the carb count.

IMG_3423

But then I got a little leery when I saw this…was the bottom falling out?

IMG_3430

My worries were unfounded.  The loop’s math was solid.  We gently landed pretty much at our target of 90 mg/dl.

IMG_3443

I’d say the experiment has been a solid success.  One of the biggest things I notice is the way the loop successfully managed this same meal without prejudice.  What do I mean by that?  It reacted to the ACTUAL BGs that it was seeing really well rather than seeming overwhelmed by strictly the carbs entered.  At the peak BG on Monday, Anna was carrying about 5.34 units of IOB.  At the peak BG on Tuesday, Anna was carrying about 3 units of IOB.  To have both of those peaks resolve close to target without overshooting or needing a low treatment or intervention is pretty impressive.

The question is “If it was UAM that did this, HOW did UAM do this?”  I spent a good portion of the day exploring the answer to that question.  And the answer probably deserves its own post.


There’s a line in the movie Labyrinth where the main character Sarah has an epiphany and says to the evil Goblin King “You have no power over me.”  I feel like I’ve just gotten to say to the snack bar “You have no power over me.”

Doritos are still devilish on BGs compared to a low-carb muffin, but at least the BGs are being handled better than if I stared at them and tried to micromanage with 8 text messages and distractions.  Anna comes home and tells me about the things she did with friends and her homework…no need to discuss how to do the snack bar “better” the next day.  What a freedom.

OpenAPS and hormones and SMB

One of the most commonly asked questions I see is “How does OpenAPS handle periods?”  Well, lucky me!  I happen to have a teenage girl using OpenAPS…and a blog.  And she is open to bribes to allow me to opine on periods and type 1 diabetes in a public settings.

We used autotune previously on our OpenAPS rigs, but ended up disabling it as a part of our normal loop operations*.  I still run it as a once-in-awhile check, but mostly now depend on autosens for making our basal and ISF adjustments.

A quick note:  Autotune runs once per day (shortly after midnight) to create a new “autotune-profile” that your rig will use for the day with basals and ISFs based on the tune it performs.  The degree to which this autotune-profile can differ from the profile stored in your pump is based on the settings you have in your preferences for OpenAPS.  Once that autotune-profile is generated, changes to your pump settings will not affect the loop until autotune runs again at midnight.  And even then, the new pump settings are only a starting point for autotune to use.

The reason we disabled autotune was two-fold…(1) I don’t like being locked into a profile for the whole day necessarily because (2) hormones (or medicine) can cause us some pretty dramatic changes.  It’s not every month that we get hit super hard.  But, certainly sometimes, the swings needed in our pump settings are really more than you could reasonably ask from an automated program. And they happen in the matter of a couple hours or even less.

We switched to using just autosens for helping us with basal and ISF changes.  It has worked TREMENDOUSLY well.  We have numerous times that it has been able to fairly quickly (within 2 hours or less) detect periods of changing insulin needs and kept us steady, even when I wasn’t paying close attention.

But, every once in awhile, those hormones just come on really strong and fast.  More than autosens can control.  Sunday morning was one of those times.  The morning started off nice and steady.  No signs of problems in her basal rates.

IMG_2971

But, when she woke up in the morning around 10am, she informed me her period had started.  Which then led to this by lunch time.  No food involved, and that BG was climbing.

IMG_2983

When I saw the SMBs start up shortly after a manual bolus and no food…I knew that it was time to take this basal change more seriously.  Those little SMBs are a good visual clue when it’s time to take more action, I love that.  This was our first time going through a hormonal change with SMBs enabled.

The first thing I did was go to autosens to see what it was autosens doing for me.  And I could see that it was trying to help bring down that high by using temp targets…adjusting target down to 80 from 90 mg/dl to help.  Good.  But, it was also Mother’s Day and I was at the movies on a date with my husband.  Kids were home alone, and I left things alone for the rig to watch and do what it could.  No basal adjustments were made manually at that point.

All_Systems_—_Papertrail_and_Image_Capture

But, by later that evening, it was clear that the period was not going to simply autosens away, this swing was bigger than some of the others we had.  The SMBs were again a useful visual clue that things weren’t settling down, even with a good front loading of insulin. We were holding steady, not coming back to range.

IMG_2989

So, we started to make some manual adjustments to basal, and used autosens to “validate”, in a way, our changes.  If we kept seeing no drop in BGs and autosens adjusting stronger…we knew we needed more.  So, we bumped up from 0.8 to 0.85.  And then from 0.85 to 0.90…

autosens

In the end, we have adjusted from a basal of 0.8 u/hour to a basal of 1.3 u/hour to keep her BGs steady.  Which actually corresponded to the amount I would’ve guessed on the correction boluses that it was taking to keep her steady (although above target).  It’s taken us almost 24 hours to make those adjustments, moving about 0.05 or 0.1 u/hour increase at a time. (I did them incrementally and watched how the changes behaved before adjusting again.)  I could’ve just jumped to 1.3 u/hour, as it is a basal rate we are used to with periods, but I didn’t want to overshoot and the loop was doing a good job of keeping her reasonably close to range despite needing over 60% more insulin than usual.

Where do we stand now?  Close to 24 hours since the insulin-resistance started…

IMG_3006

Looking at her autosens right now, it’s still seeing that 1.3 u/hour isn’t cutting it and is using a 1.55 u/hour (and a stronger ISF).  Which doesn’t surprise me given the recent SMBs needed to keep her in range.

All_Systems_—_Papertrail

I will just opt to let the rig take care of things for the rest of Anna’s school day before we make anymore changes to her pump settings.  These insulin-resistant parts of her cycle are powerfully strong, and used to be really hard to know what to do with.  But, between autosens’ numbers and SMBs visuals, this was much easier to navigate without stress or high BGs.  Making changes to her basal wasn’t as mentally burdensome as it used to be.  And hooray for SMBs keeping an insanely good job on controlling hormone-related climbs.

And now I have to bribe Anna for the permission to post.

OpenAPS SMB and Panda Express

Panda Express isn’t the first thing most type 1s call a “fun time”.  It’s a lot of carbs, both slow and fast.  BUT, oh how Anna loves their orange chicken.  It was the first meal that had made us cry after diagnosis.  We were fresh off our first endocrinologist visit only few days before.  They’d emphasized still living life and “just count carbs and dose, you’ll be fine.”  We desperately wanted to not live in fear and give her a small bit of her old life back after what had been a very tough week.  We picked up a plate of orange chicken, carefully weighed out the food and calculated the carbs.  We bolused 6 units, waited 15 minutes and she ate.  When she was 398 mg/dl not long later, we all started to cry.  She swore off food.  I swore at diabetes (and orange chicken).  And all the insulin shots later to bring her down…oh we were miserable.

Things got better though.  We learned that fats and proteins needed to be involved in all those dosing decisions  We learned that we needed to split the insulin up over time to keep her from going low early and high later.  We learned that weighing food was not going to happen very often for us and we needed to get better at eyeballing.  But, we also still ended up staying up late at night giving multiple corrections, usually to treat lingering high BGs and then eventually to treat a low BG when the food finally gave up.

So where do we stand on Panda now?  We do pretty well, but it takes about 16 units and the meal lasts close to 7 hours of impacts to BG.  We’ve learned through trial and error about how and when to split up the total needed bolus over time to help get smoother BGs.  But, there’s still some difficulty to that.  Mostly the first part is easy…we give about 8 units of insulin at least 30 minutes ahead.  Another 3-4 units about 5 minutes before eating.  And another 2-3 units usually just after she eats.

The hard part is knowing what to do nearly three hours later when the first boluses have lost their steam, but the chow mein noodles are still plugging away.  I always wonder when the right time to do that tailing bolus is.  And how much.  Of course, doing all this in the middle of the night adds to the fun.

Let’s cut to the chase…I wanted to see how Panda did using SMB and what I may (or may not) notice as a result.  Below is a comparison photo of Panda meals.  On the left is Panda on normal OpenAPS use.  On the right is Panda on SMB OpenAPS use.

loop-panda

Overall they don’t look THAT different, but there were some really notable difference in experience.

Early low on the left?  That was just my bad…too much early bolus.  We cut back on how much we gave up front…so that was human error.  After that though is the interesting part.  And probably the part that will be the hardest part for people to wrap their brains around in SMB use.  See that large long swath of suspended basal in the SMB side?  Yeah…traditionally it would be the opposite of what you’d want to see in a meal with large carbs that hits hard later.  BUT…bear with me as we talk through the math and logic (and safety).

The interesting part begins when OpenAPS first starts to see a significant carb impact.  It’s set its first SMB of 0.1 earlier. And maybe it was prepping to give more?

IMG_2898And now let’s see what the logic is for the looping decisions now by looking at the OpenAPS pill…

IMG_2899

The loop has seen a positive “deviation” (Dev: 165) meaning BGs have gone up more than the rig had expected.  The Eventual BG is predicted to be 170 vs my normal target of 90.  The loop also predicts that an extra 1.58 units of insulin will be needed to bring Anna back to target eventually (HOW COOL IS THAT NUGGET OF INFO?!).

And here’s where the SMB logic absolutely caused me panic and confusion when I first saw it.  The loop sets a 90 min temp basal and only gives 0.4 units of super microbolus.  Myself thinking “OMG.  WHAT?!  Suspending in the middle of a Panda Express meal for 90 minutes?!  And ONLY 0.4 units when it knows it needs 1.58 units?”

So…these panic points need a little explanation and understanding of the SMB logic and safety points.  The key part is to remember that SMB is designed to give you reasonably SAFE amounts of bolus needed upfront and use suspensions to balance them out.  Suspensions will be part of the regular looping behavior in SMB mode.  Suspensions can vary in duration…all the way up to 120 mins long.  These suspensions are important safety factors because if the rig has been front-loading you with SMBs and the rig suddenly fails…you want that longer temp basal to help keep you safe.

Single SMB amounts are limited by several factors.  The largest a single SMB bolus can be is the SMALLEST value of:

  • 30 minutes of the current regular basal rate, or
  • 1/3 of the Insulin Required amount, or
  • the remaining portion of your max-iob setting in preferences.

For Anna, her regular basal rate is about 0.8 u/hour therefore we’d never see a SMB given greater than 0.4 units typically.

SMBs can be administered every 5 minutes.  If SMB thinks Anna is going high, it would be able to administer approximately 5 units in an hour of SMB use (assuming the other two factors were not limiting doses).  That’s a lot of insulin…more than enough to make up for the 0.8 units that would be suspended for safety-sake during that same period of time.  So, the suspension really isn’t that much of an issue in the overall math and loop ability to administer sufficient insulin.  But, if you really missed a whole bolus for a meal that needs nearly 16 units to control…yeah, you’re still gonna have a high BG before coming down.  Bolusing is still important in looping if you want to stay near target range.

The next part…why doesn’t the loop just turn the regular basal (or a high temp basal) on while it’s also giving SMBs to more quickly give the required insulin?  SAFETY.  This system still needs to keep safety in mind (and you want it to).  If the deviations and trends show a real need, those suspensions will be canceled…but only when they safely can be.  The loop needs to see the deviations and BG predictions and IOB all showing that it would be safe to do so.

If she needed 1.6 units of insulin extra, that could be delivered in just 12-15 minutes with SMB.  That’s not a long time to sacrifice for safety sake to make sure that all that insulin is still needed.  Makes sense to confirm the need by collecting a little bit of BG trend to confirm that need, rather than laying it all on at once.  Remember…this isn’t a rage bolus loop.  😉

Ok, so then what happens a little later?  Just as I suspected…chow mein noodles are really coming on now.  But, SMB had been adding to the IOB and helping out every 3 minutes.  I also knew that around this time is when I normally give the start of the 2-3 boluses that chase the Chinese Food effect.

IMG_2901

So, I looked at the OpenAPS pill to see what the logic was offering up at this point in the game.

IMG_2900

Now it’s showing an Eventual BG of 401 (probably not that far off for what Panda has shown us in the past).  The loop was still setting SMBs but now the Insulin Required had grown to 3.96 units.  That confirmed what I suspected.  This is the part in the meal that the tail bolusing needed to start.  And normally this is where I kick myself that I’d missed the rise.  I was going to be chasing this rise…ugh.  I chose to give 2 units of the 3.96 units it wanted.  I figured that was sort of split the middle and provide some help, but also give some wiggle room if the meal also suddenly stopped BG impacts.  After all, diabetes rarely does the same things exactly the same in repeated experiments.

It worked great…except it was about 11:30pm, and I was ready to stop watching the experiment and go to bed.  I still had (my old logic) in my head that I’d probably waited too long to give that last bolus.  So, i gave another unit absentmindedly and called it a night.

IMG_2906

Except it turns out that was a mistake.  I’d underestimated (and not looked at) how much the SMBs had been doing before 11:30pm.  That last bolus was not necessary.  So I gave a little juice (hence the climb at midnight) and then really called it a night.  Lesson learned (again): SMB do an excellent job of fine tune fixing when the insulin required is less than about 2-3 units.  Not a good idea to give extra corrections when the insulin required is that little (I cannot believe how I’m even able to write that 2-3 units is a loop correctable within comfort zone amount now…freaking amazing).

As you can see, SMB and OpenAPS took care of the rest of that meal no problem at all.  In fact, it saved me an extra bolus AND a temp target in the middle of the night that I used to have to do.  Thumbs UP.  I’m all for more sleep and less manual bolusing in the middle of the night.  And we got to wake up to this:

openaps-panda

Kind of funny to see that my error caused the worst BG of the night.

My lesson from this:  SMB is a good help to know WHEN to do later boluses in extended bolus-type meals.  The Insulin Required estimate is a good help for deciding when a manual correction is needed and to provide a rough estimate of how much to give.  If the Insulin Required is over about 2-3 units, we will use that as an indication that a manual bolus will help.  I will likely never give the whole amount (since large meals are prone to so much carb counting error), but giving about half the required amount and letting SMB pick up the sloppy edges worked really well.

There’s a couple other random lessons about see RAW data (did you notice that her CGM pooped out early in the meal?!) and using bolus menu while SMBs are enacted (might require some habit changes…we are thinking about how to handle that).  I’ll post those items separately when I have more time.  Now I need to prepare…Anna has a BOY coming over to the house tonight so we can meet him before we allow a “date”.  Can’t wait to see the BGs from that.

OpenAPS new feature

You may have heard that OpenAPS got a couple new features in development…super microbolus (SMB) and Unannounced meals (UAM).  I’m currently testing out SMB features this week…seeing how they work, trying to wrap my head around some new ways of thinking, finding out if we have to change anything in our patterns.  I thought I’d report in on how that’s going.

We started SMB just before going out of town for a wedding.  Not a big deal except…lots of “perfect storm” events conspired against us in the usual diabetes way.  Anna wore a dress (hard to access pump and we had some unbolused food as a result), the music was loud and I misheard her food choice (and therefore gave her a bad carb estimate to bolus for dinner…she ate a large brioche bun and pasta.  I heard chicken.  yeah…you know where that went.), we happened to be in the only cell dead spot near LAX for several hours where I wasn’t paying any attention (and therefore I can’t say how the system would’ve behaved because it was offline).  We even had a couple random pump resets that made us need to reset the pump time (which proved to be important learning lesson on smb…pump and rig time must be within 60 seconds of each other).

So, a rough start just for my mental preparedness (although BGs on Sunday after the wedding were great).  We went back to normal non-SMB use for Monday while I read some more details about SMB and UAM.  I needed to understand more about the decisions and actions because I was not so pleased at first glance (there’s a lot more “suspend” after meals than I was mentally prepared for…I needed to understand how those played a part).  After a lot more reading, we restarted with SMB.  We are not yet trying UAM features…one step at a time.  Plus, we don’t usually have many unannounced carbs (thankfully Anna is a pretty diligent bolus unless she is wearing a dress, at a wedding, in a cell dead spot, with large brioche buns around.)

We restarted SMB yesterday and have been running it since.  I am very pleased with it now.  The basic idea is that SMBs are given in little increments earlier to help control a rising BG, as opposed to waiting the whole 30 min temp basal to deliver a needed insulin amount.  The program only gives as much as it can safely temp suspend for later…like the idea of a traditional super bolus…just on a micro scale and with the aid of a computer doing all the math better than my brain or time can permit.

Want to see some examples?  How about last night…

 

IMG_2788

Here’s her 15g dinner (yes, low carb for this one).  But, it nicely suspended and prevented a low early after the bolus…and then SMB picked up on the tail end of meal when it needed to come back online.  See those little tiny boluses of 0.1 and 0.4 units?  Those are SMBs…automatic little boluses of insulin.  The only time she touched her pump in the above graph was the 15g meal bolus.

You can also see an earlier SMB help with controlling a rebound from a low treatment at school.  Why did she go low?  She gave a correction after cheetos-involved lunch without noticing that SMB already had done so.  So, note to kids…no corrections with SMB.  She’s pretty happy with that instruction.

How about her school mornings?  Here’s this morning…

IMG_2794

Before DIY closed looping, school mornings were such a cluster @#$%.  We had huge basal set from 5am-8am plus an extra (always a guess) bolus when she left the house to help control the school morning nerves.  And then, this year, she has PE second period…oh but wait…not always second period because it might be a block day schedule.  You parents know what I’m talking about…always having to stay on my toes about what day of the week it is and make sure the bolus/basal program is the right one.  We regularly battled 220s in the morning using that system.  Plus interrupted her school day with about 5 text messages to try to get things right.

Then we got on Loop and OpenAPS…so much better.  We had to keep the basal patterns different for school days vs weekends when we used Loop…but that was ok.  When we went to OpenAPS, we’ve only used one basal pattern and autosens has taken care of our basal changes (magic?!).  But, we have still had about 75% of the mornings where she slowly climbs to 120s and even 130.  When her BG hits 130, Anna’s pebble will buzz and she mindlessly gives herself a set correction of 0.5 unit. (Parent note: Teens will not do math to check how much a loop has already given.  We finally told her to not give more than 0.5 unit for correction anymore, which equates to about a 15 point BG drop for her ISF.  That amount seemed to keep her from overcorrecting but also helped out on those days where she needed some help.)  We were pretty happy with this system because we no longer needed to text her, she wasn’t overdosing, and our basal switching around was no longer necessary.  Win-win-win.

And now two mornings on SMB have been flat-lines.  Like above.  It’s not a big sample set yet to draw conclusions, but I’m loving it.  I know SMB is playing a part (I can see the SMBs on my graph after all…none of those were administered by her or I.  She has been told to give no manual corrections while we test this SMB stuff.)

But also look…that 8g snack snuck in around 10am.  What is that?  I have no idea.  Fruit cup?  Likely.  Well she bolused for it but I have no idea what it is.  Here it comes…

IMG_2795

I don’t interrupt with a text message asking what it was.  I don’t intervene.  But I do get to watch and that was fun.  So what was OpenAPS doing when that climb started?  It lowered her BG target. (This is a new feature, too.)  We normally have her BG target set for 90-90 mg/dl.  We have allowed OpenAPS now to temporarily lower her target when her BG rises like this to help get insulin in a bit faster.  Basically, it’s like having OpenAPS automatically set “eating soon” mode for me in these situations. That temp target adjustment also will be automatically stopped when not needed anymore.  Very nice.  (I will still need to watch how it behaves in other situations like exercise.)

IMG_2800

OpenAPS also increased her basal reasonably and gave her a starting microbolus of 0.4 units based on this unexpected deviation up.

IMG_2796And then more BG data came in…and I could verify the 0.4 unit SMB had been given.

IMG_2798

At that point, OpenAPS wanted to do a 0.1 unit SMB and lower that temp basal.  Things were slowing down, but not done yet.

IMG_2799

So then we seemed to peak out about here…

IMG_2802Before starting a smooth decline…thanks to about 0.7 units of help from SMB, temp basals, AND suspended temp basals afterwards…because that’s how SMB works.  Able to give some reasonable part of the needed help up-front early and then suspend later.  Super nice.

IMG_2809But wait, that teen wasn’t done.  It’s lunch time now that I’ve spent all this time writing up the morning.  And so it begins for lunch…

IMG_2812OpenAPS will be there, helping with some SMBs and temp basals.

IMG_2814

IMG_2813

IMG_2815

IMG_2816

IMG_2817

IMG_2818

Note: I realize the BG control represented here is tight.  BUT, did you also notice that it was completely hands off?  I haven’t texted Anna.  She hasn’t done a correction.  I didn’t adjust a target, nor did I adjust a basal or ISF in over four weeks.  It’s been automated.  She has only done her usual bolus for carbs.

We will keep testing things out for awhile.  Keeping a close eye on things…looking if we need to change our habits, change our settings, or wear fewer dresses at weddings.  I’ll be back with a higher carb day (Panda Express anyone?) and more details on that (foreshadow though…she ate two Randy’s donuts for breakfast and in-n-out for lunch on the way home from wedding. And it was nice…I just didn’t grab screenshots.)

Remote monitoring of OpenAPS

My impression has always been that OpenAPS started with mostly adult t1d users.  (And mostly adult t1d users who have some sort of coding experience, too.)  However, as word has spread, the system is seeing more and more parents using OpenAPS with their t1d kids.  So…there didn’t seem to be a whole lot of discussions I could find about remotely operating the OpenAPS system as a parent. What tools could prove useful? How would I set them up?

I’m super happy to say that several people have stepped up and helped me understand some of those tools, and write-ups have been added to the OpenAPS docs so that these are more readily available to parents.  I guess the purpose of this post is that having the tools available is one thing…but concrete examples of how to use the tools is sometimes super helpful.

Nightscout

The first line of remote monitoring of OpenAPS is through a Nightscout site.  In fact, I cannot imagine Loop without a Nightscout site, either (although technically you don’t HAVE to have one for Loop).  Nightscout sites allow you to see so much of what your rig is doing.

Temp Basals

temp basal render

The little blue lines are wonderful easy visuals for what is going on for your temp basals.  Like the example above shows, you can see temp basal “buildings” growing above whatever the normally scheduled basal rate for that time of day is (indicated by a dashed blue line on the blue basal area). Visually, I can see in an instant that her OpenAPS loop is giving her a high temp basal rate in response to her rising blood sugar.

OpenAPS pill

openaps pill

The next really helpful tool is simply clicking on, or hovering over, the OpenAPS pill.  The pill contains information not just about what is being done, but even some insight about WHY those decisions are being made.  For example, in this screenshot, the OpenAPS pill shows that based on her rate of BG increase, the loop would like to provide a temp basal rate of 4.75 units/hour to help control the rise back to target.  You can see that it is predicting a BG of 150 mg/dl and that my target is 90 mg/dl.  And, even more, you can see that it is respecting my max temp basal setting of 2.4 units/hour.  You can also see, if you have autotune and/or autosens enabled, what ISF is being used in the calculations.

If the pump is suspended, you will also see a grey dot on the BG line with a hover over message that the pump was suspended.  The OpenAPS pill will display an “x” for the pill’s status and text to let you know it is not enacting temp basals while it is suspended.  SO helpful for teenagers who finish their morning showers and forget to resume or reattach their sites.

If you have multiple rigs, as I do, you can see the status of the various rigs in the OpenAPS pill too.  I have an “edison3” that stays at home in her room, so it is “waiting” for her to come home.  The “edison1” rig is at school with her.

System Status

system status

Also nice to see information about the pump’s reservoir and battery.  I have alerts set through Nightscout to let me know when her pump battery gets close to low, as well as the reservoir.

The battery icon (75% in this picture) is the rig’s battery level, so I can also keep an eye about when/if the rig needs charging.

Temp BG Targets

temp targetSetting temp BG targets to help adjust to changing situations like exercise or upcoming meal times is super easy using the care portal in Nightscout.  The site also will provide a grey line showing the range and duration of the temp BG target.  You can cancel the temp target and the line will end at the time the temp target was cancelled.  It leaves the grey bar on the graph so that you can scroll back in time to see if your actions might need modifying later.  For example, we are currently using temp targets to get our daughter to her after school track team workouts without carrying extra IOB.  We set a temp target at lunch time, 3 hours ahead of the start of her workout for 120-140 mg/dl.  As her lunch bolus wears off, the temp target helps keep loop from giving too much extra insulin between lunch and track workout.  We keep the temp target going all the way through her 2.5 hours of track workout.

Papertrail

So while all the Nightscout stuff is fantastic, it does not really help you figure out WHY your rig might not be looping while your kid is away at school or a friend’s house.  Most of the time, the troubleshooting for OpenAPS rig is as simple as a power button restart.  But, if you are setting up a new rig, or getting connected on new networks…or wondering about anything in your loop’s functions…Papertrail provides an INVALUABLE insight to the rig without needing to be near the rig.  Directions on setting up Papertrail for OpenAPS are here.

Papertrail

As you can see, both my rigs (edison1 and edison3 are uploading to Papertrail).  The blue words indicate where the information is coming from (in other words, what action in the rig is logging the activity).  Pump  loops, nightscout loops, CRON loops, etc. are all in there.

Super helpful is to set-up filters for activities that you may be interested in seeing more often.  Such as pump tuning.  If you come from Loop, and are familiar with the “tuning” as part of trouble shooting…sometimes you may not have been entirely sure whether the retuning was really affecting things or if it was the cause of the original problem anyways.  Well, OpenAPS has a similar tuning called mmtune.  If the loop detects that the pump is not establishing communications well, it will retune it’s radio automatically after failed tries and periodically during the day.  The working frequency is 916.  A failed tune will look like “916, 0, -99”.  The “-99” means a very weak signal.  Typically, if you are getting tuning results in the “-90s”, you are unlikely to keep a good loop going.  In the “-80s”, you may have sporadic problems.  Anything in the “-70s” or better, you should have pretty stable pump-to-rig communications.

Below is a filter for “edison1 916” which effectively shows her rig’s tuning results for the last several days.

pump tuningSome interesting things that you can learn about your kid’s habits and the rig’s behaviors by watching your papertrail.  My kid took a shower at about 6:55am today…she leaves her pump in the bathroom, fairly removed from her rig in the bedroom.  You can see the distance has caused pump comms to deteriorate to a “916, 1, -98” tune result.  When she finally gets dressed and puts her stuff all back together, around 7:25am, the pump tune picks up a nice “916, 5, -79″…and that was with the rig stuff in her purse, stuffed in her backpack.  Pretty good.  She arrives at school and the next pump comms failure is at about 11:39am with “916, 0, -99” just as she is finishing a PE change before lunch.  The loop picks back up and retunes by 11:43pm with “916, 5, -75”.

Why is all this info so important?  It means that I am not interrupting my kid at school nearly as much when the loop temporarily might stop.  I can see if it is likely a temporary stop based on her school patterns (PE changes for example where she may leave rig or pump somewhere separated for awhile).  I can also provide better troubleshooting advice.  If I see that the pump comms are poor…I would text “hey, can you move rig to better place?” vs. asking her to totally reboot the rig (which might not solve the problem if the rig is far away anyways).  I also know that a poor pump comms on the system are really handled quite well because I’ve been able to see how often the rig already does it’s own retuning efforts.  I am VERY supportive of keeping texts to my teen in school as short and sweet as possible.

Another extremely helpful Papertrail use is to watch how the rig is utilizing or moving between BT and wifi networks.  The screenshot below is a filter for “edison1 network.log -CRON” so that I can see just the internet connections the rig has used.wifi connectionsFor Anna’s morning, you can’t see it, but she got in the car at 7:35am to go to school and left our home wifi.  Her rig got onto her cell phone via BT connection by 7:43am.  She arrived at school and the rig got on the school’s wifi network at 7:54am.  How can you see all this…well the wifi networks have their name listed (like “Paso Schools”).  The cell phone BT connections for iPhones have local IP addresses that always start with 172.20.10.xx.  Papertrail has been so useful for figuring out if the rig is actually online while she is remotely moving around.  Especially useful for little kids who might not be the most helpful troubleshooters when you are trying to decide what network the rig is on.  So, if I see her loop is failing (yet has good pump communications), the next thing I do is usually to see if there might be a problem with wifi connections.

Papertrail is also super useful if you ever need to get on Facebook or Gitter to get troubleshooting help.  Being able to see these logs is key to know where to start in looking for a problem.

Sadly, there is no iPhone app for Papertrail, but you can easily setup a bookmark of each of the filters you use frequently and add the to your home screen.  I have one for pump loops filter and one for edison1 network logs, as I have described above.

 

iPhone

 

So, there’s some tips about WHY you should take the effort to setup good remote logging/viewing of your rig.  Nightscout and Papertrail make things pretty easy as a parent using OpenAPS.