These are chat archives for nightscout/intend-to-bolus

30th
Sep 2016
Gina
@gclyon
Sep 30 2016 00:02
Thx for the info. I will check into the loop app
Eric Jensen
@elnjensen
Sep 30 2016 00:48
Just installing openaps on my Edison. New setup script makes it very easy!
Just realized that maybe I should have answered one question differently, though. "Are you using a CGM?" The answer is yes of course, but not actually connected to the Edison... So should that be "no" in this context? Then it doesn't define a CGM device? Not a big deal, but only realized after the fact that it set up something that didn't actually exist...
Scott Leibrand
@scottleibrand
Sep 30 2016 01:51
There is no "no" to that question. It sets up for a G4 it you don't have anything else.
But if you never plug that in it'll never do anything.
And it'll just use NS if configured.
Eric Jensen
@elnjensen
Sep 30 2016 02:04
OK - as I said, didn't really think much about how to answer until after the fact...
Up and running loop on the Edison now! Looking forward to testing it out more tomorrow.
A quick question @scottleibrand - changed my in-pump BG targets to 100-100 to just tighten up a little, but enact shows target as 94. Is this related to autosens?
settings/temptargets.json is empty.
garykidd
@garykidd
Sep 30 2016 02:32
gonna convert over to a oref0-setup ---scott leibrand ---script setup shortly...but was wondering if there is a better way to handle my mmtune call in my cron than I have....below...
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
* * * * * /home/pi/bin/bt-pan client XX:XX:XX:XX:XX:XX
#* * * * * /home/pi/bin/check-and-connect-bt-pan.sh
* * * * * sudo wpa_cli scan
* * * * * cd /home/pi/APS301 && oref0-reset-git
*/5 * * * * (cd /home/pi/APS301 && openaps use pump mmtune && time openaps do-everything) 2>&1 | logger -t openaps-loop
John Benjamin
@Bender1061
Sep 30 2016 02:41
So wondering why nothing is being uploaded to nightscout with the oref0-setup. What I see is upload/latest-treatments.json is only [] what i'm finding is when i run openaps latest-ns-treatment-time i just got time of 2017-08-15T02:51:12 which would not be remotely correct.
anyone have any ideas?
Jason Calabrese
@jasoncalabrese
Sep 30 2016 03:03
Sounds like you have some future date, you can remove it from the NS admin page
Scott Leibrand
@scottleibrand
Sep 30 2016 03:06
@elnjensen yes, a target of 94 would be autosens-adjusted
John Benjamin
@Bender1061
Sep 30 2016 03:14
Thank you @jasoncalabrese that was what my problem was!
garykidd
@garykidd
Sep 30 2016 03:24
@scottleibrand so treid to install your oref0-setup...it worked nicely...but I still get .....
Starting pump-loop at Thu 29 Sep 23:19:08 EDT 2016:
Listening: .No comms detected
Profile less than 60m old
temp_basal.json more than 5m old
Temp refreshed
Could not parse input data:  { [Error: Cannot find module '/home/pi/APS401/monitor/glucose.json'] code: 'MODULE_NOT_FOUND' }
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
pumphistory more than 5m old: Refresh
Error, retrying
Listening: .No comms detected
mmtune: "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 -- "916.708", 0, -99 Starting pump-loop at Thu 29 Sep 23:21:54 EDT 2016:
Listening: .No comms detected
Profile less than 60m old
temp_basal.json less than 5m old
pumphistory more than 5m old: Refreshed pumphistory
Could not parse input data:  { [Error: Cannot find module '/home/pi/APS401/monitor/glucose.json'] code: 'MODULE_NOT_FOUND' }
determine-basal://text/shell/enact/suggested.json
reporting enact/suggested.json
Settings less than 10m old
Pumphistory-24 less than 20m old
Completed pump-loop at Thu 29 Sep 23:23:04 EDT 2016

