Pages

Tuesday 12 September 2017

Adding OpenAPS to the Kit Bag

Sometimes things just need a shake-up.
Please welcome OpenAPS into the family.

The 640g has been working solidly during the day, particularly when there's someone switched-on to T1 around (for example to take a view on how to avoid those suspend before low rebounds).

But overnight - well, Janki's requirements vary so greatly that no two nights are the same. Some nights I'm shoveling insulin in, others require long periods of suspend. To be frank it's knackering, both mentally and physically.

Welcome the 640g's kid brother.


On its own it's a Medtronic MiniMed 522. Apart from being smaller and lighter than the 640g (sigh Medtronic...) it offers nothing of interest for a six year old with access to a 640g and CGM. But connect it to OpenAPS and that changes...

Suddenly this little pump is given a brain.

Overnight OpenAPS. Trace shows period when OpenAPS is running.

Our setup is a little unconventional and is geared to our requirements and our kit availability.

Day-time: 640g with PLGM
We currently run the 640g, using its Enhanced Enlite CGM and the Android Nightscout uploader.

Night-time: 522 with OpenAPS
We switch her reservoir over to the 522 (disconnecting and priming of course).
CGM data flows from the 640g to OpenAPS via the Nightscout uploader

Comprehensive instructions on installing and setting up your own OpenAPS can be found here. For the overnight rig, I'm using a NextThing CHIP and a CareLink USB rather than the current recommendation of using an Intel Edison + Explorer board. Rolling the documentation back - for example here - makes things much easier to follow if you're on a non-Edison build.

CareLink UBS, NextThing CHIP and (underneath) a LiPo Battery
We built a fresh Nightscout site (on Heroku) for APS use and to keep the usual Nightscout site 'clean' with only 640g data. A couple of additional lines parse the CGM and BG data over from the 640g-site to OpenAPS one.

For a few months now we've been running this setup most nights.

Is it perfect?
No.
It does what it says on the tin (modulating basal) and cannot help if you've (I've) significantly over- (or under-) estimated the evening meal carbs. For example, on the Nightscout shot above, the Saturday night takeaway was under-estimated (I had to give an additional bolus) and the current evening's meal was over-estimated (openAPS suspended early - before the 640g - but I still felt I had to give a small carb correction to avoid a hypo due to the insulin-on-board).

Is it nearly perfect then?
Yes.
It quietly gets on the with the job of trying to keep Janki in range. It's cautious and sensible. Its algorithm is able to react more quickly and with finer control than the 640g's is able to. The 640g can only give 0 or 100% basal, has a minimum thirty minute suspend time and a fixed resume criteria. The figure below gives you an idea of how the two systems (640g with PLGM and the 522 with openAPS) handle the same CGM data input:

640g basal with PLGM enabled (top) with openAPS basal changes shown beneath
Anecdotally (I don't yet have enough data to say more than that), it may hold Janki on the upper end of her current target range for longer than I would to manually (in these situations I would be weighing up my confidence in what I've bolused for during the evening and know what kind of a day she's had in terms of activity, mood and general T1-running). We'll also look at whether using the smaller basal increments on the 523 pump helps.

Getting through a night with single-digit alarms and without a single manual intervention feels like an achievement. This doesn't happen every night on OpenAPS, (but it's very rare for it to allow Janki to go out of target range for long, so usually it's usually the predictive high/low alarms I've chosen to remain active on the 640g for now).

With our current setup, weak points are the limited range of the CareLink USB (another solution is coming) and the Enhanced Enlite sensors. Control with any APS algorithm can only be as good as the CGM input data it's supplied with. Whilst our Enhanced Enlite experience has been significantly improved over the past year compared to our first 12-18 months, some sensors still leave a lot to be desired.

In terms of trained staff at school, we're starting back at zero again for this new school year (again). Our school, at this time, are not capable of dealing with an OpenAPS rig and so we'll be sticking to her 640g during the day.

We're relatively near the beginning of this journey.
Next steps include:

- A Pi Zero W build for limited daytime use, improving portability and radio-range (using Slice of Radio or a TI radio instead of CareLink USB)

- Fully offline configuration to reduce the risk of system failure / speed of recovery

- Moving to a 523 for those finer bolus and basal increments.

In the meantime, there's still lots to learn and tweak on OpenAPS as we continue to try to minimise the impact of T1D on our little family.

As with the Nightscout setup, the ability to deliver this for our daughter is down to the hard work and dedication of a handful of individuals (Ben, Scott and Dana in particular) who contributed to the original OpenAPS oref0 algorithm and 500-series Medtronic communications. Once again we're indebted to both their efforts and their decision to share and support its dissemination so that others may benefit.

2 comments:

  1. Top work Matt, great to hear of its improvements. One day I may even get the kit I've had for 12 months now working, that's once I find USB cables which work, a PC which works properly and a daughter who'll want it.

    ReplyDelete
    Replies
    1. Thanks Kev - will be following your APS journey with interest too!

      Delete