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

6th
Jan 2016
Jason Calabrese
@jasoncalabrese
Jan 06 2016 01:31
just merged nightscout/cgm-remote-monitor#1447 to NS dev, if your using the OpenAPS plugin this should help speed up the initial load
Scott Leibrand
@scottleibrand
Jan 06 2016 01:32
Sweet, I'll be upgrading ASAP!
Dana Lewis
@danamlewis
Jan 06 2016 01:34
Wahoo. Thanks @jasoncalabrese
Jason Calabrese
@jasoncalabrese
Jan 06 2016 01:40
let me know if you see much of an improvement, we can tune it some more
eyim
@eyim
Jan 06 2016 02:14
@jasoncalabrese Thank you Jason!
Jason Calabrese
@jasoncalabrese
Jan 06 2016 02:54
starting on a basic pump plugin for NS: nightscout/cgm-remote-monitor#1455
includes battery and reservoir level based alarms
Scott Leibrand
@scottleibrand
Jan 06 2016 02:56
@danamlewis had some ideas for how to structure those alarms
Jason Calabrese
@jasoncalabrese
Jan 06 2016 02:56
need to figure out how this will work with what @MilosKozak, @mddub, and @ps2 need
we really need alarm groups in NS, to seperate BG based alarms from loop status, pump status, cage, etc
right now we only have warn and urgent, snooze any warning and you snooze all warnings
Scott Leibrand
@scottleibrand
Jan 06 2016 02:58
And send some to pushover/IFTTT and some not
Jason Calabrese
@jasoncalabrese
Jan 06 2016 02:58
that gets hard to customize
but any ideas would be great
just want to try keeping backwards compatibility with existing NS config
cool to scroll back and see the res change
Dana Lewis
@danamlewis
Jan 06 2016 03:06
Alarm groups would be great.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:06
@mgranberry should see how this will work with t:slim too
the status we're posting from openaps doesn't include pump model, or device name, would be nice to identify specific PIs
Matthias Granberry
@mgranberry
Jan 06 2016 03:26
@jasoncalabrese My code isn't sending anything as events. Can you point me to a repo where pump uploads are generated? I'd like to bring mine in line with openaps where possible.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:27
we're posting to /api/v1/devicestatus
Matthias Granberry
@mgranberry
Jan 06 2016 03:27
reservoir volume is one place where they really dropped the ball. I haven't found a place where it gets logged outside of alarms. I'm pretty sure there is a command to get battery level, but that gets generated and logged fairly frequently
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:28
data right now looks like this:
{
  pump: {
    battery: {
      status: 'normal',
      voltage: 1.52
    },
    status: {
      status: 'normal',
      timestamp: '2015-12-05T18:59:37.000Z',
      bolusing: false,
      suspended: false
    },
    reservoir: 86.4,
    clock: '2015-12-05T10:58:47-08:00'
  },
  openaps: {
    suggested: {
      bg: 147,
      temp: 'absolute',
      snoozeBG: 125,
      timestamp: '2015-12-05T19:02:42.000Z',
      rate: 0.75,
      reason: 'Eventual BG 125>120, no temp, setting 0.75U/hr',
      eventualBG: 125,
      duration: 30,
      tick: '+1'
    },
    iob: {
      timestamp: '2015-12-05T19:02:42.000Z',
      bolusiob: 0,
      iob: 0.6068340736133333,
      activity: 0.016131569664902996
    },
    enacted: {
      bg: 147,
      temp: 'absolute',
      snoozeBG: 125,
      recieved: true,
      reason: 'Eventual BG 125>120, no temp, setting 0.75U/hr',
      rate: 0.75,
      eventualBG: 125,
      timestamp: '2015-12-05T19:03:00.000Z',
      duration: 30,
      tick: '+1'
    }
  }
}
need to add pump model info, and normalize some fields
Scott Leibrand
@scottleibrand
Jan 06 2016 03:30
@jasoncalabrese just upgraded my NS to dev: loads much faster now! thx!
Matthias Granberry
@mgranberry
Jan 06 2016 03:30
I'll look at the plugin and see what makes sense to include. Model info is a pain w/ the t:slim too, because they really only track firmware versions as far as I can tell. Maybe the tidepool guys have docs on that now. It's been a while since I've looked at that repo.
Scott Leibrand
@scottleibrand
Jan 06 2016 03:30
interesting, I can see how it initially starts out with OpenAPS unknown, and then switches to 6h ago once the historical data finally loads. @danamlewis isn't quite so CDO about hotspotting as I am. ;-)
Dana Lewis
@danamlewis
Jan 06 2016 03:31
wowwwwww. 10 second load instead of 4+ minute from this morning!
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:34
are you uploading status from multiple pis?
Scott Leibrand
@scottleibrand
Jan 06 2016 03:35
yes
2 bedside and one mobile
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:36
any ideas on how to identify them, hate adding more input files
Scott Leibrand
@scottleibrand
Jan 06 2016 03:36
hostname
mine are super original: rpi1 through rpi4. ;-)
Dana Lewis
@danamlewis
Jan 06 2016 03:37
I’m sure Andrew and Sam would have some name ideas for us ;)
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:37
I'm running indy2 now, indy3 is dev
still haven't trying letting both hit the same pump
Scott Leibrand
@scottleibrand
Jan 06 2016 03:39
our 120 second sleep on preflight fail works pretty well
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:39
and not need to change the inputs
Scott Leibrand
@scottleibrand
Jan 06 2016 03:39
:+1:
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:40
pump model info would be good, but redundant too, maybe set the in the plugin config
Scott Leibrand
@scottleibrand
Jan 06 2016 03:40
what would that be for?
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:41
handling different fields/formats from the different pumps
hoping to have a base generic pump plugin
Scott Leibrand
@scottleibrand
Jan 06 2016 03:41
can you just go on presence or absence of fields?
Toby Canning
@TC2013
Jan 06 2016 03:42
Do you have to do anything special to run two rPis at the same time?
Dana Lewis
@danamlewis
Jan 06 2016 03:42
No @TC2013 .
Scott Leibrand
@scottleibrand
Jan 06 2016 03:42
openaps alias add preflight '! bash -c "rm -f monitor/clock.json && echo -n \"PREFLIGHT \" && openaps report invoke monitor/clock.json 2>/dev/null >/dev/null && grep -q T monitor/clock.json && echo OK || ( mm-stick warmup || sudo oref0-reset-usb; echo FAIL; openaps get-bg; sleep 120; exit 1 )"'
Dana Lewis
@danamlewis
Jan 06 2016 03:42
preflight checks to make sure soemthing’s not already running
Scott Leibrand
@scottleibrand
Jan 06 2016 03:43
* * * * * cd /home/pi/openaps-dev && ( ps aux | grep -v grep | grep -q "openaps retry-loop" || openaps retry-loop ) 2>&1 | tee -a /var/log/openaps/loop.log
Toby Canning
@TC2013
Jan 06 2016 03:43
Does the comms on one pi ever mess with the success of the other?
Scott Leibrand
@scottleibrand
Jan 06 2016 03:43
yes, that's why the sleep 120
and the ps check
Toby Canning
@TC2013
Jan 06 2016 03:43
Ahhh, is likely not long enough for us
Scott Leibrand
@scottleibrand
Jan 06 2016 03:43
so it stops trying for 2m after a preflight fails, to give other Pi time to try
other Pi doesn't need to complete a full loop, just get through a read cycle
Toby Canning
@TC2013
Jan 06 2016 03:43
Our runs take a bit longer than 2m
right
that makes sense
Scott Leibrand
@scottleibrand
Jan 06 2016 03:44
I also enact immediately after getting pumphistory and then again after wait-for-bg
so my loop is basically two bursts of comms
with uploads and waiting for BG in between
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:45
some things might be really pump specific, like converting battery voltage to a %
Scott Leibrand
@scottleibrand
Jan 06 2016 03:46
battery % is a lie anyway
maybe better to just report voltage and allow custom alarms
alkalines vs. lithiums have different voltage curves even for the same pump
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:48
voltage is fine for alarms, % would be nice for display
would be nice to do it dynamicaly
Toby Canning
@TC2013
Jan 06 2016 03:48
That might be tough with lithiums
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:48
looking for max/min
Dana Lewis
@danamlewis
Jan 06 2016 03:48
It’s more like these states: Full. Fine. Dodgy. Dead.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 03:51
need a better way to display extra pills
having OpenAPS in the name of the pill uses a lot of space
Pete Schwamb
@ps2
Jan 06 2016 03:54
In the mysentry packets, for battery, you get 100%, 75%, 50%, 25%; those correspond to what you see on the pump display.
Dana Lewis
@danamlewis
Jan 06 2016 03:57
Yea, the problem is that gives the allusion of an equal amount of time between those varying states
With openaps, and lithium, you go to 75 back to 100; wait a day; then woosh down to 25 in a couple of hours.
@jasoncalabrese just APS for pill name?
or AP?
Pete Schwamb
@ps2
Jan 06 2016 04:00
I’ve been wondering about the 3min wakeup that openaps does when gathering data. From what I’ve seen, as long as you keep sending packets; the pump will stay in listen mode. Since being in active rx mode takes up to 10x the power of normal non-rx mode, limiting that time could have a big effect.
For example, if you can gather all your data in 30s, and the pump stays on just a few seconds after that, you are being 6x more efficient vs it staying on for 3min.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 04:05
not sure I like seeing OpenAPS there, but does take up a lot of space, need to claim a unicode symbol as the OpenAPS logo
Tony Zarro
@tzarro
Jan 06 2016 04:06
FYI, I am getting a recurrence of my "ACK=0" error...I am going to try to manually run the oref0-reset-usb command and see if that resolves the issue...but here is the text of the error.
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocar e/stick.py", line 907, in <module>
stick.open( )
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocar e/stick.py", line 869, in open
log.info('%s' % self.product_info( ))
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocar e/stick.py", line 510, in product_info
return self.query(ProductInfo)
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocar e/stick.py", line 504, in query
return self.process( )
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocar e/stick.py", line 491, in process
ack, response = self.command.respond(raw)
File "/usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocar e/stick.py", line 66, in respond
raise AckError("ACK is 0 bytes:\n%s" % lib.hexdump(raw))
decocare.errors.AckError: ACK is 0 bytes:
Dana Lewis
@danamlewis
Jan 06 2016 04:06
@jasoncalabrese is there a unicode unicorn?
Tony Zarro
@tzarro
Jan 06 2016 04:10
Well, running oref0-reset-usb manually fixed the issue, so I need to find out why it isn't fixing the issue as part of my crontab...interesting
Scott Leibrand
@scottleibrand
Jan 06 2016 04:15
Check your loop.log
it should say if it's resetting USB
Tony Zarro
@tzarro
Jan 06 2016 04:18
its not
I'm not calling it in cron, but in one of the aliases...
looking at it now
Scott Leibrand
@scottleibrand
Jan 06 2016 04:19
Also, next time it happens, run that alias, and then start running its components until you narrow down what it is.
Unless you can figure it out while it's not happening.
Tony Zarro
@tzarro
Jan 06 2016 04:19
ah, that makes sense
I'm calling it in preflight, but I've got one other alias that runs before preflight...wondering if its getting stuck there
Scott Leibrand
@scottleibrand
Jan 06 2016 04:29
Does it use the Carelink?
Toby Canning
@TC2013
Jan 06 2016 04:32
Okay, I varied their wait times on preflight fail and that seems to have decreased the conflicts
offset by 20 seconds
Toby Canning
@TC2013
Jan 06 2016 04:37
I wish those radio errors wouldn't throw such big piles of text into the log. I'd be fine with Radio tx/rx problem
Toby Canning
@TC2013
Jan 06 2016 04:46
Okay, I'll keep playing around with offsetting the times, but it seems every once in a while the PIs get stuck in a rut where they knock out each others' comms for a while
diabeticgonewild
@diabeticgonewild
Jan 06 2016 04:54
I tried to have 2 WiFi adapters, one as a wifi connection and the other as an access point--DON'T DO IT! It causes a lot of interference.
Instead, get an adapter that does both at the same time (although bulkier....it will work). Refer to this, for more details: http://askubuntu.com/questions/318973/how-do-i-create-a-wifi-hotspot-sharing-wireless-internet-connection-single-adap
Scott Leibrand
@scottleibrand
Jan 06 2016 04:56
Can't you just set different channels?
diabeticgonewild
@diabeticgonewild
Jan 06 2016 04:56
It still causes problems
Yes, you can though.
eyim
@eyim
Jan 06 2016 05:24
@tzarro Is your temp basal set to absolute or % based? I think I saw similar ACK errors when mine was set to % based. You have to be on absolute
Scott Leibrand
@scottleibrand
Jan 06 2016 05:28
% setting would make it always fail. He's seeing an intermittently stuck Carelink. oref0-reset-usb fixes it, so it's the same issue we all see. Just need to figure out the aliases to make sure to run the script when needed.
Tony Zarro
@tzarro
Jan 06 2016 05:43
its absolute, yes...
diabeticgonewild
@diabeticgonewild
Jan 06 2016 05:43

