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

26th
Oct 2015
diabeticgonewild
@diabeticgonewild
Oct 26 2015 00:10
Found this article (going to my local National Library of Medicine branch or whatever tomorrow to get some paywalled articles "for free" and making a list of stuff to get). This would be something to consider for putting information down on a mobile scale for NightScout users regarding diabetes care... http://online.liebertpub.com/doi/pdfplus/10.1089/dia.2014.0276
diabeticgonewild
@diabeticgonewild
Oct 26 2015 17:39
Crazy!
Ben West
@bewest
Oct 26 2015 19:03
and sensor fail
aw....
it's only been like.... a few weeks
diabeticgonewild
@diabeticgonewild
Oct 26 2015 19:03
That sucks though!
I am about to start programming in differential equations for #VirtualPancreas soon. At least probably in a few days...
fjungman
@fjungman
Oct 26 2015 19:06
@bewest sucks when they don't go a full month... :)
Ben West
@bewest
Oct 26 2015 19:46
might be dehydrated
oh weird
lol
it was ???
for long time
I tried restarting it
I punched in a number after massaging the site and drinking some water
and after punching in a number, it's got a 3/4 pie circle again
nice
lol
with any luck it'll ask for bg in a few minutes
Dana Lewis
@danamlewis
Oct 26 2015 19:47
"just add water" :)
Ben West
@bewest
Oct 26 2015 19:51
bingo
vampire drops
fjungman
@fjungman
Oct 26 2015 20:45
Funny, I just always assume everyone is using xDrip on gitter. I haven't seen ??? or worried about restart delays in a year.
Ben West
@bewest
Oct 26 2015 21:17
haha, I usually try to work with the oldest stuff available, ironically
part of my advocacy argument is that I need to be able to inspect/understand/verify how the vendor's stuff works
and that's the reason I need access to the details... to verify that it works
harder to make that argument if I'm not using their equipment
Scott Leibrand
@scottleibrand
Oct 26 2015 21:59
we mostly are using share instead of xdrip because it requires less custom-built hardware, and we have enough of that as it is with openaps. :)
Dana Lewis
@danamlewis
Oct 26 2015 22:12
Because I break everything when I travel ;) (worth noting, it looks like the new stuff has improved my range with the carelink stick, yay! May be able to travel with only 2 pis this week instead of 4 :D) cc @bewest for whatever magic he did.
Ben West
@bewest
Oct 26 2015 22:12
interesting
hmm
well scott's the one that tuned your loop, so
Dana Lewis
@danamlewis
Oct 26 2015 22:13
right, but it's because of something you did with decocare, I think
Ben West
@bewest
Oct 26 2015 22:13
hmm, was just thinking of rolling that back
curious if you get BadResponse even with just one stick
Dana Lewis
@danamlewis
Oct 26 2015 22:15
why roll back?
Ben West
@bewest
Oct 26 2015 22:16
I'm seeing an increase in errors in my loop, even though it takes less time
a few BadResponse's
need to keep experimenting with lots of check-foo's
Scott Leibrand
@scottleibrand
Oct 26 2015 22:17
for us, the faster runs means less time for things to time out
so it's an overall increase in reliability
Ben West
@bewest
Oct 26 2015 22:18
for me, it looks like it might be "slipping" and sending next command and then the next response is the previous request
so eg, model is empty
then clock fails
Scott Leibrand
@scottleibrand
Oct 26 2015 22:19
level of errors is low enough that we can have one pi beside the bed and just retry the whole gather thing if something fails, and not have to deal with multi-pi interference.
Ben West
@bewest
Oct 26 2015 22:19
yeah, it tends to work out next time
Scott Leibrand
@scottleibrand
Oct 26 2015 22:19
I did get it tuned well enough last night where it will still work with two pi's: it just goes to sleep for 2 minutes if it gets a preflight fail.
Ben West
@bewest
Oct 26 2015 22:19
yeah, nice
Scott Leibrand
@scottleibrand
Oct 26 2015 22:19
so the one with the weaker connection tends to shut up for a bit and let the other one proceed
Ben West
@bewest
Oct 26 2015 22:20
I came up with really crude way to post just the newest data to NS
er, not crude, just, still quite complicated, but at least "general" enough to share
Scott Leibrand
@scottleibrand
Oct 26 2015 22:20
one thing that occurred to me last night: we should be posting pumphistory, not enacted treatments, because sometimes treatments get enacted but the ack gets missed
Ben West
@bewest
Oct 26 2015 22:20
I used the new device ini thing to put my personal endpoints in the new ini
right
yeah, but there's a side-effect from that, too
eg I'm posting the history gathered from before the treatment...
so it's off by one
Scott Leibrand
@scottleibrand
Oct 26 2015 22:21
I've seen cases recently where the temp did get enacted, as you can see when checking current temp, but the pi has no record of it in the enacted.json
Ben West
@bewest
Oct 26 2015 22:21
the latest treatment doesn't get posted until the next loop
Scott Leibrand
@scottleibrand
Oct 26 2015 22:21
my loop handles that pretty well
Ben West
@bewest
Oct 26 2015 22:22
I figure that's because next loop as run and decided to do nothing?
I cat enacted and some other stuff as part of check enacted
Scott Leibrand
@scottleibrand
Oct 26 2015 22:22
what I do is collect all the pump data and upload to NS, then wait until the next BG reading comes in...
Ben West
@bewest
Oct 26 2015 22:22
iob and enacted stuff
Scott Leibrand
@scottleibrand
Oct 26 2015 22:22
then do the determine-basal, enact, and upload the enact result
then immediately (at the top of the next minute) start over, so you immediately re-query the pump and upload the results
Ben West
@bewest
Oct 26 2015 22:23
ah, I guess I want determine-basal to work on new history after I get glucose
but yeah, toying with requerying afterwords
Scott Leibrand
@scottleibrand
Oct 26 2015 22:23
unless you do a bolus in the 1-2 minutes it's waiting for a new BG, it hasn't missed anything
I requeried afterward at first, but found that was duplicative
better to have your "requery" just be the next run's query
and then pause while you wait for BG
Ben West
@bewest
Oct 26 2015 22:24
well, only in the case where check-recommendation indicates that there will be a new temp sent and enacted indicates it sent it
so enacted ran and was successful, append last 5 minutes of history from iter_pump_minutes (is that a thing?) to the history
Scott Leibrand
@scottleibrand
Oct 26 2015 22:25
I just upload all of pumphistory and let nightscout dedupe it
Ben West
@bewest
Oct 26 2015 22:26
to entries?
Scott Leibrand
@scottleibrand
Oct 26 2015 22:26
yeah
don't have c-r-m reading entries yet though, just diyps
Ben West
@bewest
Oct 26 2015 22:26
ah, I'm translating a version of history to ns-treatments, and posting to treatments so it shows up in the UI
Scott Leibrand
@scottleibrand
Oct 26 2015 22:26
translated from pumphistory or from enacted?
Ben West
@bewest
Oct 26 2015 22:27
pumphistory
Scott Leibrand
@scottleibrand
Oct 26 2015 22:27
cool
Ben West
@bewest
Oct 26 2015 22:27
has to come from pump
Scott Leibrand
@scottleibrand
Oct 26 2015 22:27
I mean from iter_pump_hours or set_temp_basal?
Ben West
@bewest
Oct 26 2015 22:27
iter_
Scott Leibrand
@scottleibrand
Oct 26 2015 22:27
k, same as I want to do, good
Ben West
@bewest
Oct 26 2015 22:28
afaik, set_temp_basal doesn't produce pump history
it produces a report on what it did
Scott Leibrand
@scottleibrand
Oct 26 2015 22:28
yeah, but it does produce a single "treatment" record
so thought you were using that
pumphistory is better though IMO
Ben West
@bewest
Oct 26 2015 22:28
no, that's a record of what it did, not a record from pump memory
it's fictitious, afaik
it's "I did this thing"
not "this is in pump memory"
scottleibrand @scottleibrand nods
Ben West
@bewest
Oct 26 2015 22:29
maybe another use though...
Scott Leibrand
@scottleibrand
Oct 26 2015 22:29
it does seem to match what the pump actually set if received: true though
Ben West
@bewest
Oct 26 2015 22:29
confirm_temp maybe
Scott Leibrand
@scottleibrand
Oct 26 2015 22:29
so not completely fictitious
Ben West
@bewest
Oct 26 2015 22:29
confirm_temp --since <clock.json>?
Scott Leibrand
@scottleibrand
Oct 26 2015 22:30
for example, it returns the actual temp rate it set, not the one you requested
Ben West
@bewest
Oct 26 2015 22:30
that's because the input and the output is identical
oh
Scott Leibrand
@scottleibrand
Oct 26 2015 22:30
nope
Ben West
@bewest
Oct 26 2015 22:30
hmm
no
that's because I do ask for pump status
to confirm
Scott Leibrand
@scottleibrand
Oct 26 2015 22:30
k
Ben West
@bewest
Oct 26 2015 22:30
but not pump memory
but I think it's also because bits of the input/output are identical
same bytes/code <-> json
Scott Leibrand
@scottleibrand
Oct 26 2015 22:31
it does echo back all the "extra" output from suggested into enacted, which is nice. :)
like my "reason" field. :)
Ben West
@bewest
Oct 26 2015 22:31
so I consider the result as the combination of the input + output + status
something like that, for all the set_ commands
yeah, kind of like reason
Scott Leibrand
@scottleibrand
Oct 26 2015 22:32
anyway, I'll be switching over from old-iob to dev branch tonight, since the iob calculation bug I'm dealing with doesn't seem to exist in dev
and then after that I can play with the upload stuff
Ben West
@bewest
Oct 26 2015 22:32
yeah