Starting pump-loop at Thu 29 Sep 23:24:03 EDT 2016:
that glucose.json error...is that because the receiver needs to be plugged in?
Tim Mecklem
@tmecklem
Sep 30 2016 03:37
Alright, I’ve been tracking some things down for my friend for a while now, and I just don’t understand what’s happening. But I have a “fix". Seems related to openaps/openaps#101 and https://github.com/openaps/docs/issues/129#issuecomment-245789475 among others. The raw cgm data from enlite has a date. When it goes through mm-format-ns-glucose, it has a dateString and a date, but format-recent-type crashes out with NoneType has no attribute read, or the list is empty. If I change https://github.com/openaps/oref0/blob/master/bin/mm-format-ns-glucose.sh#L33 and add a line that does the same for dateString but instead adds display_time, then all the reports work and nightscout gets the enlite cgm data.
Is format-recent-type supposed to crash out if it doesn’t encounter display_time?
Tim Mecklem
@tmecklem
Sep 30 2016 03:55
I’ll work up a PR and start the discussion that way
Dana Lewis
@danamlewis
Sep 30 2016 04:04
For everyone who has been expressing interest in acquiring a 915MHz Explorer Block (the small boards we’ve been testing) - we have some specs on timeline. A big batch will take a longer time (boards in hand would be end of year..), so we want to see if there is enough interest to quickly fund and run a small (minimum of 50) batch before the larger project runs. You can express your interest here in acquiring one of those boards here: https://goo.gl/forms/dlq9dTFdAEfCjGhT2
Tim Mecklem
@tmecklem
Sep 30 2016 04:20
Wow. An early run would be great. Thanks for thinking about this.
Dana Lewis
@danamlewis
Sep 30 2016 04:23
:+1:
Tim Street
@tim2000s
Sep 30 2016 05:29
I've been getting this error quite regularly from the Carelink stick and it's occasionally caused OpenAPS to fully stop. ANyone got a good solution? (And move to slice of Radio isn't an option until I get on another machine as I can't build CC-Tool to flash the firmware for some odd reason to do with missing boost libraries):
File "/usr/local/bin/openaps-report", line 4, in <module>
    __import__('pkg_resources').run_script('openaps==0.1.5', 'openaps-report')
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 743, in run_script
  File "build/bdist.linux-armv7l/egg/pkg_resources/__init__.py", line 1531, in run_script
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/EGG-INFO/scripts/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps-0.1.5-py2.7.egg/openaps/vendors/medtronic.py", line 333, in main
    return getattr(self.pump.model, name)(**self.get_params(args))
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.30-py2.7.egg/decocare/models/__init__.py", line 25, in __call__
    self.response = inst.session.query(self.msg, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.30-py2.7.egg/decocare/session.py", line 101, in query
    self.execute(command)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.30-py2.7.egg/decocare/session.py", line 98, in execute
    return super(type(self), self).execute(command)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.30-py2.7.egg/decocare/session.py", line 39, in execute
    self.download( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.30-py2.7.egg/decocare/session.py", line 54, in download
    self.command.respond(data)
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.30-py2.7.egg/decocare/commands.py", line 61, in respond
    self.getData( )
  File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.30-py2.7.egg/decocare/commands.py", line 1202, in getData
    temp = { 0: 'absolute', 1: 'percent' }[self.data[0]]
IndexError: bytearray index out of range
Dana Lewis
@danamlewis
Sep 30 2016 05:30
do you have a reboot of the carelink stick programmed in?
Tim Street
@tim2000s
Sep 30 2016 05:31
Yes, pre-running the pump-loop.
Dana Lewis
@danamlewis
Sep 30 2016 05:31
hmm :/ you might just have a dying carelink unless someone else can think of something, shouldn’t be that regular with so much rebooting
Scott Leibrand
@scottleibrand
Sep 30 2016 05:32
by reboot, dana means oref0-reset-usb on failure
Tim Street
@tim2000s
Sep 30 2016 05:33
Haven't set it on failure. I do that prior to each pump loop running
Scott Leibrand
@scottleibrand
Sep 30 2016 05:33
hmm, I wouldn't advise that: it might screw up your other USB devices (like wifi)
Tim Street
@tim2000s
Sep 30 2016 05:35
Wife's onboard as it's a pi3 so carelink is the only USB device.
(I forget you guys are west coast so it's not midnight yet!)
Scott Leibrand
@scottleibrand
Sep 30 2016 06:05
took me a minute to s/Wife/Wifi/ ;-)
Tim Street
@tim2000s
Sep 30 2016 06:15
Haha! Missed that 😂😳
Sandra Keßler
@SandraK82
Sep 30 2016 06:17
does ama only work with Bolus wizard / meal entry? It seems the loop ignored Input done via combo bolus
Dana Lewis
@danamlewis
Sep 30 2016 06:21
It doesn't ignore it, but a combo square or dual blocks it from being able to temp
So you have to change methods if you want the loop to kick in after a meal
C-Ville
@C-Ville
Sep 30 2016 06:24
@danamlewis does the Medtronic pump blocks changing temp basal while combo bolus is still active or is this merely, because openaps does not want to mess with the pump while a bolus is active?
Dana Lewis
@danamlewis
Sep 30 2016 06:25
It's a pump limitation, we can't enact temp basals while a bolus is running
So regular meal bolus or square or dual is just even longer bolus activity that prevents ability to send temp basals
Sandra Keßler
@SandraK82
Sep 30 2016 06:29
ah i see, thank you. if i want to disable the loop for a certain time after the meal it would be a way to let a low combo run for this time
C-Ville
@C-Ville
Sep 30 2016 06:31
okay, so if you want to cover a pizza one could try to increase the basal for lets say 3-4 hours such that the tail of an extended Bolus is covered by the delta between normal basal at that increased basal. That way you would have an "extended Bolus" and still a running loop?
Dana Lewis
@danamlewis
Sep 30 2016 06:33
Or do an up front bolus, put all the carbs in, and let AMA take care of the resulting rise/tail.
But if you weren't happy with how AMA did, yes you could do that, but you'd have to remember to put your basals back to normal for the next day, among other potential issues
Sandra Keßler
@SandraK82
Sep 30 2016 06:35
i think i will try both ways once i put the loop on me, currently i watch, Experiment and learn with the loop pump next to me
C-Ville
@C-Ville
Sep 30 2016 06:35
@danamlewis I guess I will have to activate AMA. But I will meet with @ceben80 on saturday and we will mess with the loops :-) so chances are there :-)
Dana Lewis
@danamlewis
Sep 30 2016 06:36
:) AMA makes a big difference IMO
@SandraK82 :+1: for testing!
Matthias
@ceben80
Sep 30 2016 06:36
combined with eating soon
Dana Lewis
@danamlewis
Sep 30 2016 06:37
Yep! :)
Sandra Keßler
@SandraK82
Sep 30 2016 06:37
i unterstand it correctly? with ama i put in my meal and bolus and for everything after ama does the the work? Which log should i Monitor to see ama in action?
Colin Lennon
@colinlennon
Sep 30 2016 06:47
Thanks for your amazing work on the Explorer board @danamlewis @scottleibrand ! I've completed the form.
Tim Street
@tim2000s
Sep 30 2016 06:49
Based on what I've seen with a late night curry last night, AMA handles it way better than a combo bolus.
Scott Leibrand
@scottleibrand
Sep 30 2016 07:16
@SandraK82 the best way to monitor AMA is with NS, but if you want to tail a log, all the determine-basal output is in pump-loop.log (for oref0-setup loops).
Sandra Keßler
@SandraK82
Sep 30 2016 07:17
ah thank you @scottleibrand
I try to unterstand it on ns and on log level as I see the raspi loop still only as a waypoint to my own solution
Matthias
@ceben80
Sep 30 2016 07:23
@danamlewis Q to AMA, I always have COB undefined in my treaments although the ns COB box shows a value after entering carbs in my pump.
That's wrong here :question:
blob
Scott Leibrand
@scottleibrand
Sep 30 2016 07:23
Not enough BG data for AMA to calculate COB?
NS calculates it using a simpler algorithm if oref0 isn't uploading COB.
you can run your meal.json report manually on the rig to see what it's complaining about.
Matthias
@ceben80
Sep 30 2016 07:27
Okay Scott, will run meal.json report manually next meal after entering carbs into the pump
but the Q is....I didn' have any missed BG readings from my xDrip, strange
Sandra Keßler
@SandraK82
Sep 30 2016 07:31
hm, so if openaps tells me an cob of 5 and ns in the cob pill 2.2 it is because openaps calculates a better one?
Screen Shot 2016-09-30 at 09.34.00.png
Matthias
@ceben80
Sep 30 2016 07:48
@scottleibrand asking this yesterday or so....but fact is I do not have gaps in my BG readings, any idea :question:
https://gitter.im/nightscout/intend-to-bolus?at=57ea07da76d85b087dad5cec
C-Ville
@C-Ville
Sep 30 2016 08:09
@danamlewis could you point me to the battery you are using on your explorer board, it seems really tiny and I would be curious what mAh this battery provides
John Sjolund
@sjolundjohn
Sep 30 2016 09:42
@scottleibrand @danamlewis Setup script comment. It seems that when using mmeolink (if that is right) the aliases should be running mmtune at a earlier stage to set frequency, when first starting. It takes about 4/5 minutes before it gets to mmtune. As a result earlier cron tasks are not successful. Only taking about a few minutes, but why not start preflight with mmtune?
edison@edison2:~/openaps$ sudo tail -F /var/log/openaps/pump-loop.log
[sudo] password for edison: 
Temp refreshError, retrying
Starting pump-loop at Fri Sep 30 08:44:07 CEST 2016:
Listening: .No comms detected
Profile less than 60m old
temp_basal.json more than 5m old
Temp refreshError, retrying
Starting pump-loop at Fri Sep 30 08:45:18 CEST 2016:
Listening: .No comms detected
Starting pump-loop at Fri Sep 30 11:34:00 CEST 2016:
Listening: ...No comms detected
Old pumphistory: 
Error, retrying
Starting pump-loop at Fri Sep 30 11:35:14 CEST 2016:
Listening: .No comms detected
Old pumphistory: 
Error, retrying
Listening: .No comms detected
mmtune: "868.438", 5, -56 Starting pump-loop at Fri Sep 30 11:37:49 CEST 2016:
Listening: .No comms detected
Old pumphistory: Refreshed pumphistory
The times on the first two runs are off, not sure why this is...
Matthias
@ceben80
Sep 30 2016 09:52

