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

9th
Jan 2016
Scott Leibrand
@scottleibrand
Jan 09 2016 00:01
:+1:
Lori
@LoriLori
Jan 09 2016 00:20
is this ok ?
JSLOG determine_basal({"delta":1,"glucose":100,"avgdelta":1}, {"duration":0,"rate":0,"temp":"absolute"}, {"iob":-1.111134580957543,"activity":-0.010588167478518519,"bolusiob":0.0013579904056678417}, {"max_iob":2,"carbs_hr":28,"dia":4,"type":"current","current_basal":1.3,"max_daily_basal":1.1,"max_basal":2.6,"max_bg":110,"min_bg":90,"carbratio":10,"sens":36})
{"temp":"absolute","bg":100,"tick":"+1","eventualBG":137,"snoozeBG":137,"reason":"Eventual BG 137>90 but Avg. Delta 1.00 < Exp. Delta 1.1; no temp to cancel"}
Jason Calabrese
@jasoncalabrese
Jan 09 2016 00:21
seems unplugging anything from the hub cuts power to the pi
corrupted git, but oref0-fix-git-corruption worked
need to add that to my loop
Lori
@LoriLori
Jan 09 2016 00:21
if exp delta is just 0.1 higher then delta, was thinking putting rounding or within certain percent range
Scott Leibrand
@scottleibrand
Jan 09 2016 00:22
What would you rather it did there?
Idea is it shouldn't be high-temping you if you're rising too slowly.
Also remember expected delta already incorporates an offset to BGI to get you back to target eventually.
Lori
@LoriLori
Jan 09 2016 00:25
may be it could high temp if there is negative iob, will think about it more
Scott Leibrand
@scottleibrand
Jan 09 2016 00:25
So I think it's doing exactly the right thing. Once you uptick faster than 1.1, or negative IOB decays enough that BGI drops a bit, it'll start high-temping.
Keep in mind that delta and avgdelta never stay exactly static. So it will high temp sooner or later unless you're really not rising even close to fast enough.
So you need to look at behavior over 30m or so, not just at one point in time.
Lori
@LoriLori
Jan 09 2016 00:27
still a magic how it work for me , somehow it works
Scott Leibrand
@scottleibrand
Jan 09 2016 00:27
Heh
Lori
@LoriLori
Jan 09 2016 00:28
thanks for making it :)
Scott Leibrand
@scottleibrand
Jan 09 2016 00:28
It's been fun so far. :-)
Lori
@LoriLori
Jan 09 2016 00:29
now delta is -2, it is good it didn't high temp :)
Scott Leibrand
@scottleibrand
Jan 09 2016 00:30
:-)
my philosophy is to react quickly and strongly to info indicating low-temp is needed, and be conservative (slow and steady, but quick to cancel) in setting high-temps
Meal-assist is the exception that proves the rule: had to put in all sorts of conditions to identify when it was safe to high-temp on top of meal boluses. And it still very quickly cancels high-temps and aggressively low-temps if necessary if BG stops rising.
Lori
@LoriLori
Jan 09 2016 00:34
not on meal assist branch, that I understand even less
Scott Leibrand
@scottleibrand
Jan 09 2016 00:42
Master is a bit less aggressive on low temps and doesn't do meal assist, but is equally conservative on normal high temps
eyim
@eyim
Jan 09 2016 00:44
I really like the more aggressive low temps. It has been working better for us. It never used to low temp in time which is why I was playing around with how threshold was calculated in the beginning. But the more recent changes helped us a lot. Like the commit for low-temp faster by projecting negative deviations for 30m
Scott Leibrand
@scottleibrand
Jan 09 2016 03:20
Nice. Glad that made a difference.
a bunch of you might want to read that and provide feedback.
Pete Schwamb
@ps2
Jan 09 2016 05:47
You guys ever see dexcom being not necessarily noisy (like a random walk), but jumpy (discrete jumps)?:
87_-36_↓_and_Machine_Learning_-_Module___Coursera.png
The red dot is a calibration, and the sensor was off. The other jumps are just weird.
Wondering what openaps would do with data like this, too.
Jason Calabrese
@jasoncalabrese
Jan 09 2016 05:49
that is a strange pattern
Scott Leibrand
@scottleibrand
Jan 09 2016 05:51
oref0 would high-temp for 15m after a jump like that, cancel when it flattened, and low-temp when it dropped, depending on IOB of course
Pete Schwamb
@ps2
Jan 09 2016 05:52
I’ve been seeing this with the last two sensors, and I don’t know what to think.
Ben West
@bewest
Jan 09 2016 05:53
yeah, I've had that happen
last time it happened, it was first day
Pete Schwamb
@ps2
Jan 09 2016 05:53
She’s in bed; might be various positions causing compression events.
Ben West
@bewest
Jan 09 2016 05:53
mine was in other direction
how old is sensor?
other times, especially on an aging sensor, I've seen it just drop off
sleeping/compression seems to compound the issue
Pete Schwamb
@ps2
Jan 09 2016 05:54
It’s been on 28 hours now.
Ben West
@bewest
Jan 09 2016 05:54
so first dayish
Dana Lewis
@danamlewis
Jan 09 2016 05:56
Yea. I've been soaking my sensor for a day before putting the good transmitter over on it. (Use a dead transmitter to protect sensor Til I swap)
Less nonsense since you cut out first day sensor jitters with the pre-soak
Pete Schwamb
@ps2
Jan 09 2016 06:01
Hmm, I know with medtronic they want a live transmitter on the sensor right away. I’m trying to find the link, but I believe (maybe I made this up) that it had something to do with the gox getting fouled up quicker when there was no electrical signal present.
dexcom uses gox too, so I wonder about that.
Dana Lewis
@danamlewis
Jan 09 2016 06:02
Oh are you using MDT sensor?
Pete Schwamb
@ps2
Jan 09 2016 06:02
No, not now.
We’ve been back & forth. For us, they’re pretty equal in quality when you can avoid their weak spots. They both have different weaknesses (medtronic susceptible to calibration algo issues, and dexcom seems to really need good hydration or we get ?? often).
Scott Leibrand
@scottleibrand
Jan 09 2016 06:05
-rw-r--r-- 1 pi pi 0 Dec 31 1969 pump.ini
Same problem @tzarro had.
Pete Schwamb
@ps2
Jan 09 2016 06:06
From this page: http://www.loop-blog.com/in-the-first-few-hours-of-a-new-sensor/ " If the sensor sits under your skin longer than five minutes without the transmitter attached, a chemical reaction can occur and hydrogen peroxide can build up around the sensor site, causing performance issues."
eyim
@eyim
Jan 09 2016 06:08
I've seen the pattern. Normally about when the sensor is about to go out. We have used his bottom exclusively since it had the most fat and he is very slim. And can only get maybe three days before we start seeing stuff like that. We just switched to his love handles and passed day seven. Maybe need to switch areas
Pete Schwamb
@ps2
Jan 09 2016 06:10
Hmm, same here. She only uses her backside, and is very slim.
Dana Lewis
@danamlewis
Jan 09 2016 06:12
I have issues with placing pump sites because of muscles, but have found sensors do a lot better in all areas of my body, even the muscular or slim parts. Makes a difference with the sensor being so thin compared to the pump sites.
Pete Schwamb
@ps2
Jan 09 2016 06:12
So GOX converts glucose to hydrogen peroxide which reacts with the platinum in the sensor and generates an electrical potential. Perhaps if the electrical potential isn’t aborbed, that the reaction with the platinum slows down?
Dana Lewis
@danamlewis
Jan 09 2016 06:13
Hm. And who knows what is really happening on a "dead" transmitter. Doesn't seem to impact negatively, though.
Jason Calabrese
@jasoncalabrese
Jan 09 2016 06:25
turning off usb to fix a dead carelink is bad when powering a pi zero via a hub is bad, causes everything to lose power
and a reboot
then git gets corrupted, then preflight fails and reboots again
Jason Calabrese
@jasoncalabrese
Jan 09 2016 06:35
no git didn't get corrupted, just wasn't able to use the carelink after the reboot without unplugging it
so it looks like usb reset doesn't help in that case at all
might be a limitation of using a hub
not sure about these pi zeros any more
Jason Calabrese
@jasoncalabrese
Jan 09 2016 07:51
I merged nightscout/cgm-remote-monitor#1456, that should prevent the treatment dupes we sometimes get when uploaded from openaps
Ben West
@bewest
Jan 09 2016 08:02
@scottleibrand your pump.ini got truncated?
interesting, @ps2 based on our walkthrough, and the calibration screens, I suspect they tune for that in factory hard to say
calibration screens I saw in manufacturing plant, that is
Jason Calabrese
@jasoncalabrese
Jan 09 2016 08:25
found a bug with nightscout/cgm-remote-monitor#1456, trying to fix...
it's loosing the zoning
Jason Calabrese
@jasoncalabrese
Jan 09 2016 09:04
fixed with nightscout/cgm-remote-monitor#1463
I can reproduce the failure locally
Jason Calabrese
@jasoncalabrese
Jan 09 2016 09:12
openaps/oref0#51 should fix it
Oskar Pearson
@oskarpearson
Jan 09 2016 18:05
Hey all - I wanted to show you Siobhan's new all-inclusive closed-loop device. Battery is built into the device, and there's no carelink stick or USB stick or similar. We've not timed battery life - but I'm hopeful it'll be at least 13 hours.
v3.jpg
Pete Schwamb
@ps2
Jan 09 2016 18:06
Slick!
I want to see it open. :)
Dana Lewis
@danamlewis
Jan 09 2016 18:06
Ditto :)
Milos Kozak
@MilosKozak
Jan 09 2016 18:06
hmmm blackbox :)
Oskar Pearson
@oskarpearson
Jan 09 2016 18:12
V3-inside.jpeg
Silver in the background is a lipo. The taped-up thing is a power switch
Radio is the Ciseco/Wirelessthings ERF
Dana Lewis
@danamlewis
Jan 09 2016 18:13
Does it do ok heat wise inside for that long?
Oskar Pearson
@oskarpearson
Jan 09 2016 18:13
We've had it inside a very similar box without any heat issues
We're going to have to see how that goes
It gets warm - but not obnoxiously warm
Gotta run for now - will post more details to the mmeowlink wiki soon!
Daniel Bjørnbakk
@danibjor
Jan 09 2016 18:14
nice and compact
Dana Lewis
@danamlewis
Jan 09 2016 18:15
:) Thx @oskarpearson
Jason Calabrese
@jasoncalabrese
Jan 09 2016 18:16
Have my Edison on the way, a little disappointed with the pi zeros
Oskar Pearson
@oskarpearson
Jan 09 2016 18:16
weight is 86 grams (3 oz)
eyim
@eyim
Jan 09 2016 18:18
Yep got my Edison on the way as well
Peter Miller
@ochenmiller
Jan 09 2016 19:13
Looks like plenty of room, could get even smaller!
Andrew Warrington
@andrew-warrington
Jan 09 2016 20:26
wow @oskarpearson. how does the battery get charged?
Oskar Pearson
@oskarpearson
Jan 09 2016 20:31
I managed to break my qi charger receiver in trying to solder it. So it's going to have to be cables for now.. Into the micro USB on the Edison board
Andrew Warrington
@andrew-warrington
Jan 09 2016 20:34
qi - cool! i was trying the same but could not get enough power to simultaneously run the Pi and charge the batt. but with the Edison I guess it's a whole new ballgame. looking forward to learning more once you write it up.
Oskar Pearson
@oskarpearson
Jan 09 2016 20:34
I'm going to try avoid cutting the hole if I can help it. Hopefully qi works as intended
Jason Calabrese
@jasoncalabrese
Jan 09 2016 20:37
qi would be slick, I got one but looks like it's beyond my soldering level
Andrew Warrington
@andrew-warrington
Jan 09 2016 20:40
actually I miswrote above, the situation in my case was a bit more dire than I let on (although to be fair my statement about enough power would have held true as well). I had connected up this QI receiver to my battery charging chip http://www.amazon.fr/gp/product/B00HQV5VO6, and although the QI base station indicated a link, I got nothing inbound. I came to think that it might require a special QI circuit in the battery charger.
but I dropped it almost immediately and didn't investigate too much further. might have been something as stupid as a poor connection.
Jason Calabrese
@jasoncalabrese
Jan 09 2016 20:57
ordered a few ERFs and more stuff
Ali Mazaheri
@amazaheri
Jan 09 2016 21:00
@oskarpearson mentioned something from Wirelessthings support saying ERF runs at 868.3Mhz by default, wondering if its a good option for us in US vs TI or what @TC2013 did with RL
I suspect it's done easier with the pure radio stuff at this point
Jason Calabrese
@jasoncalabrese
Jan 09 2016 21:04
I thought I read somewhere that it depended on where you ship it to, but could be thinking of something else
Ben West
@bewest
Jan 09 2016 21:05
you need 915 for US
868 is euro-style
Ali Mazaheri
@amazaheri
Jan 09 2016 21:07
correct
Jason Calabrese
@jasoncalabrese
Jan 09 2016 21:08
the TI stick has shipped, doesn't look like I can cancel the ERF order
Ali Mazaheri
@amazaheri
Jan 09 2016 21:09
Honestly based on what @TC2013 shared RL gives us the best range, @bewest how realistic is to have RL/BLE based on your efforts?
Oskar Pearson
@oskarpearson
Jan 09 2016 21:10
I chatted to the wireless things guys - they say they only manufacture one radio at the moment - and it's for eu use. However you can solder off the antenna connections and replace them with a whip antenna of the right length if it's actually a problem. They say the radio antenna should work for US frequencies too. Suspect it might be less effective though
Ali Mazaheri
@amazaheri
Jan 09 2016 21:11
@oskarpearson I noticed covering TI or even having pump inside a spibelt impacts the connectivity, what is your experience with new set up how far of distance
I can get easily 7 to 10m range when pump is not in spibelt, with that it easily reduces to 1 or 2m
JaysonEwer
@JaysonEwer
Jan 09 2016 21:56
Hello All, I finally made it! :-D I've received all my components, with the Carelink USB stick as the final item today. I've been a Type 1 diabetic since I was 10, 29 years so far. I started pumping about 10 years ago and heard from my Animus pump training that "they were about to close the loop..." :-D Skip forward 10ish years and #WEARENOTWAITING HAPPENED TO ME!! :-D I've got my Nightscout setup with the latest fix you all provided over Christmas. THANK YOU!! I think I prefer the azure site over the heroku.
I have a quick question I've got my raspberry pi setup, I'm talking to my Dexcom cgms, i'm about to start talking to my Medtronic 515, but I wanted to do a wee bit of cleanup with my Openaps environment first. So here is my first real question. :-) If I initialized once and then initialized again, what is the best method to remove the first initialized environment? Is it cool to just delete that first folder?
Dana Lewis
@danamlewis
Jan 09 2016 22:00
Welcome @JaysonEwer ! :)
Scott Leibrand
@scottleibrand
Jan 09 2016 22:00
Not sure what you mean by initialize, but yes, you can always delete (or mv) your folder and start over.
JaysonEwer
@JaysonEwer
Jan 09 2016 22:00
:-D Thank you, Dana. Ok, cool, that's what I thought. rm -r blah
Ben West
@bewest
Jan 09 2016 22:03
@JaysonEwer the init command create a new empty git repo, you can delete the directory
Ben West
@bewest
Jan 09 2016 22:08
or mv it to rename it
JaysonEwer
@JaysonEwer
Jan 09 2016 22:10
ok, next question. do I need to do anything to setup my carelink usb stick? Its plugged in and the system see's it
Ben West
@bewest
Jan 09 2016 22:10
you see medtronic in the list from lsusb?
try mm-stick diagnose
JaysonEwer
@JaysonEwer
Jan 09 2016 22:10
oh, nevermind, i got it
I'm talking to my pump, WOOHOO
:-D
Ben West
@bewest
Jan 09 2016 22:11
:-)
you can turn on the light by pressing the down key (remotely)
JaysonEwer
@JaysonEwer
Jan 09 2016 22:11
it came back with 515, but the next line came right after that and I missed 515
Dana Lewis
@danamlewis
Jan 09 2016 22:11
Woot!
JaysonEwer
@JaysonEwer
Jan 09 2016 22:12
I just issued the first command:
root@Ewer-Open-APS:~/my_openaps_je# openaps use jayson_pump model
"515"root@Ewer-Open-APS:~/my_openaps_je# lsusb
Bus 001 Device 007: ID 0a21:8001 Medtronic Physio Control Corp. MMT-7305WW [Medtronic Minimed CareLink]
Bus 001 Device 006: ID 22a3:0047
Ben West
@bewest
Jan 09 2016 22:12
nice
yeah the "515" is the response
JaysonEwer
@JaysonEwer
Jan 09 2016 22:12
and as I was reading the output of lsusb, I saw 515 hiding over there. :-D
Ben West
@bewest
Jan 09 2016 22:12
try getting some history
JaysonEwer
@JaysonEwer
Jan 09 2016 22:12
Ideally, I wouldn't be running as root, right?
Ben West
@bewest
Jan 09 2016 22:12
no, don't run as root
JaysonEwer
@JaysonEwer
Jan 09 2016 22:13
I did sudo su
Ben West
@bewest
Jan 09 2016 22:13
usually I login as pi
I do everything as normal user
JaysonEwer
@JaysonEwer
Jan 09 2016 22:13
ok let me back out and do that to make sure it still works
thanks
Ben West
@bewest
Jan 09 2016 22:13
the sudo openaps-install-udev-rules makes it so everything works as non-root
JaysonEwer
@JaysonEwer
Jan 09 2016 22:14
I'm not remembering if I did that yet, I started setting this up a week ago. I can just run that again, right?
Ben West
@bewest
Jan 09 2016 22:14
yes
it installs system wide rules no matter what, should make it so your normal user can use everything :-)
JaysonEwer
@JaysonEwer
Jan 09 2016 22:15
sweet, I do remember that now that you mention it.
I'm pretty sure I did that, i'll do it again to cover my bases
Ben West
@bewest
Jan 09 2016 22:16
my favorite way of checking the stick currently is mm-stick diagnose
just prints bunch of debug information and packet counters from the stick itself
no pump comms
JaysonEwer
@JaysonEwer
Jan 09 2016 22:16
cool, will try that in a sec
I think I may have found one permission it doesn't fix.
pi@Ewer-Open-APS:~ $ script /var/log/openaps-jaysonewer-01092016-2
script: cannot open /var/log/openaps-jaysonewer-01092016-2: Permission denied
Terminated
pi@Ewer-Open-APS:~ $
I just pre-pended it with sudo
we're good
Yeah, you weren't kidding about a bunch of debug info
:-D
It's quite the polite script, I like that.
Ben West
@bewest
Jan 09 2016 22:21
haha :-)
JaysonEwer
@JaysonEwer
Jan 09 2016 22:21
we were talking about getting some history
Ben West
@bewest
Jan 09 2016 22:21
hmm
sure
let's avoid sudo though
JaysonEwer
@JaysonEwer
Jan 09 2016 22:22
or should I just keep working through the docs. I really appreciate you all being online like this!!
Ben West
@bewest
Jan 09 2016 22:22
I'll help fix any permissions :-)
JaysonEwer
@JaysonEwer
Jan 09 2016 22:22
as far as creating that log file, perhaps I should just keep them in my pi home directory.
I guess that would fix that, right?
Ben West
@bewest
Jan 09 2016 22:22
I highly recommend using syslog
there's a tool called logger
which adds everything to system log
I vastly prefer that, no permissions issues to worry about
JaysonEwer
@JaysonEwer
Jan 09 2016 22:23
all my commands and output?
Ben West
@bewest
Jan 09 2016 22:23
usually doing stuff by hand, I don't worry about logging it very much
only when it's automated, then I want a log so I can watch what happened
openaps itself will log a bunch of info permanently for you :-)
which says, "One helpful thing to do before starting is to log your terminal session. This will allow you to go back and see what you did at a later date. This will also be immensely helpful if you request help from other OpenAPS contributors as you will be able to provide an entire history of the commands you used. To enable this, just run $ script <filename> at the beginning of your session. It will inform you that Script started, file is <filename>. When you are done, simply $ exit and it will announce Script done, file is <filename>. At that point, you can review the file as necessary."
Ben West
@bewest
Jan 09 2016 22:24
ah, ok
not bad, youc an fix permissions on that file
JaysonEwer
@JaysonEwer
Jan 09 2016 22:25
cool
duly noted
Ben West
@bewest
Jan 09 2016 22:25
sudo chown pi /var/log/openaps-jaysonewer-01092016-2
that tells the system make that file called /var/log/... to be owned by user pi
then you can run the script command again
JaysonEwer
@JaysonEwer
Jan 09 2016 22:27
nice, thank you...for now, i'm just going to log my sessions in my pi/Documents folder, it works
Ben West
@bewest
Jan 09 2016 22:28
yeah, that'll work too
in fact, the docs should probably recommend that instead :-)
JaysonEwer
@JaysonEwer
Jan 09 2016 22:31
yeah, you know I think I may need to re-install...I foolishly installed my openaps stuff as the root user, I logged into my pi as pi and then did sudo su and then cd and all my openaps stuff is hanging off there
root@Ewer-Open-APS:~/my_openaps_je# pwd
/root/my_openaps_je
I know its not cool and VERY DANGEROUS to do things as root, I think I was being lazy
Ben West
@bewest
Jan 09 2016 22:33
it's ok
hmmm
we can fix it easily
JaysonEwer
@JaysonEwer
Jan 09 2016 22:33
mv
Ben West
@bewest
Jan 09 2016 22:33
hmm, that's one way
I have another to try
will show how openaps works :-)
JaysonEwer
@JaysonEwer
Jan 09 2016 22:33
cool, thanks
Ben West
@bewest
Jan 09 2016 22:33
as your normal user, pi, do you have a place where openaps makes sense?
I use ~/Documents/openaps
so I do cd Documents; openaps init openaps
JaysonEwer
@JaysonEwer
Jan 09 2016 22:34
sure, that would work for me
Ben West
@bewest
Jan 09 2016 22:34
then cd openaps to get in the directory
now we can have fun using some of the features
first, let's change the permissions of the old one:
sudo chown -R pi /root/my_openaps_je
er
Mark Wilson
@mddub
Jan 09 2016 22:35
can someone point me to where (if anywhere) oref0 considers suspend/resume in iob?
Ben West
@bewest
Jan 09 2016 22:35
I don't think it does
Mark Wilson
@mddub
Jan 09 2016 22:35
Ben West
@bewest
Jan 09 2016 22:35
only Temp
Mark Wilson
@mddub
Jan 09 2016 22:36
what's the reasoning there?
Ben West
@bewest
Jan 09 2016 22:36
no good reason, it probably should
Mark Wilson
@mddub
Jan 09 2016 22:36
should i set a temp basal of 0 and disable the loop if i'm going to be disconnected for a nontrivial amount of time?
just wondering how others deal with it, if at all
Ben West
@bewest
Jan 09 2016 22:37
I think what dana does there is set temp to 0 and then suspend
openaps won't be able to cancel the temp
but it will notice you aren't getting insulin
need some code similar to bolus wizard coalescing
Mark Wilson
@mddub
Jan 09 2016 22:38
in this case my loop was high-temping but i wanted to take a shower

