FYI - instructions for setting up WIP/iob-cob

509 views
Skip to first unread message

Dana Lewis

unread,
Feb 11, 2015, 3:26:24 PM2/11/15
to openaps-dev
Hi all, multiple people have asked about setting up WIP/iob-cob branch on Nightscout. This is helpful for getting "purple line" predictions (based on data entered into care portal, and you can later port that data into your loop algorithms if you want); accessing retrospective predictions to see if BGs ended up in the range of the predictions (if not, usually indicates ratios need to be changed or the person is being insulin resistant or sensitive that day); and eventually as you build your loop implementations, using the purple line predictions to see if your system's predictions are in the same ballpark.

WIP/iob-cob setup:

First, create a 'profile' collection in Mongo. Add a single document in the profile collection like so:

{
"carbratio": 24,
"carbs_hr": 30,
"dia": 3,
"sens": 50
}

DIA should be left at 3 for now, but all the others you can tweak as needed.

If you need to (re)calculate your carb absorption rate:

http://diyps.org/2014/05/29/determining-your-carbohydrate-absorption-rate-diyps-lessons-learned/

If it's been awhile since you forked the Nightscout repo in GitHub, you'll also want to update your copy of the Nightscout wip/iob-cob branch, to ensure it's up to date.  If you don't know how to do that, directions are at http://www.nightscout.info/wiki/welcome/how-to-update-to-latest-cgm-remote-monitor-aka-cookie: if you haven't made any local modifications to your GitHub Nightscout fork, you can just delete your fork and re-create it, following the "PART 1: Delete and Fork your cgm-remote-monitor Repository" directions on that page. 

Next, using your existing Azure account, add a new website, and set it up the same way you did the original one (copying info from the existing site as needed).  When you link it to GitHub, manually type your wip/iob-cob branch name instead of master.

You'll also want to enable care portal: http://www.nightscout.info/wiki/welcome/website-features/cgm-remote-monitor-care-portal
.  The wip/iob-cob branch uses it to generate the purple prediction line.  If you want to see the blue retrospective prediction dots, and use them to evaluate whether the profile ratios you entered above are generating accurate predictions, you can turn on retrospective predictions by setting the lookback to 60 minutes in the Nightscout settings tray (the same place you set night mode, etc.). *It renders more slowly, so I would only set it to 60 when you want to look at those predictions, and otherwise leave it at 0.*

When you enable wip/iob-cob, you will see three additional numbers displayed at the top: IOB (Insulin on Board), COB (Carbs on Board), and BGI (Blood Glucose Impact).  IOB and COB should be self-explanatory, but BGI is a little less intuitive.  BGI represents the current impact, measured in mg/dL per 5 minutes, of your active insulin (IOB decay) and currently-digesting carbs (COB decay).  It basically shows you what your BG "should" be doing right now, if your ratios and basals are all correct and there's nothing going on except insulin and carb activity.  So if you see, for example, +2 mg/dL, GBI: +2.6, you can tell that your BG is currently doing pretty much what you'd expect, rising 2-3 points every 5 minutes due to the carbs you're absorbing and the active insulin.  If, on the other hand, the actual BG change and the predicted BGI are way off, you should be on the lookout, because your BGs are not behaving as predicted, so the purple prediction line may not end up reflecting reality, either.

Once you have all that set up, you should be able to fire up the new Nightscout URL, enter recent boluses / carbs using the care portal, and see the resulting predictions show up on the graph.

-Dana

--
Dana Lewis | http://diyps.org | @DanaMLewis | http://www.linkedin.com/in/danalewis
"Doing something for someone else is more important than anything you would do for yourself."

Brian White

unread,
Jan 5, 2017, 3:26:08 PM1/5/17
to OpenAPS Dev
Sorry for responding to an old thread.  I am a parent of a 4 year old with T1.  I have a nightscout site--enabled careportal, iob, cob.  What I really want is the purple line forecast.  I see that the branch has been depreciated--but want to know how I can use it.  Any ideas or links for directions?  In mongolab, I already have a "profile" collection.

Scott Leibrand

unread,
Jan 8, 2017, 4:00:39 AM1/8/17
to opena...@googlegroups.com
Brian,

The ability to do get a purple line forecast in Nightscout currently requires some form of closed (or open) loop setup: OpenAPS, Loop, or AndroidAPS.  If you have a Medtronic pump (even a newer read-only one) you can set up an OpenAPS rig, and it can upload the purple line prediction data to Nightscout.

If you don't have a Medtronic pump and want to get purple line predictions based solely on data from Nightscout, that would probably require setting up OpenAPS (possibly on a VM or something) and doing some code work to get it to run off data from Nightscout.

-Scott

--
You received this message because you are subscribed to the Google Groups "OpenAPS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openaps-dev+unsubscribe@googlegroups.com.
To post to this group, send email to opena...@googlegroups.com.
Visit this group at https://groups.google.com/group/openaps-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/openaps-dev/1e54b258-76cb-46e2-afc7-f283cc69ef4c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Shannon R

unread,
Sep 28, 2018, 11:57:55 AM9/28/18
to OpenAPS Dev
Hi,

I'm new to Nighscout, how do I enable careportal. The link for directions on the Nightscouts website is no longer available!

Thanks,
Shannon 

Dana Lewis

unread,
Sep 28, 2018, 12:01:43 PM9/28/18
to opena...@googlegroups.com
Shannon; there are instructions here: 

-Dana

--
You received this message because you are subscribed to the Google Groups "OpenAPS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openaps-dev...@googlegroups.com.

To post to this group, send email to opena...@googlegroups.com.
Visit this group at https://groups.google.com/group/openaps-dev.

For more options, visit https://groups.google.com/d/optout.
--

Shannon R

unread,
Sep 28, 2018, 12:15:56 PM9/28/18
to opena...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages