openAPS: Ask and answer questions here!

So this is an open thread on how open APS works, what it’s like to use it, for those who are interested. Ask any questions here – and those who are using openAPS or Loop and are more knowledgeable than me can hopefully chime in with their experience, too!

Some background: Our two-year-old son is using openAPS using a raspberry Pi as the minicomputer that communicates between the Dexcom CGM and the Minimed 522 pump. The algorithm is a fairly simple predictive model. Other people may have other hardware setups.

As I understand it (and DISCLAIMER I am NOT the one who coded it, so I could be wrong in the details), it looks at three of the past data points (or roughly 15 minutes) to get a rate of change that will help predict where blood sugar will be in the future. EDITED TO CORRECT: While it does look at three data points sometimes to potentially veto a decision the algorithm would have made, most of the time it relies on the current BG reading and the amount of IOB

Based on that, it issues temporary basal rates of half-hour duration, either high, low or zero, to try to keep you within your target range. If your raspberry Pi loses communication with the pump or the CGM, after 30 minutes, that temp basal automatically expires. If no CGM data has shown up over 15 minutes, then the system will not issue a temp basal and will (assuming it has not lost communication with the pump) cancel the temp basal and default to your basal settings. There is a MaxSafeBasal which you can set yourself, which helps determine how much insulin you’re willing to let the automated system send assuming that either it’s wrong or will lose connection at any time. The system does not issue boluses.

there are other features, such as an auto-sensitivity and Advanced Meal Assist mode, which we’ve just set up and I can try to explain, but to be honest we still don’t totally grasp the nuances of that system.

So ask away!

4 Likes

Thank you for starting this thread. Perhaps you could describe the amount of technical expertise that this do-it-youself system might require to set up. What do you think is the biggest hurdle to jump in getting a system like this started? What data/reports do you monitor to keep on eye on how well this new system is working?

I understand that this an experimental system with no guarantees. What reservations or fears did you have going in that this would be appropriate for your child? I’m not inferring any judgement here, just curious as to your mindset when you considered pursing it.

1 Like

Can you give me a quick breakdown of the costs of the system? Both initial set up and any ongoing costs?

I’d like to see pictures of your “rigs” - what kind of stuff do you have to carry around with you?

1 Like

Can one cobble together an openAPS system utilizing an OmniPod pump? Because tubing is a deal-breaker for my daughter.

Honestly, the biggest hurdle is reading through all the documentation and troubleshooting, in my opinion. My husband is a pretty excellent computer coder and he still had to spend weeks getting everything set up.

Beyond that this is NOT a set-it-and-forget-it system… Even though we got this set up sometime in mid-July, my husband is still continuing to work on the system; making it smaller, more compact, improving the hardware, troubleshooting bugs, fixing parameters, adding new features, etc. it’s a constant work-in-progress and takes a lot of dedication to maintain.

My initial fear was that it would just have some kind of crazy bug that caused a dangerous low. Honestly though, what allayed my concerns is that a) we had a very very scary pump malfunction early on in our pump use, where our son, who got about 5 units of insulin per day usually, somehow had extra insulin delivered – up to potentially the 20 units in the pump tubing while he was wrestling with his brother. Though it was intensely frightening, we managed to keep his BG above 80 for the 5 hours it took for the insulin to wear off (by force feeding him 100s of grams of carbs :frowning:). Anyways, after that I realized that a) mistakes can happen even with vetted commercial systems and b) we can handle them. In addition, the openAPS system may add risk when connectivity issues affect it, but we humans make mistakes all the time, so I just couldn’t see how it could be that much riskier than me bleary-eyed, trying to inject insulin into my son in the middle of night for a high. In addition, I had this limitation where he would be high at daycare and because I didn’t want get dangerously high, I would have a bias towards overcorrecting highs so that I didn’t have to come back (daycare staff treat lows, but don’t give insulin). That, however, seemed equally risky.

What further convinced me is that in the weeks leading up to our using the system, I was essentially doing what the openAPS was doing – that is, trying to manually calculate anticipated rise rates and trying to counteract them – only I was doing so, of necessity, inconsistently. It just seemed like the system continuously going back to reevaluate its predictions HAD to be better than me, arbitrarily choosing some time point to take action based not solely on BG but also on, you know, life happening. And before I got one of these systems, I felt like our life was totally consumed with managing our son’s BG in a way that simply wasn’t sustainable.

3 Likes

Minimum costs to set up:
Minimed 522 pump used: $500
Raspberry pi kit: $70
TI stick: $70
Battery: $25

Everyday costs: lots of extra AAA batteries for the pump, as the constant communication with the pi drains it in two or three days. EDITED TO ADD: If you use lithium batteries, this can increase to 7 days. No idea the ongoing cost as we just bought a bulk amount.

Also keep in mind that my husband bought a lot of other components that we wound up not using, so I would say the total cost could be higher.

1 Like

There’s a bounty on cracking this code for the omniPod but it doesn’t seem like anyone’s made much progress in the last two months, at least based on what I see publicly available. Honestly, for someone like you who has achieved great control and is the sole parent looking after everything, I might consider hooking it up just for nighttime, to get a good night’s sleep, but using omnipod and sugar surfing all the rest of the time.

1 Like

Yep, a good night’s sleep would be welcome! Can’t remember the last time I had one of those… Oh, wait a minute, I actually can remember the exact date: January 23, 2014, the day before my daughter was diagnosed with T1D.

My impression is that technical expertise is slightly less important than a willingness to fiddle with things that seem broken and keep on working on them without getting discouraged. The coding language is also one that many are not familiar with, so the playing field is slightly leveled because of that. On the other hand, I’m pretty sure I would have pulled all my hair out if I had to be the one to code it, trouble shoot all the hardware issues, and debug, and I have some past coding experience.

1 Like

Hola Marie, it still looks enormous but we´re working on the size and other components. It usually travels in a small bag, im small and always carrying a bag so…has worked fine so far.

2 Likes

Mariana11,
Do you know which Pi you guys are building the system around?
A new one has been released called the Pi-Zero that is smaller and costs $5.00 but doesn’t have all the connectors.
What type of battery pack do you use and how long does a charge last?

I’m an embedded software engineer by profession and a tinkerer at heart so these systems intrigue me but also make me cringe a bit. I guess I’m too how familiar with the difficulty of getting the entire system “right” and the consequences of small bugs that can unknowingly slip into the software.

It looks like someone cracked the Animas Ping… or perhaps they are only worried someone might hack the Ping.

“Insulin pump vulnerable to hacking, J&J warns people with diabetes”

Yes, there is at least one person who is operating a closed loop using the Ping. My husband was initially working on it, as the instructions are publicly available for at least some of the process. But it just is much more uncharted water and it seemed like ti could have been quite a while before it worked.

It is a Pi-Zero but the picture did not help at all. We live in México so sometimes getting the correct stuff on time and without astronomical shipping costs is a thing…my battery es amazingly big, it gives no more than 12 hours so Im in a need to carry two of them and then sometimes charge if connector available wherever I´m at. You might see it gives me some trouble when outta the office (and/or house). We´re replacing the minilink this week so it might get smaller, always struggling to make it smaller. Im really petite so its a bit uncomfortable to carry around tho i wouldn’t leave it for a second! Have had diabetes for 31 years and this is the best thing that has ever happened!

1 Like

All of what you just said.

I’m using Loop, not OpenAPS (I did loop with OpenAPS for about a week, but as a G5 user it just seemed to be less streamlined than I would have liked - I either needed my Pi to have internet access or keep my receiver that I normally don’t use, connected, neither of which were ideal solutions), and I am SUPER happy with this solution so far - until systems using Dexcom start to hit the market there’s just about zero chance I’d ever want to move to using something else. I have a backup RileyLink and several backup pumps, and I’ll be good for a while with what I have.