I got this. I installed the dev version

Warning: could not parse carbratio_data. Meal Assist disabled.

Tony Zarro
@tzarro
Jan 06 2016 05:43
Unfortunately, I haven't had much time to make progress on this tonight, so I've just setup a periodic reboot in cron, to make sure it doesn't trip me up overnight...
Tonight will be my third night on OpenAPS :)
Dana Lewis
@danamlewis
Jan 06 2016 05:44
:) @tzarro
Scott Leibrand
@scottleibrand
Jan 06 2016 05:44
@diabeticgonewild that's fine if you don't have meal assist set up yet.
diabeticgonewild
@diabeticgonewild
Jan 06 2016 05:45
K
That's what I thought.
Tony Zarro
@tzarro
Jan 06 2016 05:45
My wife and I were talking today, and mentioned that we're getting a strange feeling of "survivor's guilt"...feeling very, very lucky to have been a part of this, and very sorry for other type 1s who don't have it and perhaps won't for a while...
Scott Leibrand
@scottleibrand
Jan 06 2016 05:45
Not really helpful for overnight use.
diabeticgonewild
@diabeticgonewild
Jan 06 2016 05:46
Yeah, I know...
@tzarro , some people are proud to what they have pulled off, against the odds...like me...
Scott Leibrand
@scottleibrand
Jan 06 2016 05:47
@tzarro if you can do this, a lot of those people can too. You can definitely help make it more accessible for people who question their ability to build something...
diabeticgonewild
@diabeticgonewild
Jan 06 2016 05:47
So I don't really have survivor's guilt.
Scott Leibrand
@scottleibrand
Jan 06 2016 05:47
it really seems to be a lot more about motivation than anything, assuming you can get the pump and CGM.
Tony Zarro
@tzarro
Jan 06 2016 05:48
@scottleibrand yep, I'll be hanging out here and trying to help others, wondering what I can do to encourage others to even come here and learn...\
but for now, time to rest...take care y'all...
Scott Leibrand
@scottleibrand
Jan 06 2016 05:48
I would encourage you to write up your experience at some point.
Tony Zarro
@tzarro
Jan 06 2016 05:48
that makes sense, I'll do that
Scott Leibrand
@scottleibrand
Jan 06 2016 05:48
'Nite
Tony Zarro
@tzarro
Jan 06 2016 05:48
especially since I thrashed around for quite a bit trying to convince myself that I could do it...that's probably the biggest hurdle...
Scott Leibrand
@scottleibrand
Jan 06 2016 05:49
exactly.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 05:49
easy to make excuses
find a reason to wait a little
it's strange looking back, and trying to figure out why it didn't happen sooner
Dana Lewis
@danamlewis
Jan 06 2016 06:18
Strange now, made sense then though :)
Jason Calabrese
@jasoncalabrese
Jan 06 2016 07:29
you're right about the the battery voltage jumping around, easy to view that now hadn't ever looked at it before
same with the reservoir, you can now position the now line in NS before a temp, see the reservoir, then move to the end and see what the pump recoded compared to what we expect
Jason Calabrese
@jasoncalabrese
Jan 06 2016 08:52
opened nightscout/cgm-remote-monitor#1456 to do an upsert for treatments posted to the api, should solve the issue some of us are running into when posted treatment from openaps
works based on created_at and eventType
it now processes each treatment individually, so for a big array it will be more work, but think thats the only way if we want to upsert
Milos Kozak
@MilosKozak
Jan 06 2016 08:54
are you deduping incomming array only or vs mongo?
Jason Calabrese
@jasoncalabrese
Jan 06 2016 08:56
vs mongo
with an upsert
so created_at and eventType become an alternate id
Milos Kozak
@MilosKozak
Jan 06 2016 08:58
cool. would be great to make function accessible for new records comming from ws
ohhh it's in lib/treatments.js ... it should work
will analyze this code and reuse. ready to merge?
Jason Calabrese
@jasoncalabrese
Jan 06 2016 09:09
having a little trouble with the tests
it's a complicated setup, lots of initialization and calbacks
Jason Calabrese
@jasoncalabrese
Jan 06 2016 09:33
tests are passing now, but it's not right, they're all sharing the same bus so event order isn't predictable
not now I have 3 ways to do get the same results, so it matches up, trying to avoid a bunch of copy and paste of the setup
dougtakeuti
@dougtakeuti
Jan 06 2016 14:39
I'm trying to create my first schedule, but when I type crontab -l I get no crontab for pi Any ideas?
Scott Leibrand
@scottleibrand
Jan 06 2016 14:40
-l just lists your current one. -e edits
dougtakeuti
@dougtakeuti
Jan 06 2016 15:03
cheers
Tony Zarro
@tzarro
Jan 06 2016 15:22
Had an interesting night last night...my ACK=0 issue didn't seem to recur (thanks to the periodic reboot in cron I setup), but I noticed some wackiness with my CGM...it was reporting BG roughly 200 points higher than it actually was (377 vs 155) with a finger stick...I can't recall how old the install was but its been at least two weeks...made me realize that I'm going to need to keep much closer track of the duration of my CGM installs, and pay very close attention to how far off my CGM is when I calibrate twice a day.
Other than that, OpenAPS performed well yet again..as of 9am this morning I've been on it for 72 hours :)
Tony Zarro
@tzarro
Jan 06 2016 15:29
@danamlewis I've just filled out the form :)
Scott Leibrand
@scottleibrand
Jan 06 2016 15:30
:-D
Rachel Sandlain
@audiefile
Jan 06 2016 15:36
:confetti_ball:
Paul Andrel
@stavlor
Jan 06 2016 15:37
:fireworks:
Oskar Pearson
@oskarpearson
Jan 06 2016 16:54
@tzarro Well done!
@tzarro I have a hunch about your ACK=0 issue, by the way... Is it possible that the battery or power supply that you're using might not be able to provide enough power to the pi? That would cause under-voltages to the carelink, which could lead to all sorts of weirdness
Alternatively - are you perhaps using a slightly dodgy USB cable anywhere in the mix?
We had loads of issues due to power issues when we first started. The pi would remain up and running, but everything just seemed very flaky
Soldering the power cable directly onto the motherboard, and using an official pi power supply made all the difference
Dragan Maksimovic
@dm61
Jan 06 2016 17:36
@tzarro :+1:
Dana Lewis
@danamlewis
Jan 06 2016 17:49
@tzarro :) just checked info. #OpenAPS= (n=1)*24!
Jason Calabrese
@jasoncalabrese
Jan 06 2016 18:14
where's Wes to start the countdown to 25 game
Scott Leibrand
@scottleibrand
Jan 06 2016 18:17
pretty sure #25 is already looping, just hasn't gotten to 3 days yet
Dana Lewis
@danamlewis
Jan 06 2016 18:17
Oh, was just reminded. For any new loopers + those on the path to looping - make sure you have downloaded 30 days of data from before you started looping. This will help analyze before/after loop changes. @dm61 @johnmales @tzarro @sulkaharo And anyone else recent that I can't name off the top of my head :)
Paul Andrel
@stavlor
Jan 06 2016 18:18
@danamlewis haven't quite gotten there but my ns/clarity has well over 30 days
Dana Lewis
@danamlewis
Jan 06 2016 18:20
excellent.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 18:21
would be nice to just point some tool to NS urls to gather standard info
seems like someone would be begging to do that
I'm happy to share all my data, if anyone can use it
Dana Lewis
@danamlewis
Jan 06 2016 18:24
I’m going to aggregate data in a couple of weeks, but not yet. So begging coming soon ;)
Jason Calabrese
@jasoncalabrese
Jan 06 2016 18:31
have an appt at the endo next monday, need to figure out what I want to show
already talked to him to make sure we have his support for sending openaps to school, the district nurse wants it listed as a required device from the Dr
Paul Andrel
@stavlor
Jan 06 2016 18:34
heh @jasoncalabrese last time i was at my endo she thought ns was neat heh i'm not sure what her opinion on openaps would be
Scott Leibrand
@scottleibrand
Jan 06 2016 18:34
probably depends on whether you come in with data showing time-in-range improvements from it. :)
Sulka Haro
@sulkaharo
Jan 06 2016 18:41
@danamlewis what do you mean by 30 day download?
I have >12 months of CGM readings. But not of much use -> the insulin profile and overall balance changes so much over time that comparing is really hard
Scott Leibrand
@scottleibrand
Jan 06 2016 18:45
it's mostly so you can see any obvious changes in time in range etc. More CGM history is obviously good, but a lot of newbies haven't been running NS, so 30 days is all they can get
Dana Lewis
@danamlewis
Jan 06 2016 18:46
Yup. @sulkaharo Just Bg data for 30+ days so we can see changes after loop started. Can calculate decrease in % time low, high, etc in addition to avg BG or a1x
Because someone may already have an ideal a1c but get big improvements staying in range more.
Also may do a survey so we can do a little bit around sleep/quality of life improvements, and to also capture parents/caregivers as well as PWDs outcomes
Paul Andrel
@stavlor
Jan 06 2016 18:48
@danamlewis heh what is this thing you call sleep quality?!?!
Dana Lewis
@danamlewis
Jan 06 2016 18:49
@stavlor Looks like this ;) https://twitter.com/danamlewis/status/684416491538804739 12-13 hours of sleep!
(Parents, don't hit me. I like to sleep :))
Jason Calabrese
@jasoncalabrese
Jan 06 2016 18:49
could look at my commit history, should be able to figure out sleep from that
Paul Andrel
@stavlor
Jan 06 2016 18:50
heh nice 5hr45mins is my average for this week according to fitbit
but then again i never was much for the sleep thing
Jason Calabrese
@jasoncalabrese
Jan 06 2016 18:50
I have a gap from when fitbit stopped taking a charge and when pebble health came out
Matthias Granberry
@mgranberry
Jan 06 2016 18:50
that's a lot of oscillation there in insulin output. The results are clearly decent, though, so it's hard to complain
Dana Lewis
@danamlewis
Jan 06 2016 18:50
Realistically my average is probably 9-10. 10 is my ideal during the week.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 18:52
the new changes on oref0 dev do cause more activity, the quicker temps to 0, and wtf-assist, but worked good last night
Scott Leibrand
@scottleibrand
Jan 06 2016 18:54
yeah. we originally tried to be more gradual with the dosing adjustments, but are finding that reacting more quickly to BG changes gets better results. you basically trade insulin variability for BG variability
Matthias Granberry
@mgranberry
Jan 06 2016 18:55
sure. I just worry when I see the outputs clamped at one end of the range or another. It doesn't allow a lot of room for fine adjustments, although I guess the adjustment is mostly being done in the time domain.
visually it looks like there is a lot of oversupply then reduced basal rates to shape the output, which is a perfectly reasonable thing to do, but it is very different from most insulin therapy. It isn't too different from what a real pancreas does, though, so maybe it's not such a bad thing.
Scott Leibrand
@scottleibrand
Jan 06 2016 18:59
exactly. the only real risk there is whether it's safe to continue your extreme rate for a full half hour. at the low end it definitely is: if your loop goes out of commission, a half hour temp to zero raises BG by ~20 mg/dL over 3-4 hours and gives you a margin of safety until you can loop again.
we don't do the same overreaction on the high side (becuse it has to be safe to run for 30m), so you'll see lower longer temps there
Matthias Granberry
@mgranberry
Jan 06 2016 19:01
yes. Looking more closely I can see asymmetric adjustments for high/lows.
Dana Lewis
@danamlewis
Jan 06 2016 19:02
(Also, FWIW, that's a random night, not an average of the typical activity or anything)
Jason Calabrese
@jasoncalabrese
Jan 06 2016 19:06
Screen Shot 2016-01-06 at 11.05.49 AM.png
Matthias Granberry
@mgranberry
Jan 06 2016 19:06
sure, but it looks similar to most others I see. It makes a great deal of sense. Basal rate manipulations are a fairly gentle lever to apply to blood glucose, so applying it fully when safe is perfectly reasonable. It doesn't look too different from HVAC control logs
Jason Calabrese
@jasoncalabrese
Jan 06 2016 19:07
pretty much stuck to 120 all night
had the same post diner crazy spike last night, and over did the correction some
but didn't have to do anything after that
for breakfast we are now bolusing for 24g, but hold back on half of it till it's needed
Scott Leibrand
@scottleibrand
Jan 06 2016 19:08
only exception to the don't-overreact-high is meal-assist, where we know (by both user input and observed BG deviation) that carbs are absorbing. we cancel meal-assist as soon as we see BG delta drop below +3 mg/dL per 5m, but if the user walks away from the loop right at peak, they'll need to take manual action.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 19:08
sending messages to Andrew on his watch
Scott Leibrand
@scottleibrand
Jan 06 2016 19:09
that's only been a problem for us when @danamlewis manually boluses (based on DIYPS recommendations) right before peak as well.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 19:11
it's like a timebomb in a way, wish we could avoid it, but they won't bolus at school till snack time, but will cover lows, and we have pretty good monitoring
I think the solution is to send openaps to school
Toby Canning
@TC2013
Jan 06 2016 19:33
@danamlewis You warned of big post meal spikes when going into a meal with negative basal IOB. Do you find that dosing for the negative IOB is sufficient to control the spike?
Dana Lewis
@danamlewis
Jan 06 2016 19:34
Yes, if it's early enough for some of the insulin to work before the meal. (So eating soon time frame, 30m-1hr ideal)
Toby Canning
@TC2013
Jan 06 2016 19:35
ahh man, getting Christian to pre-bolus is next to impossible
Dana Lewis
@danamlewis
Jan 06 2016 19:36
But not prebolus related to amount of meal. Anything helps really - even a half unit if you have -1.3u going in
Toby Canning
@TC2013
Jan 06 2016 19:36
Makes sense
Dana Lewis
@danamlewis
Jan 06 2016 19:36
Goal is just to get some insulin moving around your body since you're at a deficit, and other wise will have stronger reaction to glucose
Toby Canning
@TC2013
Jan 06 2016 19:36
That explains a lot, thanks!
We've been having severe spikes because of the -IOB and it takes way more insulin than it should to bring him down.
Matthias Granberry
@mgranberry
Jan 06 2016 19:37
@TC2013 yep. I am doing it mostly manually, but if I'm negative endogenous glucose production is high and nothing's primed for glucose update. A small amount of insulin as early as possible goes a very long way.
Dana Lewis
@danamlewis
Jan 06 2016 19:38
I have a strong emotional response to hearing “prebolus” because i was taught that meant meal bolus, 15 min before you eat. (lots of lows that way, esp if meal was glutened or i was gluten or meal was delayed, or meal was gross and I didn’t want to eat it all, or whatever.) So really try to focus on thinking about the timing of SOME sort of insulin, even if small bit, before the meal.
Matthias Granberry
@mgranberry
Jan 06 2016 19:38
the liver is the enemy here.
Dana Lewis
@danamlewis
Jan 06 2016 19:38
yep
Matthias Granberry
@mgranberry
Jan 06 2016 19:39
enough to drop 20-30 pts over 2h given 30m-1h prior to eating settles most meals out to a .25-.5 mg/dl/min rise for most foods for me, with a rise peaking at about 140
Toby Canning
@TC2013
Jan 06 2016 19:39
I need to translate the effective amount into an amount effective for my son... his carb ratio is 1/5 am and 1/7pm
okay
That's what I needed
Dana Lewis
@danamlewis
Jan 06 2016 19:40
yea, find what works for you, maybe it’s a single easy-bolus button type bolus. but something’s better than nothing, from what I have experienced.
Matthias Granberry
@mgranberry
Jan 06 2016 19:40
I have similar ratios (need to lose weight) and do ~1-1.5u most of the time
Toby Canning
@TC2013
Jan 06 2016 19:41
I'll start there
OpenAPS seems to ignore these manual boluses, is that right?
Dana Lewis
@danamlewis
Jan 06 2016 19:43
it’ll snoozebg, so it won’t counteract with a low temp, if that’s what you are asking
Toby Canning
@TC2013
Jan 06 2016 19:45
Say you are just pulling out of a low (maybe with -1.5 basal IOB) and it is time to eat, your basal is set to normal... it won't low temp seeing too much IOB
I think you're saying it will snoozebg here is an example like this...
Rachel Sandlain
@audiefile
Jan 06 2016 19:48
@danamlewis you find gluten in your meal affects by or carb absorption?
Toby Canning
@TC2013
Jan 06 2016 19:49
I'm going to guess off reading a thousand Dana tweets that she is 100% gluten free
I'm guessing she was blessed with Celiacs
Dana Lewis
@danamlewis
Jan 06 2016 19:49
@TC2013 correct. it snoozebgs anytime it sees a bolus, based on size of bolus and changes in BG. even if it’s a small bolus, it’s not going to automatically set a low temp, unless you’re super low and need LGS automatically
yep. I’m 100% gluten free for (6?7?) years. but if I get glutened, my GI system tries to get rid of said gluten, so I don’t absorb anything I had eaten
usually it’s a few bites when that nice autoimmune response kicks in, so it’s only if I’ve done a big meal size bolus and get glutened that it’s an issue of needing to eat somethign else to cover what I won’t get. I maybe get glutened 1x/year or so, so not a normal occurrence.
not sure if someone with a gluten sensitivity who eats gluten would have a different experience - mine is based on celiac.
Rachel Sandlain
@audiefile
Jan 06 2016 19:54
Ah that could explain a lot. I have some level of gluten intolerance, waiting on testing later this month to confirm so I can't go totally gluten free but feel sick from it. I've been gf some meals/days but others gluten. I sometimes think things absorb differently but haven't paid close attention.
Toby Canning
@TC2013
Jan 06 2016 19:54
@danamlewis I've been trying to read and understand Oref by comparing it to what is happening (examples give my brain better contextual understanding). I'm a just so impressed by the thoughtfulness of what you have created!
Dana Lewis
@danamlewis
Jan 06 2016 19:54
yuck, sorry to hear @audiefile :( hope you get the diagnosis you need so you can decide what to do!
Rachel Sandlain
@audiefile
Jan 06 2016 19:55
Thanks! Jan 26 can't get here fast enough!
Dana Lewis
@danamlewis
Jan 06 2016 19:56
@TC2013 I’m an example person, too. when we discuss algorithm changes, I like to start with an example and then describe the algorithm idea/change so it’s contextualized :)
Jason Calabrese
@jasoncalabrese
Jan 06 2016 20:01
think -iob is what got me last night, took about 50% extra insulin than meal bolus to correct
Dana Lewis
@danamlewis
Jan 06 2016 20:01
@audiefile my tip: eat all the gluten things you think you might miss before the test. there’s a lot of GF replacements for things, with one exception - Krispy Kreme doughnuts. So I recommend eating a donut or two before you get tested in case you go 100% GF.
@jasoncalabrese this is where going from n=1 to (n=1)*many is powerful. wondering how we can gather data on this to show the impact of neg iob before a meal, and/or the timing of early insulin dosing.
this is one of the things i had suggested to Joyce/team for the PCORI grant, is doing an analysis on insulin timing relative to carb ingestion
Matthias Granberry
@mgranberry
Jan 06 2016 20:05
-iob going into a meal is a big problem. The body needs a fair bit of insulin available to properly take on food and shut down EGP etc. There can be some pretty big spikes if it isn't there.
@AdrianLxM could probably speak from a more informed standpoint as to what's actually going on
Dana Lewis
@danamlewis
Jan 06 2016 20:07
Yea. The science is there, but in terms of the HC system understanding precisely how to recommend PWDs deal with it (other than saying “you should prebolus”), and dealing with varying situations - that’s what I’d like to influence.
Matthias Granberry
@mgranberry
Jan 06 2016 20:09
My educator looked worried when I mentioned my prebolusing habits. I probably need to find a new educator. 95% in range doesn't come from doing things dangerously.
Toby Canning
@TC2013
Jan 06 2016 20:09
LOL!
I love it when concrete data doesn't give people pause about their beliefs
Matthias Granberry
@mgranberry
Jan 06 2016 20:17
I understand not knowing what to do with someone who doesn't play by many of the accepted rules, but in this particular case the rules are wrong. With better insulin and smarter tools all of this could be pretty easy. As it is I have to manipulate things 1-4 hours out, but it lets me get away with relatively little rigidity in my schedule. It just leaves me with 12 or so (mostly small) boluses/day and a number of temp basals. I don't blame her for not knowing how to interpret any of it.
I wouldn't know how to either if I didn't have software to do it.
Rachel Sandlain
@audiefile
Jan 06 2016 20:18
@danamlewis that's my plan lots of Chinese food! Forgot about donuts, I'll have to add them to the list
Matthias Granberry
@mgranberry
Jan 06 2016 20:18
but the reality is that a healthy pancreas releases 8-12 waves of insulin per day too, so maybe it's not such an unnatural way to go about it.
@audiefile I would never have guessed that soy sauce was a problem. I'm beginning to wonder if I'm developing a gluten intolerance too. That would be a sad thing.
but maybe Chinese food isn't a great idea in general.
Dana Lewis
@danamlewis
Jan 06 2016 20:21
there is gluten free soy sauce, and there are places with GF chinese food, just not 1—% of places have it. so don’t get to worried on that front :)
*100%
Oskar Pearson
@oskarpearson
Jan 06 2016 20:35
Pretty close to Soy sauce - it's called Tamari sauce
Matthias Granberry
@mgranberry
Jan 06 2016 20:43
I found a local bright pink 722. Is there anything I need to look for before deciding to pick up a pump?
Dana Lewis
@danamlewis
Jan 06 2016 20:44
if it’s a 722, no, other than making sure it does the general functions as far as you can tell, no major cracks to the body, etc.
Pete Schwamb
@ps2
Jan 06 2016 20:46
It’s hard to find old pumps w/o cracks. Both of my 523’s have cracks. Anyone experience delivery issues with pumps with cracked cases?
Matthias Granberry
@mgranberry
Jan 06 2016 20:47
This one is a barely-used one, but I remember my 508 had some issues that looked like they were caused by poor quality plastic
Dana Lewis
@danamlewis
Jan 06 2016 20:47
major = looks like it can be pulled apart vs small hairline type things. The original 522 I was sent has a small crack, so I’m pretty careful about it in the rain more than I would be with an in-warranty one.
@mgranberry you’re probably ok to go then!
Matthias Granberry
@mgranberry
Jan 06 2016 20:49
What's the current story on Rileylinks? I really hated mashing buttons on the medtronic pump.
Pete Schwamb
@ps2
Jan 06 2016 20:49
In both my pumps, the cracks are more like hairline, except for one small piece that actually came off around the battery cap. I was wondering if there was some sort of preventative measure that could be taken to seal the cracks.
Dana Lewis
@danamlewis
Jan 06 2016 20:50
@mgranberry Several people experimenting with them, but none used in an openaps setup that I know of yet, @jasoncalabrese may end up being first. check out ps2/rileylink channel for more specifics on general usage
@ps2 duct tape? ;) :)
Pete Schwamb
@ps2
Jan 06 2016 20:50
Was thinking something more like a wicking glue like superglue or something.
Dana Lewis
@danamlewis
Jan 06 2016 20:51
hm. that would make me nervous if it seeped on the inside vs patching outside with no penetration to the enclosure. guess it would depend on where the crack was, too
Pete Schwamb
@ps2
Jan 06 2016 20:54
@mgranberry, I’ve been using RL for upload to NS for a long time. We went through a HW upgrade (xtal change) to fix issues with the pump not hearing long packets from the RL. After that, I’ve been focused on getting history dumps working. Had to rewrite the firmware entirely to fix for timing issues, since BLE has significant latency. Last night and today are the first days I’ve been getting history data dumped somewhat reliably while Riley is on the move.
Matthias Granberry
@mgranberry
Jan 06 2016 20:54
Is there a source of pre-built hardware still or has that ship sailed?
Pete Schwamb
@ps2
Jan 06 2016 20:54
I think the hardware + firmware is at the point where it could be used as part of an openaps system.
But there is more software work to be done.
Matthias Granberry
@mgranberry
Jan 06 2016 20:55
software work or firmware work?
Pete Schwamb
@ps2
Jan 06 2016 20:55
On the openaps side, we’d need to update mmblelink to work with the new firmware.
On the phone side, there is significant work before the loop can be closed, although we’ve made a lot of progress with history decoding and other low-level requirements.
software. the firmware seems to be working well.
rf params might be able to be improved a bit, though I did some pretty heavy testing/tuning last week.
Matthias Granberry
@mgranberry
Jan 06 2016 20:56
That's the easy part.
Pete Schwamb
@ps2
Jan 06 2016 20:58
I’ve been thinking about doing another HW order as soon as I have a level of confidence that everything hw & firmware is working well; Getting close to that point.
One other requirement to fill before placing a hw order is to define the testing procedure. I’m going to have the vendor perform a verification test on each piece that will involve a phone talking to the RL, and having it send & receive packets from another RL, verifying lipo charging ability, and led functionality. That should prevent a number of issues I’ve seen with boards I’ve seen from the last production run.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:02
the low level device stuff isn't an area where I can help much, but now that it seems to be getting close I want to help get the data into NS, so we can have some generic pump support that works with multiple pumps/sources
Dana Lewis
@danamlewis
Jan 06 2016 21:03
awesome, @ps2 . good idea for the tests, and thank you again for being willing to help fix/tweak everyone’s boards
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:03
also thinking that just the current status from RL could be useful, maybe optimize the loop
less polling
Matthias Granberry
@mgranberry
Jan 06 2016 21:03
I need to take a look at what openaps NS uploads look like. Alrightypump just creates treatments right now, but that doesn't feel very correct.
Paul Andrel
@stavlor
Jan 06 2016 21:04
@jasoncalabrese ah you mean using the data from the mySentry Packets?
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:04
I started on server side dedupe for treatments yesterday, that should make posting treatments easier
@stavlor yes
I'd like to know about a bolus asap
not wait 1min or even 30s
have it show up in NS almost instanly
Matthias Granberry
@mgranberry
Jan 06 2016 21:05
@jasoncalabrese I use a set _id determined from the device type/serial/record id and post them one-at-a-time so dupes can be thrown out and it works alright. It would be nice to be able to depend on batch uploads from a device, though.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:06
you can post an array
each treatment in the is an upsert on the new branch
so they would be deduped vs mongo within the batch
Matthias Granberry
@mgranberry
Jan 06 2016 21:07
you can post an array, but there are certain classes of errors (duped IDs were one) where any subsequent records would fail
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:07
we can add another id field if it helps
Matthias Granberry
@mgranberry
Jan 06 2016 21:07
maybe this fixes it
{
_id: "alrightypump-tandem-436307-395405",
enteredBy: "alrightypump-tandem-436307",
insulin: 2,
created_at: "2016-01-06T20:31:37.000Z",
eventType: "Meal Bolus",
carbs: 0
},
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:08
think letting mongo handle _id and having a device generated id might be good
at one point we were going to have something like _sig
Matthias Granberry
@mgranberry
Jan 06 2016 21:08
probably, but this works well enough. It's easy to change.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:08
could even be signed for verification
and using uri syntax for enteredBy
"enteredBy":"openaps://medtronic/522"
currently thats use for deduping on the pi
we get the most recent openaps treatment and only add past that timestamp
but it has an issue with history items that get recorded later (when the bolus finishes)
Matthias Granberry
@mgranberry
Jan 06 2016 21:11
yeah. To uniquely identify a record there needs to be a device, serial no, and record id if available. The t:slim and dexcom records each contain something that can be coerced into record IDs, although dexcom keeps them separate by record type
I haven't looked into medtronic, but I suspect it does as well
wall clock timestamp doesn't work because they aren't necessarily nonotonically increasing
I say that but my uploader uses clock timestamps right now, but I'd want to change it to keep a serial->record-id map around to do incremental reads before turning it loose on the world.
Pete Schwamb
@ps2
Jan 06 2016 21:16
@jasoncalabrese I’m driving my history dumps off the mysentry packets; so I poll when new data is available.
Matthias Granberry
@mgranberry
Jan 06 2016 21:19
how does the interaction with the host handled? Does RL push data to the host/central role when it is available?
Pete Schwamb
@ps2
Jan 06 2016 21:21
Yes, the phone acts as a central, and subscribes to notifications. In the new subg_rfspy protocol, the phone issues a command to listen on a particular channel, and a BLE attribute that the app is subscribed to is updated by the ble113 when the cc1110 responds with a packet or timeout.
I’m testing if that gives us enough background processing time on iOS to dump history.
Matthias Granberry
@mgranberry
Jan 06 2016 21:23
nice. It sounds like I need to pick up a pump and lay out some groundwork for an Android app. I wonder how difficult/memory-hogging React Native would be for embedding some of the logic/oref0 code
it would be nice to make some of this portable where it makes sense to try.
Pete Schwamb
@ps2
Jan 06 2016 21:26
Looks like her phone ran out of batteries again. Real world testing is so harsh. :) The phone is pretty old and the battery isn’t what it used to be, and now I’m asking it to do a lot of work every 5 minutes.
I’ve been talking with @loudnate about what makes sense to share. I’ve been wondering about sharing js code as well, but I know from previous experience embedding js logic in ios apps that that makes for a pretty high impedance mismatch between native code, and can add other issues as well.
We were thinking of a way of sharing tests, so that we can verify behavior between different implementations is consistent.
Matthias Granberry
@mgranberry
Jan 06 2016 21:30
right. Android is the same. React Native is not too bad, but there are still issues. There is just a lot of rapidly-moving code and I personally have full-enough pockets already and don't want to lug Yet Another Bag around with me all the time.
eyim
@eyim
Jan 06 2016 21:30
@ps2 Count me in for your next hardware order. The more I learn about Rileylink the more excited I get
Pete Schwamb
@ps2
Jan 06 2016 21:30
Most of the openaps tools take input in json and provide output in json, so that might be how we specify tests. I.E. given a) input json, for b) some process (decode history, process history, predict bg, make temp basal decisions, etc) c) expect this json output.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:34
seems like RL and pi zero might be good combination
I'm only really interested in working on things that can be shared
maybe by splitting things up into libraries it will be enough
Pete Schwamb
@ps2
Jan 06 2016 21:36
Yeah, it’s harder to share mobile stuff, but the use case is really compelling. The less devices we have to manage, the better, I think.
I also want it to be shareable.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:36
maybe a way to generate an app project
Pete Schwamb
@ps2
Jan 06 2016 21:37
The whole put it together yourself and understand the tools well approach of openaps is really important too, and that’s hard to do on mobile.
Doesn’t mean it’s impossible, though.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:39
maybe some declarative way to wire things up
Pete Schwamb
@ps2
Jan 06 2016 21:41
Ideally there’d be some way to focus on making the user understand and have control of the domain concepts (what items of data go into decision making, what does the decision making process look like, what are things that can go wrong, and what to do then?) rather than having to learn git, unix, etc...
Not sure that’s possible though. :) Some level of understanding the tooling will probably be necessary.
Matthias Granberry
@mgranberry
Jan 06 2016 21:43
@ps2 I agree. I was thinking about a "what if" chart simulator with knobs/sliders to test on simulated data
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:43
the progression is interesting, at one point no one would post an android uploader apk
then there was a safety argument about it coming from untrusted sources
similar to sharing the mechanics of a read only loop, to avoid people setting up a full loop and not considering data recency, etc
Matthias Granberry
@mgranberry
Jan 06 2016 21:45
I'd like an AWGN noise simulator too, to see what the algorithm does with simulated noise or simulated compression events etc
Pete Schwamb
@ps2
Jan 06 2016 21:46
We still can’t release a full closed loop app, certainly. The putting together your own parts still needs to apply somehow.
Matthias Granberry
@mgranberry
Jan 06 2016 21:47
I'd like to see as many parts of it as are safe make it out there. Better IOB would be a huge win, as would smarter bolus calculations etc.
Pete Schwamb
@ps2
Jan 06 2016 21:48
I think if we mirror the parts of openaps (dividing lines of component responsibility), along with the formats (sharing tests!), then we can benefit from a shared vocabulary.
@loudnate had some very interesting ideas about doing some of the wiring through healthkit and taking advantage of diet info input from other food apps.
Jason Calabrese
@jasoncalabrese
Jan 06 2016 21:50
might also be something like once you show you're already looping, sharing tips/code/apps to loop better isn't a risk
think the risk we want to avoid is having some set something up they don't understand
but that wouldn't be 100% open so isn't ideal
Lori
@LoriLori
Jan 06 2016 22:14
nicely explained loop app issues :+1: add some "App is unreliable" issue reported :) by design