loopworldproblems

but for resume/suspend
Mark Wilson
@mddub
Jan 09 2016 22:38
it was very mildly above range, i didn't want to bolus, didn't want it to think it had all been delivered
Ben West
@bewest
Jan 09 2016 22:38
create a new TempBasal for a duration with a resume and suspend extra properties
same way it works for wizard bolus property and TempBasalDuration thingies
Dana Lewis
@danamlewis
Jan 09 2016 22:40
Correct @mddub , it doesn't recognize suspends. I temp to zero, suspend, and just resume and let it adjaut temp when I get out.
Ben West
@bewest
Jan 09 2016 22:40
@JaysonEwer did that turn out ok?
next, we can import most of the content from the old openaps
Dana Lewis
@danamlewis
Jan 09 2016 22:40
That way I cancel any current running temps so to your point it doesn't assume all delivered.
Ben West
@bewest
Jan 09 2016 22:41
git remote add backup /root/my_openaps_je; git pull backup master
then, lastly, cp /root/my_openaps_je/*.ini .
this should make your new openaps instance in Documents just like the old one
Mark Wilson
@mddub
Jan 09 2016 22:42
@danamlewis: thanks, that makes sense, i'll do that for now.
Ben West
@bewest
Jan 09 2016 22:42
you could have moved it also,
Mark Wilson
@mddub
Jan 09 2016 22:42
looks like it's not a simple fix to include suspends
can't just annotate temp basals with suspend/resume because what if multiple suspends and resumes
Dana Lewis
@danamlewis
Jan 09 2016 22:43
Might be good to note somewhere in docs about that, not sure if it's in there
Ben West
@bewest
Jan 09 2016 22:43
do they not come in pairs?
Mark Wilson
@mddub
Jan 09 2016 22:44
i was thinking i'd just splice the basal before/after the suspend to include a temp basal of 0
Ben West
@bewest
Jan 09 2016 22:44
I think they always come in pairs, suspend -> resume
notice, the bolus stepping/search thing will look configurable minutes for a matching wizard record
vice, versa I guess
Mark Wilson
@mddub
Jan 09 2016 22:44
bewest: yeah, they do, i thought you were suggesting adding a single suspend and resume property to temp basal entries
Ben West
@bewest
Jan 09 2016 22:45
so on NS/MM bolus, it has type: 'Meal Bolus', bolus: { ... }, wizard: { ... }
same with TempBasal, type: 'Temp Basal', raw_rate: { ... }, ...
Toby Canning
@TC2013
Jan 09 2016 22:46
@bewest Do you mind telling me how to upgrade to the latest decocare in OpenAPS?
sudo easy_install -ZU decocare for just decocare
I believe sudo easy_install -ZU openaps will do both
Toby Canning
@TC2013
Jan 09 2016 22:47
sweet, thanks!
Does that upgrade it to the version that fixes the error with CC111x sticks?
Ben West
@bewest
Jan 09 2016 22:49
hmmm which error?
it fixes the y2k error, for sure
Toby Canning
@TC2013
Jan 09 2016 22:50
Oskar said you included his PR that fixes occasional errors received when using the CC111x sticks (opposed to carelink)
Ben West
@bewest
Jan 09 2016 22:50
hmmm
hmmmm
Toby Canning
@TC2013
Jan 09 2016 22:50
He said v10 of decocare includes it
Ben West
@bewest
Jan 09 2016 22:50
dunno
ok, then yes
Toby Canning
@TC2013
Jan 09 2016 22:50
better question, how do I return the decocare version?
Ben West
@bewest
Jan 09 2016 22:51
someone should make a tool for that
Toby Canning
@TC2013
Jan 09 2016 22:51
HA, I'll start right away!
Ben West
@bewest
Jan 09 2016 22:51
:-)
so this is kind of hacky, but the way I do it is pydoc decocare
the FILE says: /usr/local/lib/python2.7/dist-packages/decocare-0.0.21-py2.7.egg/decocare/__init__.py
Toby Canning
@TC2013
Jan 09 2016 22:52
okay .21 is the latest not .10
Ben West
@bewest
Jan 09 2016 22:52
so I know that 0.0.21 is installed
or, is being used
well, I think 0.0.10 is latest for openaps
it had it dependencies bumped to depend on latest decocare
JaysonEwer
@JaysonEwer
Jan 09 2016 22:54
@bewest I'm sorry, I got pulled away to change my daughters diaper, then "time for dinner", I totally will be back in a bit. :-/
Ben West
@bewest
Jan 09 2016 22:54
:-)
dinner time with a 2 year old is an interesting experience
I always walk away dirtier than when I sat down
Scott Leibrand
@scottleibrand
Jan 09 2016 22:57
@mddub, @loudnate's mmhistorytools do a good job of dealing with suspends (generating a synthetic temp to zero for them if one doesn't exist, IIRC). We should do something similar in iob.js if we're not going to switch to Python, but haven't gotten around it it yet. Mostly because Dana's workaround works well.
Toby Canning
@TC2013
Jan 09 2016 22:58
Is there a way I can switch to the dev branch of openaps easily?
Jason Calabrese
@jasoncalabrese
Jan 09 2016 23:00
the source install method
or you can clone it
the script clones them all, so they are in sync
Toby Canning
@TC2013
Jan 09 2016 23:02
I was just worried I would over write something on my current setup, but it seems to have worked fine
Nathan Racklyeft
@loudnate
Jan 09 2016 23:11
@mddub sorry I missed your comment. I split TempBasal records into multiples with non-standard durations when interleaved with suspends.
When resolving that history to dosing types, the suspend/resume Windows become 0 U/hour doses.
When normalizing those doses against basal schedule, doses that cross schedule boundaries are split again, and given different amounts to reflect the change in baseline basal.
Tim Howard
@tghoward
Jan 09 2016 23:14
@bewest Back to figuring out the minimed errors. So, I can't find the file created with mm-send-comm.py tweak ReadHistoryData --page 0 --save
Nathan Racklyeft
@loudnate
Jan 09 2016 23:14
So there's lots of steps involved when determining normalized insulin delivery.
Tim Howard
@tghoward
Jan 09 2016 23:14
it doesn't created in the current dir
and i couldn't find it in the decocare folder?
that command does print data to screen (no hex). is that what is needed?
Nathan Racklyeft
@loudnate
Jan 09 2016 23:19
@tghoward did you run mm-send-comm.py --init sleep 0 first?
Ben West
@bewest
Jan 09 2016 23:21
no, it should be current directory
ls *.data
Tim Howard
@tghoward
Jan 09 2016 23:23
I did --init sleep, then these commands. Still nothing in the current dir. ??
pi@betacb ~/bcb-s $ mm-send-comm.py tweak ReadHistoryData --page 0 --save
## do stuff with an insulin pump over RF
using ` Namespace(autoinit=False, begin=None, bytesPerRecord=None, command='tweak', descr=None, dryrun=False, effectTime=None, end=None, init=False, maxRecords=None, name=None, no_postlude=False, no_prelude=False, no_rf_prelude=False, other='ReadHistoryData', page=0, params=None, port='', postfix=None, prefix=None, prefix_path='', save=True, saveall=False, serial='', session_life=10, verbose=None) `
```
CRITICAL:decocare.stick:FAILED TO DOWNLOAD ANYTHING, after 0  expected:64
ERROR:decocare.stick:ACK is zero bytes!
Traceback (most recent call last):
  File "/usr/local/bin/mm-send-comm.py", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/pi/src/decoding-carelink/bin/mm-send-comm.py", line 8, in <module>
    app.run(None)
  File "/home/pi/src/decoding-carelink/decocare/helpers/cli.py", line 113, in run
    self.prelude(args)
  File "/home/pi/src/decoding-carelink/decocare/helpers/cli.py", line 130, in prelude
    uart.open( )
  File "/home/pi/src/decoding-carelink/decocare/stick.py", line 869, in open
    log.info('%s' % self.product_info( ))
  File "/home/pi/src/decoding-carelink/decocare/stick.py", line 510, in product_info
    return self.query(ProductInfo)
  File "/home/pi/src/decoding-carelink/decocare/stick.py", line 504, in query
    return self.process( )
  File "/home/pi/src/decoding-carelink/decocare/stick.py", line 491, in process
    ack, response = self.command.respond(raw)
  File "/home/pi/src/decoding-carelink/decocare/stick.py", line 66, in respond
    raise AckError("ACK is 0 bytes:\n%s" % lib.hexdump(raw))
decocare.errors.AckError: ACK is 0 bytes:

pi@betacb ~/bcb-s $ ls
determine-basal.ini  fixglucose.ini   glutools.ini  latest-treatments.ini  meal.ini    monitor  openaps.ini  pump723.ini  tz.ini
enact                get-profile.ini  iob.ini       max_iob.json           model.json  ns       oref0.ini    settings     upload
pi@betacb ~/bcb-s $ ls *.data
ls: cannot access *.data: No such file or directory
pi@betacb ~/bcb-s $
Ben West
@bewest
Jan 09 2016 23:24
ah, need --serial`
or export SERIAL=123456
it'll read the environment variable
mm-* tools are like curl, they don't read any state data from files or anything
lot of what openaps does is read basic config from INI file, like what the serial number is, state of current session
Tim Howard
@tghoward
Jan 09 2016 23:26
excellent! export SERIAL did it. I've got an output file
So, I'm thinking I'll run a whole mess of pages.
I'm not sure how I know when I get to the page needed to debug the problem.
Ben West
@bewest
Jan 09 2016 23:27
for x in $(seq 1 32) ; do echo $x; done :-)
for x in $(seq 1 32) ; do echo --save --page $x; done
JaysonEwer
@JaysonEwer
Jan 09 2016 23:28
@bewest Ok, i'm back, sorry about the delay, let me double check that command you sent me.
root@Ewer-Open-APS:~/my_openaps_je# ls -alh
total 24K
drwxr-xr-x 3 pi root 4.0K Jan 9 17:04 .
drwx------ 19 root root 4.0K Jan 9 17:01 ..
-rw-r--r-- 1 pi root 36 Jan 1 15:02 cgms.ini
drwxr-xr-x 8 pi root 4.0K Jan 9 17:10 .git
-rw-r--r-- 1 pi root 89 Jan 9 17:10 jayson_pump.ini
-rw-r--r-- 1 pi root 149 Jan 9 17:10 openaps.ini
yep, it changed the ownership of the files.
Tim Howard
@tghoward
Jan 09 2016 23:28
@bewest OK! on it with the loop. Will report back in a bit
JaysonEwer
@JaysonEwer
Jan 09 2016 23:29
@bewest Thanks for the git commands, issuing them now.
Ben West
@bewest
Jan 09 2016 23:31
that pull command might drop you into text editor and ask you save a message
@tghoward looking at that closer, try mm-stick diagnose next time that happens to ensure stick itself is ok
JaysonEwer
@JaysonEwer
Jan 09 2016 23:50

@bewest I got the following error message when issuing the git commands: '''pi@Ewer-Open-APS:~/Documents $ cd openaps/
pi@Ewer-Open-APS:~/Documents/openaps $ git remote add backup /root/my_openaps_je
pi@Ewer-Open-APS:~/Documents/openaps $ git pull backup master
fatal: '/root/my_openaps_je' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
pi@Ewer-Open-APS:~/Documents/openaps $ '''