@scottleibrand @danamlewis back to AMA, just defined 30 g carbs and 3.7 U insulin in my pump for lunch...
meal.jsonlooks good to me

{"carbs":30,"boluses":3.7,"mealCOB":28}

but COB in ns remains undefined :cry:
I would be happy this can be solved - thank you!

blob
Tim Street
@tim2000s
Sep 30 2016 09:55
Interesting observation running from Dexcom via NS is that the Contour Next Link I was using with my 640 for by data was very power hungry.
Matthias
@ceben80
Sep 30 2016 14:06
@danamlewis @scottleibrand very nice, just running oref0-setup.sh on my Edison....< 60 min - it works, awesome :tada: :star2: :tada:
John Sjolund
@sjolundjohn
Sep 30 2016 14:07
Meal-Assist = Eating soon mode?
John Sjolund
@sjolundjohn
Sep 30 2016 14:16

also, is there a document that explains all the components of preferences.json well? Some, like

"override_high_target_with_low": false,

I don't know what they are

Matthias
@ceben80
Sep 30 2016 14:50
@scottleibrand @danamlewis feedback regarding the COB undefined issue: solved by re-installtion of oref0-setup.shon my RPi rig :tada:
Dana Lewis
@danamlewis
Sep 30 2016 15:37
@C-Ville typically use a 2200mAH battery with edison rigs
@sjolundjohn no. eating soon mode can be done manually or using temp targets to have the loop do it (concept of lowering targets 1 hour or so before meal to peak insulin activity AT meal start time). meal assist is the loop features to help deal with meal rises.
@sjolundjohn and I don’t think anyone’s updated the docs w/ the new preferences file, but you can look into the PRs for an idea of what’s changed
the one you posted about is something @jasoncalabrese built so that school wouldn’t overcorrect when the loop was going - so school would use bolus wizard with high end of target range, and loop would use low end of target range to calculate for safety purposes.
Jason Calabrese
@jasoncalabrese
Sep 30 2016 16:24
I have the target on the pump set to 180-115, with oref0 only using the 115, and the bolus wizard almost never adding correction, that assume the loop would have already added any needed correction iob
Scott Leibrand
@scottleibrand
Sep 30 2016 16:54
@SandraK82 the one in the OpenAPS pill is based on actual observed carb absorption since the carbs were entered (relative to what BG should have done based on insulin alone) so that should be the most accurate. But the COB pill should be reporting the same number when it's available. Perhaps mouse over the COB pill to see the details?
Sandra Keßler
@SandraK82
Sep 30 2016 16:56
@scottleibrand in the cob pill, the detail shows only the last entry
Scott Leibrand
@scottleibrand
Sep 30 2016 16:57
@sjolundjohn the idea behind mmtune in oref0-setup is that we don't want to run it on every loop, because mmtune is extremely noisy (and slow) and would interfere with the ability of other rigs to communicate. That is especially a problem if you have multiple rigs around the house and some are out of range. So we only mmtune on a random subset of comms failures. As you noted, that means waiting 5m or so to get first mmtune after reboot. If you want you could remove the random number check in that alias to mmtune after every failure if you only have one rig and it should always be in range.
@SandraK82 does it have a label?
@sjolundjohn I think the long-term solution is to create a fork of mmtune that just sets the last known good mmtune settings, and run that after every reboot or cc1110 reset.
Sandra Keßler
@SandraK82
Sep 30 2016 16:58
Screen Shot 2016-09-30 at 18.58.39.png
Screen Shot 2016-09-30 at 18.58.34.png
Scott Leibrand
@scottleibrand
Sep 30 2016 17:00
@SandraK82 that looks like the built-in NS COB calculation, not the data from OpenAPS. Maybe @jasoncalabrese would have an idea why it's showing that. Perhaps COB pill hasn't been updated yet to use openaps data like IOB pill does?
Sandra Keßler
@SandraK82
Sep 30 2016 17:01
iob is fine :)
Sandra Keßler
@SandraK82
Sep 30 2016 17:07
@scottleibrand thanks for looking into it!
Kelly Watson
@kellyisworking
Sep 30 2016 17:07
Just realized I was in the public – sharing this here in case anyone has experience as well!
Pump arrived from seller who didn't share about this crack in the reservoir window – anyone have experience with this? I spent very little ($125 on this pump) so not too concerned.
This message was deleted
blob
Scott Leibrand
@scottleibrand
Sep 30 2016 17:14
Have you tried it with a reservoir? Seems like a non-structural crack, so should still work. Just need to keep it dry (or seal it)?
Sandra Keßler
@SandraK82
Sep 30 2016 17:18
@kellyisworking you should remove these posts, as they show the serial number of your pump...
Kelly Watson
@kellyisworking
Sep 30 2016 17:19
Reservoirs & tubing coming Monday – I'll check it out. This may be stupid, but there's no negative pressure associated with the plunger operation? I'm going to get a silcone cover anyway - the purple is not necessarily husband's cup of tea :)
Thanks @SandraK82 I'll remove and blur
David
@davidkeddydb
Sep 30 2016 17:23
Can anyone who is using an Anker mini 3350mah battery tell me how how many hours it will run your edison rig?
Hannah Crabtree
@lollydaggle
Sep 30 2016 17:28
^ also interested - just ordered my edison and TI stick. It's upgrade time.
Scott Leibrand
@scottleibrand
Sep 30 2016 17:29
@davidkeddydb with which base board? USB or serial TI stick?
Those differences affect battery life a lot.
David
@davidkeddydb
Sep 30 2016 17:35
@scottleibrand Using a sparkfun board with a TI stick.
Well, I will be. Sparkfun board shows up Monday, Edison is here along with the rest to get started
I was so nervous about somehow corrupting my microsd card with the Raspberry that I didn't even consider taking it mobile.
Hannah Crabtree
@lollydaggle
Sep 30 2016 17:39
@davidkeddydb - sounds like we're on the same timeline. My stuff shows up early next week. Also, using a sparkfun.
David
@davidkeddydb
Sep 30 2016 17:40
@lollydaggle Hannah, hopefully it goes easy for both of us. :smile:
@lollydaggle Did you ever use your pi with a battery pack to go mobile?
Hannah Crabtree
@lollydaggle
Sep 30 2016 17:44
@davidkeddydb Yep! My pi went with me everywhere and my battery pack would last ~16 hours. Something is wrong with my pi or carelink or both right now though. I had 2 months with this setup with no issues
David
@davidkeddydb
Sep 30 2016 17:47
@lollydaggle Awesome. What size battery do you use? I finally burned a copy of my original card and given @scottleibrand change to Oref0 dev I am really not nervous. My carelink, only had for about a month, messed with it for about 2 weeks to finally get up and running, sometimes is not working correctly and I have to unplug and replug it into the usb on the pi.
Hannah Crabtree
@lollydaggle
Sep 30 2016 17:50
@davidkeddydb Yeah, I had to do that with my carelink a lot too. I used a RAVPower 10400mAh, which is on the larger size but worked well enough for me.
David
@davidkeddydb
Sep 30 2016 17:51
@lollydaggle Thanks. Does that do passthrough charging?
Hannah Crabtree
@lollydaggle
Sep 30 2016 17:53
@davidkeddydb yep! here's a silly "blog" post with my rig details and amazon links, if it helps https://lollydaggle.github.io/post/openaps-startup-rig/
general question - I have to wipe my SD card tonight and start over. Once I do the Pi setup stuff, can I clone my github repository to get the loop program working again? I know I'll have to setup cron again.
Dana Lewis
@danamlewis
Sep 30 2016 17:55
depends on how you backed it up. you could also try the new setup scripts, too :)
Hannah Crabtree
@lollydaggle
Sep 30 2016 17:57
I at least have one backup copy from after I successfully had the loop running for a while. I'm definitely interested in the new setup scripts! Are they more "run and go" now?
Dana Lewis
@danamlewis
Sep 30 2016 17:57
we’re able to get from 0 to full operational rig in around ~45 min now with them. https://github.com/openaps/oref0/wiki/Setup-Script-Testing
David
@davidkeddydb
Sep 30 2016 17:58
@lollydaggle You will fall over at how run and go they are.
Hannah Crabtree
@lollydaggle
Sep 30 2016 17:58
:clap: that's amazing!
Dana Lewis
@danamlewis
Sep 30 2016 17:58
lol. so maybe sit down when running the scripts? ;)
Eric
@ecc1
Sep 30 2016 18:09
I can manually set a temp basal during a square-wave bolus, and vice versa, on my 522 pump, just not via radio. I wonder why they block that?
Eric Jensen
@elnjensen
Sep 30 2016 18:10
I'm having some "rollercoaster" challenges and so would appreciate some advice on changing my settings (or behavior, I guess :worried: ). I'm finding that after meals I'm getting a long, slow creep upward, during which the loop is high-temping me (as it should), but then once things start to turn over, I drop too far, too fast. How should I start with troubleshooting this? (And what other info would be helpful to provide?)
David
@davidkeddydb
Sep 30 2016 18:11
I am getting a weird error message when trying to loop: Refreshed temptargetsWarning: could not parse monitor/carbhistory.json
Warning: Argument order has changed: please update your oref0-meal device and meal.json report to place carbhistory.json after basalprofile.json
Scott Leibrand
@scottleibrand
Sep 30 2016 18:11
@elnjensen are you doing eating soon? what % of your carbs are you bolusing for?
Eric Jensen
@elnjensen
Sep 30 2016 18:14
I'm typically bolusing for 15 g of carbs a bit early (say 15-30 minutes) and then bolusing for the rest of the carbs at mealtime. So nominally bolusing for 100% (though it's possible that carb ratio is wrong). And I do fine for ~ 2 hours after eating, then the slow rise and high-temping starts, so it's after the loop thinks all the carbs are gone. Not eating things that are particularly fatty, either.
Scott Leibrand
@scottleibrand
Sep 30 2016 18:16
yeah, you might try adjusting your carb ratio, so it thinks more insulin is needed on the initial rise. maybe still do the same size bolus, and just let openaps high-temp for the rest?
a lot of people have had really good success doing eating soon (smaller bolus 30-60m prior) and bolusing at / right before mealtime to cover ~75% of carbs, and then letting AMA high-temp for the rest if needed
Eric Jensen
@elnjensen
Sep 30 2016 18:18
Not sure I follow - you're saying to adjust carb ratios up (e.g. currently 13 g / unit, so try 12 or 11 g/u) so I take a smaller bolus, and then loop would high-temp sooner?
So I'd still be getting high-temping, but it would be sooner to follow the rise while it's starting to happen, rather than waiting as long as it is now?
"Still do the same size bolus" - not clear how to reconcile that with also adjusting carb ratio?
Scott Leibrand
@scottleibrand
Sep 30 2016 18:20
that's the goal, yeah. if you're at 13g/u now, and change to 11g/u, then for a 40g meal, it would recommend a 3.6U bolus instead of just 3.1U. you could still just do 3U, and let AMA do the other .6 as needed.
or, if you did a .5U eating soon an hour before the meal, then it'd recommend more like 3.1 and you could do more like 2.6U
Eric Jensen
@elnjensen
Sep 30 2016 18:21
Is the carb ratio used by AMA? Or is it only used by the bolus wizard?
Scott Leibrand
@scottleibrand
Sep 30 2016 18:22
both
there is a carbratio_adjustmentratioin preferences.json that allows you to make them different
Eric Jensen
@elnjensen
Sep 30 2016 18:24
OK, thx. So just to be sure I understand - the suggestion is to bolus less for each meal (even though I'm seeing a post-meal rise already, albeit a delayed one). And the adjustment downward in carb ratio will make AMA more likely to conclude sooner that more insulin is needed to cover the carbs, so it should step in sooner (and hopefully more gradually) to cover the rise. Is that essentially right?
Scott Leibrand
@scottleibrand
Sep 30 2016 18:24
no, I'm suggesting the same initial bolus, but a 12 or 11g/u carb ratio so that AMA does more high-temping
Eric Jensen
@elnjensen
Sep 30 2016 18:25
OK, got it.
Scott Leibrand
@scottleibrand
Sep 30 2016 18:25
I would do that manually first and see if it works well
Hannah Crabtree
@lollydaggle
Sep 30 2016 18:25
@elnjensen @scottleibrand I was having a similar problem where I was bolusing regularly for meals. The loop would be great on the uptick but suspending insulin on the downward trail was not enough to stop me from crashing.
Scott Leibrand
@scottleibrand
Sep 30 2016 18:25
then if you want to make it easier, use carbratio_adjustmentratio so you don't have to manually reduce the bolus wizard recommendation every time
Eric Jensen
@elnjensen
Sep 30 2016 18:26
And do you think the earlier high-temping will help with the rollercoaster? I.e. if it can slow that rise in the first place, it can be more moderate and not have the crash?
@lollydaggle What was your solution?
Scott Leibrand
@scottleibrand
Sep 30 2016 18:27
yeah, the earlier high-temping will mean less insulin activity pushing BG down at the time you're seeing the crash
it's also possible your DIA needs adjusting
Eric Jensen
@elnjensen
Sep 30 2016 18:28
OK, will give it a try! Thanks as always for the help. Will probably take a bit to see how it's working - lots of variables, as usual.
Dana Lewis
@danamlewis
Sep 30 2016 18:28
also sounds like DIA may be contributing, so if carb ratio adjustment strategy doesn’t do it, DIA change might be worth exploring
Scott Leibrand
@scottleibrand
Sep 30 2016 18:28
a longer DIA will reduce the "huh, why hasn't that insulin I gave earlier kicked in yet; guess we need more" that might be going on
Eric Jensen
@elnjensen
Sep 30 2016 18:28
Yeah, my first thought was DIA, and I did increase from 3 to 4 hours, but still seeing the issue. Do you think that going all the way to 5 makes sense? (Unfortunate that it only goes in whole hours.)
Scott Leibrand
@scottleibrand
Sep 30 2016 18:29
hard to say. I would try it, but try one thing at a time
Hannah Crabtree
@lollydaggle
Sep 30 2016 18:29
@elnjensen now that I'm temporarily not looping, realized my carb/correction ratios were too high on their own. I'm guessing DIA is also my issue since I'm currently at 3.
Eric Jensen
@elnjensen
Sep 30 2016 18:29
OK - DIA first, or carb ratio, do you think?
@lollydaggle Too high as in boluses were too big for the carbs?
Scott Leibrand
@scottleibrand
Sep 30 2016 18:31
@elnjensen maybe DIA first, as it seems like the meal bolus is (eventually) enough? dunno.
Eric Jensen
@elnjensen
Sep 30 2016 18:32
OK, will ponder it a bit and try something. (And try to resist the urge to change everything at once... :smirk_cat: )
Hannah Crabtree
@lollydaggle
Sep 30 2016 18:32
@elnjensen yeah, I was bolusing too much for carb and correction
Eric Jensen
@elnjensen
Sep 30 2016 18:33
I guess the downside of going even longer on DIA is that it would be even slower to high-temp after a meal, and I am seeing rises there. I think I'll try your initial suggestion of carb ratios and see how that goes.
Scott Leibrand
@scottleibrand
Sep 30 2016 18:34
@elnjensen consider eating soon as well
that will reduce your initial meal rise
David
@davidkeddydb
Sep 30 2016 18:34
@lollydaggle Thanks for information on battery. I have to leave work in a bit and I am going to use my Anker 3350 and see what it gets me for time. I have a large pocket or otherwise I would have to carry a murse which I am not doing!
Scott Leibrand
@scottleibrand
Sep 30 2016 18:34
basically anything you can do to shift insulin delivery earlier sounds like it would be a better fit for when it's needed
Eric Jensen
@elnjensen
Sep 30 2016 18:36
Right, the trick (as always) is getting the right amount of insulin the right amount of early. As I said I'm already flirting with a low immediately post-breakfast, so I don't think I can push that further - it's the 2-4 hours post-meal window that's the challenge. Not spiking, just a slow later rise.
Dana Lewis
@danamlewis
Sep 30 2016 18:37
eating soon won’t risk lows, it’s just changing targets an hour or so before meal, which helps your meal bolus at whatever time be more effective, without changing anything else
Eric Jensen
@elnjensen
Sep 30 2016 18:40
But it's got to be coupled with the right bolus size, so that's the challenge to sort out.
Tim Street
@tim2000s
Sep 30 2016 18:44
I've spent today looping and not bothering to input the small amounts of carbs in various snacks. The algo has done a great job of keeping me in range. Bit of an experiment that turned out quite well!
Eric Jensen
@elnjensen
Sep 30 2016 18:47
@tim2000s That's great! Pretty wild (in the context of T1D) to think about eating and not having to do anything about it...
Scott Leibrand
@scottleibrand
Sep 30 2016 18:48
Eric Jensen
@elnjensen
Sep 30 2016 18:50
@scottleibrand Sorry, one more question - there's no setting for carb absorption rate in oref0, correct? It just assumes a fixed rate? No equivalent of DIA? (DCA?)
Tim Street
@tim2000s
Sep 30 2016 19:03
Interesting @scottleibrand I'm still not clear how to set temp targets though.
(And I disabled max settings earlier when playing with this stuff 😳😮) Results were interesting but caused an issue when I overestimated carbs. Minor hypo but easily fixed.
Scott Leibrand
@scottleibrand
Sep 30 2016 19:37
@tim2000s you set them in NS care portal.
@elnjensen no, we don't use a fixed rate. For historical absorption (calculating COB) we use actual observed BG deviation (vs. BGI of insulin alone). To predict future absorption (for high-temping) we use the current (last-30m) rate of absorption (with a min of 3mg/dL/5m if less than half of carbs have absorbed) and project that to gradually decrease to zero as all COB absorbs.
Jason Calabrese
@jasoncalabrese
Sep 30 2016 20:20
@SandraK82 the NS cob hasn't been updated to use the oref0 cob, partially since it made it easy to compare them, but we should do that same as iob and use devicestatus cob if available
@elnjensen 1 way to prevent having to adjust the meal bolus for eating soon iob is to bump up the CR on the pump and use the adjustment ratio to let oref0 know the bolus wizard wasn't the full amount
Sandra Keßler
@SandraK82
Sep 30 2016 20:26
@jasoncalabrese thanks for the answer
Another question is: can I somehow set a maximal cob. I observe a less common seen complication: if I eat a lot, as today 130g ch, I need only to calculate about 60g. The rest vanishes... I want still be able to put it in the treatment
Dana Lewis
@danamlewis
Sep 30 2016 20:42
if there’s no carb effect, it won’t kick in more, only if there’s a rise and remaining cob calculated
Scott Leibrand
@scottleibrand
Sep 30 2016 20:46
@SandraK82 I would try those kinds of meals with AMA and see how it does. Enter the full amount, bolus for just what you need to bolus for, and then see if AMA figures out the disappearing carbs. we designed it to deal with Dana's disappearing carbs, so it might already do what you want.
Sandra Keßler
@SandraK82
Sep 30 2016 20:53
Great :+1:
Scott Leibrand
@scottleibrand
Sep 30 2016 21:01
or, perhaps, bolus a little less than you would otherwise, as oref0 will likely high-temp once you really start rising...
Tim Street
@tim2000s
Sep 30 2016 21:03
Yeah. It's pretty good at that.
Eric Jensen
@elnjensen
Sep 30 2016 21:40
@scottleibrand Thanks for the detailed COB explanation. So for the historical absorption rate (used to project the future rate) it uses the BG deviation, so that must assume that the DIA is correct, as well as the shape of the insulin absorption profile curve. (It has to assume something, of course!) Just trying to think about how all the parts fit together - what is set/assumed, vs. what is calculated from empirical data.
You mentioned "Walsh curves" in a previous exchange we had - I assume that is John Walsh (Pumping Insulin, etc.), but do you have a reference for the curve you refer to? Google brings up a bunch of papers by him on this topic, but couldn't find a specific equation. (And I realize that this isn't what oref0 uses right now - I see from the code that it's a two-piece quadratic.)
@jasoncalabrese Thanks for the tip on the adjustment ratio. Is a > 1 ratio there the amount by which bolus will need to be augmented to match carbs? e.g. 1.2 would mean the carbs were 120% of the amount for which I bolused?
kenstack
@kenstack
Sep 30 2016 22:05
@elnjensen the Walsh curves are in a couple of papers - if you want the actual functions both @loudnate loop kit has them as well as glucodyn https://github.com/Perceptus/GlucoDyn
Jason Calabrese
@jasoncalabrese
Sep 30 2016 22:05
It goes the other way, so .8 would tell oref0 that the CR on the pump is only 80%
With that a CR on the pump of 20 would be seen by oref0 add 16
*as
Eric Jensen
@elnjensen
Sep 30 2016 22:26
Got it, thanks.
@kenstack Thanks for the pointers - still would like to track down the original references. On the Glucodyn site it says "GlucoDyn's calculations are based on the equations contained in background.pdf (add link)." So the search continues...
kenstack
@kenstack
Sep 30 2016 22:47
Huh not are where they went .... I'll get @bustavo to post or I'll send late tonight
I'll also send you the reference for the curves
Tim Street
@tim2000s
Sep 30 2016 23:11
I've just hit the Azure transaction limit on the free subscription with the new loop setup as well. I know someone else did.
Scott Leibrand
@scottleibrand
Sep 30 2016 23:14
yeah, we need someone to start working on switching the ns-loop upload stuff over to use the new ns device
care to help?
Tim Street
@tim2000s
Sep 30 2016 23:35
May need to!
Dana Lewis
@danamlewis
Sep 30 2016 23:35
:)
Tim Street
@tim2000s
Sep 30 2016 23:42
Ping me some links.
there'll be a bunch of stuff in there that's incompatible with oref0-setup's aliases etc.
so you'll have to figure out how to glue them together