I often jokingly refer to using Loop as “automated sugar surfing” because effectively it does what I was attempting to do before, but with just about zero effort and attention on my part. It makes dealing with the daily struggle of T1D a little easier for me… I still test, calibrate my CGM, bolus for meals, but I find myself correcting WAY less often because it’s always working to keep me in range when I get busy and forget (I’m only human, after all) and the things that I worry about on a daily basis (eg “is my RileyLink fully charged”) have definitely shifted.

I had a reasonably good A1C before starting (6.4%) and I did not see a huge drop (last was 6.3%), but the amount of effort required by me to get there, is completely different. To maintain that kind of control before felt almost all-consuming… and I have people in my life suggest I was devoting too much time to it (no, I’d rather put in a little more effort NOW than to be blind or on dialysis later), or that I was developing OCD tendencies (I was not, I had developed good self-management skills which I do still utilize). Now, it’s absolutely not consuming ever moment of my day any more. I do still worry about how accurate my sensor is and if my site is working, but where my #'s are in my list if worries involving that equation has changed… in that I just DON’T worry as much because Loop is taking care of it for me.

I feel “free” living with T1D for the first time in my life… I think even my husband worries about me a little bit less. I’ve had substantially less “severe” lows since I started using Loop (I won’t lie, I have had a couple in 3 months, but I can 100% identify mistakes that I made that led to them, they didn’t “just happen”, each was either the result of miscalculated carbs or simply bolusing for carbs and not actually eating them because I got distracted) because loop has easily prevented countless lows - I’ve not woken up in the middle of the night with a low, or woken up to a “fasting” low since starting on Loop. I used to have at least one of those a week.

4 Likes

It would be so nice if government was not allowed to protect me from myself. I would like to jump onto the home-grown AP bandwagon as soon as I see fit. I am afraid that this is the golden age of home-grown APs. The FDA will find a way to smoother any future attempt to bypass government overreach. I am patiently waiting for the FDA to approve the FreeStyle Libre which is an over-the-counter item in Europe. I am still young. It might happen before I die.

How does the APS system deal with pressure lows (often seen when sleeping)?

Great question, @Bradford1.

So, open APS doesn’t really handle them any differently than any other blood sugar reading. Same goes for calibrations – there’s no way to explicitly say “yep, this is a recalibration, not an actual jump or drop in BG.” There’s a buffer though in that, if a number is just totally out of whack (say blood sugar has been changing -3,-3, -3 every 5 minutes and then all of a sudden drops -55), the system holds off on acting because the data doesn’t make sense. openAPS typically deals well with these recalibration jumps anyways because even if it issues a high or low temp basal, it can cancel again in 5 minutes if its predictions are off – cumulatively you have administered or subtracted a relatively small amount of insulin, so the practical effect of these is relatively small.

But we do see the compression low situation where, for instance, our son just progressively drifts downward to something like 55, we test with BG and he’s sitting pretty at 120. These show up on CGM as a gradual, progressive drop over an hour or two. openAPS has no great way to deal with this but on the flipside, neither do we without openAPS. We just flip him over usually and hope for the best. If we’re woken up again because of the same trend, we have to debate whether to get up and test or not. :slight_smile:

I would say we sleep straight through the night on average 4 nights of the week out of 7, get up once a night 2 of the other nights and multiple times 1 out of 7. Another way to break it down is that less than once a week we will be woken up by a phantom BG reading like a compression low, and about twice a week he will actually dip low or get close enough that we would prefer to give him carbs. We get an alarm for highs but never wake to administer corrections because we assume openAPS will more safely deal with those than us. Prior to openAPS we were waking up every single night or close to it. A night straight through was a rare treat. (Also these numbers exclude lack of sleep from toddlers jumping into your bed in the middle of the night and shoving you off your pillow.)

4 Likes